Configuring single shared loopback SR SID

When configuring an SR SID (either IPv4 or IPv6) for OSPF or IS-IS instances, the single shared SID for loopback or system interfaces can be enabled by the routing protocol independent sr-mpls>prefix-sids command. One or more IGP protocol instances can have a unique sr-mpls>prefix-sids configured and share this interface SID for an interface. This enhancement relaxes the otherwise imposed SID uniqueness for a loopback/system interface across all configured routing instances on a device.

It is possible to configure the sr-mpls>prefix-sids by label or index. The global prefix-sid-range must be configured in the routing instance when the sr-mpls> prefix-sids is used.
  • configure router isis segment-routing prefix-sid-range global
  • configure router ospf segment-routing prefix-sid-range global
  • configure router ospf3 segment-routing prefix-sid-range global
When a shared SID is configured outside the routing instances, it can be used for all instances when the routing protocol is enabled on the interface. The following CLI configures the prefix SIDs.
configure
|
+---router
|   +---segment-routing
|   |   +---sr-mpls
|   |   |   +---prefix-sids [<ip-int-name>] 
|   |   |   |   no prefix-sids [<ip-int-name>]
|   |   |   |   +---no ipv4-sid
|   |   |   |   |   ipv4-sid index <[0..4294967295]>
|   |   |   |   |   ipv4-sid label <[32..1048575]>
|   |   |   |   +---no ipv6-sid
|   |   |   |   |   ipv6-sid index <[0..4294967295]>
|   |   |   |   |   ipv6-sid label <[32..1048575]>
|   |   |   |   |
|   |   |   |   |---node-sid
|   |   |   |   |   no node-sid
The following is a description of the configuration commands:
  • ipv4-sid

    This command is used to configure the SID associated with the primary IPv4 address of the loopback or system interface.

  • ipv6-sid

    This command is used to configure the SID associated with the primary IPv6 address of the loopback or system interface.

  • node-sid

    This command sets the N-flag. The N-flag is set when the prefix SID is a node SID as described in RFC 8402. If the N-flag is not set, the address is an SR anycast SID.

The following considerations apply for shared sr-mpls>prefix-sids.
  • When an sr-mpls>prefix-sids is shared between IGP instances, all instances must share the same SR label range. This means that the instances must use the "global" SRGB range.
  • Locally configured shared sr-mpls>prefix-sids share the statistics on that node, if configured. As a result, when incoming SID statistics on both OSPF and IS-IS are enabled and the SID is shared, the same statistics are displayed for both IGPs.
The following restrictions apply when configuring the sr-mpls>prefix-sids.
  • The sr-mpls>prefix-sids command can only be used for loopback and system interfaces.
  • Exporting sr-mpls>prefix-sids into BGP and use it for stitching an SR IGP domain with BGP-based SR MPLS tunnels is not supported.
  • On the same interface, sharing the node SID across different address families is not allowed (for example, IPv4 node SID in ISIS and IPv6 in OSPFv3 or even IPv4 and IPv6 in the same ISIS instance).
  • Configuring a SID as a prefix-sids in one instance and node-sid in another instance is not allowed. For example, if IS-IS has assigned a normal SID (either ipv4-node-sid or ipv6-node-sid) to a loopback in an IS-IS instance, OSPF cannot install the same SID on that loopback as a shared sr-mpls>prefix-sids.
  • Each sr-mpls/prefix-sids SID must be unique across all routing instances.
  • It is possible to configure on a single interface a regular IGP node-sid and sr-mpls>prefix-sids for a single IGP algorithm. In this case, the IGP will override the configure>router>segment-routing>sr-mpls>prefix-sids configuration, and the IGP node-sid will only be advertised.

Use the show router segment-routing sr-mpls prefix-sids and tools dump router segment-routing tunnel CLI commands to verify the operation of the shared SIDs. For more information, see the 7450 ESS, 7750 SR, 7950 XRS, and VSR Clear, Monitor, Show, and Tools Command Reference Guide.

Show command sample output
*A:Dut-A# show router segment-routing sr-mpls prefix-sids

====================================================================================
Rtr Base SR-MPLS Prefix-SIDs
====================================================================================
Interface Name                  AF     SID       Label     State
------------------------------------------------------------------------------------
System                          IPv4   123       100123    enabled    
System                          IPv6   234       100234    ifFailed
loopback.0                      IPv4   345       100345    ifDown    
loopback.0                      IPv6   456       100456    ifDown   
loopback.4                      IPv4   567       100567    failed     
loopback.4                      IPv6   -         -         adminDown
loopback.6                      IPv4   -         -         adminDown 
loopback.6                      IPv6   678       100678    notPref
------------------------------------------------------------------------------------
No. of Prefix-SIDs: 4
====================================================================================
*A:Dut-C# tools dump router segment-routing tunnel
===================================================================================================
Legend: (B) - Backup Next-hop for Fast Re-Route
        (D) - Duplicate
label stack is ordered from top-most to bottom-most
===================================================================================================
--------------------------------------------------------------------------------------------------+
 Prefix                                                                                           |
 Sid-Type        Fwd-Type       In-Label  Prot-Inst(algoId)                                       |
                 Next Hop(s)                                     Out-Label(s) Interface/Tunnel-ID |
--------------------------------------------------------------------------------------------------+
 1.1.1.3
 Node            Terminating    20003     IGP-Shared
 1.1.1.5
 Node            Orig/Transit   20005     ISIS-0
                 10.10.10.2                                      20005       To_1/1/1(E)
 10.10.10.2
 Adjacency       Transit        524287    ISIS-0
                 10.10.10.2                                      3           To_1/1/1(E)
--------------------------------------------------------------------------------------------------+
No. of Entries: 3
--------------------------------------------------------------------------------------------------+
*A:Dut-C#