06 July, 2013

BGP NEXT HOP SELF




BGP NEXT HOP SELF


SCENARIO:

As a junior networking engineer you were always fascinated with science fiction movies, that's why you are now working at a company specialized in special effects. The closest you got to light speed was sending bits and bytes with electricity through wires...nevertheless there is a task waiting for you. You need to configure BGP between your network (AS100) and the service provider (AS200). Setting up BGP was no problem for you, but users behind router BCN are complaining they can't access networks in AS 200. Time for you to solve this problem...you feel the force is strong within you so this should be a piece of cake!

GOAL:

  • All IP addresses have been preconfigured as specified in the topology picture.
  • Configure IBGP between router MDR and BCN, use AS 100, use the loopback0 interfaces as source for BGP.
  • Configure EBGP between router MDR and VAL.
  • Ensure both BGP neighbor relationships are up.
  • Router MDR: Advertise the 10.10.12.0/24 network into BGP.
  • Router VAL: Advertise the 3.3.3.0 /24 on the loopback interface into BGP.
  • Ensure you can ping this network from router MDR.
  • Try to ping this network from router BCN, why does this fail?
  • Fix this problem by using a BGP command on router MDR. You are not allowed to advertise the 10.10.13.X network in BGP.
BCN#configure terminal
BCN(config)#interface lo 0
BCN(config-if)#ip address 2.2.2.2 255.255.255.0
BCN(config-if)#interface fa 0/0
BCN(config-if)#ip address 10.10.12.2 255.255.255.0
BCN(config-if)#no shutdown

BCN(config)#ip route 1.1.1.0 255.255.255.0 10.10.12.1

BCN(config-if)#router bgp 100
BCN(config-router)#neighbor 1.1.1.1 remote-as 100
BCN(config-router)#neighbor 1.1.1.1 update-source loopback 0

MDR#configure terminal
MDR(config)#interface fastEthernet 0/0
MDR(config-if)#ip address 10.10.12.1 255.255.255.0
MDR(config-if)#no shutdown
MDR(config-if)#interface se 0/0
MDR(config-if)#ip address 10.10.13.1 255.255.255.0
MDR(config-if)#no shutdown
MDR(config-if)#interface lo 0
MDR(config-if)#ip address 1.1.1.1 255.255.255.0
MDR(config-if)#router bgp 100
MDR(config-if)#exit

MDR(config)#ip route 2.2.2.0 255.255.255.0 10.10.12.2
MDR(config)#ip route 3.3.3.0 255.255.255.0 10.10.13.3

MDR(config-router)#neighbor 2.2.2.2 remote-as 100
MDR(config-router)#neighbor 2.2.2.2 update-source loopback 0

MDR(config-router)#neighbor 3.3.3.3 remote-as 200
MDR(config-router)#neighbor 3.3.3.3 update-source loopback 0
MDR(config-router)#neighbor 3.3.3.3 ebgp-multihop 2

MDR(config-router)#network 10.10.12.0 mask 255.255.255.0

VAL#configure terminal
VAL(config)#interface lo 0
VAL(config-if)#ip address 3.3.3.3 255.255.255.0
VAL(config-if)#interface se0/0
VAL(config-if)#ip address 10.10.13.3 255.255.255.0
VAL(config-if)#no shutdown

VAL(config)#ip route 1.1.1.0 255.255.255.0 10.10.13.1

VAL(config-if)#router bgp 200
VAL(config-router)#neighbor 1.1.1.1 remote-as 100
VAL(config-router)#neighbor 1.1.1.1 update-source loopback 0
VAL(config-router)#neighbor 1.1.1.1 ebgp-multihop 2

VAL(config-router)#network 3.3.3.0 mask 255.255.255.0

BCN#show ip bgp
BGP table version is 3, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
* i3.3.3.0/24       3.3.3.3                  0    100      0 200 i
r>i10.10.12.0/24    1.1.1.1                  0    100      0 i

BCN#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

To Fix This We Need To Advertise Network 3.3.3.3 To Router BCN Or
Configure Next-Hop-Self Command On MDR.

MDR(config-router)#neighbor 2.2.2.2 next-hop-self

Verify:

BCN#show ip bgp
BGP table version is 4, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*>i3.3.3.0/24       1.1.1.1                  0    100      0 200 i
r>i10.10.12.0/24    1.1.1.1                  0    100      0 i

BCN#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/28/56 ms

BCN#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/24/40 ms

##########################################################################################################