Basic Concepts of LDP
LDP Peers
Two LSRs that use LDP to set up an LDP session and exchange label messages are LDP peers.
LDP peers learn labels from each other over the LDP session between them.
LDP Adjacency
Local adjacency: adjacency discovered by multicasting a Hello message (link Hello message)
Remote adjacency: adjacency discovered by unicasting a Hello message (targeted Hello message)
LDP maintains peer information based on adjacencies. The type of a peer depends on the type of its adjacency. A peer can be maintained by multiple adjacencies. If a peer is maintained by both local and remote adjacencies, the peer is a local-and-remote peer.
LDP Session
LSRs exchange messages over an LDP session that include label mapping and release messages. LDP sessions can be set up only between LDP peers. The following types of LDP sessions are available:
Local LDP session: set up between two LSRs that are directly connected
Remote LDP session: set up between two LSRs that are directly or indirectly connected
An LSR can set up local and remote LDP sessions simultaneously.
Differences and Relations Among the LDP Adjacency, Peer, and Session
Differences
Differences among the LDP adjacency, peer, and session are as follows:
An LDP adjacency is a TCP connection established after two devices exchange Hello messages with each other. The LDP adjacency is based on a link between two interconnected interfaces.
LDP peers refer to two devices that run LDP to exchange label messages over an established TCP connection.
An LDP session is a series of processes of exchanging label messages between two LDP peers.
Relations
The association between LDP adjacencies, peers, and sessions is summarized as follows: Before setting up an LDP session, you need to establish a link that establishes a TCP connection. The link is an adjacency. After the adjacency is established, the two devices exchange label information to form a peer relationship. Finally, LDP sessions are established between peers. It may be specifically described as follows:
LDP maintains the existence of the peers through adjacencies. The type of peer is determined by the type of the adjacency that maintains the peer.
A peer can be maintained using multiple adjacencies. If a peer is maintained by both local and remote adjacencies, the peer is a local and remote coexistent peer.
Only LDP peers can establish LDP sessions.