Skip to content
Calcrivo

LDP Session Calculator

Size LDP sessions, label bindings and hello load across an MPLS core using liberal label retention.

Inputs

LSRs
neighbours
FECs
s
s

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

  1. 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

  2. LDP Session

    Sessions = LSRs × neighbours ÷ 2, since a session is shared; with liberal retention each LSR stores one label binding per FEC per neighbour.

  3. Binding and hello load

    Bindings per LSR = FECs × neighbours; hello load = 2 × sessions ÷ hello interval.

  4. LDP Sessions in the Core

    = 60

  5. Label Bindings per LSR

    = 1,500

  6. Label Bindings Core-Wide

    = 60,000

  7. Hello Packets per Second

    = 24.00 pps

  8. Neighbour Loss Detection

    = 15 s

  9. 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.

You might also need