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 SPRING is enabled.

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 nested SR-TE tunnels are present and traffic is forwarded 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 SPRING is enabled.

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. Labelled 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 spring-te tunnel is preferred.

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 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, 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 is picked 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, or the traffic will be dropped. IF SR-TE tunnel is created 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 ISIS 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.