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

PDF

BGP extended route retention

Want to summarize with AI?

Log in

Overview

Details the concept of extended route retention in BGP, discusses LLGR restrictions, and provides steps for configuring and applying route policies to BGP neighbors.

BGP extended route retention is a routing feature that

  • applies a route retention policy to modify route attributes when a BGP peer fails

  • modifies route attributes in addition to changes caused by the neighbor's inbound policy, and

  • enables the use of route retention policy instead of Long-Lived Graceful Restart (LLGR) when the BGP hold timer expires or when the BGP session fails to reestablish within the configured graceful restart time

This feature helps maintain route stability and control during BGP peer failures by retaining routes with modified attributes until the session is restored.

Table 1. Feature History Table

Feature Name

Release Name

Description

BGP extended route retention

Release 25.1.1

Introduced in this release on: Fixed Systems (8700 [ASIC: K100])(select variants only*)

*This feature is supported on the Cisco 8712-MOD-M routers.

BGP extended route retention

Release 24.4.1

Introduced in this release on: Fixed Systems (8200 [ASIC: P100], 8700 [ASIC: P100])(select variants only*); Modular Systems (8800 [LC ASIC: P100])(select variants only*)

*This feature is supported on:

  • 88-LC1-36EH+A8:B12

  • 88-LC1-12TH24FH-E

  • 88-LC1-52Y8H-EM

  • 8212-48FH-M

  • 8711-32FH-M

BGP extended route retention

Release 7.3.3

This feature allows you to maintain stale routing information from a failed BGP peer for longer periods of time than that is configured in the Graceful Restart atribute. However, this feature ensures that the BGP neighbor considers the stale routes as new routes.


Recommendations for using extended route retention

Adhere to the following principles to ensure proper operation and compatibility when using BGP Extended Route Retention:

  • Ensure that your BGP neighbor supports graceful restart functionality.

  • Apply graceful restart functionality when a BGP neighbor fails, and maintain it until the graceful restart timer expires.

  • Start the Extended Route Retention feature only after the graceful restart timer expires.

  • Configure soft-reconfiguration inbound as a mandatory setting; apply inbound policy if required.

  • Activate Extended Route Retention exclusively when the BGP peer goes down, specifically after the hold-down timer expires.

  • Do not treat routes as stale or retain them for any other triggers such as timer expiry; in such cases, purge the routes.

  • Use Extended Route Retention only with the following address-family modes: IPv4 and IPv6 unicast, IPv4 and IPv4 labelled unicast.

  • Do not configure both LLGR and Extended Route Retention on the same neighbor.

  • Do not send the capability attribute when Extended Route Retention is configured.


Configure route policies and apply them to a BGP neighbor

Define route policies with specific community and local preference settings, then apply these policies to a BGP neighbor to control routing behavior, including route retention and inbound policy processing.

Use this task when you need to define route policies with specific community and local preference settings and apply them to a BGP neighbor, including route retention and inbound policies.

Before you begin

  • Ensure you have the necessary privileges to configure BGP and route policies on the router.

  • Identify the names for the route-policies and communities.

Procedure

1.

Create route policies.

Example:

Create the route policy RRP_comm_no_export_local_pref_2500.

Router(config)# route-policy RRP_comm_no_export_local_pref_2500
Router(config-rpl)# set community RRP_comm_no_export additive
Router(config-rpl)# set local-preference 2500
Router(config-rpl)# end-policy
Router(config-rpl)# exit

Create the route policy comm_number_local_pref.

Router(config)# route-policy comm_number_local_pref
Router(config-rpl)# set community comm_number
Router(config-rpl)# set local-preference 10000
Router(config-rpl)# end-policy
Router(config-rpl)# exit
2.

Apply the route policies to a BGP neighbor.

Example:

Enter BGP router configuration mode for AS 140:

Router(config)# router bgp 140

Configure the neighbor with IP address 10.1.1.1.

Router(config-bgp)# neighbor 10.1.1.1
Router(config-bgp-nbr)# remote-as 1
Router(config-bgp-nbr)# update-source Loopback 0

Enter the IPv4 unicast address family.

Router(config-bgp-nbr)# address-family ipv4 unicast

Apply the inbound route policy.

Router(config-bgp-nbr-af)# route-policy RRP_comm_no_export_local_pref_2500 retention retention-time 2340

Enable soft reconfiguration to view the peer's adj-rib-in table.

Router(config-bgp-nbr-af)# soft-reconfiguration inbound always

The route policies are now successfully configured and applied to the BGP neighbor. This setup controls community attributes, local preference values, route retention duration, and inbound policy processing.

3.

Use the show bgp neighbor command to verify the configured route-retention policy using show bgp neighbor.

Example:


Router# show bgp neighbor 10.1.1.1
Fri Oct 22 04:52:44.972 PDT

BGP neighbor is 10.1.1.1
 Remote AS 1, local AS 1, internal link
 Remote router ID 10.1.1.1
  BGP state = Established, up for 00:03:03
…
 For Address Family: IPv4 Unicast
  BGP neighbor version 16172
Policy for incoming advertisements is comm_number_local_pref
  Policy for Retention is RRP_comm_no_export_local_pref_2500
Configured route retention policy stale timer for routes is 2340 seconds
….

The show bgp neighbor 10.1.1.1 output confirms:

  • BGP neighbor 10.1.1.1 is established and up for 3 minutes.

  • Remote AS is 1; local AS is 1 (internal link).

  • Inbound policy: comm_number_local_pref

    .
  • Route-retention policy: RRP_comm_no_export_local_pref_2500

    .
  • Stale timer set to 2340 seconds.

This verifies the route policies and retention timer are correctly applied and active.

4.

Use the show bgp ipv4 unicast command to verify the presence and status of stale routes using show bgp ipv4 unicast.

Example:


Router# show bgp ipv4 unicast 181.1.1.0/24
Fri Oct 22 04:56:15.906 PDT
….
Path #1: Received by speaker 0
  Advertised IPv4 Unicast paths to peers (in unique update groups):
    3.3.3.3         
  100, (Received from a RR-client), (long-lived/route-retention policy stale)
    192.1.2.1 (metric 10) from 192.1.2.1 (10.1.1.1)
      Origin IGP, metric 1221, localpref 2500, valid, internal, best, group-best, multipath
      Received Path ID 0, Local Path ID 1, version 16243
      Community: 1:100 no-export

This output confirms that the route is marked as stale due to the route-retention policy. It verifeies that the route’s attributes such as origin, metric, local preference, and community, and shows the route is valid, internal, and selected as the best path. The output also confirms the route is advertised to peers and includes path identifiers for tracking. This demonstrates the route-retention policy is effectively maintaining stale routes for network stability.

Route policies with specific attributes are successfully applied to the BGP neighbor, providing route retention and policy enforcement.