LDP Session Calculator
Size LDP sessions, label bindings and hello load across an MPLS core using liberal label retention.
About LDP Session Calculator
LDP discovers neighbours with UDP hellos then builds a TCP session per pair, and by default keeps every label binding it hears. That liberal retention is what makes reconvergence fast — the label for the new next hop is already in memory — at the cost of memory scaling with FECs times neighbours. LDP memory and session count are what decide whether an MPLS core reconverges in milliseconds or seconds, and advertising more than the core loopbacks into LDP is the most common way to multiply bindings for no benefit.
Formulas
LDP Session
Sessions = LSRs × neighbours ÷ 2, since a session is shared; with liberal retention each LSR stores one label binding per FEC per neighbour.
- FEC
- Forwarding Equivalence Class — normally one per loopback prefix in the core
- liberal retention
- Keep bindings from every peer, not just the next hop, so a topology change needs no relabelling
- hold time
- Time without a hello before the adjacency is torn down — 15 s by default, 3 × hello
Binding and hello load
Bindings per LSR = FECs × neighbours; hello load = 2 × sessions ÷ hello interval.
Worked example
With the default values below, LDP Session Calculator returns LDP Sessions in the Core of 60. Change any input above and every figure here is recalculated in your browser.
Inputs used
- LSRs in the coreaccepts 2–2,000 LSRs
- 40 LSRs
- LDP neighbours per LSRaccepts 1–64 neighbours
- 3 neighbours
- FECs (loopback prefixes) advertisedminimum 1 FECs
- 500 FECs
- Link hello intervalaccepts 1–60 s
- 5 s
- Hello hold timeaccepts 3–180 s
- 15 s
Results
- LDP Sessions in the Core
- 60
- Label Bindings per LSR
- 1,500
- Label Bindings Core-Wide
- 60,000
- Hello Packets per Second
- 24.00 pps
- Neighbour Loss Detection
- 15 s
- Binding Memory per LSR
- 0.17 MB
Step by step
- 1Values used
- 2LDP Session
- 3Binding and hello load
- 4LDP Sessions in the Core= 60
- 5Label Bindings per LSR= 1,500
- 6Label Bindings Core-Wide= 60,000
- 7Hello Packets per Second= 24.00 pps
- 8Neighbour Loss Detection= 15 s
- 9Binding Memory per LSR= 0.17 MB
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 LDP Session calculated?
Sessions = LSRs × neighbours ÷ 2, since a session is shared; with liberal retention each LSR stores one label binding per FEC per neighbour. LDP discovers neighbours with UDP hellos then builds a TCP session per pair, and by default keeps every label binding it hears. That liberal retention is what makes reconvergence fast — the label for the new next hop is already in memory — at the cost of memory scaling with FECs times neighbours.
Why does LDP Session matter?
LDP memory and session count are what decide whether an MPLS core reconverges in milliseconds or seconds, and advertising more than the core loopbacks into LDP is the most common way to multiply bindings for no benefit.
What values do I need to enter?
This calculator takes 5 inputs: LSRs in the core, LDP neighbours per LSR, FECs (loopback prefixes) advertised, Link hello interval, Hello hold time. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
Should LDP advertise every prefix?
No. Filter LDP to core loopback /32s only. Every extra FEC multiplies bindings across every neighbour, and customer or aggregate prefixes never need a transport label — the label that matters is the one for the egress PE loopback.
