MVPN profiles 13 and 14 build their multicast trees with mLDP: profile 13 with a default MDT over MP2MP trees, profile 14 with partitioned MDTs over P2MP trees, both with BGP auto-discovery and BGP customer multicast signalling. They're good profiles. But mLDP, as the name says, is signalled over LDP sessions, and a segment-routing core has spent a lot of effort not having any.

There are two ways forward:

  • SR-native P2MP (Tree-SID), where the trees are segment-routing policies and LDP stays gone.
  • Ships in the night: run LDP next to SR. SR keeps every unicast label. LDP is there only so mLDP has sessions to signal its trees on.

Fabricwright generates the second. It works on the platforms and releases people actually run, it needs no controller, and it keeps the unicast forwarding plane exactly as it was. The cost is that the configuration has to stop LDP from doing anything except signalling trees, and it's easy to get that subtly wrong.

Trap 1: treating LDP and SR as either/or

The natural way to template an underlay is one choice: if the fabric is LDP, write LDP; else if it's SR, write SR. With mLDP in the picture that elif goes wrong without any error. mLDP makes the LDP condition true on an SR fabric, the first branch wins, and the segment-routing block disappears. Nothing warns you, and the rendered config reads as a perfectly normal LDP core.

LDP and SR are two independent questions. The segment-routing block is written whenever the fabric is SR; LDP is written when the fabric is LDP or when mLDP needs it on SR.

Trap 2: an LDP process with no interfaces

Turning LDP on globally isn't enough. It needs interfaces to form sessions on, and on a core that's normally done by the IGP's LDP auto-config. If that line is gated on "the fabric is LDP", an SR fabric with mLDP gets an LDP process with no interfaces. It forms no sessions and signals no trees. The fix is to add auto-config beside segment routing, not instead of it:

! IOS-XE, OSPF underlay
router ospf 1
 segment-routing mpls
 mpls ldp autoconfig

! IOS-XR, IS-IS underlay
router isis UNDERLAY
 address-family ipv4 unicast
  segment-routing mpls
  mpls ldp auto-config

Trap 3: LDP-IGP synchronisation

On an LDP core, LDP-IGP sync is good practice: the IGP holds an adjacency out of the shortest path until LDP has converged on it, so traffic isn't sent down a link that can't label it yet. On an SR core carrying mLDP it does the opposite of what you want. It holds up unicast, which SR is carrying perfectly well, while waiting for a protocol that carries no unicast at all.

So on SR, there's no mpls ldp sync and no igp sync, even though the same template writes them on an LDP fabric.

Trap 4: two labels for every prefix

Once LDP is running, it will happily allocate and advertise labels for every prefix in the IGP, and now there are two labels for the same destination. Each platform has its own way of settling that, and you need exactly one:

  • IOS-XE decides which label wins locally. Under segment-routing mpls, sr-label-preferred makes it SR's.
  • IOS-XR can tell its LDP peers what it wants from the session in the first place. mpls ldp capabilities sac mldp-only asks for mLDP and no unicast FECs, so the duplicate labels are never exchanged.
! IOS-XE
segment-routing mpls
 set-attributes
  address-family ipv4
   sr-label-preferred

! IOS-XR
mpls ldp
 capabilities sac mldp-only

Both are written only where mLDP put LDP on an SR fabric. On a pure SR fabric there's no second label to prefer over, and on an LDP fabric, LDP is the unicast label.

Keeping it true

Each of these produces a configuration that loads without complaint and reads plausibly in review, so none of them is caught by looking. Fabricwright's template tests render every fabric type with mLDP on and off and fail if any of them come back: an SR block that went missing, LDP with no interfaces, IGP sync on SR, a missing coexistence setting, or any MPLS at all on a fabric that has none.

Tree-SID may well be the long-term answer, and it may be offered one day. Until then, LDP beside SR is the option that runs on today's releases.

Questions or corrections: [email protected]. More about Design.