CHAPTER 2. PATH ESTABLISHMENT METHODS
2.5 Segment Routing (SR)
Segment Routing is a new source routing method that is being developed by the IETF to be supported on several routing protocols running today. In principle, an intermediate device or SR node, guides the packet through an ordered sequence of instructions called segments [12]. A segment can be any topological or service- based instruction, in which the packet will be treated according to the sequence found on its header (see Fig. 2.2). It can be applied to both MPLS and IPv6 architectures, in which would only require small changes into their forwarding planes. 1008 1007 1006 1004 102 1007 104 101 102 103 104 105 106 1001 1003 1005 1007 104 104 1 2 3 4 5 PUSH POP 1002
Figure 2.4 - Segment Routing model
As described in the general functionality of source routing, segment routing constructs the end-to-end path based on a list of segments that are identified by an integer value called the segment identifier (SID), which also identifies a network element (SR node, group of nodes, SR domain, link, and set of links)
that is going to apply the segment instruction. Each segment is executed by the SR node on any incoming packet. Following the above model (Fig. 2.2), the ingress SR node introduces the list of segments into the incoming packet. The list denotes 3 segments or instructions that are going to be executed by nodes 102 and 104. The order of execution goes from top to bottom. Node 102 will receive the packet, execute and pull out the first and second instruction from the list and send the packet through link 1007, nodes 106 and 105 will forward the packet to node 104 without executing the remaining instruction, and node 104 will pull the final segment stored in the stack and forwards the packet to the desired destination.
A segment involves actions like forwarding a packet according to shortest path destination, an interface, or an application/service instance. An SID can be an MPLS label, an index value on the MPLS label space, or an IPv6 address, depending of the data plane that segment routing uses.
2.5.1 Segment list
An ordered list of SIDs that encodes the topological and service-based source route of the packet. Depending of the data plane used, it could be and MPLS label stack, or a list of IPv6 addresses. In the top of the list lies the active segment, which is the instruction the must be executed by the receiving SR node to process the packet. During the packet transit through the path, the following actions can be executed on the segment list: Push, Next, Continue, and POP.
The Push action is executed by an SR node to introduce a segment into the segment list.
The Next action is used when an active segment is completed, defining the next segment in the list as the active segment.
The Continue action, is used when the current active segment is not yet completed, and maintains its state as an active segment. One example is when an SR node receives a packet with segments that is not up to the node to execute any of them, forwarding the packet to the node that supposed to execute the active segment (i.e. nodes 106 and 105 of Figure 2.2).
The POP action is used at the edge node to remove the final segment from the segment list, and send the packet to its final destination. In the MPLS data plane, the node previous to the edge node can perform this action (PHP).
2.5.1.1 SR Tunnel
Is a segment list specified with abstract constrains (like delay or priority) pushed on a packet to define a route that can be used for traffic engineering, OAM, or FRR reasons. SR tunnels can be configured manually by the operator.
2.5.2 Segment types
Segments can be classified in two categories: local and global segments.
The Local segments are the ones that are originated by an individual node and they are only supported by that node. Examples of these segments are those related to links directly connected to the SR node.
The Global segments are the ones that their related instructions are supported by all SR-capable nodes in the domain [12]. It can be used to identify a group of nodes that can handle a specific instruction, and relate their local SIDs to a global SID.
Besides local and global segments, they can also be classified in two types: IGP segments and BGP peering segments. BGP peering segments are out of the scope of this research, so they will not be discussed. The IGP segments are the ones advertised by an SR node for its attached prefixes and adjacencies within a link-state IGP domain, and their classification can be observed on Fig 2.5:
Figure 2.5 - IGP segments classification
The IGP-Prefix segments are global segments attached to an IGP-Prefix such as a summarized network addresses that are advertised within the IGP domain. IGP- Anycast and IGP-Node segments are the two types of the described segments, in which Anycast segments identifies a group of nodes by an Anycast SID, and the Node segments identifies a single node using a Node-SID (usually related with the node’s loopback address).
The IGP-Adjacency segments are local segments attached to a unidirectional or a set of unidirectional adjacencies, and they are identified using an Adj-SID (adjacency segment identifier). The adjacency is formed by the interconnection
of a local node and its neighbor, and it can be advertised throughout the SR domain.
When a packet is following the segment list and finds an Adj-SID of a specific node, it means that the action that the node will take for the packet is to forward it through the adjacency (link interface) assigned to the Adj-SID. If there is more than one adjacency assigned to the Adj-SID (set of link interfaces), the node will load balance the traffic through the set of adjacencies. This gives two options of encoding the Adj-SID: to reference the use of protection in the adjacency (IPFRR or MPLS-FRR), and to identify an adjacency as a local segment.
2.5.3 Path computation algorithms
There are two routing algorithms defined for segment routing: Shortest Path and Strict Shortest Path.
Shortest Path is the default algorithm, in which a packet is forwarded along the well-known ECMP-aware SPF algorithm. It has the flexibility that an intermediate device can implement a policy-based forwarding action that can override the SPF decision.
Strict Shortest Path works the same as the default shortest path algorithm, but instructing each intermediate device to ignore any local policy-based forwarding actions overriding the SPF decision.
Prefix-SID advertisement includes a set of flags and an algorithm field, in which associates a given Prefix-SID (Anycast or Node) to either routing algorithms. An ingress node gathers in this way all nodes and adjacencies information from the Prefix-SID advertisements, and the routing algorithm constructs the end-to-end path for any traffic incoming to the SR domain.