Segment Routing Global Block (SRGB)

Segment Routing Global Block (SRGB) is the range of labels reserved for segment routing.

Default SRGB range is 16000–23999. It is strongly recommended to use same SRGB on all nodes. We can also use different SRGBs on different nodes, however, using different SRGBs complicates operations for the user.

A prefix-SID is advertised as a domain-wide unique index. The Prefix-SID index points to a unique label within the SRGB.

  • Index is zero based, i.e. first index = 0.
  • Label = Prefix-SID index + SRGB base (16000).
  • E.g. Prefix 10.10.0.70/32 with prefix-SID index 70 gets label 16070.
  • A non-default SRGB can be allocated between 16000 and 1048575 or up to the platform limit, if any.
  • The size of the SRGB should be equal on all nodes. Current maximum size is 64k.

Label Switching Database (LSD)

Local label allocation is managed by Label Switching Database (LSD). MPLS Applications must register as client with LSD to allocate labels. MPLS Applications are e.g. IGP, LDP, RSVP, MPLS etc.

Label space range of Segment Routing capable software release (even if Segment Routing is not enabled) :
  • Label range [0-15] reserved for special-purposes
  • Label range [16-15999] reserved for static MPLS labels
  • Label range [16000-23999] preserved for SRGB
  • Label range [24000-max] used for dynamic label allocation
Most MPLS based applications use labels dynamically allocated by LSD, for example, LDP, RSVP, L2VPN, BGP(LU, VPN), IS-IS(Adj-SID), OSPF (Adj-SID), TE (Binding-SID). Dynamic labels are allocated from the dynamic label range (above the preserved SRGB label range).

LSD preserves the default SRGB label range [16000-23999]. In any Segment Routing capable software release even if Segment Routing is not enabled except if the configured mpls label range includes this default range. LSD allocates dynamic labels starting from 24000. If the configured MPLS label range includes the default SRGB label range, the default preservation is disabled, for example, "mpls label range 16000 1048575".  Preservation of the default SRGB label range makes future Segment Routing activation possible without any node reload or config changes.


LSD SRGB allocation mechanism
  • Upon a node reload or IGP process reset, LSD does not accept any dynamic label allocation before the IGP ISIS or OSPF has registered with LSD.
  • Upon successful OSPF/ISIS registration, LSD allocates the requested SRGB.
  • If Segment Routing not enabled, OSPF/ISIS don’t request an SRGB and no SRGB is allocated.
  • If Segment Routing is enabled, OSPF/ISIS request an SRGB either as per customized SRGB configuration or the default range [16000, 23999] if Segment Routing enabled without customized SRGB.
  • Once ISIS/OSPF have registered and their SRGB is allocated, LSD starts serving dynamic label requests from other clients.
  • LSD preserves the label range [16,000-23,999] by default, even if not used as SRGB.
  • If a router is running multiple IGP instances, these instances can use the same SRGB or use different non-overlapping SRGBs.
  • Modifying a SRGB configuration is disruptive for traffic and may require a reboot if the new SRGB is not (entirely) available.

SR activation config example:

On an IOS-XR Node

router isis ABC
 address-family ipv4 unicast
  metric-style wide
  segment-routing mpls
 !
 interface Loopback0
  address-family ipv4 unicast
   prefix-sid index <SID index>
!
segment-routing
 global-block 20000 23000


On an IOS-XE device

To enable SR capability for MPLS forwarding plane:

router isis
address-family ipv4|ipv6 unicast  
metric-style wide  
segment-routing mpls


To enable SR capability for IPv6 extension header forwarding plane:

router isis
address-family ipv6 unicast  
metric-style wide  
segment-routing ipv6