The BGP Support for Fast Peering Session Deactivation feature introduces an event driven notification

system that allows a Border Gateway Protocol (BGP) process to monitor BGP peering sessions on a
per-neighbor basis.

This feature improves the response time of BGP to adjacency changes by allowing :

BGP to detect an adjacency change and deactivate the terminated session in between standard
BGP scanning intervals. Enabling this feature improves overall BGP convergence.

Restrictions for BGP Support for Fast Peering Session Deactivation :

• This feature is not supported under the IPv6 address family.
• A host route must be available for each peering session that is configured to use BGP fast session
deactivation. If a route is aggregated or is an unreachable non-host route (through a loopback interface)
but still available to the peer, this feature will not be able to track the route and will be unable to close the session.

Information About BGP Support for Fast Peering Session Deactivation

•BGP Hold Timer
•BGP Fast Peering Session Deactivation

BGP Hold Timer

By default, the BGP hold timer is set to run every 180 seconds in Cisco IOS software.
This timer value is set as default to protect the BGP routing process from instability that can be
introduced by peering sessions with other routing protocols. BGP routers typically carry large routing tables,
so frequent session resets are not desirable.

BGP Fast Peering Session Deactivation

BGP fast peering session deactivation improves BGP convergence and response time to adjacency
changes with BGP neighbors. This feature is event driven and configured on a per-neighbor basis.
When this feature is enabled, BGP will monitor the peering session with the specified neighbor.
Adjacency changes are detected and terminated peering sessions are deactivated in between the default
or configured BGP scanning interval.

How to Configure Fast Peering Session Deactivation

This section contains the following task:

•Configuring Fast Session Deactivation for a BGP Neighbor

The neighbor fall-over command was introduced to support BGP fast session deactivation.

SHUT DOWN BGP SESSION BASED ON TRACKED OBJECT

I used a creative approach to create a static route that fits the requirements of the
Fast Peering Deactivation:
a host route toward the BGP next hop pointing at BGP next hop.

Let’s walk through a lab-tested example:

The router is running BGP in AS#65100 and has an EBGP session with 10.0.7.10 in AS#65000:

router bgp 65100
bgp log-neighbor-changes
network 10.0.1.1 mask 255.255.255.255
neighbor 10.0.7.10 remote-as 65000

First we have to create the track object that will cause the BGP session termination. It can track
anything – you can track interface state, use IP SLA and ping the firewall, or even use EEM to
trigger time-based  (or other event-based) session shutdown. I decided to track the state of the LAN interface.
!
track 10 interface FastEthernet0/0 ip routing
carrier-delay

Next, create a host route for the BGP next hop pointing to the next hop itself.
If you use a PPP interface to connect to the BGP next hop, make sure you disable
peer neighbor-route, otherwise the router creates a competing host route for the BGP next hop.

ip route 10.0.7.10 255.255.255.255 Serial1/0 10.0.7.10 track 10
!
interface Serial1/0
description Link to AS65000
ip address 10.0.7.9 255.255.255.252
encapsulation ppp
no peer neighbor-route

We need a prefix-list and a route-map to match the host route toward the BGP next hop:

ip prefix-list BGP_OK seq 5 permit 10.0.7.10/32
!
route-map BGP_OK permit 10
match ip address prefix-list BGP_OK
!
And finally, we can configure the fast BGP session deactivation on the EBGP session:

router bgp 65100
neighbor 10.0.7.10 fall-over route-map BGP_OK

Test#1 – shut down the LAN interface. BGP session is shut down almost immediately
(you can fine-tune the delay with track object parameters).

A1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
A1(config)#int fa 0/0
A1(config-if)#shut
A1(config-if)#
15:27:55.719: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to
administratively down
15:27:56.383: %TRACKING-5-STATE: 10 interface Fa0/0 ip routing Up->Down
15:27:56.415: %BGP-5-ADJCHANGE: neighbor 10.0.7.10 Down Route to peer lost
15:27:56.415: %BGP_SESSION-5-ADJCHANGE: neighbor 10.0.7.10 IPv4 Unicast
topology base removed from session Route to peer lost
15:27:56.719: %LINEPROTO-5-UPDOWN: Line protocol on Interface
FastEthernet0/0, changed state to down

Test#2 – re-enable the LAN interface. BGP session is reestablished in less than a second. Perfect 😉

A1(config-if)#no shut
A1(config-if)#
15:29:22.211: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
15:29:22.395: %TRACKING-5-STATE: 10 interface Fa0/0 ip routing Down->Up
15:29:22.511: %BGP-5-ADJCHANGE: neighbor 10.0.7.10 Up
15:29:23.211: %LINEPROTO-5-UPDOWN: Line protocol on Interface
FastEthernet0/0, changed state to up

 

In Summary :

router bgp 65100
bgp log-neighbor-changes
network 10.0.1.1 mask 255.255.255.255
neighbor 10.0.7.10 remote-as 65000
!
 track 10 interface FastEthernet0/0 ip routing
carrier-delay
!
ip route 10.0.7.10 255.255.255.255 Serial1/0 10.0.7.10 track 10
!
interface Serial1/0
no peer neighbor-route
! 
 ip prefix-list BGP_OK seq 5 permit 10.0.7.10/32
!
route-map BGP_OK permit 10
match ip address prefix-list BGP_OK
!
router bgp 65100
neighbor 10.0.7.10 fall-over route-map BGP_OK