{"id":3522,"date":"2012-02-08T16:28:39","date_gmt":"2012-02-08T16:28:39","guid":{"rendered":"http:\/\/www.wikisee.info\/?p=3522"},"modified":"2016-08-09T12:07:30","modified_gmt":"2016-08-09T12:07:30","slug":"bgp-support-for-fast-peering-session-deactivation","status":"publish","type":"post","link":"https:\/\/wiki-see.info\/wp\/2012\/02\/08\/bgp-support-for-fast-peering-session-deactivation\/","title":{"rendered":"BGP Support for Fast Peering Session Deactivation"},"content":{"rendered":"<p><span style=\"color: #000000;\"><br \/>\nThe <span style=\"color: #800000;\">BGP<\/span> Support for Fast Peering Session Deactivation feature introduces an event driven notification <\/span><br \/>\n<span style=\"color: #000000;\">system that allows a Border Gateway Protocol (<span style=\"color: #800000;\">BGP<\/span>) process to monitor <span style=\"color: #800000;\">BGP<\/span> peering sessions on a <\/span><br \/>\n<span style=\"color: #000000;\">per-neighbor basis. <\/span><\/p>\n<p><span style=\"color: #000000;\">This feature improves the response time of <span style=\"color: #800000;\">BGP<\/span> to adjacency changes by allowing :<\/span><\/p>\n<p><span style=\"color: #000000;\"><span style=\"color: #800000;\">BGP<\/span> to detect an adjacency change and deactivate the terminated session in between standard <\/span><br \/>\n<span style=\"color: #000000;\"><span style=\"color: #800000;\">BGP<\/span> scanning intervals. <span style=\"color: #000080;\">Enabling this feature improves overall BGP convergence<\/span>.<\/span><\/p>\n<p><span style=\"color: #800000;\">Restrictions for BGP Support for Fast Peering Session Deactivation <span style=\"color: #000000;\">:<\/span><\/span><\/p>\n<p><span style=\"color: #000000;\">\u2022 This feature is not supported under the IPv6 address family.<\/span><br \/>\n<span style=\"color: #000000;\">\u2022 A host route must be available for each peering session that is configured to use BGP fast session <\/span><br \/>\n<span style=\"color: #000000;\">deactivation. If a route is aggregated or is an unreachable non-host route (through a loopback interface) <\/span><br \/>\n<span style=\"color: #000000;\">but still available to the peer, this feature will not be able to track the route and will be unable to close the session.<\/span><\/p>\n<p><span style=\"color: #800000;\">Information About BGP Support for Fast Peering Session Deactivation<\/span><\/p>\n<p><span style=\"color: #000000;\">\u2022BGP Hold Timer<\/span><br \/>\n\u2022<span style=\"color: #000000;\">BGP Fast Peering Session Deactivation<\/span><\/p>\n<p><span style=\"color: #000080;\">BGP Hold Timer<\/span><\/p>\n<p><span style=\"color: #000000;\">By default, the<\/span> <span style=\"color: #800000;\">BGP<\/span> <span style=\"color: #000000;\">hold timer is set to run every 180 seconds in Cisco IOS software. <\/span><br \/>\n<span style=\"color: #000000;\">This timer value is set as default to protect the<\/span> <span style=\"color: #800000;\">BGP<\/span><span style=\"color: #000000;\"> routing process from instability that can be <\/span><br \/>\n<span style=\"color: #000000;\">introduced by peering sessions with other routing protocols<\/span>. <span style=\"color: #800000;\">BGP<\/span><span style=\"color: #000000;\"> routers typically carry large routing tables, <\/span><br \/>\n<span style=\"color: #000000;\">so frequent session resets are not desirable.<\/span><\/p>\n<p><span style=\"color: #800000;\">BGP Fast Peering Session Deactivation<\/span><\/p>\n<p><span style=\"color: #800000;\">BGP<\/span> <span style=\"color: #000000;\">fast peering session deactivation improves BGP convergence and response time to adjacency<br \/>\nchanges with BGP neighbors. This feature is event driven and configured on a per-neighbor basis.<br \/>\nWhen this feature is enabled,<span style=\"color: #800000;\"> BGP<\/span> will monitor the peering session with the specified neighbor.<br \/>\nAdjacency changes are detected and terminated peering sessions are deactivated in between the default<br \/>\nor configured BGP scanning interval.<\/span><\/p>\n<p><span style=\"color: #800000;\">How to Configure Fast Peering Session Deactivation<\/span><\/p>\n<p><span style=\"color: #000000;\">This section contains the following task<\/span>:<\/p>\n<p>\u2022<span style=\"color: #000080;\">Configuring Fast Session Deactivation for a BGP Neighbor<\/span><\/p>\n<p><span style=\"color: #000000;\">The<\/span> <em><span style=\"color: #000000;\">neighbor fall-over<\/span><\/em> <span style=\"color: #000000;\">command was introduced to support BGP fast session deactivation.<\/span><\/p>\n<p><span style=\"color: #000080;\">SHUT DOWN BGP SESSION BASED ON TRACKED OBJECT<\/span><\/p>\n<p><span style=\"color: #000000;\">I used a creative approach to create a static route that fits the requirements of the<br \/>\n<span style=\"color: #000080;\">Fast Peering Deactivation: <\/span><\/span><span style=\"color: #000000;\">a host route toward the <span style=\"color: #800000;\">BGP<\/span> next hop pointing at <span style=\"color: #800000;\">BGP<\/span> <\/span><span style=\"color: #000000;\">next hop.<\/span><\/p>\n<p><span style=\"color: #000080;\">Let\u2019s walk through a lab-tested example:<\/span><\/p>\n<p><span style=\"color: #000000;\">The router is running<\/span> <span style=\"color: #800000;\">BGP<\/span> <span style=\"color: #000000;\">in<\/span> <span style=\"color: #000080;\">AS#65100<\/span><span style=\"color: #000000;\"> and has an<\/span><span style=\"color: #800000;\"> EBGP<\/span> <span style=\"color: #000000;\">session with 10.0.7.10 in<\/span> <span style=\"color: #000080;\">AS#65000<\/span>:<\/p>\n<p><span style=\"color: #800000;\">router bgp 65100<\/span><br \/>\n<span style=\"color: #000000;\">bgp log-neighbor-changes<\/span><br \/>\n<span style=\"color: #000000;\"> network 10.0.1.1 mask 255.255.255.255<\/span><br \/>\n<span style=\"color: #000000;\"> neighbor 10.0.7.10 remote-as 65000<\/span><\/p>\n<p><span style=\"color: #000000;\">First we have to create the track object that will cause the<\/span><span style=\"color: #000000;\"> <span style=\"color: #800000;\">BGP<\/span><\/span> <span style=\"color: #000000;\">session termination. It can track<\/span><br \/>\n<span style=\"color: #000000;\">anything \u2013\u00a0you can track interface state, use<\/span> <span style=\"color: #000080;\">IP SLA<\/span> <span style=\"color: #000000;\">and ping the firewall,<\/span>\u00a0<span style=\"color: #000000;\">or even use EEM to<\/span><span style=\"color: #000000;\"><br \/>\n<\/span><span style=\"color: #000000;\">trigger time-based \u00a0(or other event-based) session shutdown.\u00a0I decided to track the state of the LAN interface.<\/span><br \/>\n<span style=\"color: #000000;\">!<\/span><br \/>\n<span style=\"color: #000000;\">track 10 interface FastEthernet0\/0 ip routing<\/span><br \/>\n<span style=\"color: #000000;\"> carrier-delay<\/span><\/p>\n<p><span style=\"color: #000000;\">Next, create a host route for the<\/span><span style=\"color: #000000;\"> <span style=\"color: #800000;\">BGP<\/span> <\/span><span style=\"color: #000000;\">next hop pointing to the next hop itself<\/span>.<br \/>\n<span style=\"color: #000000;\">If you use a PPP interface to connect to the BGP next hop, make sure you disable<\/span><br \/>\n<span style=\"color: #000000;\"><span style=\"color: #000080;\">peer neighbor-route<\/span><\/span><span style=\"color: #000000;\">, otherwise the router creates a competing host route for th<\/span><span style=\"color: #000000;\">e <span style=\"color: #800000;\">BGP<\/span><\/span> <span style=\"color: #000000;\">next hop.<\/span><\/p>\n<p><span style=\"color: #000000;\">ip route 10.0.7.10 255.255.255.255 Serial1\/0 10.0.7.10<\/span><span style=\"color: #000000;\"> <span style=\"color: #800000;\">track 10<\/span><\/span><br \/>\n<span style=\"color: #000000;\">!<\/span><br \/>\n<span style=\"color: #000000;\">interface Serial1\/0<\/span><br \/>\n<span style=\"color: #000000;\"> description Link to AS65000<\/span><br \/>\n<span style=\"color: #000000;\"> ip address 10.0.7.9 255.255.255.252<\/span><br \/>\n<span style=\"color: #000000;\"> encapsulation ppp<\/span><br \/>\n<span style=\"color: #000080;\">no peer neighbor-route<\/span><\/p>\n<p><span style=\"color: #000000;\">We need a prefix-list and a route-map to match the host route toward the <span style=\"color: #800000;\">BGP<\/span> next hop:<\/span><\/p>\n<p><span style=\"color: #000000;\">ip prefix-list <span style=\"color: #800000;\">BGP_OK<\/span> seq 5 permit 10.0.7.10\/32<\/span><br \/>\n<span style=\"color: #000000;\">!<\/span><br \/>\nr<span style=\"color: #000000;\">oute-map <span style=\"color: #800000;\">BGP_OK<\/span> permit 10<\/span><br \/>\n<span style=\"color: #000000;\"> match ip address prefix-list <span style=\"color: #800000;\">BGP_OK<br \/>\n<\/span><\/span><span style=\"color: #000000;\">!<\/span><br \/>\n<span style=\"color: #000000;\">And finally, we can configure the fast<span style=\"color: #800000;\"> BGP<\/span> session deactivation on the <span style=\"color: #800000;\">EBGP<\/span> session:<\/span><\/p>\n<p><span style=\"color: #000000;\"><span style=\"color: #800000;\">router bgp 65100<\/span><\/span><br \/>\n<span style=\"color: #000000;\">neighbor 10.0.7.10 fall-over route-map<\/span> <span style=\"color: #800000;\">BGP_OK<\/span><\/p>\n<p><span style=\"color: #000080;\">Test#1<\/span> <span style=\"color: #000000;\">\u2013 shut down the LAN interface.<span style=\"color: #800000;\"> BGP<\/span> session is shut down almost immediately<\/span><br \/>\n<span style=\"color: #000000;\">(you can fine-tune the delay with track object parameters).<\/span><\/p>\n<p><em><span style=\"color: #000000;\">A1#conf t<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">Enter configuration commands, one per line. End with CNTL\/Z.<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">A1(config)#int fa 0\/0<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">A1(config-if)#shut<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">A1(config-if)#<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">15:27:55.719: %LINK-5-CHANGED: Interface FastEthernet0\/0, changed state to <\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> administratively down<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">15:27:56.383: %TRACKING-5-STATE: 10 interface Fa0\/0 ip routing Up-&gt;Down<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">15:27:56.415: %BGP-5-ADJCHANGE: neighbor 10.0.7.10 Down Route to peer lost<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">15:27:56.415: %BGP_SESSION-5-ADJCHANGE: neighbor 10.0.7.10 IPv4 Unicast <\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> topology base removed from session Route to peer lost<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">15:27:56.719: %LINEPROTO-5-UPDOWN: Line protocol on Interface <\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> FastEthernet0\/0, changed state to down<\/span><\/em><\/p>\n<p><span style=\"color: #000000;\"><span style=\"color: #000080;\">Test#2<\/span> \u2013 re-enable the LAN interface. <span style=\"color: #800000;\">BGP<\/span> session is reestablished in less than a second. Perfect \ud83d\ude09<\/span><\/p>\n<p><em><span style=\"color: #000000;\">A1(config-if)#no shut<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">A1(config-if)#<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">15:29:22.211: %LINK-3-UPDOWN: Interface FastEthernet0\/0, changed state to up<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">15:29:22.395: %TRACKING-5-STATE: 10 interface Fa0\/0 ip routing Down-&gt;Up<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">15:29:22.511: %BGP-5-ADJCHANGE: neighbor 10.0.7.10 Up<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\">15:29:23.211: %LINEPROTO-5-UPDOWN: Line protocol on Interface<\/span><\/em><br \/>\n<em><span style=\"color: #000000;\"> FastEthernet0\/0, changed state to up<\/span><\/em><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000080;\">In Summary<\/span> :<\/p>\n<p><span style=\"color: #800000;\">router bgp 65100<\/span><br \/>\n<span style=\"color: #000000;\">bgp log-neighbor-changes<\/span><br \/>\n<span style=\"color: #000000;\">network 10.0.1.1 mask 255.255.255.255<\/span><br \/>\n<span style=\"color: #000000;\">neighbor 10.0.7.10 <span style=\"color: #800000;\">remote-as 65000<\/span><\/span><br \/>\n<span style=\"color: #000000;\">!<\/span><br \/>\n<span style=\"color: #000000;\"><span style=\"color: #800000;\">\u00a0track 10<\/span> interface FastEthernet0\/0 ip routing<\/span><br \/>\n<span style=\"color: #000000;\">carrier-delay<\/span><br \/>\n<span style=\"color: #000000;\">!<\/span><br \/>\n<span style=\"color: #000000;\">ip route 10.0.7.10 255.255.255.255 Serial1\/0 10.0.7.10<\/span><span style=\"color: #800000;\">\u00a0track 10<br \/>\n<\/span>!<br \/>\n<span style=\"color: #000000;\">interface Serial1\/0<\/span><br \/>\n<span style=\"color: #000000;\">no peer neighbor-route<\/span><br \/>\n<span style=\"color: #000000;\">!\u00a0<\/span><br \/>\n<span style=\"color: #000000;\">\u00a0ip prefix-list\u00a0<span style=\"color: #800000;\">BGP_OK<\/span>\u00a0seq 5 permit 10.0.7.10\/32<\/span><br \/>\n!<br \/>\n<span style=\"color: #000000;\">route-map\u00a0<span style=\"color: #800000;\">BGP_OK<\/span>\u00a0permit 10<\/span><br \/>\n<span style=\"color: #000000;\">match ip address prefix-list\u00a0<span style=\"color: #800000;\">BGP_OK<\/span><\/span><br \/>\n<span style=\"color: #000000;\">!<\/span><br \/>\n<span style=\"color: #800000;\">router bgp 65100<\/span><br \/>\n<span style=\"color: #000000;\">neighbor 10.0.7.10 fall-over route-map\u00a0<span style=\"color: #800000;\">BGP_OK<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[124],"class_list":["post-3522","post","type-post","status-publish","format-standard","hentry","category-bgp-2","tag-bgp-fast-peering-session"],"_links":{"self":[{"href":"https:\/\/wiki-see.info\/wp\/wp-json\/wp\/v2\/posts\/3522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki-see.info\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wiki-see.info\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wiki-see.info\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki-see.info\/wp\/wp-json\/wp\/v2\/comments?post=3522"}],"version-history":[{"count":1,"href":"https:\/\/wiki-see.info\/wp\/wp-json\/wp\/v2\/posts\/3522\/revisions"}],"predecessor-version":[{"id":4981,"href":"https:\/\/wiki-see.info\/wp\/wp-json\/wp\/v2\/posts\/3522\/revisions\/4981"}],"wp:attachment":[{"href":"https:\/\/wiki-see.info\/wp\/wp-json\/wp\/v2\/media?parent=3522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wiki-see.info\/wp\/wp-json\/wp\/v2\/categories?post=3522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wiki-see.info\/wp\/wp-json\/wp\/v2\/tags?post=3522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}