Saturday, 26 October 2013

ROUTE-REFLECTOR NOT CHANGING NEXT HOP OF IBGP ROUTES WITH NEXT-HOP- SELF COMMAND

While I am preparing for CCIE, I come across this. Please read on...

  Diagram


R1      <---------------------->    SW1   <------------------------>   R2

R1  Configuration


interface Loopback0
 ip address 18.1.1.1 255.255.255.255

interface Ethernet0/0
 ip address 10.8.18.1 255.255.255.0

router bgp 100
 bgp router-id 1.1.1.1
 bgp log-neighbor-changes
 network 18.1.1.1 mask 255.255.255.255
 neighbor 10.8.18.6 remote-as 100



R2  Configuration


interface Loopback0
 ip address 18.2.2.2 255.255.255.255

interface Ethernet0/0
 ip address 10.8.28.2 255.255.255.0

router bgp 100
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 network 18.2.2.2 mask 255.255.255.255
 neighbor 10.8.28.6 remote-as 100


SW1  Configuration

interface Loopback0
 ip address 18.6.6.6 255.255.255.255

!         
interface Ethernet0/1
 switchport access vlan 100  switchport mode access
 duplex auto
!
interface Ethernet0/2
 switchport access vlan 200
 switchport mode access
 duplex auto

interface Vlan100
 ip address 10.8.18.6 255.255.255.0
!
interface Vlan200
 ip address 10.8.28.6 255.255.255.0

router bgp 100
 bgp router-id 6.6.6.6
 bgp log-neighbor-changes
 network 18.6.6.6 mask 255.255.255.255
 neighbor 10.8.18.1 remote-as 100
 neighbor 10.8.18.1 route-reflector-client
 neighbor 10.8.18.1 next-hop-self
 neighbor 10.8.28.2 remote-as 100
 neighbor 10.8.28.2 route-reflector-client
 neighbor 10.8.28.2 next-hop-self


Result

Rack8R1#sh ip route bgp

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      18.0.0.0/32 is subnetted, 2 subnets
B        18.6.6.6 [200/0] via 10.8.18.6, 00:09:21

Rack8R1#sh ip bgp

BGP table version is 7, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found 
     Network          Next Hop            Metric LocPrf Weight Path
 *>  18.1.1.1/32      0.0.0.0                  0         32768 i
 * i 18.2.2.2/32      10.8.28.2                0    100      0 i
 *>i 18.6.6.6/32      10.8.18.6                0    100      0 i

Rack8R1#sh ip bgp 18.2.2.2

BGP routing table entry for 18.2.2.2/32, version 0
Paths: (1 available, no best path)
  Not advertised to any peer
  Refresh Epoch 1
  Local
    10.8.28.2 (inaccessible) from 10.8.18.6 (6.6.6.6)
      Origin IGP, metric 0, localpref 100, valid, internal
      Originator: 2.2.2.2, Cluster list: 6.6.6.6