Configure Segment Routing Global Block and Segment Routing Local Block

Local label allocation is managed by the label switching database (LSD). The Segment Routing Global Block (SRGB) and Segment Routing Local Block (SRLB) are label values preserved for segment routing in the LSD.

About the Segment Routing Global Block

The SRGB label values are assigned as prefix segment identifiers (SIDs) to SR-enabled nodes and have global significance throughout the domain.


Note

Because the values assigned from the range have domain-wide significance, we recommend that all routers within the domain be configured with the same range of values.


The default SRGB range is from 16000 to 23999.


Note

On SR-capable routers, the default starting value of the dynamic label range is increased from 16000 to 24000, so that the default SRGB label values (16000 to 23999) are available when SR is enabled on a running system. If a dynamic label range has been configured with a starting value of 16000, then the default SRGB label values may already be in use when SR is enabled on a running system. Therefore, you must reload the router after enabling SR to release the currently allocated labels and allocate the SRGB.

Also, if you need to increase the SRGB range after you have enabled SR, you must reload the router to release the currently allocated labels and allocate the new SRGB.


To keep the segment routing configuration simple and to make it easier to troubleshoot segment routing issues, we recommend that you use the default SRGB range on each node in the domain. However, there are instances when you might need to define a different range. For example:

  • The nodes of another vendor support a label range that is different from the default SRGB, and you want to use the same SRGB on all nodes.

  • The default range is too small.

  • To specify separate SRGBs for IS-IS and OSPF protocols, as long as the ranges do not overlap.

Restrictions:

  • In Cisco IOS XR release 6.2.x and earlier, LSD label values 0-15999 are reserved. In Cisco IOS XR release 6.3.1 and later, LSD label values 0-14999 are reserved.

  • In Cisco IOS XR release 6.2.x and earlier, the maximum SRGB size is 65536. In Cisco IOS XR release 6.3.1 and later, the maximum SRGB size is 262,143.

  • The SRGB upper bound cannot exceed the platform's capability.


Note

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


The SRGB can be disabled if SR is not used.

About the Segment Routing Local Block

The Segment Routing Local Block (SRLB) is a range of label values preserved for the manual allocation of adjacency segment identifiers (adj-SIDs). These labels are locally significant and are only valid on the nodes that allocate the labels. The default SRLB range is from 15000 to 15999.


Note

Adjacency SIDs that are not manually allocated using the SRLB will be dynamically allocated from the dynamic label range.

To keep the segment routing configuration simple and to make it easier to troubleshoot segment routing issues, we recommend that you use the default SRLB range. However, there are instances when you might need to define a different range. For example:

  • The nodes of another vendor support a label range that is different from the default SRLB, and you want to use the same SRLB on all nodes.

  • The default range is too small.

When you define a new SRLB range, there might be a label conflict (for example, if labels are already allocated, statically or dynamically, in the new SRLB range). In this case, the new SRLB range will be accepted, but not applied (pending). The previous SRLB range (active) will continue to be in use until one of the following occurs:

  • Reload the router to release the currently allocated labels and allocate the new SRLB.

  • Use the clear segment-routing local-block discrepancy all command to clear the label conflicts.

Restrictions:

  • LSD label values 0-14999 are reserved.

  • The SRLB size cannot be more than 262,143.

  • The SRLB upper bound cannot exceed the platform's capability.

The SRLB can be disabled if SR is not used.

Setup a Non-Default Segment Routing Global Block Range

This task explains how to configure a non-default SRGB range.

SUMMARY STEPS

  1. configure
  2. [router {isis instance-id | ospf process_name} ]
  3. segment-routing global-block starting_value ending_value
  4. Use the commit or end command.

DETAILED STEPS

  Command or Action Purpose
Step 1

configure

Example:


RP/0/RP0/CPU0:router# configure

Enters mode.

Step 2

[router {isis instance-id | ospf process_name} ]

Example:


RP/0/RP0/CPU0:router(config)# router isis 1

(Optional) Enter the router isis instance-id or router ospf process_name commands if you want to configure separate SRGBs for IS-IS and OSPF protocols.

Step 3

segment-routing global-block starting_value ending_value

Example:


RP/0/RP0/CPU0:router(config-isis)# segment-routing global-block 18000 19999

Enter the lowest value that you want the SRGB range to include as the starting value. Enter the highest value that you want the SRGB range to include as the ending value.

Step 4

Use the commit or end command.

commit —Saves the configuration changes and remains within the configuration session.

end —Prompts user to take one of these actions:
  • Yes — Saves configuration changes and exits the configuration session.

  • No —Exits the configuration session without committing the configuration changes.

  • Cancel —Remains in the configuration session, without committing the configuration changes.

Verify the SRGB configuration:

RP/0/RP0/CPU0:router# show mpls label table detail
Table Label   Owner                           State  Rewrite
----- ------- ------------------------------- ------ -------

<...snip...>

0     18000   ISIS(A):1                       InUse  No  
   Lbl-blk SRGB, vers:0, (start_label=18000, size=2000)
0     24000   ISIS(A):1                       InUse  Yes  
   (SR Adj Segment IPv4, vers:0, index=1, type=0, intf=Gi0/0/0/0, nh=10.0.0.2)

What to do next

Configure prefix SIDs and enable segment routing.

Setup a Non-Default Segment Routing Local Block Range

This task explains how to configure a non-default SRLB range.

SUMMARY STEPS

  1. configure
  2. segment-routing local-block starting_value ending_value
  3. Use the commit or end command.

DETAILED STEPS

  Command or Action Purpose
Step 1

configure

Example:


RP/0/RP0/CPU0:router# configure

Enters mode.

Step 2

segment-routing local-block starting_value ending_value

Example:


RP/0/RP0/CPU0:router(config)# segment-routing local-block 30000 30999

Enter the lowest value that you want the SRLB range to include as the starting value. Enter the highest value that you want the SRLB range to include as the ending value.

Step 3

Use the commit or end command.

commit —Saves the configuration changes and remains within the configuration session.

end —Prompts user to take one of these actions:
  • Yes — Saves configuration changes and exits the configuration session.

  • No —Exits the configuration session without committing the configuration changes.

  • Cancel —Remains in the configuration session, without committing the configuration changes.

Verify the SRLB configuration:

RP/0/RP0/CPU0:router# show mpls label table detail
Table Label   Owner                           State  Rewrite
----- ------- ------------------------------- ------ -------

<...snip...>

0     13      LSD(A)                          InUse  Yes
0     30000   LSD(A)                          InUse  No
  (Lbl-blk SRLB, vers:0, (start_label=30000, size=1000, app_notify=0)
0     30002   Static(A)                       InUse  Yes


Display and resolve any SRLB inconsistencies:


RP/0/RP0/CPU0:router# show segment-routing local-block inconsistencies 
Tue Aug 15 13:53:30.555 EDT	
SRLB inconsistencies range: Start/End: 30000/30009
 
RP/0/RP0/CPU0:router# show mpls lsd private | i SRLB
Tue Aug 15 13:53:50.874 EDT
SRLB Lbl Mgr:
   Current Active SRLB block      = [15000, 15999] 
   Configured Pending SRLB block  = [30000, 30999] 

RP/0/RP0/CPU0:router# clear segment-routing local-block discrepancy all
Tue Aug 15 13:59:46.897 EDT

RP/0/RP0/CPU0:router# show mpls lsd private | i SRLB
Tue Aug 15 13:59:55.370 EDT
SRLB Lbl Mgr:
   Current Active SRLB block      = [30000, 30999] 
   Configured Pending SRLB block  = [0, 0]

RP/0/RP0/CPU0:router# show mpls label table detail private 
Tue Aug 15 14:00:26.023 EDT
Table Label   Owner                           State  Rewrite
----- ------- ------------------------------- ------ -------
0     0       LSD(A)                          InUse  Yes
0     1       LSD(A)                          InUse  Yes
0     2       LSD(A)                          InUse  Yes
0     13      LSD(A)                          InUse  Yes
0     30000   LSD(A)                          InUse  No
  (Lbl-blk SRLB, vers:0, (start_label=30000, size=1000, app_notify=0)

What to do next

Configure adjacency SIDs and enable segment routing.