- Read Me First
- Cisco BGP Overview
- BGP 4
- Configuring a Basic BGP Network
- BGP 4 Soft Configuration
- BGP Support for 4-byte ASN
- IPv6 Routing: Multiprotocol BGP Extensions for IPv6
- IPv6 Routing: Multiprotocol BGP Link-Local Address Peering
- IPv6 Multicast Address Family Support for Multiprotocol BGP
- Configuring Multiprotocol BGP (MP-BGP) Support for CLNS
- BGP IPv6 Admin Distance
- Connecting to a Service Provider Using External BGP
- BGP Route-Map Continue
- BGP Route-Map Continue Support for Outbound Policy
- Removing Private AS Numbers from the AS Path in BGP
- Configuring BGP Neighbor Session Options
- BGP Neighbor Policy
- BGP Dynamic Neighbors
- BGP Support for Next-Hop Address Tracking
- BGP Restart Neighbor Session After Max-Prefix Limit Reached
- BGP Support for Dual AS Configuration for Network AS Migrations
- Configuring Internal BGP Features
- BGP VPLS Auto Discovery Support on Route Reflector
- BGP FlowSpec Route-reflector Support
- BGP Flow Specification Client
- BGP NSF Awareness
- BGP Graceful Restart per Neighbor
- BGP Support for BFD
- IPv6 NSF and Graceful Restart for MP-BGP IPv6 Address Family
- BGP Persistence
- BGP Link Bandwidth
- Border Gateway Protocol Link-State
- iBGP Multipath Load Sharing
- BGP Multipath Load Sharing for Both eBGP and iBGP in an MPLS-VPN
- Loadsharing IP Packets over More Than Six Parallel Paths
- BGP Policy Accounting
- BGP Policy Accounting Output Interface Accounting
- BGP Cost Community
- BGP Support for IP Prefix Import from Global Table into a VRF Table
- BGP Support for IP Prefix Export from a VRF Table into the Global Table
- BGP per Neighbor SoO Configuration
- Per-VRF Assignment of BGP Router ID
- BGP Next Hop Unchanged
- BGP Support for the L2VPN Address Family
- BGP Event-Based VPN Import
- BGP Best External
- BGP PIC Edge for IP and MPLS-VPN
- Detecting and Mitigating a BGP Slow Peer
- Configuring BGP: RT Constrained Route Distribution
- Configuring a BGP Route Server
- BGP Diverse Path Using a Diverse-Path Route Reflector
- BGP Enhanced Route Refresh
- Configuring BGP Consistency Checker
- BGP—Origin AS Validation
- BGP MIB Support
- BGP 4 MIB Support for Per-Peer Received Routes
- BGP Support for Nonstop Routing (NSR) with Stateful Switchover (SSO) Using L2VPN VPLS
- BGP Support for Nonstop Routing (NSR) with Stateful Switchover (SSO) Using L2VPN VPLS
- BGP NSR Auto Sense
- BGP NSR Support for iBGP Peers
- BGP Graceful Shutdown
- BGP — mVPN BGP sAFI 129 - IPv4
- BGP-MVPN SAFI 129 IPv6
- BFD—BGP Multihop Client Support, cBit (IPv4 and IPv6), and Strict Mode
- BGP Attribute Filter and Enhanced Attribute Error Handling
- BGP Additional Paths
- BGP-Multiple Cluster IDs
- BGP-VPN Distinguisher Attribute
- BGP-RT and VPN Distinguisher Attribute Rewrite Wildcard
- VPLS BGP Signaling
- Multicast VPN BGP Dampening
- BGP—IPv6 NSR
- BGP-VRF-Aware Conditional Advertisement
- BGP—Selective Route Download
- BGP—Support for iBGP Local-AS
- eiBGP Multipath for Non-VRF Interfaces (IPv4/IPv6)
- L3VPN iBGP PE-CE
- BGP NSR Support for MPLS VPNv4 and VPNv6 Inter-AS Option B
- BGP-RTC for Legacy PE
- BGP PBB EVPN Route Reflector Support
- BGP Monitoring Protocol
- VRF Aware BGP Translate-Update
- BGP Support for MTR
- BGP Accumulated IGP
- BGP MVPN Source-AS Extended Community Filtering
- BGP AS-Override Split-Horizon
- BGP Support for Multiple Sourced Paths Per Redistributed Route
- Maintenance Function: BGP Routing Protocol
BGP
Persistence
BGP persistence enables the router to retain routes that it has learnt from the configured neighbor even when the neighbor session is down. BGP persistence is also referred as long lived graceful restart (LLGR). LLGR comes into effect after graceful restart (GR) ends.
- Restrictions for BGP Persistence
- Information About BGP Persistence
- How to Configure BGP Persistence
- Verifying BGP Persistence
- Feature Information for BGP Persistence
Restrictions for BGP Persistence
Information About BGP Persistence
BGP paths received from neighbor are removed immediately when it detects that the session is down. This behavior is to keep BGP table and forwarding table updated with current network state. Eventually this avoids traffic blackhole and routing loops. But in some scenarios keeping the routes for longer time during control plane failure helps the services that are less IP sensitive to continue uninterrupted for longer duration. The traffic flow does not get affected in the following scenarios, even if the BGP routes are stored for longer time during the BGP neighbor failures:
-
When route advertisement path is different than the forwarding path that is, through MPLS tunnels. For example, VPN routes.
-
When the purpose of route advertisement is to push configuration that is, filter programming on the router. For example, flow-spec, route-targets.
-
When route advertisement is used for auto-discovery. For example, VPLS.
BGP persistence enables the local router to retain routes that it has learnt from the configured neighbor even when the neighbor session is down. BGP persistence is also referred as long lived graceful restart (LLGR). LLGR comes into effect after graceful restart (GR) ends. LLGR ends either when the LLGR stale timer expires or when the neighbor sends the end-of-RIB marker after it has sent its routes. When LLGR for a neighbor ends, all routes from that neighbor that are still LLGR stale gets deleted. The LLGR capability is signaled to a neighbor in the BGP OPEN message, if configured. With BGP persistence the paths are held for very long time (days), and unlike graceful-restart behavior the paths are de-preferenced so that a non-stale path is chosen over a stale path.
BGP speaker advertises LLGR capability including all address-families configured with LLGR. LLGR stale time is per address-family. The BGP persistence feature is supported on the following address family indicators (AFIs):
Persistence is executed by the helper router only after the graceful-restart is completed. Persistence ends when neighbor sends end-of-row (EoR) or persistence timer expires.
Restart Router
Graceful-restart configuration is mandatory to support persistence (LLGR) neighbor configuration knob to configure persistence. Persistence timer can range between 0 to 4294967.
Helper Router
Helper router executes persistence when graceful-restart is completed. It performs the following tasks:
-
Starts persistence timer.
-
Marks the prefixes learned from neighbor as long-lived stale path.
-
Performs best path calculation to de-preference the long lived stale paths. If route has only long lived stale path, it is selected as the best path. If route has multiple long lived stale paths, normal tie-breaking is executed to find the best path.
-
Re-advertises the long lived stale path as the best path/add-path with LLGR_STALE (65535:6) community attribute to all LLGR capable configured neighbors.
-
Withdraws long lived stale routes from non-LLGR capable neighbors.
Helper Router's Peer
If helper router’s neighbor is LLGR capable, it performs the following for routes received with LLGR_STALE community:
How to Configure BGP Persistence
Configuring BGP Persistence
Device# configure terminal Device(config)# router bgp AS Device(config-router)# address-family vpnv4 Device(config-router-af)# neighbor neighbor -id Device(config-router-af-nbr)# bgp long-lived-graceful-restart {stale-time send time accept time}
-
bgp long-lived-graceful-restart: Enables long lived graceful restart support for the neighbor.
-
stale-time: Specifies maximum time to wait before purging long-lived stale routes. If the neighbor router negotiates the capability and accept knob is configured locally then lowest of these two values is used as long-lived stale time.
-
send time: Specifies stale-time sent in capability. The specified range is between 0-4294967 seconds.
-
accept time: Specifies maximum stale-time acceptable from neighbor. The specified range is between 0-4294967 seconds. BGP speaker acts as helper for LLGR capable neighbors. However, it can also act as helper for non-LLGR capable neighbors by configuring accept knob. In that case, value configured with this knob is used as long-lived stale time.
The following is an example:
router bgp 1 address-family vpnv4 neighbor 1.1.1.1 long-lived-graceful-restart stale-time send 300 accept 300 long-lived-graceful-restart stale-time accept 300
Verifying BGP Persistence
-
To verify LLGR capability advertise and receive status, use the command show ip bgp vpnv4 unicast neighbors neighbor-id.
show ip bgp vpn4 unicast neighbors 1.1.1.1 ……… BGP neighbor is 1.1.1.1, remote AS 1, internal link Description: test1 ……. Neighbor capabilities: Route refresh: advertised and received(new) Four-octets ASN Capability: advertised and received Address family IPv4 Unicast: advertised and received Address family VPNv4 Unicast: advertised and received Address family VPNv6 Unicast: advertised and received Graceful Restart Capability: advertised and received Remote Restart timer is 10 seconds Address families advertised by peer: none Address families advertised by peer before restart: none Long-lived Graceful Restart Capability: VPNv4 Unicast: advertised and received(was preserved) VPNv6 Unicast: received(was preserved) Enhanced Refresh Capability: advertised and received Multisession Capability: Stateful switchover support enabled: NO for session 1 For address family: VPNv4 Unicast Session: 1.1.1.1 ……… ……… Long-lived Graceful-Restart(was preserved) Stalepath-time: sent 2000s, received 50s, accepted 2000s, used 50s
-
To verify restarting of the peer, use the command show ip bgp vpnv4 unicast neighbors neighbor-id.
show ip bgp vpn4 unicast neighbors 1.1.1.1 .............. BGP neighbor is 1.1.1.1, remote AS 1, internal link Description: test1 .............. BGP version 4, remote router ID 0.0.0.0 BGP state = Active, down for 00:00:23 Configured hold time is 15, keepalive interval is 5 seconds Minimum holdtime from neighbor is 0 seconds Neighbor sessions: 0 active, is not multisession capable (disabled) Stateful switchover support enabled: NO for session 0 Message statistics: InQ depth is 0 ……. ……. For address family: VPNv4 Unicast Session: 1.1.1.1 ……… ……… Long-lived Graceful-Restart Stalepath-time: sent 2000s, accepted 2000s, used 2000s Stalepath-timer running 37s remaining
-
To verify routes marked with long-lived stale routes, use the command show ip bgp vpnv4 all .
Device# show ip bgp vpnv4 all BGP table version is 33, local router ID is 19.19.19.19 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, L long-lived-stale-path Origin codes: i - IGP, e - EGP, ? - incomplete RPKI validation codes: V valid, I invalid, N Not found Network Next Hop Metric LocPrf Weight Path Route Distinguisher: 2:2 (default for vrf example) *L>i 20.0.0.0/16 1.1.88.1 0 100 0 81 ? *Li 38.1.1.0/24 1.1.88.1 0 100 0 81 ? *L>i 180.180.180.180/32 1.1.88.1 0 100 0 81 ? Router#show ip bgp vpnv4 all 20.0.0.0/16 BGP routing table entry for 2:2:20.0.0.0/16, version 9 Paths: (1 available, best #1, table example) Advertised to update-groups: 1 Refresh Epoch 1 81 (long-lived-stale), imported path from 5:5:20.0.0.0/16 (global) 1.1.88.1 (metric 40) (via default) from 1.1.1.188 (1.1.1.188) Origin incomplete, metric 0, localpref 100, valid, internal, best Community: 100:100 Extended Community: RT:1:1 Originator: 1.1.88.1, Cluster list: 1.1.1.188 mpls labels in/out nolabel/44 rx pathid: 0, tx pathid: 0x0
Feature Information for BGP Persistence
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Feature Name |
Releases |
Feature Configuration Information |
---|---|---|
BGP Persistence |
Cisco IOS XE Fuji 16.7.1 |
BGP persistence enables the router to retain routes that it has learnt from the configured neighbor even after the neighbor session is down. BGP persistence is also referred as Long Lived Graceful Restart (LLGR). The following commands were modified: address-family vpnv4, bgp long-lived-graceful-restart {stale-time send time accept time}, neighbor neighbor-id, router bgp AS, show ip bgp vpnv4 all, and show ip bgp vpnv4 unicast neighbors <neighbor-id>. |