Tuesday, November 30, 2010

Passing BGP Updates Through Network of Non-BGP Speakers - How Cool is that ?

In my last post  - http://deepakarora1984.blogspot.com/2010/11/transiting-non-bgp-speaking-devices.html

I presented a scenario in which we need to pass BGP updates between two AS through a Transit AS. But in Transit AS some of the devices were not BGP capable devices for say. So what we gonna do now ?


Redistribution of BGP routes into IGP could be another Idea, but in real world we usually avoid such things.


Hmmm....so what else we can try ?


Lets first setup the network and see what can be done a little later.
 Physical Topology






Logical Topology



Lets get started:



### R1 ###

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#no ip do lo
Router(config)#line con 0
Router(config-line)#no exec-time
Router(config-line)#exit
Router(config)#ho R1
R1(config)#int lo0
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config-if)#exit
R1(config)#int f0/0
R1(config-if)#ip add 12.12.12.1 255.255.255.0 
R1(config-if)#no sh
R1(config-if)#exit
R1(config)#int f0/1
R1(config-if)#ip add 51.51.51.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#exit 
R1(config)#ip route 5.5.5.5 255.255.255.255 f0/1 51.51.51.5
R1(config)#router eigrp 100
R1(config-router)#no au
R1(config-router)#net 1.1.1.1 0.0.0.0
R1(config-router)#net 12.12.12.1 0.0.0.0
R1(config-router)#exit
R1(config)#router bgp 123
R1(config-router)#no au
R1(config-router)#no sync
R1(config-router)#nei 5.5.5.5 remote 15
R1(config-router)#nei 5.5.5.5 update lo0
R1(config-router)#nei 5.5.5.5 ebgp      
R1(config-router)#nei 3.3.3.3 remote 123
R1(config-router)#nei 3.3.3.3 update lo0
R1(config-router)#nei 3.3.3.3 next-hop-self
R1(config-router)#exit     

=============================================================
### R2 ###

Router>en
Router#conf
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ho R2
R2(config)#no ip do lo
R2(config)#line con 0
R2(config-line)#no exec-time
R2(config-line)#exit
R2(config)#int f0/0
R2(config-if)#ip add 12.12.12.2 255.255.255.0
R2(config-if)#no sh 
R2(config-if)#exit
R2(config)#int f0/1
R2(config-if)#ip add 23.23.23.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#router eigrp 100
R2(config-router)#no au
R2(config-router)#net 0.0.0.0
R2(config-router)#exit

=============================================================


### R3 ###

Router>en
Router#conf
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ho R3
R3(config)#no ip do lo
R3(config)#line con 0
R3(config-line)#no exec-time
R3(config-line)#exit
R3(config)#int lo0
R3(config-if)#ip add 3.3.3.3 255.255.255.255 
R3(config-if)#exit
R3(config)#int f0/0
R3(config-if)#ip add 23.23.23.3 255.255.255.0 
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#int f0/1
R3(config-if)#ip add 43.43.43.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#exit
R3(config)#ip route 4.4.4.4 255.255.255.255 f0/1 43.43.43.4
R3(config)#router eigrp 100
R3(config-router)#no au
R3(config-router)#net 3.3.3.3 0.0.0.0
R3(config-router)#net 23.23.23.3 0.0.0.0
R3(config-router)#exit
R3(config)#router bgp 123
R3(config-router)#no au
R3(config-router)#no sync
R3(config-router)#nei 4.4.4.4 remote 34
R3(config-router)#nei 4.4.4.4 update lo0
R3(config-router)#nei 4.4.4.4 ebgp      
R3(config-router)#nei 1.1.1.1 remote 123
R3(config-router)#nei 1.1.1.1 update lo0
R3(config-router)#nei 1.1.1.1 next-hop-self
R3(config-router)#exit
==============================================================

### R4 ####

Router>en
Router#conf
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ho R4
R4(config)#no ip do lo
R4(config)#line con 0
R4(config-line)#no exec-time
R4(config-line)#exit
R4(config)#int lo0
R4(config-if)#ip add 4.4.4.4 255.255.255.255
R4(config-if)#exit
R4(config)#int lo1
R4(config-if)#ip add 44.44.44.44 255.255.255.255
R4(config-if)#exit
R4(config)#int f0/0
R4(config-if)#ip add 43.43.43.4 255.255.255.0
R4(config-if)#no sh
R4(config-if)#exit
R4(config)#ip route 3.3.3.3 255.255.255.255 f0/0 43.43.43.3
R4(config)#router bgp 34
R4(config-router)#no au
R4(config-router)#no sync
R4(config-router)#nei 3.3.3.3 remote 123
R4(config-router)#nei 3.3.3.3 update lo0
R4(config-router)#nei 3.3.3.3 ebgp      
R4(config-router)#net 44.44.44.44 mask 255.255.255.255
R4(config-router)#exit
========================================================

### R5 ###

Router>en
Router#conf
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ho R5
R5(config)#no ip do lo
R5(config)#line con 0
R5(config-line)#no exec-time
R5(config-line)#exit
R5(config)#int lo0
R5(config-if)#ip add 5.5.5.5 255.255.255.255
R5(config-if)#exit
R5(config)#int lo1
R5(config-if)#ip add 5.5.5.5 255.255.255.255
R5(config-if)#exit
R5(config)#int lo1
R5(config-if)#ip add 55.55.55.55 255.255.255.255
R5(config-if)#exit
R5(config)#int f0/0 
R5(config-if)#ip add 51.51.51.5 255.255.255.0  
R5(config-if)#no sh
R5(config-if)#exit 
R5(config)#ip route 1.1.1.1 255.255.255.255 f0/0 51.51.51.1
R5(config)#router bgp 15
R5(config-router)#no au
R5(config-router)#no sync
R5(config-router)#nei 1.1.1.1 remote 123
R5(config-router)#nei 1.1.1.1 update lo0
R5(config-router)#nei 1.1.1.1 ebgp
R5(config-router)#net 55.55.55.55 mask 255.255.255.255
R5(config-router)#exit
================================================================



R1(config)#do sh ip bgp | b Net       
   Network          Next Hop            Metric LocPrf Weight Path
*>i44.44.44.44/32   3.3.3.3                  0    100      0        34 i
*> 55.55.55.55/32   5.5.5.5                  0               0        15 i




R5(config)#do sh ip bgp | b Net
   Network          Next Hop            Metric LocPrf Weight Path
*> 44.44.44.44/32   1.1.1.1                                0 123     34 i
*> 55.55.55.55/32   0.0.0.0                  0         32768            i

Hmmm...so far everything looks good. Lets trace R4's Lo1 from R5

R5(config)#do trace 44.44.44.44 so lo1

Type escape sequence to abort.
Tracing the route to 44.44.44.44

  1 51.51.51.1 4 msec 12 msec 8 msec
  2  *  *  * 
  3  *  *  * 

Hmmm...Things doesn't look quite working yet.

Lets hop on to R2 and check it's routing table:

R2(config)#do sh ip ro | b ^G
Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
D       1.1.1.1 [90/409600] via 12.12.12.1, 01:47:22, FastEthernet0/0
     3.0.0.0/32 is subnetted, 1 subnets
D       3.3.3.3 [90/409600] via 23.23.23.3, 01:43:41, FastEthernet0/1
     23.0.0.0/24 is subnetted, 1 subnets
C       23.23.23.0 is directly connected, FastEthernet0/1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.12.12.0 is directly connected, FastEthernet0/0

so here is the problem. R2 has no knowledge about who is 44.44.44.44, so when it receive packets destined for 44.44.44.44; it checks its local routing table and as it doesn't find any entry in there it simply drops the packets. One work around could be redistributing BGP into EIGRP but thats restricted here. So what else ?

Hmmm...how about our old friend tunnels ? :-)


Okay... I am certainly not a patient of Tarsal Tunnel Syndrome :-P 

But lets see how we can fix this with tunnels.

R1(config)#int tu13
R1(config-if)#ip add 13.13.13.1 255.255.255.0
R1(config-if)#tu so f0/0
R1(config-if)#tu dest 23.23.23.3
R1(config-if)#exit


R3(config)#int tu 13
R3(config-if)#ip add 13.13.13.3 255.255.255.0
R3(config-if)#tu so f0/0
R3(config-if)#tu dest 12.12.12.1
R3(config-if)#exit

*Mar  1 01:48:46.071: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel13, changed state to up


R1(config)#router bgp 123
R1(config-router)#nei 13.13.13.3 remote 123
R1(config-router)#nei 13.13.13.3 update tu13
R1(config-router)#nei 13.13.13.3 next-hop-s
R1(config-router)#exit


R3(config)#router bgp 123
R3(config-router)#nei 13.13.13.1 remote 123
R3(config-router)#nei 13.13.13.1 update tu13
R3(config-router)#nei 13.13.13.1 next-hop-s
R3(config-router)#exit

*Mar  1 01:53:16.167: %BGP-5-ADJCHANGE: neighbor 13.13.13.1 Up 


R5(config)#do trace 44.44.44.44 so lo1

Type escape sequence to abort.
Tracing the route to 44.44.44.44

  1 51.51.51.1 4 msec 12 msec 8 msec
  2 13.13.13.3 24 msec 16 msec 16 msec
  3 43.43.43.4 52 msec *  24 msec


R4(config)#do trace 55.55.55.55 so lo1

Type escape sequence to abort.
Tracing the route to 55.55.55.55

  1 43.43.43.3 8 msec 12 msec 8 msec
  2 13.13.13.1 16 msec 20 msec 20 msec
  3 51.51.51.5 24 msec *  64 msec


R4(config)#do ping 55.55.55.55 so lo1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 55.55.55.55, timeout is 2 seconds:
Packet sent with a source address of 44.44.44.44 
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/42/60 ms




HTH...
Deepak Arora

No comments: