LDP defines the label distribution process and messages transmitted during label distribution. LSRs use LDP to map Layer 3 routing information to Layer 2 switched paths and establish LSPs.
For details about LDP, see RFC 5036 (LDP Specification).
LDP defines the following messages:
Discovery messages
Announce and maintain LSRs on networks. Hello messages are discovery messages.
Session messages
Establish, maintain, and terminate sessions between LDP peers. Initialization and Keepalive messages are session messages.
Advertisement messages
Create, modify, and delete label mappings for FECs.
Notification messages
Provide advisory and error information.
LDP uses the Transmission Control Protocol (TCP) to transmit Session, Advertisement, and Notification messages to ensure reliable message transmission. LDP uses the User Datagram Protocol (UDP) only for transmitting Discovery messages.
After LSRs send Hello messages to discover peers, LDP sessions are established. LDP peers then periodically send Hello and Keepalive messages to maintain sessions.
Hello messages are sent to maintain adjacency.
If an LSR does not receive a Hello message from a peer before the Hello timer expires, the local LSR deletes the adjacency and sends a Notification message to terminate the session.
Keepalive messages are sent to maintain the session.
If an LSR does not receive a Keepalive message from a peer before the Keepalive timer expires, the local LSR terminates the TCP connection and sends a Notification message to terminate the session.
After sessions are established, LDP peers send Label Request and Mapping messages to advertise FEC-to-label mappings and establish LSPs based on mappings.