Skip to content
Calcrivo

MPLS Label Calculator

Calculate usable MPLS label space after reserved labels, and how many Label-Switched Paths (LSPs) a given label pool can support.

Inputs

Typically 1 label per LSP direction; some designs (e.g. stacked labels) use more

Usable MPLS Labels

1,048,560

Max LSPs Supported (at given labels/LSP)

1,048,560

Labels Needed for Requested LSPs

10,000

Label Space Utilization

0.9537%

Step by step

  1. Values used

    Labels Consumed per LSP = 1; Number of LSPs to Provision = 10,000

  2. Usable label space

    usable_labels = 2^20 − 16 = 1,048,560

  3. Max LSPs supported

    max_lsps = usable_labels / labels_per_lsp

  4. Usable MPLS Labels

    = 1,048,560

  5. Max LSPs Supported (at given labels/LSP)

    = 1,048,560

  6. Labels Needed for Requested LSPs

    = 10,000

  7. Label Space Utilization

    = 0.9537

How it works

MPLS uses a 20-bit label field, giving a theoretical 2^20 = 1,048,576 label values, but the first 16 (0-15) are reserved for special purposes (e.g. label 3 for Implicit NULL, label 0/2 for IPv4/IPv6 Explicit NULL) per RFC 3032, leaving 1,048,560 usable labels on a device. Dividing usable labels by the number of labels each LSP consumes gives the maximum number of Label-Switched Paths a single label space can support — a practical ceiling that matters for large-scale MPLS/VPN or traffic-engineering deployments with many LSPs.

Formulas

Usable label space

usable_labels = 2^20 − 16 = 1,048,560

Max LSPs supported

max_lsps = usable_labels / labels_per_lsp

Frequently Asked Questions

Why are the first 16 MPLS labels reserved?

RFC 3032 reserves label values 0-15 for special-purpose signaling — for example, label 0 (IPv4 Explicit NULL), label 2 (IPv6 Explicit NULL), and label 3 (Implicit NULL, used in penultimate-hop popping) — these are never assigned to regular LSPs, leaving 1,048,560 of the full 1,048,576 values for actual label-switched paths.

Is the MPLS label space shared across the whole network or per-device?

Per-device (per label space on that router/switch) — each MPLS-enabled device maintains its own local label allocation, so the 20-bit space is a per-node constraint, not a network-wide budget. Very large networks rarely approach this limit on any single device in practice.

When would an LSP need more than one label?

Label stacking — used for MPLS VPNs (an inner VPN label plus an outer transport label), traffic engineering with explicit paths, or fast reroute mechanisms — consumes multiple labels per logical path, which is why this calculator lets you set labels-per-LSP above 1 for such designs.

You might also need