Let's say, that I have two directly connected routers r1 and r2. For example, I do see that the r2 sends a Label Mapping Message to r1 and provides several labels including 21(0x15):

enter image description here

r1 associates the label 21 with prefix in the LDP label database:

Input label database,
Labels received: 7
  Label     Prefix

Why did r1 associate the label 21 with prefix


FEC Elements are addresses or prefixes which, when included in an FEC TLV as part of a Mapping Message, are mapped to the associated label.

If you expand the FEC Element 1 section of your packet capture it will most likely display the element That's encoded in the FEC TLV in the format documented in RFC5036 §3.4.1 and each element has the following structure & fields:

Prefix FEC Element value encoding:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      |  Prefix (2)   |     Address Family            |     PreLen    |
      |                     Prefix                                    |

         Address Family
            Two octet quantity containing a value from ADDRESS FAMILY
            NUMBERS in [ASSIGNED_AF] that encodes the address family for
            the address prefix in the Prefix field.

            One octet unsigned integer containing the length in bits of
            the address prefix that follows.  A length of zero indicates
            a prefix that matches all addresses (the default
            destination); in this case, the Prefix itself is zero

            An address prefix encoded according to the Address Family
            field, whose length, in bits, was specified in the PreLen
            field, padded to a byte boundary.

The mapping message itself is documented in §3.5.7.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.