BGP Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

BGP persistence

Want to summarize with AI?

Log in

Overview

Explains BGP persistence and its role in network resiliency, outlines operational flows, delivers recommendations for enhancing stability, and provides instructions to configure BGP persistence.

BGP persistence mechanism is a routing feature that

  • allow you to retain BGP routes learned from a configured neighbor

  • keep those routes active even if the BGP session with that neighbor goes down, and

  • help you maintain network stability during transient neighbor outages.

BGP persistence, also known as Long-Lived Graceful Restart (LLGR), is a feature that enables a local router to retain BGP routes learned from a configured neighbor, even if the BGP session with that neighbor goes down. This capability helps maintain network stability by preventing unnecessary route withdrawals during transient neighbor outages.

Key characteristics of BGP Persistence routes include:

  • Duration: LLGR can remain in effect for a significantly longer period than standard Graceful Restart (GR).

  • Route Preference: LLGR stale routes are assigned the lowest preference during the BGP bestpath computation, ensuring that fresh, active routes are always preferred.

  • Advertisement: If an LLGR stale route is selected as the best path, it is advertised with the LLGR_STALE community (65535:6) attached. These routes are not advertised to neighbors that do not support LLGR.

  • Resilience: LLGR stale routes are not deleted if the forwarding path to the neighbor is detected as down, nor are they deleted if the BGP session to the neighbor experiences multiple flaps, even if the neighbor does not re-advertise the route.

  • Exclusion: Any route explicitly tagged with the NO_LLGR community (65535:7) will not be retained by the BGP persistence mechanism.

By using BGP persistence, you reduce the impact of transient BGP session outages on your network, which can be especially useful in large or dynamic environments.


Limitations for BGP persistence

The BGP persistence feature is supported only on the following address family identifiers:

  • VPNv4 and VPNv6

  • RT constraint

  • Flowspec (IPv4, IPv6, VPNv4, and VPNv6)

  • IPv4 and IPv6 address families


BGP persistence operational flow

Summary

BGP persistence operational flow begins when a BGP session drops or after Graceful Restart, with its capability signaled during session establishment. The local router then retains learned routes as stale. LLGR concludes upon stale timer expiry or receipt of an End-of-RIB marker, at which point any remaining stale routes are deleted.

Workflow

BGP persistence operates through a defined lifecycle as given below:

  1. Initiation: LLGR takes effect either immediately upon a BGP session going down (if standard Graceful Restart is not enabled) or after the standard Graceful Restart process concludes.
  2. Capability Signaling: The LLGR capability is signaled to a neighbor during the BGP session establishment via the BGP OPEN message, provided it has been configured for that neighbor.
  3. Route Retention: Once active, the local router retains learned routes from the neighbor, marking them as "stale" but keeping them in the routing table.
  4. Termination: LLGR for a neighbor ends when one of the following conditions is met:
    • The configured LLGR stale timer expires.
    • The neighbor sends an End-of-RIB (Routing Information Base) marker, indicating that it has completed revising and re-advertising its routes.
  5. Stale Route Deletion: Upon LLGR termination, any routes from that neighbor that are still marked as stale are deleted from the routing table.

Configure BGP persistence

Use this task to enable BGP Persistence (Long-Lived Graceful Restart) for a BGP neighbor, allowing the router to retain routes during session outages.

BGP Persistence, also known as Long-Lived Graceful Restart (LLGR), ensures network stability by keeping learned routes active even when a neighbor session is temporarily down. This configuration defines how long stale routes are retained.

Before you begin

Ensure that you meet the following requirements:

  • You must have a basic BGP configuration already in place, including the BGP process and the neighbor definition.

  • You must know the remote Autonomous System (AS) number and the IP address of the BGP neighbor for which you are configuring LLGR.

  • Understand the implications of graceful-restart stalepath-time if configured, as LLGR takes effect after standard Graceful Restart concludes.

To configure BGP Persistence for a neighbor, perform the following steps:

Procedure

1.

Configure BGP on the router, and the BGP neighbor, and its basic parameters.

Example:

Router(config)# router bgp 100
Router(config-router)# neighbor 10.3.3.3
Router(config-router-neighbor)# remote-as 30813
Router(config-router-neighbor)# update-source Loopback0
Router(config-router-neighbor)# graceful-restart stalepath-time 150
Router(config-router-neighbor)#
2.

Enter address family configuration mode for VPNv4 unicast.

Example:

Router(config-router-neighbor)# address-family vpnv4 unicast
3.

Enable long-lived graceful restart capability for the VPNv4 address family and specify the LLGR stale time for sending and accepting VPNv4 routes.

Example:

Router(config-router-af)# long-lived-graceful-restart capable
Router(config-router-af)# long-lived-graceful-restart stale-time send 16777215 accept 16777215
Router(config-router-af)# exit
4.

Enter address family configuration mode for VPNv6 unicast.

Example:

Router(config-router-neighbor)# address-family vpnv6 unicast
5.

Enable long-lived graceful restart capability for the VPNv6 address family and specify the LLGR stale time for sending and accepting VPNv6 routes.

Example:

Router(config-router-af)# long-lived-graceful-restart capable
Router(config-router-af)# long-lived-graceful-restart stale-time send 16777215 accept 16777215
Router(config-router-af)# exit