Preview
Rate this lesson

In the last video we talked about the segment routing control-plane and data-plane and how “segment routing” network works. in this section, I would like to add a few points about the control-plane in “segment routing”. ECMP or Load Balancing over equal-cost paths, using Explicit-null instead of Implicit-null for QoS application, how adj-SID is created in the NBMA and broadcast network and how to change the global range of the prefix-SID, are the topics that will be addressed in this video.

segment routing topology and configuration

in this video we are using a new topology that we can use to show these new concepts. In the last video the ISIS protocol was implemented, but in the new topology we are using OSPF so we can also see the configuration of OSPF.

segment routing topology

In this topology we use 6 routers, xrv1 to xrv6. xrv1 and xrv6 are edge routers of the network. All routers have a loopback address with an IP address that corresponds to the router number, from 1.1.1.1 to 6.6.6.6. The IP addresses in each link also correspond to the number of connecting routers. For example, 10.2.4.x is the IP address between router2 and router4. The last digit is also configured based on the router number.

segment routing control-plane and data-plane description

There is also a broadcast ethernet network with three routers, xrv2, xrv3, and xrv5 to show how segment routing works on a broadcast and NBMA network with multiple routers. The IP address configured for this link is 10.23.5.x.

segment routing control plane in detail

The configurations of the xrv2 and xrv5 routers are shown in the picture. All configurations except the IP addressing are displayed here. As you can see, OSPF is activated in all routers. ISIS protocol was configured in previous topology. then the “router-id”  is configured, then area 0 is activated and all interfaces including loopback and all GigabitEthernet interfaces are activated in area 0. OSPF point-to-point network type is configured for all interfaces except Gigabitethernet3, since three routers are connected in this link and it’s default network type is broadcast.

Then we activate the segment routing in the OSPF context mode with two commands, “segment routing mpls” and “segment routing mpls forwarding”. Then we assign a prefix-SID for the loopback interface of all routers. Index 2 means that 16002 is configured for the xrv2 router and index 5 is configured for the xrv5 router.

!!! xrv2
router ospf 1
 router-id 2.2.2.2
 segment-routing mpls
 segment-routing forwarding mpls
 area 0
  interface Loopback0
   passive enable
   prefix-sid index 2
  !
  interface GigabitEthernet0/0/0/0
   network point-to-point
  !
  interface GigabitEthernet0/0/0/1
   network point-to-point
  !
  interface GigabitEthernet0/0/0/2
   network point-to-point
  !
  interface GigabitEthernet0/0/0/3
  !
 !
!

segment routing ECMP

The first new point that we would like to talk about in the “Segment Routing Control-Plane” is ECMP or Equal Cost Path Load Balancing. In this topology we have equal-cost paths between the edge routers, xrv1 and xrv6.

Since there is no traffic engineering rules in edge routers, we know that segment routing follows the best IGP path for forwarding. In IGP, we have load balancing over equal-cost paths so the traffic is load-balanced also in the segment routing network.

To make sure, we check xrv1’s CEF table and also LFIB table for traffic destined to xrv6.

With “show ip route ospf” we check in xrv1 whether there are paths with the same costs for the destination 6.6.6.6.

Then we use “show cef 6.6.6.6/32” to show CEF table for destination 6.6.6.6 to check the load balancing of the receiving IP traffic over the “Segment Routing” network. As you see, the label 16006 is used for both paths, which is the prefix-SID of the xrv6.

We also check the LFIB table with “show mpls forwarding” to make sure that load balancing is taking place.

And finally, we can traceroute the traffic to destination 6.6.6.6 to make sure that the load balancing is really happening.

RP/0/RP0/CPU0:xrv1#show ip route ospf
Fri Jun 18 20:53:14.634 UTC

O    2.2.2.2/32 [110/2] via 10.1.2.2, 1d06h, GigabitEthernet0/0/0/0
O    3.3.3.3/32 [110/2] via 10.1.3.3, 1d06h, GigabitEthernet0/0/0/1
O    4.4.4.4/32 [110/3] via 10.1.2.2, 1d06h, GigabitEthernet0/0/0/0
O    5.5.5.5/32 [110/3] via 10.1.3.3, 1d06h, GigabitEthernet0/0/0/1
                [110/3] via 10.1.2.2, 1d06h, GigabitEthernet0/0/0/0
O    6.6.6.6/32 [110/4] via 10.1.3.3, 1d06h, GigabitEthernet0/0/0/1
                [110/4] via 10.1.2.2, 1d06h, GigabitEthernet0/0/0/0
O    10.2.3.0/24 [110/2] via 10.1.3.3, 1d06h, GigabitEthernet0/0/0/1
                 [110/2] via 10.1.2.2, 1d06h, GigabitEthernet0/0/0/0
O    10.2.4.0/24 [110/2] via 10.1.2.2, 1d06h, GigabitEthernet0/0/0/0
O    10.3.5.0/24 [110/2] via 10.1.3.3, 1d06h, GigabitEthernet0/0/0/1
O    10.4.5.0/24 [110/3] via 10.1.3.3, 1d06h, GigabitEthernet0/0/0/1
                 [110/3] via 10.1.2.2, 1d06h, GigabitEthernet0/0/0/0
O    10.4.6.0/24 [110/3] via 10.1.2.2, 1d06h, GigabitEthernet0/0/0/0
O    10.5.6.0/24 [110/3] via 10.1.3.3, 1d06h, GigabitEthernet0/0/0/1
                 [110/3] via 10.1.2.2, 1d06h, GigabitEthernet0/0/0/0
O    10.23.5.0/24 [110/2] via 10.1.3.3, 1d06h, GigabitEthernet0/0/0/1
                  [110/2] via 10.1.2.2, 1d06h, GigabitEthernet0/0/0/0
RP/0/RP0/CPU0:xrv1#show cef 6.6.6.6/32
Fri Jun 18 20:53:48.871 UTC
6.6.6.6/32, version 256, labeled SR, internal 0x1000001 0x81 (ptr 0xe1b4b30) [1], 0x0 (0xe376528), 0xa28 (0xf2c80f0)
 Updated Jun 17 14:11:40.623
 remote adjacency to GigabitEthernet0/0/0/0
 Prefix Len 32, traffic index 0, precedence n/a, priority 1
   via 10.1.2.2/32, GigabitEthernet0/0/0/0, 8 dependencies, weight 0, class 0 [flags 0x0]
    path-idx 0 NHID 0x0 [0xf1041d0 0x0]
    next hop 10.1.2.2/32
    remote adjacency
     local label 16006      labels imposed {16006}
   via 10.1.3.3/32, GigabitEthernet0/0/0/1, 6 dependencies, weight 0, class 0 [flags 0x0]
    path-idx 1 NHID 0x0 [0xf104260 0x0]
    next hop 10.1.3.3/32
    remote adjacency
     local label 16006      labels imposed {16006}
RP/0/RP0/CPU0:xrv1#show mpls forwarding
Fri Jun 18 20:54:33.215 UTC
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
Label  Label       or ID              Interface                    Switched
------ ----------- ------------------ ------------ --------------- ------------
16002  Pop         SR Pfx (idx 2)     Gi0/0/0/0    10.1.2.2        0
16003  Pop         SR Pfx (idx 3)     Gi0/0/0/1    10.1.3.3        0
16004  16004       SR Pfx (idx 4)     Gi0/0/0/0    10.1.2.2        0
16005  16005       SR Pfx (idx 5)     Gi0/0/0/0    10.1.2.2        0
       16005       SR Pfx (idx 5)     Gi0/0/0/1    10.1.3.3        0
16006  16006       SR Pfx (idx 6)     Gi0/0/0/0    10.1.2.2        1036
       16006       SR Pfx (idx 6)     Gi0/0/0/1    10.1.3.3        980
24004  Pop         SR Adj (idx 0)     Gi0/0/0/1    10.1.3.3        0
24005  Pop         SR Adj (idx 0)     Gi0/0/0/0    10.1.2.2        0
RP/0/RP0/CPU0:xrv1#traceroute 6.6.6.6 source 1.1.1.1
Fri Jun 18 20:55:15.962 UTC

Type escape sequence to abort.
Tracing the route to 6.6.6.6

 1  10.1.2.2 [MPLS: Label 16006 Exp 0] 79 msec
    10.1.3.3 137 msec
    10.1.2.2 123 msec
 2  10.2.4.4 [MPLS: Label 16006 Exp 0] 242 msec
    10.23.5.5 98 msec
    10.2.4.4 77 msec
 3  10.4.6.6 89 msec
    10.5.6.6 81 msec  *

segment routing explicit-null versus implicit-null

The second new point in this video is to replace implicit-null with explicit-null. as you know, with PHP rule in MPLS, the label is removed in the last router before the destination. Since the QoS tag is also inside MPLS label, the QoS tag is automatically removed when MPLS label is removed. Then it is difficult to apply the QoS policy if the packet does not contain a QoS tag as we cannot easily identify if it is for example a voice or data packet. With explicit-null, we’re adding real null MPLS label to the packet instead of removing it. So the QoS tag is not removed from the packet and it is easier to identify the traffic in order to apply the appropriate QoS policy.

Before we change implicit-null to explicit-null, we can check in routers xrv4 and xrv5 whether the label is removed before forwarding to the destination xrv6 (6.6.6.6).

RP/0/RP0/CPU0:xrv4#show mpls forwarding
Fri Jun 18 20:58:30.065 UTC
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
Label  Label       or ID              Interface                    Switched
------ ----------- ------------------ ------------ --------------- ------------
16001  16001       SR Pfx (idx 1)     Gi0/0/0/0    10.2.4.2        1104
16002  Pop         SR Pfx (idx 2)     Gi0/0/0/0    10.2.4.2        0
16003  16003       SR Pfx (idx 3)     Gi0/0/0/0    10.2.4.2        0
       16003       SR Pfx (idx 3)     Gi0/0/0/1    10.4.5.5        0
16005  Pop         SR Pfx (idx 5)     Gi0/0/0/1    10.4.5.5        0
16006  Pop         SR Pfx (idx 6)     Gi0/0/0/2    10.4.6.6        714
24000  Pop         SR Adj (idx 0)     Gi0/0/0/0    10.2.4.2        0
24001  Pop         SR Adj (idx 0)     Gi0/0/0/1    10.4.5.5        0
24002  Pop         SR Adj (idx 0)     Gi0/0/0/2    10.4.6.6        0
RP/0/RP0/CPU0:xrv5#show mpls forwarding
Fri Jun 18 20:58:56.405 UTC
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
Label  Label       or ID              Interface                    Switched
------ ----------- ------------------ ------------ --------------- ------------
16001  16001       SR Pfx (idx 1)     Gi0/0/0/0    10.3.5.3        3360
       16001       SR Pfx (idx 1)     Gi0/0/0/3    10.23.5.2       672
       16001       SR Pfx (idx 1)     Gi0/0/0/3    10.23.5.3       4464
16002  Pop         SR Pfx (idx 2)     Gi0/0/0/3    10.23.5.2       0
16003  Pop         SR Pfx (idx 3)     Gi0/0/0/0    10.3.5.3        0
       Pop         SR Pfx (idx 3)     Gi0/0/0/3    10.23.5.3       0
16004  Pop         SR Pfx (idx 4)     Gi0/0/0/1    10.4.5.4        0
16006  Pop         SR Pfx (idx 6)     Gi0/0/0/2    10.5.6.6        420
24010  Pop         SR Adj (idx 0)     Gi0/0/0/1    10.4.5.4        0
24011  Pop         SR Adj (idx 0)     Gi0/0/0/0    10.3.5.3        0
24012  Pop         SR Adj (idx 0)     Gi0/0/0/2    10.5.6.6        0
24013  Pop         SR Adj (idx 0)     Gi0/0/0/3    10.23.5.2       0
24014  Pop         SR Adj (idx 0)     Gi0/0/0/3    10.23.5.3       0

Then we change implicit-null to explicit-null in router xrv6 so that neighbouring routers xrv4 and xrv5 know that they don’t must remove label and must instead use explicit-null.

router ospf 1
 area 0
  interface Loopback0
   prefix-sid index 6 explicit-null

now we check again, the LFIB table in xrv4 and xrv5 with “show mpls forwarding” to make sure that pop is replaced by explicit-null.

RP/0/RP0/CPU0:xrv4#show mpls forwarding
Fri Jun 18 21:00:28.691 UTC
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
Label  Label       or ID              Interface                    Switched
------ ----------- ------------------ ------------ --------------- ------------
16001  16001       SR Pfx (idx 1)     Gi0/0/0/0    10.2.4.2        1104
16002  Pop         SR Pfx (idx 2)     Gi0/0/0/0    10.2.4.2        0
16003  16003       SR Pfx (idx 3)     Gi0/0/0/0    10.2.4.2        0
       16003       SR Pfx (idx 3)     Gi0/0/0/1    10.4.5.5        0
16005  Pop         SR Pfx (idx 5)     Gi0/0/0/1    10.4.5.5        0
16006  Exp-Null-v4 SR Pfx (idx 6)     Gi0/0/0/2    10.4.6.6        0
24000  Pop         SR Adj (idx 0)     Gi0/0/0/0    10.2.4.2        0
24001  Pop         SR Adj (idx 0)     Gi0/0/0/1    10.4.5.5        0
24002  Pop         SR Adj (idx 0)     Gi0/0/0/2    10.4.6.6        0
RP/0/RP0/CPU0:xrv5#show mpls forwarding
Fri Jun 18 20:58:56.405 UTC
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
Label  Label       or ID              Interface                    Switched
------ ----------- ------------------ ------------ --------------- ------------
16001  16001       SR Pfx (idx 1)     Gi0/0/0/0    10.3.5.3        3360
       16001       SR Pfx (idx 1)     Gi0/0/0/3    10.23.5.2       672
       16001       SR Pfx (idx 1)     Gi0/0/0/3    10.23.5.3       4464
16002  Pop         SR Pfx (idx 2)     Gi0/0/0/3    10.23.5.2       0
16003  Pop         SR Pfx (idx 3)     Gi0/0/0/0    10.3.5.3        0
       Pop         SR Pfx (idx 3)     Gi0/0/0/3    10.23.5.3       0
16004  Pop         SR Pfx (idx 4)     Gi0/0/0/1    10.4.5.4        0
16006  Pop         SR Pfx (idx 6)     Gi0/0/0/2    10.5.6.6        420
24010  Pop         SR Adj (idx 0)     Gi0/0/0/1    10.4.5.4        0
24011  Pop         SR Adj (idx 0)     Gi0/0/0/0    10.3.5.3        0
24012  Pop         SR Adj (idx 0)     Gi0/0/0/2    10.5.6.6        0
24013  Pop         SR Adj (idx 0)     Gi0/0/0/3    10.23.5.2       0
24014  Pop         SR Adj (idx 0)     Gi0/0/0/3    10.23.5.3       0

So when we implement QoS in our “segment routing” network, it is recommended to enable explicit-null, which helps us to implement the QoS policy easier.

adj-SID in broadcast and NBMA networks

Another point in this video is how adj-SID works in broadcast and NBMA networks where more than two routers make neighborship. Previously I said that the router would dynamically create an adj-SID for each of its links. The question is then how we engineer traffic in broadcast and in NBMA network?  for example in our topology, we want, the receiving traffic in xrv1 to be sent to xrv2 and then via Gigabitethernet3 to xrv5 or xrv3? How can we differentiate between these two xrv2-xrv3 or xrv2-xrv5?

If xrv2 assigns only one adj-SID for Gigabitethernet3, then we cannot distinguish between these two neighbourhoods. The reality is that in the “segment routing” network, for each neighbour in the broadcast and NBMA network, a different adj-SID is assigned and not just one for the link. So there is a different adj-SID for xrv2-xrv3 and xrv2-xrv5. this is the reason why it is called adj-SID and not link-SID.

To make sue,  in xrv2 and in Gigabitethernet3, we check how many labels are assigned.

RP/0/RP0/CPU0:xrv2#show ospf neighbor detail | inc "Neighbor|GigabitEthernet|Label"
Fri Jun 18 21:04:31.504 UTC
# Indicates Neighbor awaiting BFD session up
Neighbors for OSPF 1
 Neighbor 1.1.1.1, interface address 10.1.2.1
    In the area 0 via interface GigabitEthernet0/0/0/0
    Neighbor priority is 1, State is FULL, 6 state changes
    Neighbor is up for 1d06h
        Label: 24012,    Dynamic, Unprotected
    Neighbor Interface ID: 7
 Neighbor 3.3.3.3, interface address 10.2.3.3
    In the area 0 via interface GigabitEthernet0/0/0/1
    Neighbor priority is 1, State is FULL, 6 state changes
    Neighbor is up for 1d07h
        Label: 24010,    Dynamic, Unprotected
    Neighbor Interface ID: 8
 Neighbor 4.4.4.4, interface address 10.2.4.4
    In the area 0 via interface GigabitEthernet0/0/0/2
    Neighbor priority is 1, State is FULL, 6 state changes
    Neighbor is up for 1d07h
        Label: 24011,    Dynamic, Unprotected
    Neighbor Interface ID: 7
 Neighbor 3.3.3.3, interface address 10.23.5.3
    In the area 0 via interface GigabitEthernet0/0/0/3
    Neighbor priority is 1, State is FULL, 6 state changes
    Neighbor is up for 1d06h
        Label: 24013,    Dynamic, Unprotected
    Neighbor Interface ID: 10
 Neighbor 5.5.5.5, interface address 10.23.5.5
    In the area 0 via interface GigabitEthernet0/0/0/3
    Neighbor priority is 1, State is FULL, 6 state changes
    Neighbor is up for 1d06h
        Label: 24014,    Dynamic, Unprotected

As you can see in GigabitEthernet0 /0/0/3 we have two neighbours, 3.3.3.3 and 5.5.5.5 and each of them has a different label or adj-SID. So I can differentiate between these two in traffic engineering.

And the last point I this video,,,, as you know, default global prefix-SID range is between 16000 – 23999 and it is also changeable. you can show default range with the command “show mpls label table detail”.

RP/0/RP0/CPU0:xrv2#show mpls label table detail
Fri Jun 18 21:06:09.743 UTC
Table Label   Owner                           State  Rewrite
----- ------- ------------------------------- ------ -------
0     0       LSD(A)                          InUse  Yes
0     1       LSD(A)                          InUse  Yes
0     2       LSD(A)                          InUse  Yes
0     13      LSD(A)                          InUse  Yes
0     16000   OSPF(A):ospf-1                  InUse  No
  (Lbl-blk SRGB, vers:0, (start_label=16000, size=8000)
0     24010   OSPF(A):ospf-1                  InUse  Yes
  (SR Adj Segment IPv4, vers:0, index=0, type=2, intf=Gi0/0/0/1, nh=10.2.3.3)
0     24011   OSPF(A):ospf-1                  InUse  Yes
  (SR Adj Segment IPv4, vers:0, index=0, type=2, intf=Gi0/0/0/2, nh=10.2.4.4)
0     24012   OSPF(A):ospf-1                  InUse  Yes
  (SR Adj Segment IPv4, vers:0, index=0, type=2, intf=Gi0/0/0/0, nh=10.1.2.1)
0     24013   OSPF(A):ospf-1                  InUse  Yes
  (SR Adj Segment IPv4, vers:0, index=0, type=2, intf=Gi0/0/0/3, nh=10.23.5.3)
0     24014   OSPF(A):ospf-1                  InUse  Yes
  (SR Adj Segment IPv4, vers:0, index=0, type=2, intf=Gi0/0/0/3, nh=10.23.5.5)

The default range can be changed, but it is recommended that the range be the same for all routers. If the range is different, for example for some routers, it is from 18000 and some other routers from 16000 and you choose Prefix-SID with index 6 for xrv6, then some routers assign the label as 16006 and the others 18006. in this situation, the swapping label will be different in some routers forwarding MPLS packet. This is not wrong, but it is also not recommended.

Remember that changing prefix-SID range is also disruptive.

With the following command we can change the default range. However I will not do it. Just want to show you.

router isis 1
 segment-routing global-block 18000 19999
router ospf 1
 segment-routing global-block 18000 19999

 

Back to: Segment Routing > segment routing basic process and configuration

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment