LDP-IGP Synchronization and LDP Session Protection
The IGP that distributes routes and LDP that distributes labels run independently. When the IGP picks a link on which LDP is not usable, there is no label and only the MPLS traffic is dropped. This article explains that gap and the two mechanisms that close it, then measures both in an IOS XR (XRd) lab. The basics of LDP are covered in What Is LDP.
What happens when a link without labels is chosen
MPLS forwarding assumes that LDP has finished distributing the label for the FEC towards the next hop the IGP chose. Two situations break that assumption.
The first is LDP not running on the link at all. A missing configuration, an ACL or filter, or a mismatched password stops the session from coming up; the IGP keeps choosing the link and only the MPLS traffic is dropped, permanently.
The second is the convergence gap right after a link comes up, but which of the two finishes first depends on the timers. With the IOS XR defaults, LDP sends Hellos every 5 seconds and the session is established over TCP immediately, while OSPF sends Hellos every 10 seconds and reaches FULL through ExStart / Exchange / Loading. On a point-to-point link LDP usually comes up first (measured later in this article), and in that case restoring a link does not create a blackhole.
How things break also depends on the kind of traffic. Plain IP is sent out without a label, and if the next router has an IP route it is forwarded anyway. VPN (VPNv4) traffic, on the other hand, requires the transport label and has no way to fall back to IP forwarding. The same fault drops only the VPN traffic.
LDP-IGP synchronization
RFC 5443 defines a mechanism where the IGP advertises a link at maximum cost until LDP is “fully operational” on it. Because the cost is the maximum, any other path wins and traffic does not flow onto a link that has no labels.
Fully operational means all three conditions hold (section 2).
| Condition | Content |
|---|---|
| 1 | An LDP hello adjacency exists on the link |
| 2 | A session matching the hello adjacency’s LDP Identifier is established with the peer |
| 3 | All label bindings have been exchanged over that session |
A router cannot verify the third condition. Section 2 of RFC 5443 says it “cannot generally be verified by a router and some estimation may have to be used”, and points to a configurable hold-down timer as a simple implementation strategy. The mechanism that makes it verifiable is End-of-LIB in RFC 5919, which signals that label advertisement is complete; with it the timer is unnecessary. On IOS XR the timer is igp sync delay on-session-up <seconds> and shows up as Sync delay in show mpls ldp igp sync (measured later in this article).
The maximum cost differs per IGP.
| IGP | Value | Note |
|---|---|---|
| OSPF | 65535 (LSInfinity, 16 bits) | — |
| IS-IS | 16777214 (2^24−2) | 2^24−1 would remove the link from the topology, so it is avoided |
There are two caveats. It is meaningless without an alternate path — if there is no other route, the link is chosen anyway. Section 3 of RFC 5443 likewise says the mechanism is for cases where “availability of LDP-signaled LSPs matters more than always choosing the optimal path”. Also, on a broadcast link the whole link is costed out, not the individual peer (section 3). When TE tunnels are in use, the mechanism applies only to the IP link cost and not to the TE metric (section 4), since disturbing the TE path computation would cause unnecessary tunnel reroutes.
LDP session protection
An LDP session is TCP between Lo0s, but whether it may be kept depends on whether a hello adjacency is alive. When the link fails and every hello adjacency disappears, the session goes down too and the label bindings are lost. On restoration it all starts again: Hello → TCP → Initialization → label exchange.
LDP session protection fills that gap with targeted Hellos. They are the Extended Discovery messages of RFC 5036 section 2.4.2 and, unlike link Hellos (multicast), are sent as unicast to the peer’s address. Even with the link gone, the hello adjacency survives as long as an IP path to the peer remains, and so do the session and its labels. Extended Discovery is asymmetric: one side starts sending and the receiver decides whether to answer.
What session protection changes is not the speed of recovery but whether the session and its labels are lost. It does not help if the peer cannot be reached by IP.
Lab verification
Lab setup
The core is doubled up, and PE1 and P1 are joined by a single link. Stopping discovery on that one link prevents an LDP session between PE1 and P1.
| Link | Subnet | OSPF cost | Role |
|---|---|---|---|
| PE1 - P1 | 10.2.3.0/24 | 1 | Under test; the ACL goes here |
| PE1 - P2 | 10.2.4.0/24 | 100 | Entry to the detour |
| P1 - P3 / P2 - P4 | 10.3.5.0/24 / 10.4.6.0/24 | 1 | The two planes |
| P3 - PE2 | 10.5.7.0/24 | 1 | — |
| P4 - PE2 | 10.6.7.0/24 | 100 | Exit from the detour |
| P1 - P2 / P3 - P4 | 10.3.4.0/24 / 10.5.6.0/24 | 1 | Cross links; the detour for session protection |
By cost, PE1 to PE2 is 3 via PE1-P1-P3-PE2, 103 via PE1-P2-P1-P3-PE2, and 201 via PE1-P2-P4-PE2.
CE1 and CE2 attach to vrf CUST-A (RD/RT 65001:1) on the PEs over eBGP, and PE1 and PE2 run iBGP vpnv4 between their Loopback0 addresses. Customer traffic always carries two labels, so it has no IP-forwarding escape route.
How the outage is measured
The forwarding outage is measured with a ping from CE1 that runs across the configuration change (count 600 interval 100 timeout 1). In the default collection order (clear the counters, ping, then show), the ping runs after the change and the convergence wait, so it only sees the steady state. The ..._flap.txt of each STEP holds that record.
The loss count only resolves times coarser than the ping’s own granularity. With timeout 1, one lost packet means the next is sent a second later, so an outage of 150 ms and one of 1 s both show up as “one packet lost”. This lab treats “how many packets were lost” and “which link carried the traffic” as the facts, and does not claim a millisecond switchover time.
XRd forwards in software on CML. Read the numbers as relative comparisons within this lab.
Verification steps
STEP 0 to 3 cover LDP-IGP synchronization, and STEP 9 to 12 the measurements across a link flap (STEP 4 to 8 are a first pass of the same operations; their files are kept).
| STEP | Action | What to confirm |
|---|---|---|
| 0 | Initial state | Traffic goes PE1-P1-P3-PE2. The LDP capabilities do not include End-of-LIB |
| 1 | ACL (deny UDP 646) on both ends of PE1 - P1 | No session forms and the VPN goes down, while plain IP still works |
| 2 | mpls ldp sync on both ends | The link is advertised with cost 65535 and traffic recovers over the detour |
| 3 | Remove the ACL | Synchronization completes and the cost returns |
| 9 | Flap the link with no sync and no protection | The baseline outage; which of LDP and OSPF comes up first |
| 10 | Same with sync | The difference from STEP 9 |
| 11 | Same with protection added | The session survives and targeted hellos cross the detour |
| 12 | Same with protection off and the hold-down timer on | The cost stays at 65535 until synchronization is declared |
When LDP is down, only the VPN breaks
Both ends of PE1 - P1 get an ACL that drops only LDP discovery. TCP 646 is left open, because without discovery no session forms anyway.
RP/0/RP0/CPU0:PE1#show configuration commit changes last 1
Sun Sep 27 21:52:06.954 UTC
!! Building configuration...
!! IOS XR Configuration 26.1.1
ipv4 access-list BLOCK-LDP-DISCOVERY
10 deny udp any any eq ldp
20 permit ipv4 any any
!
interface GigabitEthernet0/0/0/1
ipv4 access-group BLOCK-LDP-DISCOVERY ingress
!
endAfter the 15-second hold time the session with P1 disappears, leaving only the one with P2.
RP/0/RP0/CPU0:PE1#show mpls ldp neighbor brief
Sun Sep 27 21:57:48.699 UTC
Peer GR NSR Up Time Discovery Addresses Labels
ipv4 ipv6 ipv4 ipv6 ipv4 ipv6
----------------- -- --- ---------- ---------- ---------- ------------
4.4.4.4:0 N N 00:17:26 1 0 4 0 14 0All customer traffic is gone. The traceroute does not advance a single hop past PE1: !N is network unreachable, returned by PE1 itself.
RP/0/RP0/CPU0:CE1#traceroute 192.168.2.1 source 192.168.1.1 timeout 1 probe 2 maxttl 8
Sun Sep 27 21:55:46.047 UTC
Type escape sequence to abort.
Tracing the route to 192.168.2.1
1 10.1.2.2 !N *The forwarding entry gives the reason. The VPN label is known, but no transport label is available and the next hop became drop.
RP/0/RP0/CPU0:PE1#show cef vrf CUST-A 192.168.2.0/24 detail
Sun Sep 27 21:57:58.538 UTC
192.168.2.0/24, version 7, internal 0x5000001 0x30 (ptr 0x885192c0) [1], 0x0 (0x0), 0x208 (0x899cb518)
Updated Sep 27 21:41:43.111
Prefix Len 24, traffic index 0, precedence n/a, priority 3
gateway array (0x8938ba58) reference count 1, flags 0x203a, source rib (7), 0 backups
[1 type 1 flags 0xc0441 (0x89a044b8) ext 0x0 (0x0)]
LW-LDI[type=0, refc=0, ptr=0x0, sh-ldi=0x0]
gateway array update type-time 3 Sep 27 21:57:51.444
LDI Update time Sep 27 21:52:21.357
via 7.7.7.7/32, 0 dependencies, recursive [flags 0x6000]
path-idx 0 NHID 0x0 [0x885295e0 0x0]
recursion-via-/32
next hop VRF - 'default', table - 0xe0000000
unresolved
labels imposed {24011}
Load distribution: 0 (refcount 1)
Hash OK Interface Address
0 Y recursive dropPlain IP, however, still gets through. Every ping from PE1 to PE2’s Loopback0 succeeds, and the first hop carries no label: PE1 sends it as IP and P1, which has an IP route, forwards it. Whether the traffic can fall back to IP forwarding is what separates the VPN from plain IP.
RP/0/RP0/CPU0:PE1#ping 7.7.7.7 source 2.2.2.2 count 50 timeout 1
Sun Sep 27 21:55:50.945 UTC
Type escape sequence to abort.
Sending 50, 100-byte ICMP Echos to 7.7.7.7 timeout is 1 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (50/50), round-trip min/avg/max = 10/12/47 ms
RP/0/RP0/CPU0:PE1#traceroute 7.7.7.7 source 2.2.2.2 timeout 1 probe 2 maxttl 6
Sun Sep 27 21:55:52.371 UTC
Type escape sequence to abort.
Tracing the route to 7.7.7.7
1 10.2.3.3 7 msec 5 msec
2 10.3.5.5 [MPLS: Label 24008 Exp 0] 11 msec 11 msec
3 10.5.7.7 13 msec *Advertising the link with the maximum cost
mpls ldp sync goes on that interface in OSPF on PE1 and P1.
RP/0/RP0/CPU0:PE1#show configuration commit changes last 1
Sun Sep 27 22:02:02.263 UTC
!! Building configuration...
!! IOS XR Configuration 26.1.1
router ospf 1
area 0
interface GigabitEthernet0/0/0/1
mpls ldp sync
!
!
!
endThe synchronization state is shown per interface, including which condition is unmet. No hello adjacency means condition 1 of fully operational is missing. Gi0/0/0/2, which has no ACL, reads Ready in the same output.
RP/0/RP0/CPU0:PE1#show mpls ldp igp sync
Sun Sep 27 22:05:52.251 UTC
GigabitEthernet0/0/0/1:
VRF: 'default' (0x60000000)
Sync delay: Disabled
Sync status: Not ready (No hello adjacency)
GigabitEthernet0/0/0/2:
VRF: 'default' (0x60000000)
Sync delay: Disabled
Sync status: Ready
Peers:
4.4.4.4:0The advertised value appears in the Router-LSA: only the link to P1 (3.3.3.3) is 65535.
RP/0/RP0/CPU0:PE1#show ospf database router self-originate
Sun Sep 27 22:05:47.791 UTC
OSPF Router with ID (2.2.2.2) (Process ID 1)
Router Link States (Area 0)
LS age: 226
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 2.2.2.2
Advertising Router: 2.2.2.2
LS Seq Number: 80000005
Checksum: 0xe3cd
Length: 84
Number of Links: 5
Link connected to: a Stub Network
(Link ID) Network/subnet number: 2.2.2.2
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 3.3.3.3
(Link Data) Router Interface address: 10.2.3.2
Number of TOS metrics: 0
TOS 0 Metrics: 65535
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.2.3.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 4.4.4.4
(Link Data) Router Interface address: 10.2.4.2
Number of TOS metrics: 0
TOS 0 Metrics: 100
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.2.4.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 100Traffic moves to the cost-100 link and detours while keeping both labels: out to P2 (10.2.4.4), back to P1 (10.3.4.3) over the cross link, and on along the original path.
RP/0/RP0/CPU0:CE1#traceroute 192.168.2.1 source 192.168.1.1 timeout 1 probe 2 maxttl 8
Sun Sep 27 22:04:49.702 UTC
Type escape sequence to abort.
Tracing the route to 192.168.2.1
1 10.1.2.2 6 msec 5 msec
2 10.2.4.4 [MPLS: Labels 24009/24011 Exp 0] 22 msec 21 msec
3 10.3.4.3 [MPLS: Labels 24009/24011 Exp 0] 21 msec 23 msec
4 10.3.5.5 [MPLS: Labels 24008/24011 Exp 0] 22 msec 19 msec
5 10.5.7.7 [MPLS: Label 24011 Exp 0] 20 msec 19 msec
6 10.7.8.8 19 msec *Sync delay: Disabled corresponds to the third condition of fully operational (all label bindings exchanged) being only an estimate. Section 2 of RFC 5443 states that “at the present time, the latter condition cannot generally be verified by a router and some estimation may have to be used”, and that “a simple implementation strategy is to use a configurable hold-down timer”. The mechanism that makes it verifiable is End-of-LIB in RFC 5919, which signals that label advertisement is complete; once implemented, the timer is no longer needed.
The XRd in this lab does not advertise End-of-LIB. It is absent from the LDP capabilities, so the estimating path applies.
RP/0/RP0/CPU0:PE1#show mpls ldp capabilities
Sun Sep 27 21:47:53.665 UTC
Type Description Owner
------ ---------------------------------------- ------------
0x50b Typed Wildcard FEC LDP
0x3eff Cisco IOS-XR LDP
0x508 MP: Point-to-Multipoint (P2MP) mLDP
0x509 MP: Multipoint-to-Multipoint (MP2MP) mLDP
0x50c MP: Multi-Topology (MT) mLDP
0x703 P2MP PW L2VPN-AToMRemoving the ACL in STEP 3 completes the synchronization. The trace records the moment it is declared, and the cost returns to 1.
RP/0/RP0/CPU0:PE1#show mpls ldp trace igp-sync
Sun Sep 27 22:14:09.547 UTC
5 wrapping entries (1027456 possible, 3200 allocated, 826 filtered, 831 total)
Sep 27 21:40:38.884 mpls/ldp/isyn 0/RP0/CPU0 t4113 [ISYNC]:2158: Intf GigabitEthernet0/0/0/1 (ifh 0x18): Nbr 3.3.3.3:0 came up, sync_achieved up
Sep 27 21:40:43.190 mpls/ldp/isyn 0/RP0/CPU0 t4113 [ISYNC]:2158: Intf GigabitEthernet0/0/0/2 (ifh 0x20): Nbr 4.4.4.4:0 came up, sync_achieved up
Sep 27 21:52:20.343 mpls/ldp/isyn 0/RP0/CPU0 t4113 [ISYNC]:1472: Intf GigabitEthernet0/0/0/1 (ifh 0x18): Adj 10.2.3.3 is being deleted, sync achieved 0
Sep 27 21:52:20.343 mpls/ldp/isyn 0/RP0/CPU0 t4113 [ISYNC]:1476: Adj 10.2.3.3 being deleted belongs to adj_grp 3.3.3.3, has adj_flags 0xb4
Sep 27 22:10:09.824 mpls/ldp/isyn 0/RP0/CPU0 t4113 [ISYNC]:2158: Intf GigabitEthernet0/0/0/1 (ifh 0x18): Nbr 3.3.3.3:0 came up, sync_achieved upRP/0/RP0/CPU0:PE1#show ospf database router self-originate
Sun Sep 27 22:13:44.803 UTC
OSPF Router with ID (2.2.2.2) (Process ID 1)
Router Link States (Area 0)
LS age: 215
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 2.2.2.2
Advertising Router: 2.2.2.2
LS Seq Number: 80000006
Checksum: 0xffaf
Length: 84
Number of Links: 5
Link connected to: a Stub Network
(Link ID) Network/subnet number: 2.2.2.2
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 3.3.3.3
(Link Data) Router Interface address: 10.2.3.2
Number of TOS metrics: 0
TOS 0 Metrics: 1
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.2.3.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 4.4.4.4
(Link Data) Router Interface address: 10.2.4.2
Number of TOS metrics: 0
TOS 0 Metrics: 100
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.2.4.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 100On a link recovery, synchronization makes no difference
Both ends of PE1 - P1 were shut down and restored 40 seconds later, once without synchronization (STEP 9) and once with it (STEP 10). Both lost exactly one packet; there is no difference.
The syslog timestamps give the reason: LDP comes up before OSPF.
RP/0/RP0/CPU0:Sep 27 19:14:28.310 UTC: mpls_ldp[1178]: %ROUTING-LDP-5-NBR_CHANGE : VRF 'default' (0x60000000), Neighbor 3.3.3.3:0 is UP (IPv4 connection)
RP/0/RP0/CPU0:Sep 27 19:14:30.424 UTC: ospf[1035]: %ROUTING-OSPF-5-ADJCHG : Process 1, Nbr 3.3.3.3 on GigabitEthernet0/0/0/1 in area 0 from LOADING to FULL, Loading Done, vrf default vrfid 0x60000000By the time the IGP picks the link again, labels are already available, so there is no moment for synchronization to hold back. With IOS XR defaults, the LDP session is established over TCP immediately, while OSPF waits for its 10-second Hello and then goes through ExStart, Exchange and Loading.
Synchronization is not a feature that speeds up recovery; it is insurance against the IGP choosing a link where LDP cannot run. It earns its place when LDP fails to come up because of a missing configuration, a filter or a password mismatch (STEP 1 to 2 is exactly that), or when LDP converges later than the IGP because of a large label table or a slow peer.
Session protection: keeping the session when the link is gone
With session protection (STEP 11), the same operation never drops the LDP session. Not one NBR_CHANGE appears, and the label bindings stay.
show mpls ldp discovery shows why: next to the link hello adjacency there is a Targeted Hellos entry, and its hold time is 90 seconds rather than 15.
RP/0/RP0/CPU0:PE1#show mpls ldp discovery
Sun Sep 27 19:37:43.015 UTC
Local LDP Identifier: 2.2.2.2:0
Discovery Sources:
Interfaces:
GigabitEthernet0/0/0/1 : xmit/recv
VRF: 'default' (0x60000000)
LDP Id: 3.3.3.3:0, Transport address: 3.3.3.3
Hold time: 15 sec (local:15 sec, peer:15 sec)
Established: Sep 27 19:33:39.109 (00:04:03 ago)
GigabitEthernet0/0/0/2 : xmit/recv
VRF: 'default' (0x60000000)
LDP Id: 4.4.4.4:0, Transport address: 4.4.4.4
Hold time: 15 sec (local:15 sec, peer:15 sec)
Established: Sep 27 19:07:06.757 (00:30:36 ago)
Targeted Hellos:
2.2.2.2 -> 3.3.3.3 (active), xmit/recv
LDP Id: 3.3.3.3:0
Hold time: 90 sec (local:90 sec, peer:90 sec)
Established: Sep 27 19:32:25.537 (00:05:17 ago)
2.2.2.2 -> 4.4.4.4 (active), xmit
Established: N/AThe capture shows where they went: during the outage, unicast hellos crossed the detour (PE1 - P2), addressed to the peer’s Loopback0 (3.3.3.3).
Internet Protocol Version 4, Src: 2.2.2.2, Dst: 3.3.3.3
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0xc0 (DSCP: CS6, ECN: Not-ECT)
1100 00.. = Differentiated Services Codepoint: Class Selector 6 (48)
.... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
Total Length: 70
Identification: 0xb900 (47360)
000. .... = Flags: 0x0
0... .... = Reserved bit: Not set
.0.. .... = Don't fragment: Not set
..0. .... = More fragments: Not set
...0 0000 0000 0000 = Fragment Offset: 0
Time to Live: 255
Protocol: UDP (17)
Header Checksum: 0xf7dc [validation disabled]
[Header checksum status: Unverified]
Source Address: 2.2.2.2
Destination Address: 3.3.3.3
[Stream index: 5]
User Datagram Protocol, Src Port: 646, Dst Port: 646
Source Port: 646
Destination Port: 646
Length: 50
Checksum: 0x5cc5 [unverified]
[Checksum Status: Unverified]
[Stream index: 3]
[Stream Packet Number: 2]
[Timestamps]
[Time since first frame: 253.577000 milliseconds]
[Time since previous frame: 253.577000 milliseconds]
UDP payload (42 bytes)
Label Distribution Protocol
Version: 1
PDU Length: 38
LSR ID: 2.2.2.2
Label Space ID: 0
Hello Message
0... .... = U bit: Unknown bit not set
Message Type: Hello Message (0x100)
Message Length: 28
Message ID: 0x00000000
Common Hello Parameters
00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
TLV Type: Common Hello Parameters (0x400)
TLV Length: 4
Hold Time: 90
1... .... .... .... = Targeted Hello: Targeted Hello
.1.. .... .... .... = Hello Requested: Source requests periodic hellosThe Hello Requested bit is the asymmetric exchange defined in section 2.4.2 of RFC 5036: the initiating LSR asks the other side to send periodic hellos back.
What protection changes is whether the session and the labels are lost, not the length of the outage (still one packet). In this topology the traffic moves to the detour as soon as the link goes down, so the cost of the switch is the same under every condition. Keeping the labels avoids re-establishing the session and re-exchanging them.
The hold-down timer: waiting before declaring synchronization
On IOS XR, igp sync delay on-session-up <seconds> under mpls ldp sets how long to wait after the session comes up before declaring synchronization. STEP 12 sets 30 seconds and flaps the link with protection off, so that the session really drops.
Looking at PE1 right after the recovery, while synchronization is Deferred, the Router-LSA still advertises the link to P1 with 65535.
Sun Sep 27 19:43:16.685 UTC
RP/0/RP0/CPU0:PE1#show clock
Sun Sep 27 19:43:16.963 UTC
19:43:17.006 UTC Sun Sep 27 2026
RP/0/RP0/CPU0:PE1#show mpls ldp igp sync
Sun Sep 27 19:43:17.081 UTC
GigabitEthernet0/0/0/1:
VRF: 'default' (0x60000000)
Sync delay: 30 sec
Sync status: Deferred (20 sec remaining)
GigabitEthernet0/0/0/2:
VRF: 'default' (0x60000000)
Sync delay: 30 sec
Sync status: Ready
Peers:
4.4.4.4:0
RP/0/RP0/CPU0:PE1#show ospf database router self-originate
Sun Sep 27 19:43:17.202 UTC
OSPF Router with ID (2.2.2.2) (Process ID 1)
Router Link States (Area 0)
LS age: 8
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 2.2.2.2
Advertising Router: 2.2.2.2
LS Seq Number: 80000010
Checksum: 0xcdd8
Length: 84
Number of Links: 5
Link connected to: a Stub Network
(Link ID) Network/subnet number: 2.2.2.2
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 3.3.3.3
(Link Data) Router Interface address: 10.2.3.2
Number of TOS metrics: 0
TOS 0 Metrics: 65535
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.2.3.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 1
Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 4.4.4.4
(Link Data) Router Interface address: 10.2.4.2
Number of TOS metrics: 0
TOS 0 Metrics: 100
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.2.4.0
(Link Data) Network Mask: 255.255.255.0
Number of TOS metrics: 0
TOS 0 Metrics: 100
RP/0/RP0/CPU0:PE1#show route 7.7.7.7/32
Sun Sep 27 19:43:18.000 UTC
Routing entry for 7.7.7.7/32
Known via "ospf 1", distance 110, metric 104, type intra area
Installed Sep 27 19:42:07.212 for 00:01:10
Routing Descriptor Blocks
10.2.4.4, from 7.7.7.7, via GigabitEthernet0/0/0/2
Route metric is 104
No advertising protos.The later snapshot is back to Ready with a cost of 1. This is the part RFC 5443 calls an estimate, filled in by the implementation with a timer.
The four conditions side by side
| STEP | Sync | Protection | Delay | Ping across the change | LDP session | Targeted hellos on the detour |
|---|---|---|---|---|---|---|
| 9 | No | No | No | 599/600 (1 lost) | Dropped | 0 |
| 10 | Yes | No | No | 599/600 (1 lost) | Dropped | 0 |
| 11 | Yes | Yes | No | 599/600 (1 lost) | Kept | 6 |
| 12 | Yes | No | Yes | 599/600 (1 lost) | Dropped | 0 |
| Synchronization only made a difference in STEP 1 to 2, where reachability went from 0% to 100%. Across a link flap (STEP 9 to 12), one packet is lost whichever of synchronization, protection and the delay is enabled. What changes is whether the session and labels are lost (protection) and how long the declaration is held back (the delay). |
RP/0/RP0/CPU0:CE1#ping 192.168.2.1 source 192.168.1.1 count 50 timeout 1
Sun Sep 27 21:46:49.592 UTC
Type escape sequence to abort.
Sending 50, 100-byte ICMP Echos to 192.168.2.1 timeout is 1 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (50/50), round-trip min/avg/max = 16/22/81 msVerification config and show output
For every STEP the following files were collected from all eight routers, one file per router. The verification config is the ..._run.txt (the final state is the one from STEP 13). Each STEP was collected in the order “clear the counters, ping, then show”.
| File | Contents |
|---|---|
..._clear.txt | The counters cleared at the start of the STEP |
..._ping.txt | ping (50 packets) and traceroute after convergence: between the CEs for customer traffic, between Loopback0 for the core |
..._flap.txt | The ping that ran across the configuration change (600 packets at 100 ms), from CE1, on the link-flap STEPs only |
..._show.txt | show version / show route / the OSPF set / the LDP set (igp sync / discovery / neighbor / bindings / capabilities) / MPLS forwarding / VPN and BGP |
..._log.txt | show logging limited to the range of that STEP |
..._run.txt | show running-config at that STEP (that is, the verification config for the STEP) |
..._trace.txt | The six core routers only: show mpls ldp trace igp-sync / peer / binding and show mpls lsd trace |
..._commit.cfg | The configuration committed in that STEP. On the flap STEPs it is split between taking the link down (pe1 / p1) and bringing it back (pe1r / p1r) |
..._during.txt | Flap STEPs only: PE1 right after the recovery (+5 s / +15 s), its synchronization state and Router-LSA |
STEP 0: Initial state
| Router | show | ping | outage | clear | syslog | running-config | trace | committed config | just after recovery |
|---|---|---|---|---|---|---|---|---|---|
| CE1 | show | ping | — | clear | log | run | — | — | — |
| PE1 | show | ping | — | clear | log | run | trace | — | — |
| P1 | show | ping | — | clear | log | run | trace | — | — |
| P2 | show | ping | — | clear | log | run | trace | — | — |
| P3 | show | ping | — | clear | log | run | trace | — | — |
| P4 | show | ping | — | clear | log | run | trace | — | — |
| PE2 | show | ping | — | clear | log | run | trace | — | — |
| CE2 | show | ping | — | clear | log | run | — | — | — |
STEP 1: ACL (deny UDP 646) on both ends of PE1 - P1
| Router | show | ping | outage | clear | syslog | running-config | trace | committed config | just after recovery |
|---|---|---|---|---|---|---|---|---|---|
| CE1 | show | ping | — | clear | log | run | — | — | — |
| PE1 | show | ping | — | clear | log | run | trace | pe1 | — |
| P1 | show | ping | — | clear | log | run | trace | p1 | — |
| P2 | show | ping | — | clear | log | run | trace | — | — |
| P3 | show | ping | — | clear | log | run | trace | — | — |
| P4 | show | ping | — | clear | log | run | trace | — | — |
| PE2 | show | ping | — | clear | log | run | trace | — | — |
| CE2 | show | ping | — | clear | log | run | — | — | — |
STEP 2: mpls ldp sync on both ends
| Router | show | ping | outage | clear | syslog | running-config | trace | committed config | just after recovery |
|---|---|---|---|---|---|---|---|---|---|
| CE1 | show | ping | — | clear | log | run | — | — | — |
| PE1 | show | ping | — | clear | log | run | trace | pe1 | — |
| P1 | show | ping | — | clear | log | run | trace | p1 | — |
| P2 | show | ping | — | clear | log | run | trace | — | — |
| P3 | show | ping | — | clear | log | run | trace | — | — |
| P4 | show | ping | — | clear | log | run | trace | — | — |
| PE2 | show | ping | — | clear | log | run | trace | — | — |
| CE2 | show | ping | — | clear | log | run | — | — | — |
STEP 3: Remove the ACL
| Router | show | ping | outage | clear | syslog | running-config | trace | committed config | just after recovery |
|---|---|---|---|---|---|---|---|---|---|
| CE1 | show | ping | — | clear | log | run | — | — | — |
| PE1 | show | ping | — | clear | log | run | trace | pe1 | — |
| P1 | show | ping | — | clear | log | run | trace | p1 | — |
| P2 | show | ping | — | clear | log | run | trace | — | — |
| P3 | show | ping | — | clear | log | run | trace | — | — |
| P4 | show | ping | — | clear | log | run | trace | — | — |
| PE2 | show | ping | — | clear | log | run | trace | — | — |
| CE2 | show | ping | — | clear | log | run | — | — | — |
STEP 4: Remove sync, then flap the link
| Router | show | ping | outage | clear | syslog | running-config | trace | committed config | just after recovery |
|---|---|---|---|---|---|---|---|---|---|
| CE1 | show | ping | outage | clear | log | run | — | — | — |
| PE1 | show | ping | — | clear | log | run | trace | pe1 pe1r | during |
| P1 | show | ping | — | clear | log | run | trace | p1 p1r | — |
| P2 | show | ping | — | clear | log | run | trace | — | — |
| P3 | show | ping | — | clear | log | run | trace | — | — |
| P4 | show | ping | — | clear | log | run | trace | — | — |
| PE2 | show | ping | — | clear | log | run | trace | — | — |
| CE2 | show | ping | — | clear | log | run | — | — | — |
STEP 5: Same with sync
| Router | show | ping | outage | clear | syslog | running-config | trace | committed config | just after recovery |
|---|---|---|---|---|---|---|---|---|---|
| CE1 | show | ping | outage | clear | log | run | — | — | — |
| PE1 | show | ping | — | clear | log | run | trace | pe1 pe1r | during |
| P1 | show | ping | — | clear | log | run | trace | p1 p1r | — |
| P2 | show | ping | — | clear | log | run | trace | — | — |
| P3 | show | ping | — | clear | log | run | trace | — | — |
| P4 | show | ping | — | clear | log | run | trace | — | — |
| PE2 | show | ping | — | clear | log | run | trace | — | — |
| CE2 | show | ping | — | clear | log | run | — | — | — |
STEP 6: Same with session protection added
| Router | show | ping | outage | clear | syslog | running-config | trace | committed config | just after recovery |
|---|---|---|---|---|---|---|---|---|---|
| CE1 | show | ping | outage | clear | log | run | — | — | — |
| PE1 | show | ping | — | clear | log | run | trace | pe1 pe1r | during |
| P1 | show | ping | — | clear | log | run | trace | p1 p1r | — |
| P2 | show | ping | — | clear | log | run | trace | — | — |
| P3 | show | ping | — | clear | log | run | trace | — | — |
| P4 | show | ping | — | clear | log | run | trace | — | — |
| PE2 | show | ping | — | clear | log | run | trace | — | — |
| CE2 | show | ping | — | clear | log | run | — | — | — |
STEP 7: Same with the hold-down timer
| Router | show | ping | outage | clear | syslog | running-config | trace | committed config | just after recovery |
|---|---|---|---|---|---|---|---|---|---|
| CE1 | show | ping | outage | clear | log | run | — | — | — |
| PE1 | show | ping | — | clear | log | run | trace | pe1 pe1r | during |
| P1 | show | ping | — | clear | log | run | trace | p1 p1r | — |
| P2 | show | ping | — | clear | log | run | trace | — | — |
| P3 | show | ping | — | clear | log | run | trace | — | — |
| P4 | show | ping | — | clear | log | run | trace | — | — |
| PE2 | show | ping | — | clear | log | run | trace | — | — |
| CE2 | show | ping | — | clear | log | run | — | — | — |
STEP 8: Remove protection, delay and sync
| Router | show | ping | outage | clear | syslog | running-config | trace | committed config | just after recovery |
|---|---|---|---|---|---|---|---|---|---|
| CE1 | show | ping | — | clear | log | run | — | — | — |
| PE1 | show | ping | — | clear | log | run | trace | pe1 | — |
| P1 | show | ping | — | clear | log | run | trace | p1 | — |
| P2 | show | ping | — | clear | log | run | trace | — | — |
| P3 | show | ping | — | clear | log | run | trace | — | — |
| P4 | show | ping | — | clear | log | run | trace | — | — |
| PE2 | show | ping | — | clear | log | run | trace | — | — |
| CE2 | show | ping | — | clear | log | run | — | — | — |
STEP 9: Flap the link with no sync and no protection
| Router | show | ping | outage | clear | syslog | running-config | trace | committed config | just after recovery |
|---|---|---|---|---|---|---|---|---|---|
| CE1 | show | ping | outage | clear | log | run | — | — | — |
| PE1 | show | ping | — | clear | log | run | trace | pe1 pe1r | during |
| P1 | show | ping | — | clear | log | run | trace | p1 p1r | — |
| P2 | show | ping | — | clear | log | run | trace | — | — |
| P3 | show | ping | — | clear | log | run | trace | — | — |
| P4 | show | ping | — | clear | log | run | trace | — | — |
| PE2 | show | ping | — | clear | log | run | trace | — | — |
| CE2 | show | ping | — | clear | log | run | — | — | — |
STEP 10: Same with sync
| Router | show | ping | outage | clear | syslog | running-config | trace | committed config | just after recovery |
|---|---|---|---|---|---|---|---|---|---|
| CE1 | show | ping | outage | clear | log | run | — | — | — |
| PE1 | show | ping | — | clear | log | run | trace | pe1 pe1r | during |
| P1 | show | ping | — | clear | log | run | trace | p1 p1r | — |
| P2 | show | ping | — | clear | log | run | trace | — | — |
| P3 | show | ping | — | clear | log | run | trace | — | — |
| P4 | show | ping | — | clear | log | run | trace | — | — |
| PE2 | show | ping | — | clear | log | run | trace | — | — |
| CE2 | show | ping | — | clear | log | run | — | — | — |
STEP 11: Same with sync and protection
| Router | show | ping | outage | clear | syslog | running-config | trace | committed config | just after recovery |
|---|---|---|---|---|---|---|---|---|---|
| CE1 | show | ping | outage | clear | log | run | — | — | — |
| PE1 | show | ping | — | clear | log | run | trace | pe1 pe1r | during |
| P1 | show | ping | — | clear | log | run | trace | p1 p1r | — |
| P2 | show | ping | — | clear | log | run | trace | — | — |
| P3 | show | ping | — | clear | log | run | trace | — | — |
| P4 | show | ping | — | clear | log | run | trace | — | — |
| PE2 | show | ping | — | clear | log | run | trace | — | — |
| CE2 | show | ping | — | clear | log | run | — | — | — |
STEP 12: Same with sync, no protection and the delay
| Router | show | ping | outage | clear | syslog | running-config | trace | committed config | just after recovery |
|---|---|---|---|---|---|---|---|---|---|
| CE1 | show | ping | outage | clear | log | run | — | — | — |
| PE1 | show | ping | — | clear | log | run | trace | pe1 pe1r | during |
| P1 | show | ping | — | clear | log | run | trace | p1 p1r | — |
| P2 | show | ping | — | clear | log | run | trace | — | — |
| P3 | show | ping | — | clear | log | run | trace | — | — |
| P4 | show | ping | — | clear | log | run | trace | — | — |
| PE2 | show | ping | — | clear | log | run | trace | — | — |
| CE2 | show | ping | — | clear | log | run | — | — | — |
STEP 13: Remove sync and delay (final state)
| Router | show | ping | outage | clear | syslog | running-config | trace | committed config | just after recovery |
|---|---|---|---|---|---|---|---|---|---|
| CE1 | show | ping | — | clear | log | run | — | — | — |
| PE1 | show | ping | — | clear | log | run | trace | pe1 | — |
| P1 | show | ping | — | clear | log | run | trace | p1 | — |
| P2 | show | ping | — | clear | log | run | trace | — | — |
| P3 | show | ping | — | clear | log | run | trace | — | — |
| P4 | show | ping | — | clear | log | run | trace | — | — |
| PE2 | show | ping | — | clear | log | run | trace | — | — |
| CE2 | show | ping | — | clear | log | run | — | — | — |
Packet captures were taken per STEP on the three segments.
| STEP | CE1 - PE1 | PE1 - P1 | PE1 - P2 (detour) |
|---|---|---|---|
| 0 | pcap | pcap | pcap |
| 1 | pcap | pcap | pcap |
| 2 | pcap | pcap | pcap |
| 3 | pcap | pcap | pcap |
| 4 | pcap | pcap | pcap |
| 5 | pcap | pcap | pcap |
| 6 | pcap | pcap | pcap |
| 7 | pcap | pcap | pcap |
| 8 | pcap | pcap | pcap |
| 9 | pcap | pcap | pcap |
| 10 | pcap | pcap | pcap |
| 11 | pcap | pcap | pcap |
| 12 | pcap | pcap | pcap |
| 13 | pcap | pcap | pcap |
References
| RFC | Title | Summary |
|---|---|---|
| RFC 5443 | LDP IGP Synchronization | The IGP advertises the maximum cost until LDP is fully operational. The definition of fully operational and the cost values (section 2); applicability and broadcast links (section 3). |
| RFC 5036 | LDP Specification | Basic Discovery (section 2.4.1) and Extended Discovery (section 2.4.2), which defines the asymmetric targeted Hello exchange. |
Book: Luc De Ghein, MPLS Fundamentals (Cisco Press, 2006), Chapter 4
Related articles
- What Is MPLS
- MPLS Labels and the Label Stack
- MPLS Label Operations (push / swap / pop) and PHP
- MPLS TTL Processing and MTU
- What Is LDP
- LDP Label Distribution Modes and Label Spaces
- LDP-IGP Synchronization and LDP Session Protection
- LDP label advertisement control (filtering)
- LDP session authentication (TCP MD5)
- MPLS OAM (LSP ping and LSP traceroute)
- What Is MPLS TE (RSVP-TE)
- MPLS TE CSPF and Path Constraints (Bandwidth, Affinity, TE Metric)
- Steering Traffic into MPLS TE Tunnels
- MPLS TE Fast Reroute (Link and Node Protection)
- MPLS TE Fast Reroute (Auto-Tunnel Backup and SRLG)
- MPLS QoS (EXP and Uniform / Pipe / Short-Pipe)
- MPLS QoS Rate Control and Queuing (policer / shaper / priority)