LDP-IGP Synchronization

LDP-IGP Synchronization

Problem-

LDP establishes MPLS LSPs along the shortest-path along the destination as determined by IP forwarding. In L2VPN or L3VPN scenario, if the LSP is not formed between the PE routers, a blackhole exists and services depending on MPLS forwarding will fail. The reasons for LSP not setting up completely could be-

1) Implementation bug

2) Configuration error

3) A link has just come up and IGP adjacency is UP but LDP sessions are not up or label-bindings are not exchanged with the neighbors.

Solution-

The problem arises as there is no coupling between IGP and LDP operational states. So the solution is to discourage a link from being used as long as the LDP sessions are not fully established. When LDP is not fully operational on a given link, the IGP will advertise the cost of the link to be maximum in order to avoid any traffic to flow through it.

In Cisco IOS, this is done by using mpls ldp igp sync command from router configuration mode. (NOTE: Cisco IOS supports LDP-IGP Synchronization only for OSPF). By default, if the peer is reachable and LDP-IGP synchronization is enabled, the IGP waits indefinitely for LDP session to be fully operational. Until then, OSPF advertises maximum metric (metric=65536) for the link in order to avoid using that link to send traffic. To limit the length of time IGP session must wait, use mpls ldp igp sync holddown <value> command from global configuration mode.

NOTE: if there are multiple paths between LDP peers, OSPF adjacency is never formed between the peers for the interface for which LDP is not configured. If there is only one path between the peers, LDP allows OSPF to form the adjacency between the peers.

Consider the following-

R1 and R2 routers are connected via a point-to-point serial link.

Case-1: LDP is enabled only on the serial interface of R1. LDP is not enabled on the serial interface of R2. Also, LDP-IGP synchronization is not enabled on any routers.

R1 config-

mpls label protocol ldp

mpls ldp router-id Loopback 0 force

!

interface Loopback 0

ip address 1.1.1.1 255.255.255.255

ip ospf 1 area 0

!

interface serial 0/0

ip address 10.1.1.1 255.255.255.0

ip ospf 1 area 0

mpls ip

!

R2 config-

mpls label protocol ldp

mpls ldp router-id Loopback 0 force

!

interface Loopback 0

ip address 2.2.2.2 255.255.255.255

ip ospf 1 area 0

!

interface serial 0/0

ip address 10.1.1.2 255.255.255.0

ip ospf 1 area 0

!

R1# show ip ospf mpls ldp interface serial 0/0

Serial0/0

Process ID 1, Area 0

LDP is not configured through LDP autoconfig

LDP-IGP Synchronization : Not required

Holddown timer is disabled

Interface is up

The output shows that the "Interface is up".

Case-2: LDP is only enabled on the serial interface of R1, not on R2. However, MPLS LDP-IGP synchronization is enabled on R1. Also, a Holddown timer of 2000 miliseconds is configured.

R1(config)# mpls ldp igp sync holddown 2000

R1(config)# router ospf 1

R1(config-router)# mpls ldp igp sync

The debug mpls ldp igp sync interface serial 0/0 command on R1 displays that IGP informs LDP that sync is enabled but sync is not achieved. For Holddown timer to run, it requires the interface to flap (essentially, shutdown and then enable again).

*Mar 1 00:11:51.743: LDP-SYNC: Enqueue request req_type 0 IGP OSPF 1 interface none.

*Mar 1 00:11:51.743: LDP-SYNC: OSPF 1: SYNC enabled, added to global tree, informed IGP.

*Mar 1 00:11:51.743: LDP-SYNC: Enqueue request req_type 3 IGP OSPF 1 interface Se0/0.

*Mar 1 00:11:51.743: LDP-SYNC: Se0/0, OSPF 1: Added to per-interface IGP list.

*Mar 1 00:11:51.743: LDP-SYNC: Se0/0: Enabled for SYNC by IGP

*Mar 1 00:13:51.015: LDP-SYNC: Se0/0, OSPF 1: notify status (required, not achieved, delay, holddown 2000) internal status (not achieved, timer not running).

R1 brings the interface UP but advertises maximum metric for link.

R1# show ip ospf mpls ldp interface serial 0/0

Serial0/0

Process ID 1, Area 0

LDP is not configured through LDP autoconfig

LDP-IGP Synchronization : Required

Holddown timer is configured : 2000 msecs

Holddown timer is not running

Interface is up and sending maximum metric

R1# show ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route

o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets

C 1.1.1.1 is directly connected, Loopback0

2.0.0.0/32 is subnetted, 1 subnets

O 2.2.2.2 [110/65536] via 10.1.1.2, 00:07:34, Serial0/0

10.0.0.0/24 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, Serial0/0

When LDP is enabled on R2, the LDP session comes up. IGP notifies LDP that sync is achieved and then R1 advertises the actual/normal metric for the link.

R2(config)# interface serial 0/0

R2(config-if)# mpls ip

*Mar 1 00:19:28.711: %LDP-5-NBRCHG: LDP Neighbor 2.2.2.2:0 (1) is UP

*Mar 1 00:19:28.711: LDP-SYNC: Se0/0: session 2.2.2.2:0 came up, sync_achieved up

*Mar 1 00:19:28.715: LDP-SYNC: Se0/0, OSPF 1: notify status (required, achieved, no delay, holddown 2000) internal status (achieved, timer not running)

R1# show ip ospf mpls ldp interface serial 0/0

Serial0/0

Process ID 1, Area 0

LDP is not configured through LDP autoconfig

LDP-IGP Synchronization : Required

Holddown timer is configured : 2000 msecs

Holddown timer is not running

Interface is up

R1# show ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route

o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets

C 1.1.1.1 is directly connected, Loopback0

2.0.0.0/32 is subnetted, 1 subnets

O 2.2.2.2 [110/65] via 10.1.1.2, 00:00:57, Serial0/0

10.0.0.0/24 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, Serial0/0