Subject: [mpls] RFC6790 and LDP independent mode

From: "George Swallow (swallow)" <[email-masked]>
Date: Mon, 14 Apr 2014 21:23:29 +0000

Authors -

We have uncovered what we believe to be a hole in the 6790 procedures when it comes to ELC TLV redistribution in independent mode.  Here's the text from the RFC with the most problematic part in bold.

5.1.1.  Processing the ELC TLV

   An LSR that receives a Label Mapping with the ELC TLV but does not
   understand it MUST propagate it intact to its neighbors and MUST NOT
   send a notification to the sender (following the meaning of the U-
   and F-bits).

   An LSR X may receive multiple Label Mappings for a given FEC F from
   its neighbors.  In its turn, X may advertise a Label Mapping for F to
   its neighbors.  If X understands the ELC TLV, and if any of the
   advertisements it received for FEC F does not include the ELC TLV, X
   MUST NOT include the ELC TLV in its own advertisements of F.  If all
   the advertised Mappings for F include the ELC TLV, then X MUST
   advertise its Mapping for F with the ELC TLV.  If any of X's
   neighbors resends its Mapping, sends a new Mapping or sends a Label
   Withdraw for a previously advertised Mapping for F, X MUST re-
   evaluate the status of ELC for FEC F, and, if there is a change, X
   MUST re-advertise its Mapping for F with the updated status of ELC.

Consider a core LSR-A that is just re-booting.  When LDP comes up it will begin advertising label mapping for all of it's IGP learned & installed  prefixes.  For any prefix the LSR-A has yet to receive a mapping with a TLV, LSR-A will not send a TLV with the initial mapping.  Suppose LSR-B is a neighbor of LSR-A.  Following the text in bold LSR-B MUST re-advertise the FEC without the TLV.  It does not matter whether LSR-B is in independent or ordered mode.  This likely will ripple through the entire network all the way to the PE advertising the FEC.  I don't see any procedure that would get the network out of this condition.  Even if that PE withdrew it's advertisement, LSR-A would still advertise the FEC.  I suppose the PE could remove the prefix from the IGP and then re-advertise it.  But you would still face a race condition where LSR-A is more than likely going to re-advertise the mapping before it gets the TLV.

We haven't come up with a clean solution, but the following change to the RFC would greatly mitigate the situation.

1. include TLV if received from ALL next-hop neighbors
2. drop TLV if not advertised by ANY next-hop neighbor

This amounts to imposing a kind of ordered mode on the ELC TLV irrespective of the LDP advertisement mode.

The fly in the ointment here is that you still have the possibility of causing your upstream neighbors to drop the TLV if LSR-A becomes a next-hop towards the FEC before LSR-A has 1) discovered the need to advertise the TLV and 2) sent the label mapping.  Depending on how the operator has the IGP-sync timer configured, this may or may not be a big problem.

George & Dave