MPLS Label Distribution

Source: Internet
Author: User
Tags keep alive

MPLS label distribution protocols include:
1. LDP (Label Distribution Protocol)
2. TDP (CISCO private)
3. RSVP Resource Reservation Protocol
4. CE-LDP
5. MP-BGP (Multi-Protocol extensions for BGP-4)
6. Labeled BGP (BGPV4 with label distribution capability)
LDP (Label Distribution Protocol) Label Distribution Protocol
LDP operations mainly include the following four stages:
(1) discovery stage
(2) session establishment and maintenance
(3) LSP establishment and maintenance
(4) Session Revocation
1. discovery phase
The LSR that wants to establish a session sends a Hello Message to the adjacent LSR periodically to notify the adjacent node of its own existence. Through this process, LSR can automatically discover its LDP peer without manual configuration.
LDP has two discovery mechanisms:
Basic discovery mechanism:
The Basic discovery mechanism is used to discover local LDP peers, that is, LSR directly connected through the link layer, and establish LDP sessions between LDP peers. In this way, LSR periodically sends LDP Link Hello messages (LDP Link Hello) from interfaces in the form of UDP packets ). The destination address of the link Hello message is the multicast address 224.0.0.2 of "all routers in the subnet. The LDP link Hello message carries the LDP identifier of the LSR and other related information. If the LSR receives the LDP link Hello Message on an interface, it indicates that there is a LDP peer on the interface (Link Layer.
Extended discovery mechanism:
Extended discovery is used to discover remote LDP peers, that is, LSR that is not directly connected through the link layer, and LDP sessions are established between LDP peers. In this way, the LSR periodically sends the LDP target Hello Message (LDP Targeted Hello) to the specified IP address in the form of UDP packets ). The LDP target Hello message carries the LDP identifier of the LSR and other related information. If the LSR receives the LDP target Hello message, it indicates that the LDP peer body exists at the network layer.
2. Session creation and maintenance
After finding a neighbor, LSR starts to establish a session. This process can be divided into two steps:
(1) Establish a transport layer connection, that is, establish a TCP connection between LSR;
(2) initiate sessions between LSR and negotiate various parameters involved in the session, such as the LDP version, tag publishing method, Keepalive timer value, and the LDP identifier of the receiving router.
After a session is established, the LDP peer continuously sends Hello messages and Keepalive messages to maintain the session.
3. LSP establishment and maintenance
By sending tag requests and tag ing messages, LDP advertises the binding relationship between FEC and tags between LDP peers to establish LSP.
(1) When the network route changes, the edge node (LSR) finds a new destination address in its route forwarding table, and this address does not belong to any existing FEC, then, LSR creates a new FEC for this destination address.
(2) If the LSR still has tags available for allocation, assign tags to the FEC and advertise tag ing to the upstream LSR.
(3) After the LSR receives the tag ing, it determines whether the label ing sender (LSR) is the next hop of the FEC. If yes, Add corresponding entries in the tag forwarding table, assign tags to FEC, and continue to advertise label ing to upstream LSR.
(4) Similarly, after the LSR receives the tag ing, it determines whether the label ing sender (LSR) is the next hop of the FEC. If yes, Add corresponding entries in the tag forwarding table, assign tags to FEC, and continue to advertise tag ing to upstream lsr.
(5) After receiving the tag ing, the entry LSR (LSR) determines whether the sender (lsr B) of the tag ing is the next hop of the FEC. If yes, add the corresponding entries in the tag forwarding table.
4. Session Revocation
In the following cases, LSR revokes the LDP session:
By sending a Hello Message periodically, the LSR indicates that it wants to maintain this relationship with the neighbor LSR. If the Hello message is not received after the timer times out, the Hello neighbor relationship is deleted. Multiple Hello joining relations may exist in a LDP session. When the last Hello neighbor relationship in the LDP session is deleted, LSR sends a Notification message to end the LDP session.
LSR identifies the connectivity of LDP sessions through the ldp pdu transmitted on the ldp session (ldp pdu carries one or more LDP messages. If the session persistence timer (Keepalive timer) times out and does not receive any ldp pdu, LSR closes the TCP connection and ends the LDP session. If no interaction information is required between the LDP peer before the Keepalive timer times out, LSR sends the Keepalive message to the LDP peer to maintain the LDP session.
LSR can also send Shutdown messages to notify its LDP peer to end the LDP session.
Process Analysis Based on the LDP Neighbor Relationship Between RT5 and RT3:
After MPLS is configured on RT5 and RT3, it enters the neighbor Discovery stage. RT5 and RT3 send Discovery messages to each other (UDP: 646 target IP Address: 224.0.0.2 TTL = 1)

Version-Protocol Version number. The current value is 1.
PDU Length-total PDU Length, excluding the version and PDU Length fields.
LDP Identifier-this field uniquely identifies the space where the LSR is sent by the PDU request. The starting 4 Octet encodes the IP address allocated to the LSR. The last 2 Octet indicates the tag space in the LSR.
LDP Messages: information types include Notification, Hello, Initialization, Keep Alive, Address, Address Withdraw, Label Request, Label Withdraw, Label Release, and Unknown Message names.
Message Length-Information ID, command parameter, and optional parameter Length (eight bits ).
Message ID-32-bit value, providing information recognition.
Parameters-Parameters include TLV. There are both command parameters and optional parameters. Some information does not have command parameters, and some information does not have optional parameters.
When the Discovery message sent from the other party is received, it enters the session establishment stage (TCP three-way handshake is initiated by the ldp id party and port is 646)


After a TCP connection is established, the session is initialized. The master initiates the initialization information and carries the negotiation parameters. (Mainly for LDP IDs)

The slave checks whether the parameter can be accepted. If yes, the initialization message is sent, the negotiation parameter is carried, and the keepalive message is sent later.

Whether the master check parameter can be accepted. If yes, the Keepalive message is sent. Mutual receipt of Keepalive messages, session establishment, status Operational, during which any error messages are received, the session is closed and the TCP connection is closed!
After entering the Operational status, start to distribute labels for all IGP routes

Cisco ldp Label Distribution Principle: downstream autonomous distribution + independent control + free retention
Distribute tags for all IGP routes in the global route table (TAG 3 is displayed in the second-to-last hop), and send the tags that you distribute to all LDP neighbors regardless of upstream and downstream, labels are prioritized based on the next hop of the route. There are a large number of non-optimal tags in the tag database.
Quidway/H3C LDP label distribution principle; downstream independent distribution + ordered Control + free retention
Distribute tags for your direct connection routes (send tag 3 when the last hop pops up), receive the tags distributed downstream, and the labels take effect, the upstream route distribution label (effective means that the route is available in the global route table, and the label is the next hop distribution label of the route) only distributes labels for all IGP routes, by default, only 32-bit IGP route distribution labels are used. The tag database contains a large number of non-optimal tags.
For details, please leave a message below. Let's discuss it together!
More detailed information about MPLS is provided in the attachment!

Author: "Mortal World"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.