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 global IPv6 over SRv6

Want to summarize with AI?

Log in

Explains this feature extends support of SRv6-based BGP services to include Internet (IPv6) services by implementing End.DT6 SRv6 functions at the PE node, as defined in IETF draft "SRv6 BGP based Overlay services".


A BGP global IPv6 service over SRv6 is a network feature that

  • extends SRv6-based BGP services to support Internet (IPv6) connectivity, and

  • implements End.DT6 SRv6 functions at the provider edge (PE) node.

Table 1. Table 1. Feature History Table

Feature Name

Release Information

Feature Description

SRv6 Services: BGP Global IPv6

Release 25.4.1

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

*This feature is supported on:

  • 8011-32Y8L2H2FH

  • 8011-12G12X4Y-A/D

SRv6 Services: BGP Global IPv6

Release 25.1.1

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

This feature is now supported on Cisco 8011-4G24Y4H-I routers.

SRv6 Services: BGP Global IPv6

Release 24.4.1

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

This feature extends support of SRv6-based BGP services to include Internet (IPv6) services by implementing End.DT6 SRv6 functions at the PE node, as defined in IETF draft "SRv6 BGP based Overlay services".

*This feature is supported on:

  • 8212-48FH-M

  • 8711-32FH-M

  • 8712-MOD-M

  • 88-LC1-36EH

  • 88-LC1-12TH24FH-E

  • 88-LC1-52Y8H-EM

This feature extends support of SRv6-based BGP services to include Internet (IPv6) services by implementing End.DT6 SRv6 functions at the PE node, as defined in IETF draft SRv6 BGP based Overlay services.


BGP global IPv6 guidelines and limitations

The following are key capabilities and limitations for BGP global IPv6 configurations:

  • SRv6 locator can be assigned globally or under IPv4 unicast address family

  • Equal-Cost Multi-path (ECMP) and Unequal Cost Multipath (UCMP) are supported.

  • BGP, OSPF, Static are supported as PE-CE protocol.


Configure per-AFI SID allocation for BGP global IPv6

Enable and customize Segment Routing over IPv6 (SRv6) SID allocation for BGP using per-AFI settings on Cisco IOS XR routers.

Some networks require SRv6 locator and SID allocation to be configured on a per-address family basis. This feature lets you define how SIDs are allocated for BGP global IPv6, improving traffic engineering flexibility and route policy control for IPv6 address families.

Procedure

  1. Enable SRv6 for BGP address-family IPv6 unicast.

    Example:

    router bgp as-number address-family ipv6 unicast segment-routing srv6
  2. Specify the SID behavior (allocation mode).

    Example:

    router bgp as-number address-family ipv6 unicast segment-routing srv6 alloc mode per-vrf

    The per-vrf keyword specifies that the same label is be used for all the routes advertised from a unique VRF.

    Example:

    router bgp as-number address-family ipv6 unicast segment-routing srv6 alloc mode {per-vrf | route-policy policy_name}
    • per-vrf: Specifies that the same label is be used for all the routes advertised from a unique VRF.

    • route-policy policy_name: Uses a route policy to determine the SID allocation mode and locator (if provided) for given prefix.

  3. Specify the locator for SRv6.

    Example:

    router bgp as-number address-family ipv6 unicast segment-routing srv6 locator WORD
  4. Specify the SRv6 encapsulation type for BGP peers.

    Example:

    router bgp as-number {af-group WORD| neighbor-group WORD | neighbor ipv6-addr} address-family ipv6 unicast encapsulation-type srv6
    • Use af-group WORD to apply the SRv6 encapsulation type to the address family group for BGP neighbors.

    • Use neighbor-group WORD to apply the SRv6 encapsulation type to the neighbor group for BGP neighbors.

    • Use neighbor ipv6-addr to apply the SRv6 encapsulation type to the specific BGP neighbor.

  5. Apply the configuration with an example workflow.

    Example:

    Node1(config)# router bgp 100
    Node1(config-bgp)# bgp router-id 10.1.1.1
    Node1(config-bgp)# segment-routing srv6
    Node1(config-bgp-gbl-srv6)# locator Node1
    Node1(config-bgp-gbl-srv6)# exit
    Node1(config-bgp)# address-family ipv6 unicast
    Node1(config-bgp-af)# segment-routing srv6
    Node1(config-bgp-af-srv6)# locator Node1
    Node1(config-bgp-af-srv6)# alloc mode per-vrf
    Node1(config-bgp-af-srv6)# exit
    Node1(config-bgp-af)# exit
    Node1(config-bgp)# neighbor 3001::1:1:1:4
    Node1(config-bgp-nbr)# address-family ipv6 unicast
    Node1(config-bgp-nbr-af)# encapsulation-type srv6
    Node1(config-bgp-nbr-af)# exit
    Node1(config-bgp-nbr)# exit
    Node1(config-bgp)# neighbor 3001::1:1:1:5
    Node1(config-bgp-nbr)# address-family ipv6 unicast
    Node1(config-bgp-nbr-af)# encapsulation-type srv6
    Node1(config-bgp-nbr-af)# commit
    
    

    Running Configuration

    router bgp 100
     bgp router-id 10.1.1.1
     segment-routing srv6
      locator Node1 
     !
     address-family ipv6 unicast 
      segment-routing srv6
       locator Node1 
       alloc mode per-vrf 
      !
     !
     neighbor 3001::1:1:1:4
      address-family ipv6 unicast 
       encapsulation-type srv6 
      !
     !
     neighbor 3001::1:1:1:5
      address-family ipv6 unicast 
       encapsulation-type srv6 
    
    

BGP for global IPv6 address family is now configured to use per-address family (per-AFI) SID allocation over SRv6. All specified BGP neighbors exchange IPv6 routes using the configured SID allocation and encapsulation mode.

What to do next

  • Verify the SID allocation and BGP IPv6 SRv6 reachability.

  • Adjust locator names or allocation modes as needed for your deployment.


Configure per-prefix SID allocation for BGP global IPv6

Assign specific Segment Routing v6 (SRv6) locators to IPv6 prefixes through route policies, allowing per-prefix steering for advanced transport behaviors (for example, Flex Algo)

This use case provides the ability to assign a specific SRv6 locator for a given prefix or a set of prefixes. The egress PE advertises the prefix with the specified locator. This allows for per-prefix steering into desired transport behaviors, such as Flex Algo.

To assign an SRv6 locator for a specific prefix, configure a route policy to specify the SID allocation mode based on match criteria. Examples of match criteria are destination-based match or community-based match.

  • Supported SID allocation modes are per-VRF and per-CE.

  • For per-VRF allocation mode, you can also specify the SRv6 locator.

    • If an SRv6 locator is specified in the route policy, BGP will use that to allocate per-VRF SID. If the specified locator is invalid, the SID will not be allocated.

    • If an SRv6 locator is not specified in the route policy, the default locator is used to allocate the SID. If the default locator is not configured in BGP, then the SID will not be allocated.

  • Per-CE allocation mode always uses the default locator to allocate the SID.

Follow these steps to configure per-prefix SID allocation for BGP global IPv6:

Procedure

  1. Configure a route policy to specify SID allocation modes for desired prefixes.

    Example:

    Node1(config)# route-policy set_per_prefix_locator_rpl
    Node1(config-rpl)# if destination in (3001::1:1:1:1/128) then
    Node1(config-rpl-if)# set srv6-alloc-mode per-vrf locator locator1
    Node1(config-rpl-if)# elseif destination in (3001::2:2:2:2/128) then
    Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf locator locator2
    Node1(config-rpl-elseif)# elseif destination in (3001::3:3:3:3/128) then
    Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf
    Node1(config-rpl-elseif)# elseif destination in (3001::4:4:4:4/128) then
    Node1(config-rpl-elseif)# set srv6-alloc-mode per-ce
    Node1(config-rpl-elseif)# else
    Node1(config-rpl-else)# drop
    Node1(config-rpl-else)# endif
    Node1(config-rpl)# end-policy
  2. Configure BGP global IPv6 over SRv6 with a route policy to determine the SID allocation mode for given prefix.

    Example:

    Node1(config)# router bgp 100
    Node1(config-bgp)# address-family ipv4 unicast
    Node1(config-bgp-af)# segment-routing srv6
    Node1(config-bgp-af-srv6)# alloc mode route-policy set_per_prefix_locator_rpl
    

    Running Configuration

    route-policy set_per_prefix_locator_rpl 
      if destination in (3001::1:1:1:1/128) then
        set srv6-alloc-mode per-vrf locator locator1 
      elseif destination in (3001::2:2:2:2/128) then
        set srv6-alloc-mode per-vrf locator locator2 
      elseif destination in (3001::3:3:3:3/128) then
        set srv6-alloc-mode per-vrf 
      elseif destination in (3001::4:4:4:4/128) then
        set srv6-alloc-mode per-ce 
      else
        drop
      endif
    end-policy
    !
    router bgp 100
     address-family ipv6 unicast 
      segment-routing srv6 
       alloc mode route-policy set_per_prefix_locator_rpl 
      !
     !
    
  3. Verify local and received SIDs have been correctly allocated under BGP IPv6 address family.

    Example:

    Node1# show bgp ipv6 unicast local-sids 
    …
    Status codes: s suppressed, d damped, h history, * valid, > best
                  i - internal, r RIB-failure, S stale, N Nexthop-discard
    Origin codes: i - IGP, e - EGP, ? - incomplete
       Network            Local Sid                                   Alloc mode   Locator
    *> 3001::1:1:1:1/128  fc00:0:0:1:41::                             per-vrf      locator1
    *> 3001::2:2:2:2/128  fc00:0:8:1:41::                             per-vrf      locator2
    *> 3001::3:3:3:3/128  fc00:0:9:1:42::                             per-vrf      locator4
    *> 3001::4:4:4:4/128  fc00:0:9:1:43::                             per-ce       locator4
    *> 3001::5:5:5:5/128  NO SRv6 Sid                                 -            -
    * i3008::8:8:8:8/128  NO SRv6 Sid                                 -            -
    
    
    Node1# show bgp ipv6 unicast received-sids 
    …
    Status codes: s suppressed, d damped, h history, * valid, > best
                  i - internal, r RIB-failure, S stale, N Nexthop-discard
    Origin codes: i - IGP, e - EGP, ? - incomplete
       Network            Next Hop                            Received Sid
    *> 3001::1:1:1:1/128  66.2.2.2                            NO SRv6 Sid
    *> 3001::2:2:2:2/128  66.2.2.2                            NO SRv6 Sid
    *> 3001::3:3:3:3/128  66.2.2.2                            NO SRv6 Sid
    *> 3001::4:4:4:4/128  66.2.2.2                            NO SRv6 Sid
    *> 3001::5:5:5:5/128  66.2.2.2                            NO SRv6 Sid
    * i3008::8:8:8:8/128  77.1.1.2                            fc00:0:0:2:41::
    
    

The device allocates and advertises SIDs for each prefix according to the configured policy. You can verify assignment and locator mapping using the show commands.

What to do next

Verify the BGP global IPv6 configuration using the show bgp ipv6 unicast commands. For more information, see Verify BGP global IPv6 over SRv6.

Verify BGP global IPv6 over SRv6

Ensure that BGP global IPv6 is operating correctly over SRv6 by checking configurations, routing table entries, and CEF tables.

Use this task to confirm the SRv6 feature is enabled and BGP IPv6 routes are properly established and forwarding, using Cisco IOS XR CLI commands.

Follow these steps to verify BGP global IPv6 over SRv6:

Procedure

  1. Verify the BGP global IPv6 configuration using the show bgp ipv6 unicast command.

    RP/0/RSP0/CPU0:Node1# show bgp ipv6 unicast summary
    Fri Jan 15 21:07:04.681 UTC
    BGP router identifier 10.1.1.1, local AS number 100
    BGP generic scan interval 60 secs
    Non-stop routing is enabled
    BGP table state: Active
    Table ID: 0xe0800000   RD version: 4
    BGP main routing table version 4
    BGP NSR Initial initsync version 1 (Reached)
    BGP NSR/ISSU Sync-Group versions 0/0
    BGP scan interval 60 secs
    
    BGP is operating in STANDALONE mode.
    
    
    Process       RcvTblVer   bRIB/RIB   LabelVer  ImportVer  SendTblVer  StandbyVer
    Speaker               4          4          4          4           4           0
    
    Neighbor        Spk    AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down  St/PfxRcd
    3001::1:1:1:4     0   100    1502    1502        4    0    0 04:16:26          1
    3001::1:1:1:5     0   100    1501    1501        4    0    0 04:14:47          1
      
    RP/0/RSP0/CPU0:Node1# show bgp ipv6 unicast
    Fri Jan 15 21:07:26.818 UTC
    BGP router identifier 10.1.1.1, local AS number 100
    BGP generic scan interval 60 secs
    Non-stop routing is enabled
    BGP table state: Active
    Table ID: 0xe0800000   RD version: 4
    BGP main routing table version 4
    BGP NSR Initial initsync version 1 (Reached)
    BGP NSR/ISSU Sync-Group versions 0/0
    BGP scan interval 60 secs
    
    Status codes: s suppressed, d damped, h history, * valid, > best
                  i - internal, r RIB-failure, S stale, N Nexthop-discard
    Origin codes: i - IGP, e - EGP, ? - incomplete
       Network            Next Hop            Metric LocPrf Weight Path
    *> 3001::13:1:1:1/128 ::                       0         32768 i
    *>i3001::13:1:1:4/128 3001::1:1:1:4            0    100      0 i
    *>i3001::13:1:1:5/128 3001::1:1:1:5            0    100      0 i
    
    Processed 3 prefixes, 3 paths
      
    RP/0/RSP0/CPU0:Node1# show bgp ipv6 unicast 3001::13:1:1:4/128
    Fri Jan 15 21:07:50.309 UTC
    BGP routing table entry for 3001::13:1:1:4/128
    Versions:
      Process           bRIB/RIB  SendTblVer
      Speaker                  4           4
    Last Modified: Jan 15 17:13:50.032 for 03:54:01
    Paths: (1 available, best #1)
      Not advertised to any peer
      Path #1: Received by speaker 0
      Not advertised to any peer
      Local
        3001::1:1:1:4 (metric 30) from 3001::1:1:1:4 (10.1.1.4)
          Origin IGP, metric 0, localpref 100, valid, internal, best, group-best
          Received Path ID 0, Local Path ID 1, version 4
          PSID-Type:L3, SubTLV Count:1
           SubTLV:
            T:1(Sid information), Sid:cafe:0:0:4:4b::, Behavior:18, SS-TLV Count:1
             SubSubTLV:
              T:1(Sid structure):
    
    
  2. Verify the current routes in the RIB.

    RP/0/RSP0/CPU0:Node1# show route ipv6 3001::13:1:1:4/128
    Fri Jan 15 21:08:05.499 UTC
    
    Routing entry for 3001::13:1:1:4/128
      Known via "bgp 100", distance 200, metric 0, type internal
      Installed Jan 15 17:13:50.431 for 03:54:15
      Routing Descriptor Blocks
        3001::1:1:1:4, from 3001::1:1:1:4
          Route metric is 0
      No advertising protos.
    
    RP/0/RSP0/CPU0:Node1# show route ipv6 3001::13:1:1:4/128 detail
    Fri Jan 15 21:08:22.628 UTC
    
    Routing entry for 3001::13:1:1:4/128
      Known via "bgp 100", distance 200, metric 0, type internal
      Installed Jan 15 17:13:50.431 for 03:54:32
      Routing Descriptor Blocks
        3001::1:1:1:4, from 3001::1:1:1:4
          Route metric is 0
          Label: None
          Tunnel ID: None
          Binding Label: None
          Extended communities count: 0
          NHID:0x0(Ref:0)
          SRv6 Headend: H.Encaps.Red [base], SID-list {cafe:0:0:4:4b::}
      Route version is 0x1 (1)
      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 93
      No advertising protos.
    
    
  3. Verify the current IPv6 Cisco Express Forwarding (CEF) table.

    RP/0/RSP0/CPU0:Node1# show cef ipv6 3001::13:1:1:4/128
    Fri Jan 15 21:08:41.483 UTC
    3001::13:1:1:4/128, version 93, SRv6 Headend, internal 0x5000001 0x40 (ptr 0x78a100d4) [1], 0x0 (0x0), 0x0 (0x8886b840)
     Updated Jan 15 17:13:50.433
     Prefix Len 128, traffic index 0, precedence n/a, priority 4
       via cafe:0:0:4::/128, 9 dependencies, recursive [flags 0x6000]
        path-idx 0 NHID 0x0 [0x78a0f504 0x0]
        next hop cafe:0:0:4::/128 via cafe:0:0:4::/64
        SRv6 H.Encaps.Red SID-list {cafe:0:0:4:4b::}
    
    RP/0/RSP0/CPU0:Node1# show cef ipv6 3001::13:1:1:4/128 detail
    Fri Jan 15 21:08:59.789 UTC
    3001::13:1:1:4/128, version 93, SRv6 Headend, internal 0x5000001 0x40 (ptr 0x78a100d4) [1], 0x0 (0x0), 0x0 (0x8886b840)
     Updated Jan 15 17:13:50.433
     Prefix Len 128, traffic index 0, precedence n/a, priority 4
      gateway array (0x7883b5d8) reference count 1, flags 0x2010, source rib (7), 0 backups
                    [1 type 3 flags 0x48441 (0x788e6c40) ext 0x0 (0x0)]
      LW-LDI[type=0, refc=0, ptr=0x0, sh-ldi=0x0]
      gateway array update type-time 1 Jan 15 17:13:50.433
     LDI Update time Jan 15 17:13:50.433
    
      Level 1 - Load distribution: 0
      [0] via cafe:0:0:4::/128, recursive
    
       via cafe:0:0:4::/128, 9 dependencies, recursive [flags 0x6000]
        path-idx 0 NHID 0x0 [0x78a0f504 0x0]
        next hop cafe:0:0:4::/128 via cafe:0:0:4::/64
        SRv6 H.Encaps.Red SID-list {cafe:0:0:4:4b::}
    
        Load distribution: 0 1 (refcount 1)
    
        Hash  OK  Interface                 Address
        0     Y   HundredGigE0/0/0/0        remote
        1     Y   HundredGigE0/0/0/1        remote
    
    

BGP global IPv6 routes over SRv6 are verified as operational. The expected output confirms routes are present, SRv6 headend encapsulation is active, and forwarding entries are correctly installed.