By: Sajid Ali Pathan
This is quite new think that we have ever done with
BGP. In a BGP dual multi-home scenario we configured "Selective
Route Tracking" with "neighbor
fall-over" command under BGP process. Actually we
were facing some kind of unusual issue during internet outage from primary ISP.
We lost internet connectivity but local peering with ISP remains up.
“When
you configured Neighbor fall-over command under BGP process, it
monitors RIB and if route to peer is not present in routing table it will
immediately deactivate peer session without waiting for hold down timer.”
First thing first, Configured an object that track
BGP-received-route, in our case this was a route that ISP receives from
upstream provider and advertise to downstream (Remember that
I didn't track default route).
RTR-1(config)# track 10 ip route 221.120.x.x 255.255.255.255 reachability
RTR-1#sh track 10
Track 10
IP route 221.120.x.x 255.255.255.255 reachability
Reachability is Up (BGP)
2 changes, last change 00:00:16
Delay up 2 secs, down 2 secs
First-hop interface is FastEthernet3/0
Tracked by:
STATIC-IP-ROUTING 0
Next, create a host route for the BGP next hop
pointing to the next hop itself.
RTR-1(config)# ip route 192.168.x.113 255.255.255.255 FastEthernet3/0 track 10
Above mentioned route will remove from routing table when track 10 returns
false value.
Current output of “sh ip route” command:
192.168.x.0/24 is variably subnetted, 3 subnets, 2 masks
C 192.168.x.112/30 is directly connected, FastEthernet3/0
S 192.168.x.113/32 is directly connected, FastEthernet3/0
L 192.168.x.114/32 is directly connected, FastEthernet3/0
Now,
configure prefix-list matches exactly neighbor IP
Address and then apply it in route-map and attached
in "neighbor
fall-over" command.
RTR-1(config)# ip prefix-list LPB seq 5 permit 192.168.x.113/32
!
RTR-1(config)# route-map Edge_R permit 10
RTR-1(config -route-map)# match ip address prefix-list LPB
!
RTR-1(config)# router bgp 12345
RTR-1(config-router)# neighbor 192.168.x.113 fall-over route-map Edge_R
Below logs appears on console when BGP receive route
remove from BGP RIB:
*May 9 10:55:18.643: %TRACKING-5-STATE: 10 ip route 221.120.x.x/32 reachability Up->Down
*May 9 10:55:18.683: %BGP-5-ADJCHANGE: neighbor 192.168.x.113 Down Route to peer lost
*May 9 10:55:18.683: %BGP_SESSION-5-ADJCHANGE: neighbor 192.168.x.113 IPv4 Unicast topology base removed from session Route to peer lost
Now look, “sh ip route”
command output:
192.168.x.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.x.112/30 is directly connected, FastEthernet3/0
L 192.168.x.114/32 is directly connected, FastEthernet3/0
Static route to peer removed from routing table.
No comments:
Post a Comment