MPLS LDP – IGP Synchronization

In certain networks, for example; Multiprotocol Label Switching (MPLS) Virtual Private Network (VPN) applications rely upon Label Switched Paths (LSP’s) set up by Label Distribution Protocol (LDP), in these networks, it is possible for the IGP to become operational on a link on which LDP is not resulting in labeled traffic being blackholed. IP packets could still be forwarded as normal, however, this is not useful in BGP route-free cores designs.

We look at a way to avoid this blackholing of labelled traffic. Essentially a LSP must exist from the ingress to the egress of the network or simply put edge-to-edge. If for whatever reason one of these links is not covered by LDP and the IGP (IS-IS or OSPF) adjacency becomes operational before LDP has established a session or distributed its labels then labelled traffic can get blackholed.

The MPLS LDP IGP Synchronization feature does the following:

  • Provides a means to synchronize LDP and IGPs to minimize MPLS packet loss.
  • Enables you to globally enable LDP IGP synchronization on each interface associated with an IGP OSPF or IS-IS process.
  • Provides a means to disable LDP IGP synchronization on interfaces that you do not want to be enabled.
  • Prevents MPLS packet loss due to synchronization conflicts.
  • Works when LDP is enabled on interfaces using either the mpls ip or mpls ldp autoconfig command.

To enable LDP IGP synchronization on each interface that belongs to an OSPF or IS-IS process, enter the mpls ldp sync command. To disable LDP IGP synchronization issue the no mpls ldp igp sync command on those interfaces.

Notes:

  • If the LDP peer is reachable, the IGP waits indefinitely (by default) for synchronization to be achieved. To limit the length of time an IGP session must wait we can issue the mpls ldp igp sync holddown msec command.
  • Reachability is determined by the peer’s transport address, so a VAILD routing entry must exist for the peer’s transport address including either a longest match or default routing entry.

Consider this simple topology.


R2 configuration:

interface Ethernet0/0
 description ** Link to R1 **
 ip address 12.0.0.2 255.255.255.252
 ip ospf 1 area 0
 no mpls ldp igp sync  (disable LDP-IGP Synchronization at the interface level)

router ospf 1
 mpls ldp sync       (enables LDP-IGP Synchronization globally)
 mpls ldp autoconfig

R1 shows we have an OSPF neighborship out of the Eth0/0 interface.

R1#sh ip ospf int brief
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Lo0          1     0               1.1.1.1/32         1     LOOP  0/0
Et0/1        1     0               14.0.0.1/30        10    BDR   1/1
Et0/0        1     0               12.0.0.1/30        10    BDR   1/1

The following command also shows that the IGP is not in sync, yet the LDP peer TRANSPORT address is reachable.

R1#sh mpls ldp igp sync
    Ethernet0/0:
        LDP configured; LDP-IGP Synchronization enabled.
        Sync status: sync not achieved; peer reachable.
        Sync delay time: 0 seconds (0 seconds left)
        IGP holddown time: infinite.
        IGP enabled: OSPF 1
    Ethernet0/1:
        LDP configured; LDP-IGP Synchronization enabled.
        Sync status: sync achieved; peer reachable.
        Sync delay time: 0 seconds (0 seconds left)
        IGP holddown time: infinite.
        Peer LDP Ident: 4.4.4.4

We don’t have an LDP neighbor been R1 and R2.

R1#sh mpls ldp neighbor
    Peer LDP Ident: 4.4.4.4:0; Local LDP Ident 1.1.1.1:0
        TCP connection: 4.4.4.4.49334 - 1.1.1.1.646
        State: Oper; Msgs sent/rcvd: 30/30; Downstream
        Up time: 00:18:16
        LDP discovery sources:
          Ethernet0/1, Src IP addr: 14.0.0.2
        Addresses bound to peer LDP Ident:
          34.0.0.2        14.0.0.2        4.4.4.4

To further confirm this we can issue the following command for OSPF, notice that the Eth0/0 interface is advertising the link with the maximum metric!

R1#sh ip ospf mpls ldp interface
Loopback0
  Process ID 1, Area 0
  LDP is not configured through LDP autoconfig
  LDP-IGP Synchronization : Not required
  Holddown timer is disabled
  Interface is up
Ethernet0/1
  Process ID 1, Area 0
  LDP is configured through LDP autoconfig
  LDP-IGP Synchronization : Required
  Holddown timer is not configured
  Interface is up
Ethernet0/0
  Process ID 1, Area 0
  LDP is configured through LDP autoconfig
  LDP-IGP Synchronization : Required
  Holddown timer is not configured
  Interface is up and sending maximum metric  <-----

If we check the OSPF database for the router LSA we see that it has indeed set the metric to 65535.

R1#sh ip ospf database router self-originate 

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Router Link States (Area 0)

  LS age: 1626
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID: 1.1.1.1
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000004
  Checksum: 0xD2ED
  Length: 60
  Number of Links: 3

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 1.1.1.1
     (Link Data) Network Mask: 255.255.255.255
      Number of MTID metrics: 0
       TOS 0 Metrics: 1

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 14.0.0.2
     (Link Data) Router Interface address: 14.0.0.1
      Number of MTID metrics: 0
       TOS 0 Metrics: 10

    Link connected to: a Transit Network
     (Link ID) Designated Router address: 12.0.0.2
     (Link Data) Router Interface address: 12.0.0.1
      Number of MTID metrics: 0
       TOS 0 Metrics: 65535 <-----

Note: The “show ip ospf int brief” command does not show the maximum metric of 65535 and only displays the original cost of 10.

The routing table for OSPF only shows one path to the 3.3.3.3 network.

R1#sh ip route ospf
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
O        2.2.2.2 [110/31] via 14.0.0.2, 00:29:29, Ethernet0/1
      3.0.0.0/32 is subnetted, 1 subnets
O        3.3.3.3 [110/21] via 14.0.0.2, 00:29:29, Ethernet0/1
      4.0.0.0/32 is subnetted, 1 subnets
O        4.4.4.4 [110/11] via 14.0.0.2, 00:29:29, Ethernet0/1
      34.0.0.0/30 is subnetted, 1 subnets
O        34.0.0.0 [110/20] via 14.0.0.2, 00:29:29, Ethernet0/1
R1#

When we enable LDP-IGP Synchronization on R2 Eth0/0 interface the LDP neighbor comes up and we can now see two paths for the 3.3.3.3 prefix.

*Jul 20 15:39:28.712: %LDP-5-NBRCHG: LDP Neighbor 2.2.2.2:0 (2) is UP

R1#sh ip route ospf
Codes: L - local, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
O        2.2.2.2 [110/11] via 12.0.0.2, 00:00:04, Ethernet0/0
      3.0.0.0/32 is subnetted, 1 subnets
O        3.3.3.3 [110/21] via 14.0.0.2, 00:31:07, Ethernet0/1
                 [110/21] via 12.0.0.2, 00:00:04, Ethernet0/0
      4.0.0.0/32 is subnetted, 1 subnets
O        4.4.4.4 [110/11] via 14.0.0.2, 00:31:07, Ethernet0/1
      34.0.0.0/30 is subnetted, 1 subnets
O        34.0.0.0 [110/20] via 14.0.0.2, 00:31:07, Ethernet0/1

You can also get the interface in a state where the LDP session is down and synchronization is required. This is normally due to one side being configured for LDP-IGP synchronization and other not. The OSPF other HELLO messages are rejected and an LDP neighborship is not formed.

Ethernet0/0
Process ID 1, Area 0
LDP is configured through LDP autoconfig
LDP-IGP Synchronization : Required
Holddown timer is not configured
Interface is down and pending LDP <-------------------------

When OSPF is waiting for LDP to synchronize you will see the following output “Interface is down and pending LDP”. OSPF will not form an adjacency in this state and can be seen with the “debug ip ospf hello” command. The HELLO message is ignored. When the OSPF adjacency is up but the LDP session is not, you will see the following output “Interface is up and sending maximum metric” The interface is not used to forward traffic unless it is the only path out of the LSR. This is to try and avoid sending unlabelled packets out of the interface.

*Jul 20 07:38:29.671: OSPF-1 HELLO Et0/0: Rcv hello from 2.2.2.2 area 0 12.0.0.2
*Jul 20 07:38:29.671: OSPF-1 HELLO Et0/0: Hello ignored - state DOWN

Leave a Comment

*