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
- Overview of Strict SPF (SR-Algo 1) and IGP Shortcuts
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 A 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 B 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 C 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
- Enable Default SIDs (Algorithm 0) in SPRING
- Enable Strict SPF SIDs (Algorithm 1) in SPRING
- Results
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.
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
set system host-name R0 set system ports console log-out-on-disconnect set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 family inet address 10.0.10.10/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/1 unit 0 family inet address 10.0.10.20/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.255.10/32 set interfaces lo0 unit 0 family iso address 49.1921.6825.5010.00 set interfaces lo0 unit 0 family mpls maximum-labels 8 set policy-options policy-statement sspf term 1 from route-filter 192.168.255.10/32 exact set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3100 set policy-options policy-statement sspf term 1 then prefix-segment index 3000 set policy-options policy-statement sspf term 1 then prefix-segment node-segment set policy-options policy-statement sspf term 1 then accept set protocols isis interface ge-0/0/0.0 set protocols isis interface ge-0/0/1.0 set protocols isis interface all set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 400000 set protocols isis source-packet-routing srgb index-range 64000 set protocols isis source-packet-routing node-segment ipv4-index 1000 set protocols isis source-packet-routing flex-algorithm 128 set protocols isis backup-spf-options use-post-convergence-lfa maximum-labels 8 set protocols isis backup-spf-options use-post-convergence-lfa maximum-backup-paths 8 set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering tunnel-source-protocol spring-te set protocols isis traffic-engineering family inet-mpls shortcuts set protocols isis export sspf set protocols mpls traceoptions file sspf-igp-short set protocols mpls traceoptions file size 100m set protocols mpls traceoptions file world-readable set protocols mpls traceoptions flag ted-export set protocols mpls traceoptions flag ted-import set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols rsvp interface all deactivate protocols rsvp interface all set protocols rsvp interface fxp0.0 disable deactivate protocols rsvp interface fxp0.0 disable set protocols source-packet-routing segment-list v4R0R7 h1 label 403102 set protocols source-packet-routing source-routing-path V4_R7 use-for-shortcut set protocols source-packet-routing source-routing-path V4_R7 to 192.168.255.6 set protocols source-packet-routing source-routing-path V4_R7 primary v4R0R7 set routing-options router-id 192.168.255.10 set routing-options autonomous-system 65540
R1
set system host-name R1 set system ports console log-out-on-disconnect set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 family inet address 10.0.10.1/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/1 unit 0 family inet address 10.0.12.1/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.255.1/32 set interfaces lo0 unit 0 family iso address 49.1921.6825.5001.00 set interfaces lo0 unit 0 family mpls maximum-labels 8 set policy-options policy-statement sspf term 1 from route-filter 192.168.255.1/32 exact set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3101 set policy-options policy-statement sspf term 1 then prefix-segment index 3001 set policy-options policy-statement sspf term 1 then prefix-segment node-segment set policy-options policy-statement sspf term 1 then accept set protocols isis interface all set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 400000 set protocols isis source-packet-routing srgb index-range 64000 set protocols isis source-packet-routing node-segment ipv4-index 1001 set protocols isis source-packet-routing flex-algorithm 128 set protocols isis backup-spf-options use-post-convergence-lfa maximum-labels 8 set protocols isis backup-spf-options use-post-convergence-lfa maximum-backup-paths 8 set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering tunnel-source-protocol spring-te set protocols isis traffic-engineering family inet-mpls shortcuts set protocols isis export sspf set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols source-packet-routing segment-list v4R1R2 h1 label 403106 set protocols source-packet-routing source-routing-path V4_R2 use-for-shortcut set protocols source-packet-routing source-routing-path V4_R2 to 192.168.255.2 set protocols source-packet-routing source-routing-path V4_R2 primary v4R1R2 set routing-options router-id 192.168.255.1 set routing-options autonomous-system 65540
R2
set system host-name R2 set system ports console log-out-on-disconnect set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 family inet address 10.0.23.2/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/1 unit 0 family inet address 10.0.12.2/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.255.2/32 set interfaces lo0 unit 0 family iso address 49.1921.6825.5002.00 set interfaces lo0 unit 0 family mpls maximum-labels 8 set policy-options policy-statement sspf term 1 from route-filter 192.168.255.2/32 exact set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3102 set policy-options policy-statement sspf term 1 then prefix-segment index 3002 set policy-options policy-statement sspf term 1 then prefix-segment node-segment set policy-options policy-statement sspf term 1 then accept set protocols isis interface all set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 400000 set protocols isis source-packet-routing srgb index-range 64000 set protocols isis source-packet-routing node-segment ipv4-index 1002 set protocols isis source-packet-routing flex-algorithm 128 set protocols isis level 2 wide-metrics-only set protocols isis level 1 wide-metrics-only set protocols isis backup-spf-options use-post-convergence-lfa maximum-labels 8 set protocols isis backup-spf-options use-post-convergence-lfa maximum-backup-paths 8 set protocols isis backup-spf-options use-source-packet-routing set protocols isis traffic-engineering tunnel-source-protocol spring-te set protocols isis traffic-engineering family inet-mpls shortcuts set protocols isis export sspf set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols source-packet-routing segment-list v4R2R6 h1 label 403100 set protocols source-packet-routing segment-list v4R2R6 h2 label 403107 set protocols source-packet-routing source-routing-path v4_R6 use-for-shortcut set protocols source-packet-routing source-routing-path v4_R6 to 192.168.255.2 set protocols source-packet-routing source-routing-path v4_R6 primary v4R2R6 set routing-options router-id 192.168.255.2 set routing-options autonomous-system 65540
R3
set system host-name R3 set system ports console log-out-on-disconnect set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 family inet address 10.0.23.3/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/1 unit 0 family inet address 10.0.34.3/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.255.3/32 set interfaces lo0 unit 0 family iso address 49.1921.6825.5003.00 set interfaces lo0 unit 0 family mpls maximum-labels 8 set policy-options policy-statement sspf term 1 from route-filter 192.168.255.3/32 exact set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3103 set policy-options policy-statement sspf term 1 then prefix-segment index 3003 set policy-options policy-statement sspf term 1 then prefix-segment node-segment set policy-options policy-statement sspf term 1 then accept set protocols isis interface all set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 400000 set protocols isis source-packet-routing srgb index-range 64000 set protocols isis source-packet-routing node-segment ipv4-index 1003 set protocols isis source-packet-routing flex-algorithm 128 set protocols isis level 2 wide-metrics-only set protocols isis level 1 wide-metrics-only set protocols isis backup-spf-options use-post-convergence-lfa maximum-labels 8 set protocols isis backup-spf-options use-post-convergence-lfa maximum-backup-paths 8 set protocols isis backup-spf-options use-source-packet-routing set protocols isis export sspf set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols source-packet-routing set routing-options router-id 192.168.255.3 set routing-options autonomous-system 65540
R4
set system host-name R4 set system ports console log-out-on-disconnect set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 family inet address 10.0.34.4/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/1 unit 0 family inet address 10.0.47.4/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.255.4/32 set interfaces lo0 unit 0 family iso address 49.1921.6825.5004.00 set interfaces lo0 unit 0 family mpls maximum-labels 8 set policy-options policy-statement sspf term 1 from route-filter 192.168.255.4/32 exact set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3104 set policy-options policy-statement sspf term 1 then prefix-segment index 3004 set policy-options policy-statement sspf term 1 then prefix-segment node-segment set policy-options policy-statement sspf term 1 then accept set protocols isis interface all set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 400000 set protocols isis source-packet-routing srgb index-range 64000 set protocols isis source-packet-routing node-segment ipv4-index 1004 set protocols isis source-packet-routing flex-algorithm 128 set protocols isis level 2 wide-metrics-only set protocols isis level 1 wide-metrics-only set protocols isis backup-spf-options use-post-convergence-lfa maximum-labels 8 set protocols isis backup-spf-options use-post-convergence-lfa maximum-backup-paths 8 set protocols isis backup-spf-options use-source-packet-routing set protocols isis export sspf set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols source-packet-routing set routing-options router-id 192.168.255.4 set routing-options autonomous-system 65540
R5
set system host-name R5 set system ports console log-out-on-disconnect set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 family inet address 10.0.56.5/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/1 unit 0 family inet address 10.0.10.5/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.255.5/32 set interfaces lo0 unit 0 family iso address 49.1921.6825.5005.00 set interfaces lo0 unit 0 family mpls maximum-labels 8 set policy-options policy-statement sspf term 1 from route-filter 192.168.255.5/32 exact set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3105 set policy-options policy-statement sspf term 1 then prefix-segment index 3005 set policy-options policy-statement sspf term 1 then prefix-segment node-segment set policy-options policy-statement sspf term 1 then accept set protocols isis interface all set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 400000 set protocols isis source-packet-routing srgb index-range 64000 set protocols isis source-packet-routing node-segment ipv4-index 1005 set protocols isis source-packet-routing node-segment ipv6-index 2005 set protocols isis source-packet-routing flex-algorithm 128 set protocols isis level 2 wide-metrics-only set protocols isis level 1 wide-metrics-only set protocols isis backup-spf-options use-post-convergence-lfa maximum-labels 8 set protocols isis backup-spf-options use-post-convergence-lfa maximum-backup-paths 8 set protocols isis backup-spf-options use-source-packet-routing set protocols isis export sspf set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols source-packet-routing set routing-options router-id 192.168.255.5 set routing-options autonomous-system 65540
R6
set system host-name R6 set system ports console log-out-on-disconnect set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 family inet address 10.0.56.6/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/1 unit 0 family inet address 10.0.67.6/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.255.6/32 set interfaces lo0 unit 0 family iso address 49.1921.6825.5006.00 set interfaces lo0 unit 0 family mpls maximum-labels 8 set policy-options policy-statement sspf term 1 from route-filter 192.168.255.6/32 exact set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3106 set policy-options policy-statement sspf term 1 then prefix-segment index 3006 set policy-options policy-statement sspf term 1 then prefix-segment node-segment set policy-options policy-statement sspf term 1 then accept set protocols isis interface all set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 400000 set protocols isis source-packet-routing srgb index-range 64000 set protocols isis source-packet-routing node-segment ipv4-index 1006 set protocols isis source-packet-routing node-segment ipv6-index 2006 set protocols isis source-packet-routing flex-algorithm 128 set protocols isis level 2 wide-metrics-only set protocols isis level 1 wide-metrics-only set protocols isis backup-spf-options use-post-convergence-lfa maximum-labels 8 set protocols isis backup-spf-options use-post-convergence-lfa maximum-backup-paths 8 set protocols isis backup-spf-options use-source-packet-routing set protocols isis export sspf set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols source-packet-routing set routing-options router-id 192.168.255.6 set routing-options autonomous-system 65540
R7
set system host-name R7 set system ports console log-out-on-disconnect set chassis network-services enhanced-ip set interfaces ge-0/0/0 unit 0 family inet address 10.0.47.7/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/1 unit 0 family inet address 10.0.67.7/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.255.7/32 set interfaces lo0 unit 0 family iso address 49.1921.6825.5007.00 set interfaces lo0 unit 0 family mpls maximum-labels 8 set policy-options policy-statement sspf term 1 from route-filter 192.168.255.7/32 exact set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3107 set policy-options policy-statement sspf term 1 then prefix-segment index 3007 set policy-options policy-statement sspf term 1 then prefix-segment node-segment set policy-options policy-statement sspf term 1 then accept set protocols isis interface all set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 passive set protocols isis source-packet-routing srgb start-label 400000 set protocols isis source-packet-routing srgb index-range 64000 set protocols isis source-packet-routing node-segment ipv4-index 1007 set protocols isis source-packet-routing node-segment ipv6-index 2007 set protocols isis source-packet-routing flex-algorithm 128 set protocols isis level 2 wide-metrics-only set protocols isis level 1 wide-metrics-only set protocols isis backup-spf-options use-post-convergence-lfa maximum-labels 8 set protocols isis backup-spf-options use-post-convergence-lfa maximum-backup-paths 8 set protocols isis backup-spf-options use-source-packet-routing set protocols isis export sspf set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols rsvp interface all set protocols rsvp interface fxp0.0 disable set protocols source-packet-routing set routing-options router-id 192.168.255.7 set routing-options autonomous-system 65540
Enable Default SIDs (Algorithm 0) in SPRING
-
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.user@R0# set chassis network-services enhanced-ip set system host-name R0 set interfaces ge-0/0/0 unit 0 family inet address 10.0.10.10/24 set interfaces ge-0/0/0 unit 0 family iso set interfaces ge-0/0/0 unit 0 family mpls maximum-labels 8 set interfaces ge-0/0/1 unit 0 family inet address 10.0.10.20/24 set interfaces ge-0/0/1 unit 0 family iso set interfaces ge-0/0/1 unit 0 family mpls maximum-labels 8 set interfaces lo0 unit 0 family inet address 192.168.255.10/32 set interfaces lo0 unit 0 family iso address 49.1921.6825.5010.00 set interfaces lo0 unit 0 family mpls maximum-labels 8 set routing-options router-id 192.168.255.10 set routing-options autonomous-system 65540
-
Enable IS-IS, RSVP, and MPLS protocols on all interfaces of all eight devices. You can also specify trace files and operations for MPLS.
user@R0# set protocols isis interface ge-0/0/0.0 set protocols isis interface ge-0/0/1.0 set protocols isis interface all set protocols isis interface fxp0.0 disable set protocols isis interface lo0.0 passive set protocols mpls traceoptions file sspf-igp-short set protocols mpls traceoptions file size 100m set protocols mpls traceoptions file world-readable set protocols mpls traceoptions flag ted-export set protocols mpls traceoptions flag ted-import set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols rsvp interface all deactivate protocols rsvp interface all set protocols rsvp interface fxp0.0 disable deactivate protocols rsvp interface fxp0.0 disable
-
Configure all routers to advertise their loopback address and specify the index and the node segment of the prefix segment.
user@R0# set policy-options policy-statement sspf term 1 from route-filter 192.168.255.10/32 exact set policy-options policy-statement sspf term 1 then prefix-segment index 3000 set policy-options policy-statement sspf term 1 then prefix-segment node-segment set policy-options policy-statement sspf term 1 then accept
-
Configure the start-label and index-range of SRGB for SPRING. Configure the value of IPv4 node segment index and assign 128 flex algorithm.
user@R0# set protocols isis source-packet-routing srgb start-label 400000 set protocols isis source-packet-routing srgb index-range 64000 set protocols isis source-packet-routing node-segment ipv4-index 1000 set protocols isis source-packet-routing flex-algorithm 128
-
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.
user@R0# set protocols isis backup-spf-options use-post-convergence-lfa maximum-labels 8 set protocols isis backup-spf-options use-post-convergence-lfa maximum-backup-paths 8 set protocols isis backup-spf-options use-source-packet-routing
-
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.user@R0# set protocols isis traffic-engineering tunnel-source-protocol spring-te set protocols isis traffic-engineering family inet-mpls shortcuts set protocols isis export sspf
-
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.user@R0# set protocols source-packet-routing segment-list v4R0R7 h1 label 403002 set protocols source-packet-routing source-routing-path V4_R7 use-for-shortcut set protocols source-packet-routing source-routing-path V4_R7 to 192.168.255.6 set protocols source-packet-routing source-routing-path V4_R7 primary v4R0R7
user@R1# set protocols source-packet-routing segment-list v4R1R2 h1 label 403006 set protocols source-packet-routing source-routing-path V4_R2 use-for-shortcut set protocols source-packet-routing source-routing-path V4_R2 to 192.168.255.2 set protocols source-packet-routing source-routing-path V4_R2 primary v4R1R2
user@R2# set protocols source-packet-routing segment-list v4R2R6 h1 label 403000 set protocols source-packet-routing segment-list v4R2R6 h2 label 403007 set protocols source-packet-routing source-routing-path v4_R6 use-for-shortcut set protocols source-packet-routing source-routing-path v4_R6 to 192.168.255.2 set protocols source-packet-routing source-routing-path v4_R6 primary v4R2R6
-
Enter
commit
command to commit the configurations.
Enable Strict SPF SIDs (Algorithm 1) in SPRING
-
To replace the labels used for default SPF SIDs with labels to be used for strict SPF SIDs, configure the following:
user@R0# delete protocols source-packet-routing segment-list v4R0R7 h1 label 403002 set protocols source-packet-routing segment-list v4R0R7 h1 label 403102 set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3100
user@R1# delete protocols source-packet-routing segment-list v4R1R2 h1 label 403006 set protocols source-packet-routing segment-list v4R1R2 h1 label 403106 set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3101
user@R2# delete protocols source-packet-routing segment-list v4R2R6 h1 label 403000 set protocols source-packet-routing segment-list v4R2R6 h1 label 403100 delete protocols source-packet-routing segment-list v4R2R6 h2 label 403007 set protocols source-packet-routing segment-list v4R2R6 h2 label 403107 set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3102
-
Set/activate algorithm 1 on all other routers in the network.
user@R3# set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3103
user@R4# set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3104
user@R5# set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3105
user@R6# set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3106
user@R7# set policy-options policy-statement sspf term 1 then prefix-segment algorithm 1 index 3107
-
Enter
commit
command to commit all configuration.
Results
Check the results of the configuration:
user@R0# show system { host-name R0; ports { console log-out-on-disconnect; } } chassis { network-services enhanced-ip; } interfaces { ge-0/0/0 { unit 0 { family inet { address 10.0.10.10/24; } family iso; family mpls { maximum-labels 8; } } } ge-0/0/1 { unit 0 { family inet { address 10.0.10.20/24; } family iso; family mpls { maximum-labels 8; } } } lo0 { unit 0 { family inet { address 192.168.255.10/32; } family iso { address 49.1921.6825.5010.00; } family mpls { maximum-labels 8; } } } } policy-options { policy-statement sspf { term 1 { from { route-filter 192.168.255.10/32 exact; } then { prefix-segment { algorithm 1 index 3100; index 3000; node-segment; } accept; } } } } protocols { isis { interface ge-0/0/0.0; interface ge-0/0/1.0; interface all; interface fxp0.0 { disable; } interface lo0.0 { passive; } source-packet-routing { srgb start-label 400000 index-range 64000; node-segment ipv4-index 1000; flex-algorithm 128; } backup-spf-options { use-post-convergence-lfa { maximum-labels 8; maximum-backup-paths 8; } use-source-packet-routing; } traffic-engineering { tunnel-source-protocol { spring-te; } family inet-mpls { shortcuts; } } export sspf; } mpls { traceoptions { file sspf-igp-short size 100m world-readable; flag ted-export; flag ted-import; } interface all; interface fxp0.0 { disable; } } rsvp { inactive: interface all; interface fxp0.0 { inactive: disable; } } source-packet-routing { segment-list v4R0R7 { h1 label 403102; } source-routing-path V4_R7 { use-for-shortcut; to 192.168.255.6; primary { v4R0R7; } } } } routing-options { router-id 192.168.255.10;
Verification
- Verify IS-IS Adjacencies
- Verify Route Table inet.3
- Verify Route Label (Default SPF)
- Verify Route Label (Strict SPF)
Verify IS-IS Adjacencies
Purpose
Verify expected IS-IS adjacencies on the routing devices.
Action
From operational mode, enter the show isis adjacency
command.
user@R0> show isis adjacency Interface System L State Hold (secs) SNPA ge-0/0/0.0 R1 1 Up 23 56:4:15:0:1c:d2 ge-0/0/0.0 R1 2 Up 25 56:4:15:0:1c:d2 ge-0/0/1.0 R5 1 Up 25 56:4:15:0:1c:eb ge-0/0/1.0 R5 2 Up 24 56:4:15:0:1c:eb
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.
regress@R0> show route table inet.3 inet.3: 7 destinations, 8 routes (7 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.168.255.1/32 *[L-ISIS/14] 3d 19:43:17, metric 10 > to 10.0.10.1 via ge-0/0/0.0 192.168.255.2/32 *[L-ISIS/14] 3d 19:43:17, metric 20 > to 10.0.10.1 via ge-0/0/0.0, Push 403002 192.168.255.3/32 *[L-ISIS/14] 3d 19:43:17, metric 30 > to 10.0.10.1 via ge-0/0/0.0, Push 403003 192.168.255.4/32 *[L-ISIS/14] 3d 19:43:17, metric 21 > to 10.0.10.1 via ge-0/0/0.0, Push 403004, Push 403002(top) 192.168.255.5/32 *[L-ISIS/14] 3d 19:43:17, metric 10 > to 10.0.10.5 via ge-0/0/1.0 192.168.255.6/32 *[SPRING-TE/8] 3d 19:43:17, metric 1, metric2 20 > to 10.0.10.1 via ge-0/0/0.0, Push 403002 [L-ISIS/14] 3d 19:43:17, metric 1 > to 10.0.10.1 via ge-0/0/0.0, Push 403002 192.168.255.7/32 *[L-ISIS/14] 3d 19:43:17, metric 11 > to 10.0.10.1 via ge-0/0/0.0, Push 403007, Push 403002(top)
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.
user@R0> show route label 403002 mpls.0: 23 destinations, 23 routes (23 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 403002 *[L-ISIS/14] 3d 20:17:24, metric 20 > to 10.0.10.1 via ge-0/0/0.0, Swap 403002
regress@R1> show route label 403002 mpls.0: 23 destinations, 23 routes (23 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 403002 *[L-ISIS/14] 3d 20:31:53, metric 1 > to 10.0.10.10 via ge-0/0/0.0, Push 403006 403002(S=0) *[L-ISIS/14] 3d 20:31:53, metric 1 > to 10.0.10.10 via ge-0/0/0.0, Push 403006
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.
user@R0> show route label 403102 mpls.0: 32 destinations, 32 routes (32 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 403102 *[L-ISIS/14] 00:36:07, metric 20 > to 10.0.10.1 via ge-0/0/0.0, Swap 403102
regress@R1> show route label 403102 mpls.0: 32 destinations, 32 routes (32 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 403102 *[L-ISIS/14] 00:37:38, metric 10 > to 10.0.12.2 via ge-0/0/1.0, Pop 403102(S=0) *[L-ISIS/14] 00:37:38, metric 10 > to 10.0.12.2 via ge-0/0/1.0, Pop
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.