Skip to content
Calcrivo

Segment Routing SID Calculator

Derive prefix-SID labels from an SRGB base and index, and check SRGB utilisation across the domain.

Inputs

labels
nodes
SIDs

MPLS Label for This Prefix-SID

16,101

SRGB Range

16000–23999

SRGB Used by Prefix-SIDs

2.50%

SRGB Labels Free

7,800

Adjacency SIDs Domain-Wide

800

Index Fits the SRGB

Yes — index 101 maps to label 16101 inside 16000–23999

Step by step

  1. Values used

    SRGB base label = 16,000; SRGB size = 8,000 labels; Prefix-SID index for this node = 101; Nodes needing a prefix-SID = 200 nodes; Adjacency SIDs per node = 4 SIDs

  2. Segment Routing SID

    A prefix-SID is an index, not a label: the local label is SRGB base + index, so the same index resolves to a different label on a node with a different SRGB.

  3. Label derivation

    label = SRGB base + prefix-SID index.

  4. MPLS Label for This Prefix-SID

    = 16,101

  5. SRGB Range

    = 16000–23999

  6. SRGB Used by Prefix-SIDs

    = 2.50

  7. SRGB Labels Free

    = 7,800

  8. Adjacency SIDs Domain-Wide

    = 800

  9. Index Fits the SRGB

    = Yes — index 101 maps to label 16101 inside 16000–23999

How it works

Advertising an index rather than a label is what lets Segment Routing work without a label distribution protocol: every node computes its neighbour's label from that neighbour's advertised SRGB. Adjacency SIDs are local and come from the dynamic range, so they do not consume SRGB space. A consistent SRGB across the domain makes labels predictable and troubleshooting straightforward, because the same prefix has the same label everywhere; inconsistent SRGBs are legal but turn every traceroute into an arithmetic exercise.

Formulas

Segment Routing SID

A prefix-SID is an index, not a label: the local label is SRGB base + index, so the same index resolves to a different label on a node with a different SRGB.

SRGB
Segment Routing Global Block — the label range reserved for global SIDs, 16000–23999 by default on many platforms
index
Globally significant prefix-SID index advertised in the IGP
adjacency SID
Locally significant label for one link, allocated outside the SRGB from dynamic label space

Label derivation

label = SRGB base + prefix-SID index.

Frequently Asked Questions

How is Segment Routing SID calculated?

A prefix-SID is an index, not a label: the local label is SRGB base + index, so the same index resolves to a different label on a node with a different SRGB. Advertising an index rather than a label is what lets Segment Routing work without a label distribution protocol: every node computes its neighbour's label from that neighbour's advertised SRGB. Adjacency SIDs are local and come from the dynamic range, so they do not consume SRGB space.

Why does Segment Routing SID matter?

A consistent SRGB across the domain makes labels predictable and troubleshooting straightforward, because the same prefix has the same label everywhere; inconsistent SRGBs are legal but turn every traceroute into an arithmetic exercise.

What values do I need to enter?

This calculator takes 5 inputs: SRGB base label, SRGB size, Prefix-SID index for this node, Nodes needing a prefix-SID, Adjacency SIDs per node. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

Must every router use the same SRGB?

Not strictly — SR works with different SRGBs because each node advertises its own — but use the same block everywhere anyway. Uniform SRGBs make labels globally meaningful, which is worth far more than the flexibility of varying them.

You might also need