Segment Routing Global Block (SRGB)

The Segment Routing Global Block (SRGB) is the range of label values reserved for Segment Routing (SR) in the Label Switching Database (LSD). These values are assigned as segment identifiers (SIDs) to SR-enabled nodes and have global significance throughout the domain. On SR-capable routers, SRGB is enabled by default so that label values are automatically reserved when the router first boots whether SR is enabled or not. The default SRGB range is 16000 to 23999, and the SRGB can be disabled if SR is not used. You can also specify separate SRGBs for IS-IS and OSPF protocols so long as the ranges do not overlap.

SRGB Limitations

  • LSD label values 0-15,999 are reserved.
  • The SRGB size cannot be more than 2^16 or 65536.
  • The SRGB upper bound value cannot exceed the platform capability.
  • The SRGB cannot be configured to be the same value as the default SRGB. So SRGB cannot be configured for 16000 to 23999.

Note

Label values that are not previously reserved are available for dynamic assignment.


Configuring the SRGB

When SR is enabled, but the SRGB is not configured, the system reserves a default label range. After you configure the SRGB, the default label range is released.

When the SR is disabled, the corresponding label range is released and a default label range is reserved.

Reserving a New SRGB

If the SRGB is reserved successfully with the MPLS Forwarding Interface (MFI), then SR is enabled. Otherwise, SR is disabled, but the segment routing MPLS global configuration is saved.

If the MFI reserves the SRGB, but there are some dynamically allocated labels in use in that range, then SR is disabled, the SRGB is released, and the configuration is saved.

Modifying an Existing SRGB

There can be two scenarios when modifying an SRGB:

  1. Extending the upper bound of an existing SRGB. For example,

    Current range—16000 to 20000

    New range—16000 to 24000

    The new SRGB range is reserved based on the conditions mentioned in Reserving a New SRGB .


    Note

    In all cases, the new configuration is always saved.
  2. The new range is either a disjoint range from the existing SRGB or overlaps with existing SRGB

    In this case, SR is disabled and the previous configuration is deleted. See the figure in Segment Routing Limitations section.

    To configure an SRGB:

    
    enable
    configure terminal
    segment-routing mpls
    global-block 16000 17000
    

Adjacency Segment Identifiers

The Adjacency Segment Identifier (adj-SID) is a local label that points to a specific interface and a next hop out of that interface. The router in which the interface is installed automatically assigns an SR SID to the connection using values outside the range of those in its segment routing global block. This SID has local significance only and is not distributed for inclusion in the FIBs of other routers.


Note

Only IPv4 address-family supports allocating adjacency-SIDs.


Prefix Segment Identifiers

A prefix segment identifier (SID) identifies a segment routing tunnel leading to the destination represented by a prefix. The maximum prefix SID value is (2^16) - 1.

When a prefix SID value x is configured, the prefix SID translates to a label value equivalent to x + lower boundary of SRGB. For example, if the default SRGB is used, configuring a prefix-SID of 10 for interface Loopback 0 with IPv4 address 1.0.0.1/32 results in assigning the label 16010 to the prefix 1.0.0.1/32.

Types of Prefix SID Mapping

  • Export Prefix SID Mapping
  • Connected Prefix SID Mapping

Export Prefix SID Mapping

These are the prefix-sid mappings that the IGPs export to the segment routing nodes through the SID or the Label Binding TLVs, and define the prefix-SID bindings for the network.

Connected Prefix SID Mappings

These are the prefix SID mappings that define the Prefix SID or Node-SID of the interface. Connected prefix SID mappings are created under the mapping-server that the IGPs query to obtain the prefix SID of the interface of an SR node.

Configuring Export Prefix SID Mapping


segment-routing mpls
connected-prefix-sid-map
address-family ipv4 cisco
 <prefix> / <masklen> [index | absolute] <label> [range <value>]

For example,


connected-prefix-sid-map
address-family ipv4
92.0.0.0/24 index 51 range 1
2.2.2.2/32 index 2 range 1


Note

The index and absolute keywords indicate whether the label value entered should be interpreted as an index in the SRGB or as an absolute value. By default, the value is interpreted as an index value. Regardless of the configuration mode, the value is advertised by the protocols as an index value.


Configuring Connected Prefix SID Mapping


segment-routing mpls
  mapping-server
      prefix-sid-map
         address-family ipv4 
cisco
    	   <prefix> / <masklen> [index
 | absolute
] <label> [range <value>]

Note

The index and absolute keywords indicate whether the label value entered should be interpreted as an index in the SRGB or as an absolute value. By default, the value is interpreted as an index value. Regardless of the configuration mode, the value is advertised by the protocols as an index value.


Configuring the Preferred Label

The Cisco Express Forwarding engine (CEF) can use either the prefix labels stored in the routing information base (RIB) or the labels provided by the label distribution protocol (LDP), for forwarding.

You can set the prefix label or the LDP label as the preferred label by using:


segment-routing mpls
	 set-attributes	
	   address-family ipv4 
cisco
	 sr-label-preferred

The IGPs communicate the preference to the CEF, which in turn processes the forwarding for that prefix accordingly.

Configuring the Segment Routing Explicit Null

To ensure that quality of service is maintained between the penultimate and last-hop routers, the penultimate router swaps the segment routing label with an explicit null label and forwards the packet to the last-hop router. This swapping preserves the MPLS header attributes for QoS purposes.


segment-routing mpls
set-attributes	
address-family ipv4 cisco
explicit-null