Restrictions for BGP Persistence
-
LLGR is not supported for multicast address-families.
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
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.
LLGR is not supported for multicast address-families.
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 null routes 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):
VPNv4 and VPNv6
Flow spec (IPv4, IPv6, VPNv4 and VPNv6)
Starts graceful-restart timer
Marks the prefixes from its neighbor as stale
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.
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 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.
If helper router’s neighbor is LLGR capable, it performs the following for routes received with LLGR_STALE community:
De-preferences the routes received with LLGR_STALE community attribute.
Re-advertises the path with LLGR_STALE community attribute as the best path/add-path to the LLGR capable routers with same LLGR_STALE attribute attached.
Sends route withdraw message to non-LLGR capable routers.
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
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
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> . |