In this blog, we will learn segment routing in MPLS (Multiprotocol Label Switching). It’s a new label-switching technology that is going to enhance the working of IP and MPLS networks. SR (Segment Routing) replaces LDP (Label Discovery Protocol) in the existing MPLS network.

In a traditional MPLS network, if a service provider wants to do an end-to-end Label Switch Path (LSP) then needs to assign some labels and they should be exchanged with the help of Label Discovery Protocol (LDP). LDP is the protocol that is used to generate the labels.


In segment routing we don’t need additional protocol LDP, labels are no longer assigned on a per LSP basis, but instead on a per segment basis. The segment is identified by Segment ID (SID), which is a 32-bit integer value. We are no more using the LDP. We integrated the label distribution mechanism inside the IGP (Interior Gateway Protocol). It completely removes the dependency on LDP.

What is Segment Routing?

  • New label switching technology (replaces MPLS LDP).
  • The Label distribution mechanism has now been incorporated in the link state routing protocols OSPF (Open Shortest Path First) & IS-IS (Intermediate System-Intermediate System).
  • In segment routing, there is no need to run LDP. Link state routing protocol (OSPF & IS-IS) in segment routing is responsible for distributing the labels and it places an important role in providing end-to-end reachability.
  • A new and efficient way of routing.
  • Flexible and scalable compared to legacy MPLS technology.
  • Offers simplified MPLS traffic engineering and support SDN network -controlled based path manipulation.

How does Segment routing work?

In LDP separate labels are used for each network but in segment routing labels are assigned to the router/node.  In SR, each router has unique global labels. The network is divided into segments where each node & link could be assigned a segment identifier (SID).

SIDs are advertised by each node using a link-state routing protocol (ISIS/OSPF) or BGP.

These SIDs are either locally significant SIDs or globally unique SIDs.

The globally unique SIDs can be assigned an absolute value from the Segment Routing Global Block (SRGB).

The Prefix or node SID is manually configured from the segment routing global block (SRGB) range of labels and is distributed by ISIS or OSPF.

Segment Routing Global Block (SRGB)

  • It’s the range of labels reserved for segment routing global segments.
  • Each box automatically assigns a block of labels for segment routing called SRGB.
  • The default SRGB range is 16000-23999.

Label Switching Database (LSD)

  • Local label allocation is managed by Label Switching Database (LSD).
  • MPLS Applications must register as clients with LSD to allocate labels
  • MPLS Applications are e.g., IGP, LDP, RSVP, MPLS Static, …
  • Label space carving of segment routing capable software release (even if segment routing is not enabled):

– Label range [0-15] reserved for special-purposes

– Label range [16-15,999] reserved for static MPLS labels

– Label range [16,000-23,999] preserved for SRGB

– Label range [24,000-max] used for dynamic label allocation


Node or Prefix-SID

  • Any loopback interface is assigned with a node SID or prefix SID index value.
  • Values are assigned to loopback prefixes (admin) to identify the node.
  • These are advertised by OSPF or ISIS using the prefix SID sub-TLV.
  • A prefix SID is advertised as a domain-wide unique index.

Label = Prefix SID index + SRGB base (16000)

e.g., Prefix with prefix SID index 1 gets label 16001.


Adjacency SID

  • Each router (node) and each link (adjacency) have an associated Segment Identifier (SID).
  • Adjacency SID tracks IGP neighbors for purpose of MPLS TE.
  • Represents a specific adjacency, such as an egress interface, to a neighboring router.
  • Adjacency SID value is not configured manually, there is no need to do any kind of configuration. Whenever you enable the segment routing, the SR-capable router/node automatically generates adjacency SID, and it is locally unique.

Here we take a basic understanding of how segment routing works in MPLS networks along with IGP protocol (OSPF or IS-IS). It’s a source-based routing technique, allowing the source to choose a path, which is then added to the packet header as an order list of segments.

Zindagi Technologies is a top cybersecurity company and IT consulting company that has been in existence for more than a decade. We have hands-on experience on many public and private projects and have been delivering great results. We also provide Managed IT Services to organizations who have difficulty managing their IT goals. Drop us a message at 9773973971 or email us and we will get back to you with the right strategy for your business goals.  

Prakash Raghav

Senior Consultant Enterprise Networking

Leave a comment