LDP Session Calculator
Size LDP sessions, label bindings and hello load across an MPLS core using liberal label retention.
Inputs
LDP Sessions in the Core
60
Label Bindings per LSR
1,500
Label Bindings Core-Wide
60,000
Hello Packets per Second
24.00pps
Neighbour Loss Detection
15s
Binding Memory per LSR
0.17MB
Step by step
Values used
LSRs in the core = 40 LSRs; LDP neighbours per LSR = 3 neighbours; FECs (loopback prefixes) advertised = 500 FECs; Link hello interval = 5 s; Hello hold time = 15 s
LDP Session
Sessions = LSRs × neighbours ÷ 2, since a session is shared; with liberal retention each LSR stores one label binding per FEC per neighbour.
Binding and hello load
Bindings per LSR = FECs × neighbours; hello load = 2 × sessions ÷ hello interval.
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
How it works
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.
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.