The following describes the LDP protocol. Some design methods and optimization schemes of the LDP protocol are briefly introduced. You also need to have some basic information on session establishment and maintenance. At this stage, we hope to establish a session LSR to periodically send Hello messages to adjacent LSR to notify neighboring nodes of local peering relationships, LSR can automatically discover its LDP peer without manual configuration 。
The LDP protocol has two discovery mechanisms: the Basic discovery mechanism is used to discover the local LDP peer, that is, the local LDP session is established through the LSR directly connected to the link layer, the LSR periodically sends the LDP link hello message to a specific port and carries the LDP identifier and other related information of the tag space of the specific port 。
If the LSR receives the hello Message from the LDP protocol link on a specific port, it indicates that there may be an accessible peer-to-peer LSR, the LSR can also be used in the tag space of a specific port. The extended discovery mechanism is used to discover remote LDP protocol peers, that is, LSR that is not directly connected through the link layer, creates a remote LDP session 。
In this way, LSR sends the LDP target hello Message (targetedhello) to a specific IP address periodically. The LDP target hello message is sent to the well-known LDP discovery port of a specific address in the form of a UDP group, the LDP Protocol target message sent by LSR carries the tag space and other optional information that the LSR wants to use. ComwareV3 Operation Manual (MPLS)
Session creation and maintenance
When the peering relationship is established, LSR starts to establish a session. This process can be divided into two steps: first, establish a Transport Layer connection, that is, establish a TCP connection between LSR; then, the sessions between LSR are initialized, and various parameters involved in the session are negotiated, such as the LDP Protocol version, tag distribution method, Timer value, and tag space 。
LSP establishment and maintenance
The LSP establishment process is actually to bind FEC and tags, and advertise this binding to the adjacent LSR on the LSP. This process is implemented through the LDP protocol, the main steps are as follows:
◆ When the route of the network changes, if a new destination address is found in the route table of the edge node, and the address does not belong to any existing FEC, the edge node needs to create a new FEC for the destination address. The Edge LSR determines the route to be used by the FEC and initiates a tag request message to its downstream LSR, and specify the FEC for which tags are to be assigned;
◆ The downstream LSR that receives the tag request records the request message, finds the next hop of the FEC according to the local route table, and continues to send the tag request message to the downstream LSR;
◆ When a tag request message arrives at the destination node or the egress node of the MPLS network, if there are still tags available for allocation on these nodes and the request message is valid, the node assigns tags to FEC and sends a tag ing message to the upstream game. The tag ing message contains the assigned tags and other information;
◆ The LSR that receives the tag ing message checks the status of the tag request message stored locally. For a tag ing message of a FEC, if the corresponding tag request message is recorded in the database, LSR assigns tags to the FEC, adds corresponding entries to its tag forwarding table, and then sends tag ing messages to the upstream LSR;
◆ When the entry LSR receives the tag ing message, it also needs to add corresponding entries in the tag forwarding table. Then, the LSP is created, next, you can tag and forward the data group corresponding to the FEC 。