ISIS Segment Routing Traffic Engineering¶
The source-routing approach used by SR networks completely identifies the LSP path that a given packet will take when entering an SR network. IGPs generally use the SPF algorithm to determine the best next hop to use. With SR, the resulting LSP relies on this selection to offer the best path between a head-end device and a given endpoint. SR also offers a list of MPLS labels that can be used by the user to forge alternate paths that do not rely on the criteria of the SPF algorithm.
The below figure illustrates how to divert traffic from the 10.100.0.0/24
sub-network to the 10.200.0.0/24
sub-network by using the rt3
device as the
next-hop instead of the rt2
device.
The configuration of the rt1
device is given below.
rt1
rt1 running vrf main# interface physical eth1
rt1 running physical eth1# ipv4 address 10.100.0.1/24
rt1 running physical eth1# port pci-b0s4
rt1 running physical eth1# ..
rt1 running interface# physical eth2
rt1 running physical eth2# ipv4 address 10.130.0.1/24
rt1 running physical eth2# port pci-b0s5
rt1 running physical eth2# ..
rt1 running interface# physical eth3
rt1 running physical eth3# ipv4 address 10.125.0.1/24
rt1 running physical eth3# port pci-b0s6
rt1 running physical eth3# ..
rt1 running interface# loopback loop1
rt1 running loopback loop1# ipv4 address 1.1.1.1/32
rt1 running loopback loop1# .. ..
rt1 running vrf main# routing
rt1 running routing# interface loop1
rt1 running interface loop1# isis area-tag 1
rt1 running interface loop1# isis ipv4-routing true
rt1 running interface loop1# isis network-point-to-point true
rt1 running interface loop1# isis hello interval level-1 1
rt1 running interface loop1# isis hello multiplier level-1 3
rt1 running interface loop1# ..
rt1 running routing# interface eth2
rt1 running interface eth2# isis area-tag 1
rt1 running interface eth2# isis ipv4-routing true
rt1 running interface eth2# isis network-point-to-point true
rt1 running interface eth2# isis hello interval level-1 1
rt1 running interface eth2# isis hello multiplier level-1 3
rt1 running interface eth2# isis metric level-1 25
rt1 running interface eth2# ..
rt1 running routing# interface eth3
rt1 running interface eth3# isis area-tag 1
rt1 running interface eth3# isis ipv4-routing true
rt1 running interface eth3# isis network-point-to-point true
rt1 running interface eth3# isis hello interval level-1 1
rt1 running interface eth3# isis hello multiplier level-1 3
rt1 running interface eth3# ..
rt1 running routing# isis instance 1
rt1 running instance 1# area-address 49.0002.0000.1977.00
rt1 running instance 1# log-adjacency-changes true
rt1 running instance 1# segment-routing
rt1 running segment-routing# enabled true
rt1 running segment-routing# label-blocks srgb
rt1 running srgb# lower-bound 1000 upper-bound 10000
rt1 running srgb# .. ..
rt1 running segment-routing# label-blocks srlb
rt1 running srgb# lower-bound 32000 upper-bound 32999
rt1 running srgb# .. ..
rt1 running segment-routing# prefix-sid-map 1.1.1.1/32 sid-value 11
rt1 running segment-routing# ..
rt1 running instance 1# .. ..
rt1 running routing#
The below display shows that the LSP path to the 4.4.4.4
endpoint uses the
rt2
device (next hop 10.125.0.2
).
rt1> show ipv4-routes
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, A - Babel, D - SHARP, F - PBR, f - OpenFabric,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
C>* 1.1.1.1/32 is directly connected, loop1, 18:40:03
I>* 2.2.2.2/32 [115/20] via 10.125.0.2, eth3, label implicit-null, weight 1, 18:38:59
I>* 3.3.3.3/32 [115/30] via 10.125.0.2, eth3, label 1033, weight 1, 05:15:40
I>* 4.4.4.4/32 [115/45] via 10.125.0.2, eth3, label 1044, weight 1, 05:15:40
C>* 10.100.0.0/24 is directly connected, eth1, 18:40:08
I 10.125.0.0/24 [115/20] via 10.125.0.2, eth3 inactive, weight 1, 18:39:20
C>* 10.125.0.0/24 is directly connected, eth3, 18:40:08
I>* 10.126.0.0/24 [115/20] via 10.125.0.2, eth3, weight 1, 18:39:20
I>* 10.127.0.0/24 [115/35] via 10.125.0.2, eth3, weight 1, 05:15:40
I 10.130.0.0/24 [115/45] via 10.125.0.2, eth3, weight 1, 05:14:46
C>* 10.130.0.0/24 is directly connected, eth2, 07:57:01
To reach the 10.200.0.0/24
, a BGP session between the head-end 1.1.1.1
and the endpoint 4.4.4.4
could be established, and the resulting route would
use the 10.125.0.2
next hop as indicated below:
rt1> show ipv4-routes
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, A - Babel, D - SHARP, F - PBR, f - OpenFabric,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
B> 10.200.0.0/24 [200/0] via 4.4.4.4 (recursive), weight 1, 00:00:27
* via 10.125.0.2, eth3, label 1044, weight 1, 00:00:27
[..]
The rt3
device has the following MPLS table where the highlighted entries will
be used to send traffic to the 4.4.4.4
endpoint.
rt3> show mpls table
Inbound Label Type Nexthop Outbound Label
-------------------------------------------------------
1011 SR (IS-IS) 10.126.0.2 1011
1022 SR (IS-IS) 10.126.0.2 implicit-null
1044 SR (IS-IS) 10.127.0.4 implicit-null
33000 SR (IS-IS) 10.126.0.2 implicit-null
33001 SR (IS-IS) 10.130.0.1 implicit-null
33002 SR (IS-IS) 10.127.0.4 implicit-null
A static route to reach the 10.200.0.0/24
is performed to force the
traffic to use the rt3
device as next hop.
rt1 running vrf main# routing static
rt1 running static# ipv4-route 10.200.0.0/24 next-hop 10.130.0.3 mpls-label 1044
rt1 running static#
The resulting route entry is selected from the RIB and applied to traffic entering the SR topology.
rt1> show ipv4-routes
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
T - Table, A - Babel, D - SHARP, F - PBR, f - OpenFabric,
> - selected route, * - FIB route, q - queued, r - rejected, b - backup
t - trapped, o - offload failure
[..]
S>* 10.200.0.0/24 [1/0] via 10.130.0.3, eth2, label 1044, weight 1, 04:44:53
Using adjacency labels is also possible, thus forcing the traffic from the rt1
device to the rt3
device. The below example creates a static labeled route with
the 33002
adjacency label value.
rt1
rt1 running vrf main# routing static
rt1 running static# del ipv4-route 10.200.0.0/24
rt1 running static# ipv4-route 10.200.0.0/24 next-hop 10.130.0.3 mpls-label 33002
rt1 running static#
It is possible to perform multiple label stacking when the SR networks become
bigger. The segment list will then be used to execute swap
and pop
operations
until reaching the LER.
See also
Segment Routing Traffic Engineering.