Useful Articles


Introduction to Segment Routing

Introduction to Segment Routing

Segment Routing (SR) is a new label switching technology that will evolve and enhance the working of IP and MPLS networks. Segment Routing (SR) uses a new and efficient way of routing which is more flexible and scalable compared to legacy MPLS technology. In Segment Routing, the labels are not generated by Label Distribution Protocol (LDP) or RSVP. Then how do the labels be generated now? The label distribution mechanism has now been incorporated in the Link State Routing Protocols OSPF and ISIS. New extensions, also known as TLVs and Sub-TLVs have been added in both the IGPs advertise the Segment Routing labels. In addition to that, like Traffic Engineering in MPLS networks, Segment Routing also utilizes its own FRR (Fast Re Route) protection mechanisms known as TI-LFA (Topology Independent Loop Free Alternate) for faster convergence in Service Provider Core network.

Segment Routing is based on source routing and allows to create a path by combining Segments. Segments are a kind of sub-paths. As mentioned above, these segments are advertised by OSPF or ISIS.  s its own number called the Segment ID (SID). A Segment Routing path can consists of one or more Segments in the stack known as segment list or stack list.

As shown in the picture below, we can reach from the Source node A to Destination node N using a list of 3 Segments in the segment list. Segment 1 would take the packet from Source node A to a transit node C. Here, Segment 1 is Popped off and packet is switched till node H using Segment 2. Finally, Segment 2 is also popped off and packet is switched till the destination node N using Segment 3.

Introduction to Segment Routing


Each segment is identified by the segment Identifier (or SID) consisting of a flat unsigned 32-bit integer. Two classes of Segments exist in Segment Routing. 


  • Global Segment - A global segment is a  ID value that has a significance inside the entire Segment Routing domain which means that every node in the SR domain knows about this value and performs the same function to the associated instruction set or Label in its forwarding table(LFIB). That is why referred to as Global Segment ID. Default reserved label range for Cisco nodes used for these purposes is 16000 - 23999 and is referred as Segment Routing Global Block (SRGB). This range is and it is a vendor-specific range, therefore, other vendors may use a different range.
  • Local Segment -  It is an ID value which has local significance, and only the source node can execute the associated instruction. As this range is only relevant for that particular node and therefore these values are not in the allocated using SRGB range but only via the locally configured label range.


Node SID or Prefix SID 

A node SID or a Prefix SID are globally significant segments. These are advertised by OSPF or ISIS using Prefix SID sub TLV.  Node SID values are assigned to Loopback Prefixes (admin) to identify the node and represent the shortest path to a node/router as determined by the IGP. The path could be ECMP aware. The network administrator should allocates a unique Node ID to each router from a reserved block known as Segment Routing Global Block (SRGB)

Adjacency SID

An Adjacency SID is an example of the significant segment and corresponds a specific adjacency between two nodes or a particular link. These are advertised by OSPF and ISIS using Adjacency SID sub TLV. There is no need for a network administrator to allocate Adjacency SIDs because Segment Routing capable nodes/routers automatically generate adjacency identifiers outside of the reserved block of node ID (SRGB)

 The below picture shows the Node and Adjacency SIDs

Introduction to Segment Routing, Node SID, Adjacency SID

 BGP Prefix SID 


Like the Node or a  Prefix SID, BGP Prefix SID also has a global significance. A BGP Prefix SID tells the shortest path to a specific BGP prefix and is also ECMP-aware. In contrast to IGP Prefix SID, BGP Prefix SID is signaled by BGP. 


While we implement Segment Routing, the network no longer requires to maintain a per-application and per-flow state. Rather, it obeys the forwarding instructions provided in the packet.

Another important point to learn is that besides the MPLS forwarding plane (or Data Plane), Segment Routing also supports the IPv6 forwarding plane. SR can be applied to the IPv6 architecture with a new type of routing extension header. A segment is encoded as an IPv6 address. An ordered list of segments is encoded as an ordered list of IPv6 addresses in the routing extension header. The segment to process is indicated by a pointer in the routing extension header. The pointer is incremented, after the completion of a segment. 

Using either type of data planes (MPLS or IPv6), SR integrates with the rich multi-service capabilities of MPLS, including Layer 3 VPN (L3VPN), AToM(or VPWS), Virtual Private LAN Service (VPLS), and Ethernet VPN (EVPN).

Click Here for other useful Segment Routing articles

Post a Comment