LDP (Label Distribution Protocol) is a key protocol in the MPLS (Multi Protocol Label Switching) architecture. In the MPLS network, 2 label switching routers (LSR) must agree on the meaning of the labels used to forward traffic between and through them. LDP defines a set of procedures and messages by which one LSR (Label Switched Router) informs another of the label bindings it has made. The LSR uses this protocol to establish label switched paths through a network by mapping network layer routing information directly to data-link layer switched paths.
Two LSRs (Label Switched Routers) which use LDP to exchange label mapping information are known as LDP peers and they have an LDP session between them. In a single session, each peer is able to learn about the others label mappings, in other words, the protocol is bi-directional.
Protocol Structure
| 2 bytes | 2 bytes |
| Version | PDU Length |
| LDP Identifier (6 bytes) | |
| LDP Messages | |
- Version -- LDP version number. The present number is 1.
- PDU Length -- The total length of the PDU excluding the version and the PDU length field.
- LDP identifier -- This field uniquely identifies the label space of the sending LSR for which this PDU applies. The first 4 octets encode the IP address assigned to the LSR. The lst 2 indicate a label space within the LSR.
LDP messages -- All LDP messages have the following format:
| U | Message type | Message Ienght |
| Message ID | ||
| Parameters | ||
- U - The U bit is an unknown message bit.
- Message type - The type of message. The following message types exist: Notification, Hello, Initialization, Keep Alive, Address, Address Withdraw, Label Request, Label Withdraw, Label Release, and Unknown Message name.
- Message length - The length in octets of the message ID, mandatory parameters and optional parameters
- Message ID - 32-bit value used to identify the message.
- Parameters - The parameters contain the TLVs. There are both mandatory and optional parameters. Some messages have no mandatory parameters, and some have no optional parameters.
TLV format:
| U | F | Type | Length |
| Value | |||
| TLV format | |||
- U - The U bit is an unknown TLV bit.
- F - Forward unknown TLV bit.
- Type - Encodes how the Value field is to be interpreted.
- Length - Specifies the length of the Value field in octets.
- Value - Octet string of Length octets that encodes information to be interpreted as specified by the Type field.
Related Terms: MPLS, CR-LDP, RSVP-TE, IP, ATM, RSVP, OSPF
Sponsor Source: MPLS architecture is defined by IETF (http://www.ietf.org) RFC3036.
Reference:
http://www.javvin.com/protocol/rfc3031.pdfMultiprotocol Label Switching Architecture
http://www.javvin.com/protocol/rfc3036.pdfLDP Specification
