When 'ldp-synchronization' is enabled for OSPF, ensure that LDP is fully established before the IGP path is used for forwarding traffic. In the output of ' show ospf interface extensive' , the 'LDP sync state' should appear under each interface.
'ldp-synchronization'
'
show ospf interface extensive'
'LDP sync state'
In most scenarios, when everything is up and stable, you should see 'LDP session up' as the reason for 'LDP sync state'. However, in certain scenarios, you may see 'LDP adjacency up' for 'LDP sync state' .
'LDP session up'
'LDP sync state'.
'LDP adjacency up'
This article will explain a scenario when 'LDP adjacency up' is seen instead of 'LDP session up' as the expected behavior.
In a scenario, where there are 2 interfaces (layer 3 interfaces, not one AE bundle) between 2 routers, OSPF is established in each interface. LDP session is established between the loopback of those 2 routers by default, so there will be 1 LDP session and 2 OSPF interfaces. When those sessions established post reboot or configured, the output displays all reasons to be 'LDP session up'.
'LDP session up'.
regress@PE1_re> show ospf interface extensive Jun 03 06:29:23 Interface State Area DR ID BDR ID Nbrs ge-0/0/3.0 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1 Type: P2P, Address: 10.0.35.170, Mask: 255.255.255.252, MTU: 9178, Cost: 100 Adj count: 1 Hello: 10, Dead: 40, ReXmit: 5, Not Stub Auth type: None Protection type: Link Topology default (ID 0) -> Cost: 100 LDP sync state: in sync, for: 00:00:02, reason: LDP session up config holdtime: infinity ge-1/0/3.0 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1 Type: P2P, Address: 10.0.35.174, Mask: 255.255.255.252, MTU: 9178, Cost: 100 Adj count: 1 Hello: 10, Dead: 40, ReXmit: 5, Not Stub Auth type: None Protection type: Link Topology default (ID 0) -> Cost: 100 LDP sync state: in sync, for: 00:00:02, reason: LDP session up config holdtime: infinity lo0.0 Waiting 0.0.0.0 0.0.0.0 0.0.0.0 0 Type: LAN, Address: 128.51.138.74, Mask: 255.255.255.255, MTU: 65535, Cost: 0 Priority: 128 Adj count: 0 Hello: 10, Dead: 40, ReXmit: 5, Not Stub Auth type: None Protection type: None Topology default (ID 0) -> Cost: 0
If one of the OSPF interface flaps, the OSPF session on that interface turns down. However, the LDP session and the other OSPF session remains up. When it comes back, the OSPF session on that interface establishes again. However, the LDP session never flaps. Hence, the LDP can only tell OSPF is 'Adjacency up' instead of 'Session up' .
'Adjacency up'
'Session up'
regress@PE1_re> show ospf interface extensive Jun 03 06:30:22 Interface State Area DR ID BDR ID Nbrs ge-0/0/3.0 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1 Type: P2P, Address: 10.0.35.170, Mask: 255.255.255.252, MTU: 9178, Cost: 100 Adj count: 1 Hello: 10, Dead: 40, ReXmit: 5, Not Stub Auth type: None Protection type: Link Topology default (ID 0) -> Cost: 100 LDP sync state: in sync, for: 00:01:00, reason: LDP session up config holdtime: infinity ge-1/0/3.0 PtToPt 0.0.0.0 0.0.0.0 0.0.0.0 1 Type: P2P, Address: 10.0.35.174, Mask: 255.255.255.252, MTU: 9178, Cost: 100 Adj count: 1 Hello: 10, Dead: 40, ReXmit: 5, Not Stub Auth type: None Protection type: Link Topology default (ID 0) -> Cost: 100 LDP sync state: in sync, for: 00:00:07, reason: LDP adjacency up config holdtime: infinity lo0.0 DR 0.0.0.0 128.51.138.74 0.0.0.0 0 Type: LAN, Address: 128.51.138.74, Mask: 255.255.255.255, MTU: 65535, Cost: 0 DR addr: 128.51.138.74, Priority: 128 Adj count: 0 Hello: 10, Dead: 40, ReXmit: 5, Not Stub Auth type: None Protection type: None Topology default (ID 0) -> Cost: 0