Segment Routing SID Calculator
Derive prefix-SID labels from an SRGB base and index, and check SRGB utilisation across the domain.
About Segment Routing SID Calculator
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.
Worked example
With the default values below, Segment Routing SID Calculator returns MPLS Label for This Prefix-SID of 16,101. Change any input above and every figure here is recalculated in your browser.
Inputs used
- SRGB base labelaccepts 16–1,000,000
- 16,000
- SRGB sizeaccepts 1–1,000,000 labels
- 8,000 labels
- Prefix-SID index for this nodeaccepts 0–1,000,000
- 101
- Nodes needing a prefix-SIDaccepts 1–100,000 nodes
- 200 nodes
- Adjacency SIDs per nodeaccepts 0–64 SIDs
- 4 SIDs
Results
- 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
- 1Values used
- 2Segment Routing SID
- 3Label derivation
- 4MPLS Label for This Prefix-SID= 16,101
- 5SRGB Range= 16000–23999
- 6SRGB Used by Prefix-SIDs= 2.50
- 7SRGB Labels Free= 7,800
- 8Adjacency SIDs Domain-Wide= 800
- 9Index Fits the SRGB= Yes — index 101 maps to label 16101 inside 16000–23999
Assumptions and limits
- The result is derived only from the 5 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
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.
