Skip to main content

Segment Routing Configuration

Segment Routing(SR), also known as Source Packet Routing in Networking (SPRING), is a recent network routing paradigm covered by several complementary IETF drafts. The most fundamental are draft-ietfspring-segment-routing, draft-ietf-spring-segment-routing-mpls, draft-ietf-isis-segmentrouting-extensions, and draft-ietf-ospf-segment-routing-extensions.
SPRING is proposed as an alternative to LDP and/or RSVP-TE, segment routing is an emerging technology for IP/MPLS networks that enables source routing (SR), if you enable SR on your network no state is held in the network except the ingress SR router. This allow SR to scale significantly better then RSVP-TE while providing most the same functions, SR can offer IGP-based MPLS tunnels to services such as VPRN or VPWS without the addition of any other transport signaling protocol (Different with BGP-LU).

I think the main idea of SR is the capability of Link state (IGP) can carry a label that represent a segment, when MPLS is used to instantiate SR tunels, the MPLS forwarding plane doesn’t change, the folowwing actions apply :

  • The active segments is the top label
  • The CONTINUE operations is implemented as an MPLS swap operator.
  • the NEXT operations is implemented as an MPLS pos operation.
  • The PUSH operations is implemented as an MPLS push operations.

Figure 1. SR domain

As we see figure 1, SR domain represented  as segments, segments can either be local or global.

Local segments

The router that originates and advertises a local segment is the only one that assigns a label to the segments and installs that label in its LFIB.

Global segments

Typically every router in the domain assigns a (local) label to a (global) segment and install that label in its LFIB.

Segment Identifiers

In a SR domain, each segment is known as a Prefix-SID or an Adjacency-SID (Adj-SID).

A Prefix-SID is globally unique within the IGP/SR domain. The SID value is allocated from a unique pool called the SR Global Block (SRGB). In MPLS network, the SRGB is a set of labels reserved specially for SR use.

Prefix-SIDs divide into to type, Node-SID and Anycast-SID.

A Node-SID is a special type of Prefix-SID used to identify a particular router (loopback/system address) in the domain. The Node-SID is identified by an N flag set to 1 in the Prefix-SID sub-TLV that IS-IS or OSPF uses to advertise the SID.

An Adj-SID is a segment that identifies an adjacency or a set of adjacencies to another router that must be known in the IGP. The valu of an Adj-SID is local to the router that advertises it, and every SR router in the domain can potentially use the same segment (label) space. Therefore, only the advertising router can install an Adj-SID in the forwarding information base. Later on, an Adj-SID will be used to support traffic engineering.

Lab Test :

In the Lab The the following Software released were used :

  • Nokia (Alcatel-Lucent) vSR 13.0.R10
  • Juniper vMX 17.1R1.8
  • Cisco IOSXRv demo-6.1.2
  • GNS3 v1.5.4

I would use this base topology for lab test :

In this topology we run OSPF area 0 as a base routing protocol, on R4 (Juniper) i used em interface  for connectivity between router,  because the juniper running olive instead vMX, but interface em still support for segment routing, why i am running olive instead vMX because to save more resources :-).

Well, actually i want to use ISIS rather than OSPF because  i think is more easy to facilitate understanding of exchanging label information between router because ISIS just exchagne one LSA that contain all label (SRGB, Node-SID, Adj-SID), not like OSPF that send one Opaque LSA for one Label (SRGB,Node-SID, Adj-SID, but many blogger has been discuss segment routing in ISIS, so i would try with OSPF.

in this below listed all the router ospf basic configuration.





Segment routing require MPLS protocol to run at interface that want to enable segment routing,  assumed that we have been enabling MPLS capability in all interfaces.

Segment Routing Configuration

To enable segment routing in the router, we just need add simple configuration in the ospf context.

First at the Router 1 and 6 (Nokia) we must configures global label block, referred to as Segment Routing Global Block (SRGB), which will be reserved for assigning labels to segment routing perifx SIDs originated by this router. Label block doesn’t configure by default.

In the router R2 and R4 ( Cisco and Juniper ) label block has been allocated by default Cisco = 16000-23999 and Juniper = 800000-804095, so we don’t need to configured, Next the main configuration of segment routing parameter within a given IGP instance :





In the Nokia router we must enable option advertise-router-capability {link|area|as} in the OSPF instance. Segment routing is a new capability and needs to be advertised to all router in a given domain. IGP segment routing extensions are area-scoped, so we must configure the flooding scope to area in OSPF. In the Cisco and Juniper router, the advertise capability has been set to area by default.

Also in the Nokia router we must configure offset label value for a OSPF instance with option prefix-sid-range global, it means the OSPF instance will assume the start label value is the lowest label value in the SRGB. In the Cisco and Juniper router the start label value has been set to the lowest label value in the SRGB by default.

The configuration above trigger to the automatic creation of MP2P LSPs (any-to-R1, any-to-R2, any-to-R4 and any-to-R6) and each router will generate Local Label (Pefix SID) with combination from start-label (SRGB) + [Node SID Index]. 

Also after the configuration above, each router will exchange opaque-lsa to other router, so let’s examine each LSA :





Every router generate more than one opaque LSA with Link state ID :

  • 4.0.0.x,  The LSA have advertisement type router Information that contain SRGB range
  • 7.0.0.x, The LSA have advertisement type Extended Prefix that contain Node SID index,
  • 8.0.0.x, The LSA have advertisement type Extended Link that contain Adj-ID, this number of LSA equal to the OSPF neighbor that enable segment routing.

You can read more in draft-ietf-ospf-segment-routing-extensions-12.

Segment Routing as a transport tunnel in L2/L3VPN.

As mentioned before that segment routing didn’t require addition of any other transport signaling protocol (LDP/RSVP), but the segment routing doesn’t have capabilty to advertise service label like T-LDP, so we need T-LDP to signal service label, i will create VPLS service between R1 and R6 (Nokia).

To enbale T-LDP in Nokia router, we just need to turn on the LDP protocol without any other configuration  configure router ldp no shutdown , the targeted address will derived from sdp far-end address.



we see the sdp transport tunnel use sr-ospf.

I have been configuring simple VPLS service with sdp that recently created,



The VPLS service getting UP and the ping from CE is successful.

Dataplane Walkthrough.

You can see, all the labels end in 6, Node Segment Identifier (Node SID) of R6. But the three label have different value in the flow : 16006, 800006 and 100006. it’s because we configured different SRGB at each router. Actually, we can configured the same SRGB for all router because SRGB locally unique, if we do this all the label will same at the flow, very interesting. This is very different from LDP or RSVP, whose labels are not deterministic and often change to a different value on a hop-by-hop basis.

Remember, that the outgoing label assigned from calculated of SRGB and Node SID of destination.



If you want to know more detail about the exchange label, you can examine PCAP file between all router, R1-R2R2-R4R4-R6.


Segment Routing is emerging  as a new tunneling protocol beside LDP and RSVP. But unlike LDP and RSVP that need MPLS control plane, SR no requires MPLS control plane process and imposes no changes to the MPLS data plane. Segment routing also enabling source routing without requiring any midpoint or tail-end state. The only state required is held at the ingress PE, whisch makes segment routing more scalable than RSVP-TE.

Network Telco Engineer – SDN/NFV Enthusiast

Khoirul Firdaus

Network Telco Engineer - SDN/NFV Enthusiast