LDP Synchronization
1. Intro
In this post we will look at the LDP Synchronization feature, and the impact it can create in the network.
We will work with the following setup, where between R1 and R3, the LDP protocols was not activated in the configuration the R1 router. Because of this, the IGP protocol (OSPF in this case) will advertise maximum metric on the link:

2. The impact
Let’s see the metric and the impact on the CLI:
root@R1# run show ospf interface extensive
Interface State Area DR ID BDR ID Nbrs
ge-0/0/2.0 PtToPt 0.0.0.1 0.0.0.0 0.0.0.0 1
Type: P2P, Address: 17.18.1.1, Mask: 255.255.255.0, MTU: 1500, Cost: 65535
Adj count: 1
Hello: 10, Dead: 40, ReXmit: 5, Not Stub
Auth type: None
Protection type: None
Topology default (ID 0) -> Cost: 10
LDP sync state: in hold-down, for: 00:00:07, reason: LDP down during config
config holdtime: infinity
ge-0/0/3.0 PtToPt 0.0.0.1 0.0.0.0 0.0.0.0 1
Type: P2P, Address: 17.18.2.1, Mask: 255.255.255.0, MTU: 1500, Cost: 10
Adj count: 1
Hello: 10, Dead: 40, ReXmit: 5, Not Stub
Auth type: None
Protection type: None
Topology default (ID 0) -> Cost: 10
LDP sync state: in sync, for: 00:00:07, reason: LDP up during config
config holdtime: infinity
lo0.0 DRother 0.0.0.1 0.0.0.0 0.0.0.0 0
Type: LAN, Address: 17.0.0.1, Mask: 255.255.255.255, MTU: 65535, Cost: 0
Adj count: 0, Passive
Hello: 10, Dead: 40, ReXmit: 5, Not Stub
Auth type: None
Protection type: None
Topology default (ID 0) -> Passive, Cost: 0
lo0.0 DRother 0.0.0.1 0.0.0.0 0.0.0.0 0
Type: LAN, Address: 128.49.247.1, Mask: 255.255.255.255, MTU: 65535, Cost: 0
Adj count: 0, Passive
Hello: 10, Dead: 40, ReXmit: 5, Not Stub
Auth type: None
Protection type: None
Topology default (ID 0) -> Passive, Cost: 0
### LDP is missing for ge-0/0/2.0:
root@R1# run show ldp interface
Interface Address Label space ID Nbr Next
count hello
lo0.0 128.49.247.1 17.0.0.1:0 0 0
ge-0/0/3.0 17.18.2.1 17.0.0.1:0 1 2
### The impact is that for all destinations we are using the alternate interface instead.
root@R1# run show route 17.0.0/24
inet.0: 49 destinations, 49 routes (49 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
17.0.0.1/32 *[Direct/0] 4w0d 02:15:45
> via lo0.0
17.0.0.3/32 *[OSPF/10] 00:03:12, metric 40
> to 17.18.2.2 via ge-0/0/3.0
17.0.0.4/32 *[OSPF/10] 02:08:48, metric 10
> to 17.18.2.2 via ge-0/0/3.0
17.0.0.5/32 *[OSPF/10] 00:59:13, metric 20
> to 17.18.2.2 via ge-0/0/3.0
17.0.0.6/32 *[OSPF/10] 00:03:12, metric 30
> to 17.18.2.2 via ge-0/0/3.0
inet.3: 6 destinations, 6 routes (6 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
17.0.0.3/32 *[LDP/9] 00:03:12, metric 1
> to 17.18.2.2 via ge-0/0/3.0, Push 300240
17.0.0.4/32 *[LDP/9] 01:15:38, metric 1
> to 17.18.2.2 via ge-0/0/3.0
17.0.0.5/32 *[LDP/9] 00:59:13, metric 1
> to 17.18.2.2 via ge-0/0/3.0, Push 300176
17.0.0.6/32 *[LDP/9] 00:03:12, metric 1
> to 17.18.2.2 via ge-0/0/3.0, Push 300192
17.0.0.7/32 *[LDP/9] 00:03:12, metric 1
> to 17.18.2.2 via ge-0/0/3.0, Push 300224
17.0.0.8/32 *[LDP/9] 00:03:12, metric 1
> to 17.18.2.2 via ge-0/0/3.0, Push 300208
3. Only p2p interfaces
Note: LDP synchronization is supported only on point-to-point interfaces.
### If you try to configure this feature on interfaces that are not p2p:
root@R6# run show ospf interface extensive
[...]
ge-0/0/3.0 BDR 0.0.0.2 17.0.0.7 17.0.0.6 1
Type: LAN, Address: 17.28.14.1, Mask: 255.255.255.0, MTU: 1500, Cost: 10
DR addr: 17.28.14.2, BDR addr: 17.28.14.1, Priority: 128
Adj count: 1
Hello: 10, Dead: 40, ReXmit: 5, Stub NSSA
Auth type: None
Protection type: None
Topology default (ID 0) -> Cost: 10
LDP sync state: not supported for non Point-to-Point interfaces
4. Consistency
If the config is not consistent, we can end up with unpredictable routing and blackholing.
For example, in the following setup, both LDP interface and LDP synchronization is missing on R1, so the metric is not symmetric on the link, and this will cause all kind of issues.

In the figure we can see that routing between R1 and R6 will be asymmetrical, even worse, MPLS traffic from R1 to R6 will be blacked holed because of the missing LDP interface. This is also reflected in the routing table:
### Observe the missing routes in the inet.3 table:
root@R1# run show route 17.0.0/24
inet.0: 49 destinations, 49 routes (49 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
17.0.0.1/32 *[Direct/0] 4w0d 01:46:13
> via lo0.0
17.0.0.3/32 *[OSPF/10] 00:50:08, metric 10
> to 17.18.1.2 via ge-0/0/2.0
17.0.0.4/32 *[OSPF/10] 01:39:16, metric 10
> to 17.18.2.2 via ge-0/0/3.0
17.0.0.5/32 *[OSPF/10] 00:29:41, metric 20
> to 17.18.2.2 via ge-0/0/3.0
17.0.0.6/32 *[OSPF/10] 00:50:08, metric 20
> to 17.18.1.2 via ge-0/0/2.0
inet.3: 2 destinations, 2 routes (2 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
17.0.0.4/32 *[LDP/9] 00:46:06, metric 1
> to 17.18.2.2 via ge-0/0/3.0
17.0.0.5/32 *[LDP/9] 00:29:41, metric 1
> to 17.18.2.2 via ge-0/0/3.0, Push 300176
External Resources: