Overview

In the first two articles of this series, we covered the Segment Routing Problem definition, Drivers, use cases,  and the benefits it brings to the table. (First blog link Click Here). Then Segment Routing Building Block starts with SR SID (Second blog link Click Here)

In this post, we will dig deep into some other Types of SIDs like Adjacency and AnyCast SID and outline their use cases

Lab Setup

The Network Setup that we will use in this series is shown below:

  • It includes Cisco and Juniper virtual routers.
  • Below devices forms an MPLS network with (3 Core + 4 Provider Edge routers).
  • Segment Routing is used and preferred over LDP.

 

Adjacency Segments

Adjacency Segment [ADJ] is associated with unidirectional adjacencies.  Each router in the topology advertises a label associated with each of its IGP adjacencies with neighboring routers. Such Adjacency Segments have strict forwarding semantics. This means that in the data plane when a packet arrives with that adjacency label, the router pops it and sends it onto the associated link. 

Using these ADjcacny SIDs we can force the traffic over a specific Link and have more control over the traffic forwarding within the core. Take the below network setup which outlines the Adjcacny SID labels associated with the XR-P01 and MX-P02 devices.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The below output outline the Adj-SID allocated by both XR-P01 and MX-P03 for their P2P link.

MX-P03# run show isis database MX-P03.00-00 detail
IS-IS level 1 link-state database:

IS-IS level 2 link-state database:

MX-P03.00-00 Sequence: 0x77, Checksum: 0x7f3d, Lifetime: 962 secs
IPV4 Index: 403
Node Segment Blocks Advertised:
Start Index : 0, Size : 1000, Label-Range: [ 400000, 400999 ]
IS neighbor: XR-P01.00 Metric: 1000
P2P IPv4 Adj-SID: 16, Weight: 0, Flags: --VL--
IS neighbor: MX-P02.00 Metric: 1000
P2P IPv4 Adj-SID: 18, Weight: 0, Flags: --VL--
IS neighbor: XR-PE01.00 Metric: 1000
P2P IPv4 Adj-SID: 17, Weight: 0, Flags: --VL--
IS neighbor: MX-PE03.00 Metric: 1000
P2P IPv4 Adj-SID: 19, Weight: 0, Flags: --VL--

 

RP/0/RP0/CPU0:XR-PE01#sh isis database XR-P01 detail verbose

IS-IS 100 (Level-2) Link State Database
LSPID                 LSP Seq Num  LSP Checksum  LSP Holdtime/Rcvd  ATT/P/OL
XR-P01.00-00          0x00000176   0x2591        1192 /1200         0/0/0
  Area Address:   49
  NLPID:          0xcc
  IP Address:     10.100.1.1

  Hostname:       XR-P01
  SID Binding:    10.100.100.1/32 F:0 M:0 S:0 D:0 A:0 Weight:0 Range:1
    SID: Start:900, Algorithm:0, R:0 N:0 P:0 E:0 V:0 L:0
  Router Cap:     10.100.1.1 D:0 S:0
    Segment Routing: I:1 V:0, SRGB Base: 400000 Range: 1000
    SR Local Block: Base: 15000 Range: 1000
    Node Maximum SID Depth:
      Label Imposition: 10
    SR Algorithm:
      Algorithm: 0
      Algorithm: 1
  Metric: 1000       IS-Extended MX-P02.00
    Interface IP Address: 172.20.1.0
    Neighbor IP Address: 172.20.1.1
    Link Maximum SID Depth:
      Label Imposition: 10
    ADJ-SID: F:0 B:0 V:1 L:1 S:0 P:0 weight:0 Adjacency-sid:24001
  Metric: 1000       IS-Extended MX-P03.00
    Interface IP Address: 172.20.1.2
    Neighbor IP Address: 172.20.1.3
    Link Maximum SID Depth:
      Label Imposition: 10
    ADJ-SID: F:0 B:0 V:1 L:1 S:0 P:0 weight:0 Adjacency-sid:24003
  Metric: 1000       IS-Extended XR-PE01.00
    Interface IP Address: 172.20.1.7
    Neighbor IP Address: 172.20.1.6
    Link Maximum SID Depth:
      Label Imposition: 10

 

If we want to steer the traffic for example from XR-PE01 to MX-PE03 we can push the below Label stack on XR-PE01 to force the traffic to use the XR-P01 <> MX-P02 link as shown below.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The Below traceroute outlines the data plane and Labels for the traffic from XR-PE01 towards MX-PE03

RP/0/RP0/CPU0:XR-PE01#traceroute 10.100.1.6

Type escape sequence to abort.
Tracing the route to 10.100.1.6

 1  172.20.1.7 [MPLS: Labels 24003/400402/400406 Exp 0] 50 msec  9 msec  7 msec
 2  172.20.1.3 [MPLS: Labels 400402/400406 Exp 0] 267 msec  836 msec  47 msec.   >> XR-P01 <> MX-P02 link
 3  172.20.1.4 [MPLS: Label 400406 Exp 0] 189 msec  410 msec  427 msec
 4  10.100.1.6 66 msec  403 msec  436 msec

 


Anycast SID

Anycast SID is a special type of Prefix-SID where multiple nodes in the network advertise the same prefix using the same SID. This would be useful in Resiliency, and High Availability situations.

Using Anycast SID will accomplish many benefits, to mention a few:

  • Each PE router will choose the closet Core router based on IGP metric.
  • In case, for a specific PE, its preferred core router failed, automatically it will use the other core router, thanks to Anycast SID.

 

Note

In order to setup AnyCast SID the devices which will advertise the AnyCast SID  must have the same SR Global Block (SRGB) configured since the AnyCast SID is only setup using index value and doesn’t support Absolute reference

 

Below is the configuration required on a Juniper Device to setup an AnyCast SID

 

MX-P03# show interfaces lo0.0
family inet {
address 10.100.1.3/32 {
primary;
}
address 10.100.251.13/32;  >> New Prefix
}
family iso {
address 49.0000.0000.0003.00;
}

MX-P03# show policy-options policy-statement ISIS-EXPORT
term CORE_ANYCAST_SID {
from {
protocol direct;
interface lo0.0;
route-filter 10.100.251.13/32 exact;
}
then {
prefix-segment index 813;  >> AnyCast-SID
accept;
}
}

MX-P03# show protocols isis
export ISIS-EXPORT;

 

On IOS-XR below is the required configuration

 

# Create a new Prefix assigned to a new Loopback
RP/0/RP0/CPU0:XR-P01#sh running-config interface lo1
interface Loopback1
ipv4 address 10.100.251.13 255.255.255.255
!
# Advertise this new Prefix with the AnyCast SID
RP/0/RP0/CPU0:XR-P01#sh running-config router isis
router isis 100
!
interface Loopback1
passive
address-family ipv4 unicast
prefix-sid index 813 n-flag-clear
!

We can check to see the new Advertised prefix in ISIS Database and validate that the N-bit is not set as shown below

IS-IS 100 (Level-2) Link State Database
LSPID LSP Seq Num LSP Checksum LSP Holdtime/Rcvd ATT/P/OL
XR-P01.00-00 * 0x00000164 0xa395 439 /* 0/0/0
Area Address: 49
NLPID: 0xcc
IP Address: 10.100.1.1
Router ID: 10.100.1.1
Metric: 0 IP-Extended 10.100.1.1/32
Prefix-SID Index: 1, Algorithm:0, R:0 N:1 P:0 E:0 V:0 L:0
Prefix Attribute Flags: X:0 R:0 N:1
Source Router ID: 10.100.1.1
Metric: 0 IP-Extended 10.100.251.13/32
Prefix-SID Index: 813, Algorithm:0, R:0 N:0 P:0 E:0 V:0 L:0

 

Consider the below diagram where Routers MX-P02 and MX-P03 share the same SID 812. assume these two core routers are in the same city and you want to steer traffic to or from any PE routers in the same city through these core routes. In this setup, an Anycast SID would provide the best approach to provide resiliency for such a setup

 

 

 

 

 

 

 

 

 

 

 

 

 

Consider we have an SR-TE LSP from XR-PE01 towards MX-PE03 the below diagram outlines the labels pushed from XR-PE01 to reach MX-PE03 and the path taken by this LSP in order to reach MX-PE03.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Below are the forwarding entries on XR-P01 for SR Label 400812 which outlines the load balancing which will take place in the Core for this LSP.

RP/0/RP0/CPU0:XR-P01#show mpls forwarding labels 400812
Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
Label  Label       or ID              Interface                    Switched
------ ----------- ------------------ ------------ --------------- ------------
400812 Pop         SR Pfx (idx 812)   Gi0/0/0/0    172.20.1.1      2360
       Pop         SR Pfx (idx 812)   Gi0/0/0/1    172.20.1.3      320

 

The below traceroute  from XR-P01 outlines the labels and path taken to reach MX-PE03

RP/0/RP0/CPU0:XR-PE01# traceroute 10.100.1.6

Type escape sequence to abort.
Tracing the route to 10.100.1.6

 1  172.20.1.7 [MPLS: Labels 400812/400406 Exp 0] 31 msec  10 msec  6 msec
 2  172.20.1.3 [MPLS: Label 400406 Exp 0] 85 msec.  >> ECMP in the Core
    172.20.1.1 80 msec
    172.20.1.3 841 msec
 3  10.100.1.6 13 msec  92 msec  112 msec

 

In case any of the Core routes in this region (MX-P02 or MX-P03) were to fail, the LSP will still be functional and traffic will be re-routed towards the live Core router in this region.

 


 

 

 

 

 

 

 

 

 

 

 

 

 

RP/0/RP0/CPU0:XR-PE01# traceroute 10.100.1.6

Type escape sequence to abort.
Tracing the route to 10.100.1.6

1 172.20.1.7 [MPLS: Labels 400812/400406 Exp 0] 52 msec 13 msec 13 msec
2 172.20.1.1 [MPLS: Label 400406 Exp 0] 59 msec 45 msec 8 msec
3 10.100.1.6 14 msec 9 msec 8 msec

 

BGP SID

In case you decided to use BGP as your IGP protocol (instead of using OSPF, or ISIS as an example) you can still use BGP as your main protocol to exchange SID within your domain.

This case may be rarely used in Service Providers, and Telco, however, it is gaining attraction in the Data Center field.

BGP Segments can be used for Prefix, Adjacencies, Peer SID, and more. This is not a brand new idea for BGP as it was used before in BGP-LU (Label Unicast) to distribute label information (along with prefix reachability information) among multiple domains. Actually, some vendors (e.g. Cisco) uses BGP-LU as a means to advertise Prefix-SID to other BGP neighbors.

In this case BGP transport Prefix-SID as an optional transitive path attribute.

Conclusion

The main takeaways from this article are:

  1. The adjacency Segment is associated with unidirectional adjacencies. It has strict forwarding semantics allowing you to define the path through the network via a specific link when required.
  2. Anycast SID is useful in Resiliency and High Availability situations.
  3. You can use BGP as an IGP protocol and still get all Segment Routing benefits, as BGP will be used as the transport vehicle to carry SID across your domain.

Stay tuned to our next blog where we will discuss SR & LDP coexistence.