Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Example: Configuring SRGB in Segment Routing for IS-IS

This example shows how to define the segment routing label block (SRGB) label range for segment packet routing in networking (SPRING) or segment routing (SR) for the IS-IS protocol. This configuration ensures that the labels are more predictable across the segment routing domain with a beneficial impact on network speed.


Our content testing team has validated and updated this example.


This example uses the following hardware and software components:

  • Two MX Series routers

  • Junos OS Release 17.2 or later running on all devices

    • Updated and revalidated using vMX on Junos OS Release 21.1R1.


Are you interested in getting hands-on experience on this feature?

Visit Juniper vLabs to reserve your pre-configured vLab Sandbox: Segment Routing - Basic and try it out for free!

Before you configure the SRGB label range for segment routing in the IS-IS domain, be sure you configured the routing and signaling protocols.


Currently, Junos OS allows you to configure only node segment indices. The value of the start label depends on the dynamic label available in the system. Because there is no predictability of the dynamic label range being allocated to the SRGB, Junos OS allows you to configure the SRGB label range used by segment routing. The labels in the SRGB range are used for segment routing in the IS-IS domain. This means the labels advertised are more predictable and deterministic across the segment routing domain.


Figure 1 shows SRGB configured on router R1 and router R2.



CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.



Configuring Device R1

Step-by-Step Procedure

The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.

To configure device R1:


Repeat this procedure for device R2 after modifying the appropriate interface names, addresses, and other parameters.

  1. Configure enhanced-ip mode on the MX Series because the SRGB functionality is supported on routers with MPCs and MIC interfaces only. A system reboot is required after you commit this configuration.

  2. Configure the interfaces.

  3. Configure the MPLS protocol on the interface. For segment routing to work, you can configure any of the statements under the [edit protocols mpls] hierarchy. For example, abstract-hop, class-of-service, label-range, optimize-switchover-delay, et cetra.

  4. Configure the start label and index range of SRGB.

    • Ensure that the MPLS label for a binding segment ID (SID) is the sum of the SRGB start label and SID index value. In addition, SID index value must be less than or equal to the index-range value specified in the configuration.

    • Junos does not check whether the SID index is within the SRGB's range when the SID index is assigned through an IS-IS export policy. If you configure an index that is out of range of the configured SRGB, you won’t see any error message in the logs or while committing the configuration. Junos OS shows a commit error only when you configure the SID under the [edit protocols isis source-packet-routing] hierarchy level.

  5. Configure the IPv4 index value of the node segment.

  6. Configure the IPv6 index value of the node segment.

  7. Disable level 1, configure the IS-IS protocol on the interface, and configure loopback interface lo0.0 as passive..


From configuration mode, confirm your configuration by entering the show chassis, show interfaces, and show protocols commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.


SUMMARY Confirm that the configuration is working properly.

Verifying the Configurable SRGB


Verify the configurable SRGB label range in the IS-IS overview information.


From operational mode, run the show isis overview command to display the IS-IS overview information.


The output displays the configured SRGB start label and the SRGB index range. The end of the SRGB label range is the summation of the start label value and the index range. All devices in the segment routing domain must have the same SRGB range values.