Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

How to Enable Strict SPF SIDs and IGP Shortcut

Understanding Strict SPF (SR-Algo 1) and IGP Shortcuts

Strict SPF (SR-Algo 1) and IGP shortcut provides the following benefits

Benefits of Strict SPF (SR-Algo 1) and IGP Shortcuts

  • Enhances segment routing capabilities.

  • Helps to avoid loops by creating SR-TE tunnel to forward the traffic using the shortest IGP path.

  • Ability to use SR-Algo 1 (strict SPF) along with SR-Algo 0 (default SPF) by default, when you enable SPRING.

Overview of Strict SPF (SR-Algo 1) and IGP Shortcuts

Segment routing (SR) simplifies operations and reduces resource requirements in the network by removing network state information from intermediate routers and placing path information into packet headers at the ingress node. However, in some cases, when there are nested SR-TE tunnels present and devices forward traffic over these SR-TE tunnel, traffic might loop, cause congestion, and not forward traffic over the shortest IGP path.

Starting in Junos OS Release 21.1R1, you can advertise SR algorithm 1 (strict SPF) and use the strict SPF SIDs to create SR-TE tunnels. Such SR-TE tunnels use only the strict path SPF instead of the local policy to reach the tunnel endpoint. You can specify prefixes in the import policy, based on which the tunnels redirect the traffic to a certain destination. Additionally, you can use SR-Algo 1 (strict SPF) along with SR-Algo 0 (default SPF) by default when you enable SPRING.

You can advertise strict-SPF SIDs in IS-IS LSPDU and use these SIDs to create SR-TE tunnel to forward the traffic through the shortest IGP path while not causing loops. Labeled IS-IS routes will then use the tunnel with the pre-defined shortcut statement at the inet-mpls family or inet6-mpls family configuration when you prefer spring-te tunnel.

The following illustration depicts the difference between SR-TE tunnels created without strict SPF SIDs and SR-TE tunnels created by using strict SPF (SR-Algo 1) SIDs:

Figure 1 shows a network topology where SR-TE tunnel is not created using shortest IGP path to forward a traffic when a pre-existing SR-TE tunnel (or RSVP tunnel) is selected as ingress at P1 node. Two SR-TE tunnels exist in this topology. One from P1 to P6 (tunnel a, blue colored) via P0 and another tunnel is P1 to P7 (tunnel b, green colored) via P6. In this case, tunnel (b) is not created using the shortest IGP path. Thus, instead of taking the existing tunnel to reach P6 and then forwarding to P7, since, inet-mpls shortcut statement is enabled on P1 node, label IS-IS route uses the SR-TE tunnel (a) to forward the traffic destined to P7 avoiding the shortest IGP path, resulting traffic congestion on tunnel (a).

Figure 2 shows a topology where traffic loops. When the labeled IS-IS route chooses SR-TE tunnel as ingress and redirected to another SR-TE tunnel, then traffic will loop. In this topology we have two SR-TE tunnels, one from P0 to P6 via P2 and another tunnel is from P1 to P2 via P6. For a packet sent from P0 to P6 node, at P0 if this node picks SR-TE tunnel as ingress for the destination 2.2.2.6, it will push P2 label and forward to P1. At P1, another SR-TE tunnel is present via P6 with a label in mpls.0 table. When P1 receives this traffic to reach P2 node, it will use L-ISIS route shortcut over SR-TE tunnel and push P6 with the same label then forward to P0 node. At P0, the top label is the same as P6, which means that if the SR-TE tunnel again then it will push P2 label and forward the traffic to P1, which will loop.

Figure 3 shows the SR-TE tunnels created using Strict SPF SIDs that now supports SR-Algo 1 along with the pre-existing SR-Algo 0. Strict-SPF SID routes are installed in IS-IS only if the next-hop node is also capable of SR algo 1. Else, the traffic will be dropped. If you created the SR-TE tunnel using strict SPF SIDs and if anywhere on the path where a device did not advertise support for SR Algo 1, the tunnel will stay down. When tunnel is created using Strict SPF SIDs it will take the shortest IGP path to reach another tunnel endpoint, and thereby, avoids congestion. In a scenario where traffic loops (as shown in figure 2), the strict-SPF SIDs will be advertised in IS-IS LSPDU only by each node that is participating in SR domain that supports SR Algo 1. There can be multiple SR-TE tunnels, either created by using Strict-SPF SIDS or normal SIDs. When the operator configures the statement “use-for-shortcut” before creating the explicit route object (ERO), tunnels are created using strict SPF SIDs.

Example: Configure Strict SPF SIDs and Enable IGP Shortcuts in SPRING for IS-IS Protocol

Overview

Typically, when there are nested SR-TE tunnels present in a network and devices forward traffic over these SR-TE tunnels, traffic might not get forwarded over the shortest IGP path. As a result, traffic might loop.

Starting in Junos OS Release 21.1R1, you can advertise SR algorithm and use the strict SPF SIDs to create SR-TE tunnels to forward the traffic using shortest IGP path to avoid loop. Labeled IS-IS route will now use this tunnel with the pre-defined shortcut knob present under inet-mpls family (or inet6-mpls family) when you enable spring-te.

Requirements

This example uses the following hardware and software components:

  • Eight MX Series routers

  • Junos OS Release 21.1R1 or later running on all devices

Topology

In the following example, we are demonstrating how loops occur in a network with multiple SR-TE tunnels and how you can resolve it by using strict SPF SIDs created by SR Algorithm 1. The example topology has two SR-TE tunnels. Tunnel A from R0>R2>R6 and Tunnel B from R1>R6>R2.

On R0 a packet destined to R6 typically use the IGP shortest path: that is, R0>R5>R6. When you configure an SR-TE tunnel with its ingress node as R0 (tunnel A), the packet needs to go through R2 as its first hop (destination: R6 and label: 403002), which means the traffic destined to R6 needs to take the R0>R2>R6 path. To reach R2, the packet needs to reach R1 first on the R0—R1 interface with the first label 403002. The R2's label 403002 should get forwarded from R1>R2 with no changes to the label stack. However, there is a second SR-TE tunnel (tunnel B) configured on R1 (R1>R6>R2) with destination R2 and label 403006. The packet that came from R0 with top label as R2 (403002) on R1 ends up using the second tunnel to reach R6. But to reach R6 on R1, R1—R0 (R1>R0>R5>R6) is the interface it needs to use. Thus, the packet reaches R0 again and the whole process repeats, resulting in looping.

With the SR algorithm 1 activated on all devices, and its labels activated on the relevant devices, when the packet from the ingress device R0 to the destination device R6 reaches R1 (tunnel A), the packet gets forwarded to R2. Even though R1 has LSP configured to consider R6 as its next hop (tunnel B), it would instead take the IGP shortest path (R1>R2). From R2, it reaches R6 through Tunnel A.

Configuration

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, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

Note:

Depending on the type of MPC in your MX Series routers you might need to explicitly enable enhanced IP services to support the IS-IS delay feature. When you commit the set chassis network-services enhanced-ip configuration statement, you will be prompted to reboot the system.

R0

R1

R2

R3

R4

R5

R6

R7

Enable Default SIDs (Algorithm 0) in SPRING

  1. Configure the basic device settings such as hostname, IPv4 address, loopback interface address, NET address, family ISO, family MPLS (with maximum number of labels for segment routing routed paths), enhanced-ip mode, router-ID, and autonomous system (AS) number on all eight routers.

  2. Enable IS-IS, RSVP, and MPLS protocols on all interfaces of all eight devices. You can also specify trace files and operations for MPLS.

  3. Configure all routers to advertise their loopback address and specify the index and the node segment of the prefix segment.

  4. Configure the start-label and index-range of SRGB for SPRING. Configure the value of IPv4 node segment index and assign 128 flex algorithm.

  5. Configure options for shortest-path-first (SPF) algorithm in IS-IS protocol to enable the source packet routing node segment labels for computing backup paths on R0, R1, and R2. Set maximum labels set to 8.

  6. Configure traffic engineering options to choose label switched paths from spring-te and use the MPLS paths as next hops on R0, R1, and R2. Set the IS-IS export policy.

  7. Configure an R2 label 403002 (created for algorithm 0 to create default SPF SID) on R0 with R2 as its next hop to the destination R6 and enable use-for-shortcut. Create labels on R1, and R2 as well.

  8. Enter commit command to commit the configurations.

Enable Strict SPF SIDs (Algorithm 1) in SPRING

  1. To replace the labels used for default SPF SIDs with labels to be used for strict SPF SIDs, configure the following:

  2. Set/activate algorithm 1 on all other routers in the network.

  3. Enter commit command to commit all configuration.

Results

Check the results of the configuration:

Verification

Verify IS-IS Adjacencies

Purpose

Verify expected IS-IS adjacencies on the routing devices.

Action

From operational mode, enter the show isis adjacency command.

Meaning

The output indicates that R0 has successfully formed IS-IS adjacencies on its ge-0/0/0.0 and ge-0/0/1.0 interfaces, which attach to their R1 and R5 routers, respectively.

Verify Route Table inet.3

Purpose

Verify the inet.3 routing table with the advertised.

Action

From operational mode, enter the show route table inet.3 command.

Meaning

Th output displays the routes on inet.3 table.

Verify Route Label (Default SPF)

Purpose

Verify route labels created for default SPF on the routing devices.

Action

From operational mode, enter the show route label 403002 command.

Meaning

The output indicates that the packet is pushing R2's label 403002 to R1 to reach its next hop R2. But on R1, it picks up the tunnel B and pushes the label of its next hop R6- 403006, instead of getting forwarded from R1 to R2 on tunnel A.

Verify Route Label (Strict SPF)

Purpose

Verify route labels created for strict SPF on the routing devices.

Action

From operational mode, enter the show route label 403102 command.

Meaning

The first output indicates that the packet with R2's label has reached R1. The second output indicates that the packet is now forwarded to R2 (on tunnel A), instead of getting picked by the tunnel B on R1. Once it reaches R2, it can complete the tunnel A path and reach R6.