Segment Routing v6 Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

Segment Routing v6 Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

BGP SID locator tracking for SRv6 services

Want to summarize with AI?

Log in

Explains how BGP monitors SRv6 locator reachability and metrics directly to improve service convergence, route processing, and forwarding reliability.


BGP SID locator tracking is an SRv6 feature that

  • allows BGP to monitor the reachability and metric of SRv6 SID locators in the RIB, in addition to validating the BGP next-hop, rather than relying solely on the next-hop

  • automatically tracks these locators and reports locator- and next-hop–related reachability or metric changes to the BGP routing process as they are updated in the RIB, and

  • improves overall BGP convergence and ensures consistent control-plane and data-plane behavior in SRv6 deployments.

Table 1. Feature History Table

Feature Name

Release Information

Feature Description

BGP SID locator tracking for SRv6 services

Release 26.1.1

Introduced in this release on: Fixed Systems (8200 [ASIC: Q200, P100], 8700 [ASIC: P100, K100], 8010 [ASIC: A100]); Centralized Systems (8600 [ASIC: Q200]); Modular Systems (8800 [LC ASIC: Q200, P100], 8400 [ASIC: K100])

You can now enhance SRv6 path selection by extending BGP next-hop tracking to monitor the reachability and metric of SRv6 SID locators. BGP tracks locators for both Layer 2 and Layer 3 services and updates path selection when a locator becomes unreachable, even if the next-hop remains reachable.

The feature introduces these changes:

CLI:

Challenges with traditional BGP next-hop tracking

Traditional BGP next-hop tracking monitors only the reachability and metric of the BGP next-hop. In SRv6 networks, however, forwarding decisions rely on the SID locator, which may use different IGP paths or experience independent routing changes.

This disconnect can lead to several critical issues:

  • Traffic blackholing: BGP may consider a path valid even if the associated SID locator is unreachable.

  • Suboptimal path selection: BGP might incorrectly select the best path when next-hop metrics do not accurately reflect the locator's metrics.

  • Reduced performance: These inconsistencies can result in slower convergence, routing metric mismatches, and loss of connectivity.

Enhancing BGP path selection with SID locator tracking in SRv6 networks

The BGP SID locator tracking feature addresses these challenges by:

  • Extending BGP’s existing RIB registration mechanism to track and monitor the reachability and metrics of SRv6 SID locators, in addition to traditional next-hop tracking.

  • Incorporating locator information into BGP path evaluation and attribute propagation.

With these enhancements, BGP can make more accurate best-path selections and respond faster to network changes that affect SRv6 SID locators.

By default, BGP SID locator tracking is disabled, so BGP relies on traditional next-hop tracking. To enable this feature and ensure that BGP monitors the reachability and metrics of SRv6 SID locators in the RIB, configure the nexthop validation use-locator command.

You must enable this feature on all devices of a network to avoid the risk of routing loop.

SID locator tracking

Table 2. SID Locator Tracking — Behavior Comparison

BGP behavior

Without SID locator tracking feature

With SID locator tracking feature

What BGP tracks
  • BGP next‑hop reachability

  • BGP next-hop metric

  • BGP next‑hop

  • SRv6 SID locator reachability

  • SRv6 SID locator metric

RIB registration BGP registers with RIB for BGP next‑hop tracking BGP extends RIB registration to include SRv6 SID locator.
SID resolvability check One‑time SID resolvability check during path validation. Continuous tracking of SID locator reachability via RIB notifications.

Benefits of BGP SID locator tracking for SRv6 services

  • Faster convergence: Accelerates convergence for SRv6 Layer 2 and Layer 3 services.

  • Prevents traffic loss: Avoids loss of traffic when SID locators become unreachable.

  • Control and data plane alignment: Ensures consistent reachability and metric information across control and data planes.

  • Improved best-path selection: Uses locator RIB metrics for more accurate path selection.

  • Better attribute propagation: Supports Accumulated IGP (AIGP) and Multi-Exit Discriminator (MED) based on SID locator metrics.


Restrictions for BGP SID locator tracking for SRv6 services

For BGP SID locator tracking with SRv6 services, follow these restrictions.

Configuration requirements

  • You must manually configure BGP SID locator tracking because it is disabled by default.

    If SID structure sub-TLVs are missing, BGP cannot extract locator information and will use traditional next-hop tracking (NHT) behavior.

  • You must enable this feature on all devices in the network to avoid the risk of a routing loop

Operational restrictions

  • Do not use BGP SID locator tracking when SRv6 locator summarization is enabled at ABR nodes. Summarization can hide actual locator reachability and may cause the locator and BGP next-hop RIB metric to appear worse than the BGP next-hop metric

Feature limitations

  • This feature does not provide enhancements to Optimal Route Reflection (ORR).


How BGP SID locator tracking for SRv6 services works

BGP SID locator tracking for SRv6 services ensures correct path selection and convergence when SRv6 SID locators follow different IGP paths than the BGP next hop. By tracking locator reachability and metrics in the RIB, BGP can maintain accurate and consistent SRv6 service routing.

Summary

The process of BGP SID locator tracking for SRv6 services begins with Provider Edge (PE) routers allocating and advertising SRv6 SIDs for local services through BGP. These BGP updates, containing SRv6 SIDs and their locators, are then propagated by Route Reflectors (RRs). IS-IS domains distribute locator reachability information throughout the network. Each PE router actively tracks the reachability of remote SRv6 locators, enabling BGP to automatically withdraw or update affected SID routes in response to topology changes. This mechanism ensures rapid service rerouting and fast convergence, thereby maintaining service continuity and minimizing traffic disruption.

Workflow

These stages describe how BGP SID locator tracking works:
Figure 1. Topology for BGP SID locator tracking
Topology for BGP SID locator tracking.
  1. SID advertisement: Each PE router allocates SRv6 SIDs for locally hosted services and associates them with IPv6 locators. These SIDs are advertised using BGP so that remote PEs can learn the SRv6 service endpoints.

    For example, PE1 allocates SID1 with locator L1 and advertises it via BGP.

  2. Locator reachability distribution: IGP domains propagate reachability information for SRv6 locators, ensuring all nodes in the AS 100 backbone can forward packets based on the SIDs.

  3. RIB‑Based Locator Tracking: Each PE registers with the RIB to track the reachability and metric of SRv6 locators from the received SID advertised by remote PEs, in addition to traditional BGP next‑hop tracking.

    When the RIB reports that a locator becomes unreachable or its metric changes due to a link or node failure, BGP automatically re‑evaluates path selection and withdraws or updates the SRv6 service routes as needed.

    For example, PE3 receives the BGP route for SID1/L1 and checks in its RIB if L1 is reachable and to determine its current IGP cost.

    If a topology change increases the cost or makes L1 unreachable, the RIB notifies BGP, which then updates or withdraws the corresponding SRv6 service routes.

    Table 3. BGP best path calculation example

    Underlay FlexAlgo

    PE router path view from PE3

    Metric calculation

    BGP bestpath

    FA 0

    PE1-P1-PE3

    1 + 1 = 2

    For FA0, PE1 is the best path.

    FA 129

    PE1-P1-PE3

    1+ 5 = 6

    FA 0

    PE2-P1-PE3

    1 + 5 = 6

    FA 129

    PE2-P1-PE3

    1 + 2 = 3

    For FA129, PE2 is the best path.

  4. Service continuity and fast convergence: When topology changes occur, IGP updates locator reachability, and RIB notifies and BGP promptly withdraws or updates SRv6 service routes. This mechanism ensures services are rerouted or restored quickly, minimizing traffic disruption.


Configure BGP SID locator tracking for SRv6 services

Use this task to enable and validate BGP SID locator tracking for SRv6 services.

Procedure

  1. Enable next-hop validation to use the locator for SRv6.

    Example:

    
    Router(config)#router bgp 200
    Router(config-bgp)#nexthop validation use-locator
  2. Verify that the BGP SID locator tracking is active and providing reachability or metric information.

    Example:

    Router#show bgp vrf CE2500 192.0.1.1                                                   
    
    BGP routing table entry for 192.0.1.1, Route Distinguisher: 102:2500
    Versions:
      Process           bRIB/RIB   SendTblVer
      Speaker             472872       472872
    Paths: (1 available, best #1)
      Advertised to CE peers (in unique update groups):
        18::1:1:1                               
      Path #1: Received by speaker 0
      Advertised to CE peers (in unique update groups):
        18::1:1:1                               
      200, (received & used)
        fccc:cc00:1202::2 (metric 30) from fccc:cc00:1401::1 (10.1.1.2)
          Received Label 0xe0040
          Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
          Received Path ID 1, Local Path ID 1, version 472872
          Extended community: Color:2500 RT:62500:2500 
          Originator: 10.1.1.2, Cluster list: 10.1.1.5
          PSID-Type:L3, SubTLV Count:1
           SID Locator RIB metric: 30
           SubTLV:
            T:1(Sid information), Sid:fccc:cc05:1052::(Transposed), Behavior:63, SS-TLV Count:1
             SubSubTLV:
              T:1(Sid structure):
          Source AFI: VPNv4 Unicast, Source VRF: default, Source Route Distinguisher: 101:2500
    
    
    
    Router#show cef vrf CE2500 192.0.1.1
    Thu Dec 24 03:44:02.973 IST
    10.19.1.1/32, version 206690, SRv6 Headend, internal 0x5000001 0x30 (ptr 0x90c0df14) [1], 0x0 (0x0), 0x0 (0x925f7468)
     Updated Dec 24 03:40:21.401
     Prefix Len 32, traffic index 0, precedence n/a, priority 3
      gateway array (0x8fa65a98) reference count 5025, flags 0x2010, source rib (7), 0 backups
                    [1 type 3 flags 0x48441 (0x7a19a758) ext 0x0 (0x0)]
      LW-LDI[type=0, refc=0, ptr=0x0, sh-ldi=0x0]
      gateway array update type-time 1 Dec 23 05:05:48.103
     LDI Update time Dec 23 05:05:48.103
    
      Level 1 - Load distribution: 0
      [0] via fccc:cc05:1052::/128, recursive
    
       via fccc:cc05:1052::/128, 5 dependencies, recursive [flags 0x6000]
        path-idx 0 NHID 0x0 [0x79ffbd34 0x0]
        next hop VRF - 'default', table - 0xe0800000
        next hop fccc:cc05:1052::/128 via fccc:cc05:1052::/48
        SRv6 H.Encaps.Red SID-list {fccc:cc05:1052:e004::}
    
        Load distribution: 0 (refcount 1)
              
        Hash  OK  Interface                 Address
        0     Y   Bundle-Ether1             fe80::28a:96ff:fe4a:20e1
    
  3. Confirm BGP is actively tracking the SRv6 locator in the RIB.

    Example:

    Router#show bgp nexthops fccc:cc05:1052:: 
    Nexthop: fccc:cc05:1052::
      VRF: default
      Nexthop ID: 0x6000071, Version: 0
      Nexthop Flags: 0x10000000
      Nexthop Handle: 0x7f0b036d80e8
      Tree Nexthop Handle: 0x7f0b036d80e8
    
      RIB Related Information:
      Firsthop interface handle 0x00000000
        Gateway TBL Id: 0xe0800000    Gateway Flags: 0x00000080
        Gateway Handle: 0x7f0b7f9e7b68
        Gateway: unreachable, non-Connected route, prefix length 0
        Resolving Route: fccc:cc05:1052::/48 (isis 2)
        SRv6 locator, prefix len: 48
        Paths: 0
        RIB Nexthop Route Type: ISIS level-2
        RIB Nexthop Path Type: any
        RIB Nexthop ID: 0x0
        Nexthop sync slot: 22
        Status: [Unreachable]
        Metric: 4294967295
        Admin Distance: 4294967295, 115 (RIB)
        ORR afi bits: 0x0
        Registration: Synchronous, Completed: 1d00h
        Events: Critical (5)/Non-critical (0)
        Last Received: 00:50:59 (Critical)
        Last gw update: (Crit-notif) 00:50:59(rib)
        Reference Count: 0
    
        Reachable Notifications:           3 (last at Dec 24 03:00:35.062)
        Unreachable Notifications:         3 (last at Dec 24 03:01:39.121)
        Metric Increase Notifications:     0
        Metric Decrease Notifications:     0
        Nexthop find:                     21
        Most Recent Events:
          Time                 EventType    Metric   RIBAdminDist    Ifhandle     RouteType           PathType
          Dec 24 02:52:21.218  Unreachable  -
          Dec 24 02:53:05.838  Reachable    210      115             0x40032a0    ISIS level-2        any
          Dec 24 02:54:02.226  Unreachable  -
          Dec 24 03:00:35.062  Reachable    210      115             0x40032a0    ISIS level-2        any
          Dec 24 03:01:39.121  Unreachable  -
    
      

What to do next

You can use these commands to verify the feature or troubleshoot:
  • show bgp <afi safi> rd <rd> <nlri>

  • show bgp vrf <vrfname> ipv4/ipv6 <prefix>

  • show bgp ipv4/ipv6 unicast <prefix>

  • show bgp nexthops <locator>

  • show cef vrf <vrfname> ipv4/ipv6 <prefix>