MPLS · Topic 5 of 5
Segment Routing with MPLS
Learn segment routing for the JN0-364: node and adjacency SIDs, the SRGB, source-packet-routing in IS-IS, and verifying shortest-path SR LSPs.
- 6 min
- Includes a diagram
- Junos calls segment routing SPRING; configure it with
source-packet-routingunder IS-IS or OSPF. srgb start-labelandsrgb index-rangeset the global block; index range defaults to 4096.node-segment ipv4-index <n>gives the router its node SID.
What it is
Segment routing (SR), which Junos OS calls source packet routing in networking (SPRING), builds MPLS LSPs without RSVP or LDP. The IGP itself advertises the labels, called segment identifiers (SIDs), inside its link-state packets. Every router then knows the label for every other router from the IGP database.
A shortest-path SR LSP follows the IGP best path to a node, just like LDP, but with no extra signaling protocol and no per-LSP state on transit routers. The ingress can also stack several SIDs to steer traffic, which is the basis of SR traffic engineering.
How it works
Segment types
| SID type | Scope | What it identifies |
|---|---|---|
| Prefix SID | Global in the SR domain | A prefix; advertised as an index into the SRGB |
| Node SID | Global | A prefix SID for the router's loopback, identifying the router itself |
| Adjacency SID | Local to the router | One IGP adjacency (a link to a neighbor); allocated dynamically |
Prefix and node SIDs are advertised as an index, not a label. Each router turns the index into a label by adding it to the start of its segment routing global block (SRGB).
The SRGB and label calculation
The SRGB is a label range reserved for SR. The label for a node SID is:
label = SRGB start label + SID index
| Setting | Example value |
|---|---|
| SRGB start label | 400000 |
| SRGB index range | 4000 (labels 400000 to 403999) |
| R4 node SID index | 2004 |
| Label every router uses toward R4 | 402004 |
When every router uses the same SRGB, the label for R4 is the same everywhere along the path. This makes SR labels easy to read in output, unlike RSVP and LDP labels, which change at every hop. Juniper recommends using the same SRGB on all routers in the domain. If you set a start label without an index range, the index range defaults to 4096.
Adjacency SIDs are allocated from the router's dynamic label range when the adjacency comes up. They have meaning only on the router that advertised them.
Configuration with IS-IS
SR is enabled under the IGP with source-packet-routing. Interfaces still need family mpls and protocols mpls interface, because the labeled packets are forwarded the same way as any other MPLS packet.
user@R4# set interfaces ge-0/0/0 unit 0 family iso
user@R4# set interfaces ge-0/0/0 unit 0 family mpls
user@R4# set protocols mpls interface ge-0/0/0.0
user@R4# set protocols isis interface ge-0/0/0.0
user@R4# set protocols isis interface lo0.0 passive
user@R4# set protocols isis source-packet-routing srgb start-label 400000
user@R4# set protocols isis source-packet-routing srgb index-range 4000
user@R4# set protocols isis source-packet-routing node-segment ipv4-index 2004
The same node-segment form also takes ipv6-index for an IPv6 node SID. OSPF uses the same idea under [edit protocols ospf source-packet-routing]. A node SID index must be unique in the domain, and it must fit inside the SRGB.
What gets installed
| Table | Content |
|---|---|
| inet.3 | A route to every remote node SID loopback, with the protocol shown as L-ISIS for IS-IS |
| mpls.0 | The incoming node SID labels and the router's own adjacency SID labels |
Because the SR routes land in inet.3, BGP next hops resolve over SR LSPs exactly as they do over LDP or RSVP LSPs. No LSP is named or configured on the ingress.
Monitoring
| Command | Shows |
|---|---|
show isis overview | SRGB start label, index range, whether the SRGB block allocation succeeded and whether node segments are enabled |
show isis database extensive | SR capabilities, node SIDs and adjacency SIDs advertised in each LSP |
show route table inet.3 | SR routes toward remote loopbacks |
show route table mpls.0 | Node SID and adjacency SID labels with swap or pop actions |
user@R4> show isis overview
...
SRGB Config Range :
SRGB Start-Label : 400000, SRGB Index-Range : 4000
SRGB Block Allocation: Success
SRGB Start Index : 400000, SRGB Size : 4000, Label-Range: [ 400000, 403999 ]
Node Segments: Enabled
Troubleshooting checklist
| Symptom | Likely cause |
|---|---|
| SRGB block allocation fails | The label range overlaps a range already used by another application |
| No route to a node in inet.3 | That node has no node SID, or SR is not enabled in its IGP |
| Two routers claim the same label | Duplicate node SID index in the domain |
| inet.3 route present but traffic dropped | family mpls or protocols mpls interface missing on a link |
To check an SR label by hand, add the node SID index to the SRGB start label. If the result is not what show route table mpls.0 shows, the routers do not share the same SRGB.
Common mistakes
Looking for a signaling protocol. SR needs neither RSVP nor LDP. The IGP carries the SIDs, and no LSP is configured on the ingress for shortest-path SR.
Treating the index as the label. The IGP advertises an index. The label is the SRGB start plus the index.
Thinking adjacency SIDs are global. Only prefix and node SIDs are global. Adjacency SIDs are local to the advertising router.
Skipping MPLS on the interfaces. SR forwarding is MPLS forwarding, so family mpls and protocols mpls interface are still required.
Two routers with the same node SID index cause a conflict in the domain. Every node SID index must be unique.
What to remember for the exam
- Junos calls segment routing SPRING; configure it with
source-packet-routingunder IS-IS or OSPF. srgb start-labelandsrgb index-rangeset the global block; index range defaults to 4096.node-segment ipv4-index <n>gives the router its node SID.- Label = SRGB start + index; with a common SRGB, the label is the same on every hop.
- Prefix and node SIDs are global; adjacency SIDs are local and dynamic.
- SR routes go into inet.3 and resolve BGP next hops; no LSP is named.
- Verify with
show isis overview,show isis database extensive, inet.3 and mpls.0.
Check yourself
The SRGB starts at 400000 and R4's node SID index is 2004. Which label do other routers use to reach R4?
402004, the SRGB start label plus the index, if all routers share that SRGB.
Which protocol advertises the SIDs in a segment routing network?
The IGP, IS-IS or OSPF; no RSVP or LDP is needed.
Is an adjacency SID meaningful on every router in the domain?
No. An adjacency SID is local to the router that advertised it.
Topic 5 of 5 in MPLS
Test yourself on MPLS
The full Juniper JNCIS-SP JN0-364 question bank has 860 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.