Mpls ldp protocol-Operation Process
1. For each igp ip prefix in the IP route tableLDPOfLSRA label and a mapping will be generated, and then LSR will upload this mapping to allLDP neighborThe LSR running LDP establishes a neighbor relationship ).
2. each LSR will save a LIB table label information base) label information library). This table collects all prefix and label mapping received from all LDP neighbors. Therefore, for an IP prefix, there will certainly be multiple labels corresponding to them. The reason is:
Topology: router--- routerB --- routerC ---- 10.0.0.0/24
The three routers are directly connected and run OSPF. Their route tables all have a prefix of 10.0.0.0/24, so they will generate a mapping for the prefix and label, in addition, other LSR mappings about the label will be received. For example, if B receives the mapping of A and C at the same time, select A or C?
In fact, we recommend another table named LFIBlabel forwarding information dase in LSR. In this table, the label in Local mapping is used as the inbound label, in this example, the label in the mapping sent from the next hop of 10.0.0.0/24 in the route table is used as the outbound label. In this example, the next hop of 10.0.0.0/24 is C, B uses the label in mapping sent by C as the outbound label, and A uses the label sent by B as the outbound label ), this leads to a very important principle in LDP: When all routers send packets destined for a specific prefix, his label is sent to him by the next hop of the prefix, that is, the next hop corresponding to the prefix in the routing table, and he will also send his label to his previous hop router.
Mpls ldp protocol-LSR discovery of LDPNote: We only found that no neighbor is created, similar to the 2-way status in OSPF)
(1) Configuration:
- Ip cef
-
- // Enable CEF
-
- Mpls label protocol ldp
-
- // Specify the MPLS protocol. The default value is LDP.
-
- Int e0/0
-
- Mpls ip
-
- // Enable MPLS under the interface
(2) The hello message of LDP is a message sent to 224.0.0.2 on UDP port 646.
(3) Sh mpls ldp discovery view LDP neighbors
(4) Sh mpls int: view all LDP-enabled Interfaces
(5) ldp id: similar to the OSPF router ID, the election rules are also the same; Use mpls ldp router-id interface force to change the LDP ID
(6) When LDP neighbor discovery, the ldp id between neighbors must be IGP reachable; otherwise, no route will appear in the last line of sh mpls ldp discovery, that is, the neighbor discovery is not established successfully.
Mpls ldp protocol-LDP session establishment and maintenance
(1) When both ends receive Hello, they can try to see the LDP session. a ldp will open the TCP646 port on the peer end and go to another LSR. If TCP is successfully established, they will exchange the following information:
1. Timer Value
2. Label Distribution Method
If both lsrs accept the parameter, the LDP neighbor is created.
(2) Sh mpls ldp nei view the Neighbor Relationship
Mpls ldp protocol -- Label & prefix mapping announcement
LSR will map all the prefixes in its IGP route table to a label, and then advertise them to all its LDP neighbors.
A downstream LDP neighbor will therefore receive the mapping of Multiple labels of the same prefix. How can he choose?
The downstream LSR searches for the next hop IP address of this prefix in the routing table, finds a specific ldp id through this IP address, and then finds the corresponding label through this ldp id. The reason for multiple searches: When an LSR sends mapping to its LDP neighbor, it only includes its own ldp id, the prefix that requires the label, and the corresponding label, when the downstream router selects LFIB mapping, it selects the next hop in the IGP route table, and the corresponding ldp ip cannot be found through this next hop IP address, the corresponding mapping cannot be found. Therefore, when each LSR sends mapping, it also sends the binding of the IP addresses of all its interfaces and the ldp id. Now, the downstream router can find the idp id corresponding to the next hop IP address through the next hop IP address, and then find the corresponding mapping. Sh mpls ldp nei detail can see all interfaces IPAddresses bound to peer LDP Ident sent by LDP neighbors)
Sh mpls ip binding: Check the LIB table, and enter the LFIB table with inuse.
Sh mpls ip forwarding-table view LFIB table
For more information about the mpls ldp protocol, refer to the previous article.