Articles

Introduction to Segment Based routing in IOS-XR

Today I am going to talk about the segment based routing in the Cisco IOS-XR devices. As per the understanding on Segment based routing, Segment Routing is a new architecture that leverages source routing based tunneling technique and allows an edge (Ingress) router to encode a list of segments as packet header. Each Segment can be considered as an instruction on how devices should process the packet. Segments could refer to the forwarding instruction of sending a packet towards a node, over a specific link, or towards any service application. The list of segments becomes the path the Ingress router instructs the network on how to treat/forward the packet. Because the information of the path that the packet has to traverse is included in the packet, intermediate routers do not have to maintain state for all possible paths that the network offers.

Fig 1.1- Segment Based Routing

Let me describe the main components of the Segment Routing Architecture. The topology above depicts a network that offers different path that satisfies traffic constraints. For example, large file transfer traffic from CE1 to CE2 requires High Bandwidth path while voice traffic from CE1 to CE2 require low latency path. Accordingly, the network allows the file transfer traffic to flow over CE1-R2-R3-R5-R7-CE2 while voice traffic will flow over CE1-R2-R3-R4-R6-R5-R7-CE2.

In a traditional MPLS network, this requires pre instantiated TE tunnel from R2 to R7 over different paths creating state entries in all transit nodes along the path.

With Segment Routing, R2 can define the path a packet should traverse by inserting a list of segments to be executed by the network. The state entry is carried in the packet itself eliminating the need for intermittent transit nodes to maintain the state entries.

The control plane of Segment Routing defines different Segment Identifiers (Segment ID) and how the segment information is communicated to all devices in the network. Segment Routing can be applied on MPLS dataplane without any changes in dataplane. The segments are equivalent to labels. The main two types of Segments are as below:

Prefix Segment ID (aka Node Segment ID) – The forwarding semantic associated with Node Segment ID is to forward the packet on the shortest path towards the Node to which the Segment ID is assigned. Each node in Segment Routing network will be assigned with a minimum of one domain wide Prefix Segment. This can be done manually (like assigning IP address) or using a centralized controller.

Adjacency Segment ID – The forwarding semantic associated with an Adjacency Segment ID is to POP the segment and forward the packet over the corresponding adjacency. Each router will assign a locally significant segment ID for each of its IGP adjacencies.

Fig 1.2-Segment Routing Global Block

To maintain domain wide uniqueness for Prefix Segment ID, it is the Operators responsibility to assign the Prefix SID without overlapping with other nodes in the domain. Since each node will dynamically assign Adj-SID, it should not overlap with Prefix SID. To achieve this, a block of label will be carved out on each Segment Routing router from platform label space. This block is known as Segment Routing Global Block (SRGB). The default range of this block in Cisco platform will be 16000 to 23999 (a range of 8000 labels).

In case of Absolute Value, the Prefix SID will be defined as a value. For example, on R2, the Prefix SID for loopback address will be configured as “16002” and advertise via IGP (with V flag set). Any other node will use 16002 as the label to reach R2 loopback address. Currently this is not supported in IOS-XE.

In case of Index based approach, the Prefix SID will be defined as Index and this needs to be unique for each node. For example on R2, the Index for loopback address will be configured as “2” and will be advertised via IGP (with V flag unset). Any other node will perform the below to identify the Prefix Segment ID of R2 loopback address

In our topology, Prefix SID for R2 will be 16000 + 2 making it as 16002. Other nodes will use this value as label to reach R2 loopback address. From above topology, it could be observed that the Adj-SID {2003, 2004, 3004 ..} are assigned outside SRGB block and will not overlap with Prefix SID. Since Adj-SID have node level uniqueness, it could be observed that same Adj-SID can be assigned by different node for different IGP adjacency. For example, R2 assigned 2003 for R3 while R3 assigned 2003 for R5.

Segment Routing relies on link state IGP protocol to advertise the Segments to other nodes eliminate the need to manage multiple control plane protocols (like LDP, RSVP etc). ISIS and OSPF, the most popular IGP protocols in services provider networks, were extended to support the advertisement of segment identifiers.