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

SRv6 double recursion for multilayer BGP underlay

Want to summarize with AI?

Log in

Explains how double recursion resolves services across multiple routing layers and supports hierarchical load balancing in multilayer BGP underlay networks.


SRv6 double recursion is a SRv6 feature that supports

  • network services, such as BGP VPNs for Layer 2 and Layer 3, that require multiple resolution layers, where one routing layer resolves over another before reaching its final destination

  • three-level load balancing by collapsing the underlay (typically involving protocols like IGP or BGP in the forwarding chain), and

  • specific configurations in RIB, BGP, and static routes to indicate IPv4 and IPv6 unicast routes with Layer 2 prefixes that resolve as nexthop Layer 3 prefixes.

Table 1. Feature History Table

Feature Name

Release Information

Feature Description

SRv6 double recursion for multilayer BGP underlay

Release 25.4.1

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

*This feature is supported on:

  • 8711-48Z-M

  • 8011-32Y8L2H2FH

  • 8011-12G12X4Y-A/D

SRv6 double recursion for multilayer BGP underlay

Release 25.1.1

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

*This feature is supported on:

  • 8712-MOD-M

  • 8011-4G24Y4H-I

SRv6 double recursion for multilayer BGP underlay

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: Q200, P100])(select variants only*)

The feature introduces support for SRv6 double recursion, where network services such as BGP VPNs (Layer 2 and Layer 3) require multiple resolution layers. Specifically, one routing layer resolves over another before reaching the final destination. Double recursion is achieved by collapsing the underlay, typically involving protocols like IGP or BGP in the packet forwarding chain. This enables three-level load balancing and an even distribution of traffic across multiple layers of the network stack.

The feature is supported on the ingress Provider Edge (PE) router.

*This feature is supported on:

  • 8212-48FH-M

  • 8711-32FH-M

  • 88-LC1-36EH

  • 88-LC1-12TH24FH-E

  • 88-LC1-52Y8H-EM

The feature introduces these changes:

CLI:

YANG Data Models:

  • Cisco-IOS-XR-um-router-rib-cfg:router (see GitHub, Yang Data Models Navigator) data model.

Key benefits of SRv6 double recursion

  • Supports complex network scenarios: Enables BGP VPN services to resolve over a BGP underlay, which then resolves over IGP or directly connected routes. This accommodates new architectures in data centers and service provider networks where traditional direct IGP resolution is insufficient.

  • Enhances load balancing: Allows the routing platform to distribute traffic more efficiently across all available paths and recursion levels. This improves overall network performance, reduces congestion, and ensures optimal packet paths in complex topologies.

  • Improves network flexibility: Provides advanced routing solutions for service provider and data center networks, supporting complex use cases that extend beyond single-layer limitations.

Single and double recursion in BGP VPN services

Understanding the resolution processes of BGP VPN services is crucial for optimizing network routing efficiency.

Table 2. Comparison of Single and Double Recursion for BGP VPN Services

Type of Recursione

Resolution Path

Description

Single Recursion

BGP VPN service → IGP reachability

The BGP VPN service directly resolves to IGP reachability. This is applicable when a BGP VPN service can resolve directly to an IGP route without any intermediary steps.

Double Recursion

BGP VPN service → BGP underlay reachability → IGP reachability.

The BGP VPN service first resolves over a BGP underlay, which then leads to IGP reachability. This is necessary when a BGP VPN service cannot resolve directly to an IGP route but must traverse a BGP underlay first. This layered resolution process effectively handles scenarios that standard single-level load balancing cannot.


Usage guidelines for SRv6 double recursion

  • Configure the locator prefix for IPv6 prefixes that are Layer 2 prefixes.

  • Do not use a combination of BGP-SU (BGP Service Unicast) and BGP-IP paths at Layer 2.

  • For a collapsed chain, there must be an encapsulation ID on BGP if IGP is SRv6.

  • If the collapsed BGP paths are a combination of IGP IPv6 and SRv6, the router filters out only the IPv6 paths.


Configure SRv6 double recursion for multilayer BGP underlay

Before you begin

  • For Layer 2 IPv6 prefixes, set the locator prefix using the prefix-set command in RIB.

  • Configure the set of IPv4 and IPv6 Layer 2 prefixes that resolve as nexthop Layer 3 prefixes using the prefix-set command.

Procedure

  1. Enable the hardware support for BGP-LU to allow the ingress PE router to advertise and forward the MPLS-labelled unicast routes.

    Example:

    Router#config
    Router(config)#hw-module profile cef bgplu enable
    
  2. Configure the IPv4 and IPv6 unicast routes in the RIB, ensuring that these Layer 2 prefixes could be used as nexthop for Layer 3 prefixes.

    Example:

    Router#config
    Router(config)#router bgp 100
    Router(config-bgp)#address-family ipv4 unicast 
    Router(config-bgp-af)#table-policy level2-ipv4-policy
    Router(config-bgp-af)#exit 
    Router(config-bgp)#address-family ipv6 unicast
    Router(config-bgp-af)#table-policy level2-ipv6-policy
    Router(config-bgp-af)#commit
  3. Assign the required tag to the IPv4 and IPv6 unicast routes.

    For these IPv4 and IPv6 routes, the RIB assigns the tags and forwards the route information to the Forwarding Information Base (FIB), indicating that these Layer 2 prefixes resolve as nexthop for Layer 3 prefixes.

    Example:

    IPv4 Layer 2 prefixes:
    Router(config)#route-policy level2-ipv4-policy
    Router(config-rpl)#if destination in level2_prefixes-ipv4 then
    Router(config-rpl-if)#set tag 100
    Router(config-rpl-if)#else
    Router(config-rpl-else)#pass
    Router(config-rpl-else)#endif
    Router(config-rpl)#end-policy 
    Router(config)#commit

    Example:

    IPv6 Layer 2 prefixes:
    Router(config)#route-policy level2-ipv6-policy
    Router(config-rpl)#if destination in level2_prefixes-ipv6 then
    Router(config-rpl-if)#set tag 100
    Router(config-rpl-if)#endif
    Router(config-rpl)#if destination in level2_locators then
    Router(config-rpl-if)#set locator-prefix 
    Router(config-rpl-if)#else
    Router(config-rpl-else)#pass
    Router(config-rpl-else)#endif
    Router(config-rpl)#end-policy 
  4. Map the tags in the RIB for the IPv4 and IPv6 unicast routes.

    In the following example, the RIB maps all the IPv4 and IPv6 routes tagged with the value 100, which indicates that these routes resolve as nexthop for Layer 3 prefixes. The RIB adds the FIB_UPDATE_ROUTE_FLAG_EXTN_LVL2_HAS_DEPENDENT flag when it sends the route update to the FIB.

    Example:

    Router#config 
    Router(config)#router rib
    Router(config-rib)#tag-map tag 100 map forwarding-hierarchy level-2-used-as-nexthop
    Router(config-rib)#commit
  5. Verify the running configuration using the show running-config command.

    Example:

    hw-module profile cef bgplu enable
    !
    router bgp 100
     address-family ipv4 unicast
      table-policy level2-ipv4-policy
     !
     address-family ipv6 unicast
      table-policy level2-ipv6-policy
     !
    !
    router rib
     tag-map tag 100 map forwarding-hierarchy level-2-used-as-nexthop
     !
    !
    
  6. Use the show cef ipv4 and show cef ipv6 commands to verify the Layer 2 collapsed prefixes.

    In the following example, the IPv6 Layer 2 prefixes, which resolve as nexthop for Layer 3 prefixes are collapsed. This is indicated by the collapsed keyword in the output. The SRv6 SID lists indicate the different encapsulation layers or hierarchy.

    Example:

    Router#show cef ipv6 2001:DB8:A:B::1/64
    Thu Jun  6 12:48:52.399 EDT
    2001:DB8:A:B::1/64, version 8, SRv6 Headend, internal 0x1000001 0x0 (ptr 0x63851c98) [1], 0x1400 (0x63851da0), 0x0 (0x638b2128)
     Updated Jun  6 12:41:10.589
     Prefix Len 64, traffic index 0, precedence n/a, priority 0, encap-id 0x11deadbeef
      gateway array (0x61e1a798) reference count 1, flags 0x10, source rib (7), 0 backups
                    [2 type 3 flags 0x40008501 (0x63853e38) ext 0x0 (0x0) (collapsed)]
      LW-LDI[type=3, refc=1, ptr=0x63851da0, sh-ldi=0x63853e38]
      gateway array update type-time 1 Jun  6 12:41:10.589
     LDI Update time Jun  6 12:41:10.629
     LW-LDI-TS Jun  6 12:41:10.629
     Accounting: Disabled
       via 2001:DB8::1/128, 1 dependency, recursive [flags 0x3000000]
        path-idx 0 NHID 0x0 [0x63a2c098 0x0]
        next hop 2001:DB8::1/128 via  2001:DB8::1
        SRv6 H.Encaps.Red SID-list {2001:DB8:1:e002::}
          SRv6 H.Insert.Red SID-list {}
          SRv6 H.Insert.Red SID-list {bbbb:bbbb:3:: bbbb:bbbb:4::}
       via 2001:DB8::1/128, 1 dependency, recursive [flags 0x3000000]
        path-idx 1 NHID 0x0 [0x63a2c270 0x0]
        next hop 2001:DB8::1/128 via 2001:DB8::1
        SRv6 H.Encaps.Red SID-list {bbbb:bbbb:2:e002::}
          SRv6 H.Insert.Red SID-list {} 
    
        Load distribution: 0 1 2 2 (refcount 2)
    
        Hash  OK  Interface                 Address
        0     Y   UNKNOWN intf 0x00000013   10::2          
        1     Y   UNKNOWN intf 0x00000014   20::2          
        2     Y   UNKNOWN intf 0x00000013   10::2          
        3     Y   UNKNOWN intf 0x00000013   10::2  
    

    In the following example, the IPv4 Layer 2 prefixes, which resolve as nexthop for Layer 3 prefixes are collapsed.

    Example:

    Router#show cef ipv4 209.165.201.1 detail 
    Output received:
    Mon Dec  2 08:31:43.765 UTC
    209.165.201.1/27, version 47031, internal 0x5000001 0x40 (ptr 0x98246ad8) [1], 0x0 (0x0), 0x0 (0x0)
    Updated Dec  2 08:27:35.523
    Prefix Len 32, traffic index 0, precedence n/a, priority 4
    gateway array (0x98099098) reference count 1, flags 0x2010, source rib (7), 0 backups
    [1 type 3 flags 0x40441 (0x98134438) ext 0x0 (0x0)]
    LW-LDI[type=0, refc=0, ptr=0x0, sh-ldi=0x0]
    gateway array update type-time 1 Dec  2 08:27:35.523
    LDI Update time Dec  2 08:31:14.951
    
    Level 1 - Load distribution: 0 1
    [0] via 209.165.200.225/27, recursive
    [1] via 209.165.200.226/27, recursive
    
    via 209.165.200.225/27, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
    path-idx 0 NHID 0x0 [0x982355c8 0x0]
    next hop 209.165.200.225/27 via 209.165.200.225/27
    
    Load distribution: 0 1 2 2 (refcount 1)
    
    Hash  OK  Interface                 Address
    0     Y   HundredGigE0/0/0/0/2      fe80::2        
    1     Y   Bundle-Ether1201          fe80::2        
    2     Y   Bundle-Ether1301          fe80::3        
    3     Y   Bundle-Ether1301          fe80::3         
    
    via 209.165.200.226/27, 3 dependencies, recursive, bgp-multipath [flags 0x6080]
    path-idx 1 NHID 0x0 [0x98235678 0x0]
    next hop 209.165.200.226/27 via 209.165.200.226/27
    
    Load distribution: 0 1 2 2 (refcount 1)
    
    Hash  OK  Interface                 Address
    4     Y   HundredGigE0/0/0/0/2      fe80::2        
    5     Y   Bundle-Ether1201          fe80::2        
    6     Y   Bundle-Ether1301          fe80::3        
    7     Y   Bundle-Ether1301          fe80::3 
  7. For IPv6 or IPv4 static routes, use the router static command to configure and map the tags in RIB:

    Example:

    Router#config
    Router(config)#router static 
    Router(config-static)#address-family ipv6 unicast
    Router(config-static-afi)#2001:DB8:8::/48 4::4 tag 100
    Router(config-static-afi)#commit
  8. Use the show route command to view the configuration for IPv4 or IPv6 static routes.

    Example:

    The following show output command displays the IPv4 static route configuration.

    Router#show route 209.165.201.30
    
    Tue Dec  3 18:22:39.579 UTC
    
    Routing entry for 209.165.201.30/27
    Known via "bgp 100", distance 200, metric 0, lvl2 has dependent
    Tag 100, type internal
    Installed Dec  3 18:22:35.820 for 00:00:03
    Routing Descriptor Blocks
    1::2, from 1::2, BGP multi path
    Nexthop in Vrf: "default", Table: "default", IPv6 Unicast, Table Id: 0xe0800000
    Route metric is 0
    1::3, from 1::3, BGP multi path
    Nexthop in Vrf: "default", Table: "default", IPv6 Unicast, Table Id: 0xe0800000
    Route metric is 0
    No advertising protos.

    Example:

    The following show output command displays the IPv6 static route configuration.

    Router#show route ipv6 2001:DB8:A:B::1 detail
    Tue Dec  3 18:23:55.390 UTC
    
    Routing entry for 2001:DB8:A:B::1/64
    Known via "bgp 100", distance 200, metric 0, lvl2 has dependent
    Tag 100, type internal
    Installed Dec  3 18:22:45.835 for 00:01:09
    Routing Descriptor Blocks
    1::2, from 1::2
    Route metric is 0
    Label: None
    Tunnel ID: None
    Binding Label: None
    Extended communities count: 0
    NHID: 0x0 (Ref: 0)
    Path Grouping ID: 100
    SRv6 Headend: H.Encaps.Red [f3216], SID-list {fccc:bb01:2:e002::}
    Route version is 0x1c (28)
    No local label
    IP Precedence: Not Set
    QoS Group ID: Not Set
    Flow-tag: Not Set
    Fwd-class: Not Set
    Route Priority: RIB_PRIORITY_RECURSIVE (12) SVD Type RIB_SVD_TYPE_LOCAL
    Download Priority 4, Download Version 17265
    No advertising protos.