MPLS Label Distribution: LDP Part3
So far so good, we have finished two parts of LDP and in this post we are going to explore another function of the four major functions of LDP.
After an LDP session is initialized, LDP peers start to exchange label mappings according to the pre-negotiated parameters. In this post I will assume that LDP is using the most common label distribution modes for as follows:
- MPLS Label Space: Per platform label space.
- MPLS label retention mode: Liberal label retention.
- MPLS Label distribution mode: unsolicited downstream.
- MPLS Label control mode: Independent label distribution.
For more information please review my previous posts LDP part1 and LDP part2.
LDP Operation helicopter view:
- LDP session is established and initialized between two LSRs.
- Each LSR binds local labels to all FECs available in the routing table.
- LSRs advertise all connected interface addressing information in address mapping messages.
- Actual label exchange starts here; each LSR advertises FEC/Label bindings in label mapping messages.
- Received label mappings are placed in a special database called the label information base or the LIB.
- Finally an LSR consults its routing table to determine the best route and installs the label mapping to the label forwarding information base LFIB.
Lets get down and explain some of these steps in brief details
1. Address Mapping Messages:
When a new LDP session is initialized and before sending any label mappings or requests, an LSR should advertise its interface addresses using one or more messages addresses.
The addresses received in the address messages are used by an LSR for the mapping between peer LDP-ID and next hop addresses found in the best route in the routing table.
Whenever an interface comes up a new address mapping advertisement should be sent to neighbors to advertise this new information. When an interfaces comes down the LSR will withdraw previously advertised address mappings.
The use of Address information is shown in the example below, try to follow the commands and notice highlighted text:
RP/0/RP0/CPU0:crs1#sh mpls ldp neighbor Peer LDP Identifier: 172.31.253.143:0 TCP connection: 172.31.253.143:63530 - 172.31.253.141:646 Graceful Restart: No Session Holdtime: 180 sec State: Oper; Msgs sent/rcvd: 46641/46692 Up time: 3w5d LDP Discovery Sources: POS0/6/1/0 POS0/1/1/0 ! Below info were exchanged in Address messages, watch out underlined next hop in the example Addresses bound to this peer: 10.13.1.97 10.13.1.98 172.17.10.50 172.17.10.54 172.17.20.17 172.17.20.21 172.17.20.29 172.17.20.37 172.17.20.41 172.17.20.49 172.17.20.53 172.17.20.57 172.17.20.61 ! Look at the label binding below and ask yourself, how does a router know which label !to install in the LFIB? RP/0/RP0/CPU0:crs1#sh mpls ldp bindings 172.31.253.127/32 172.31.253.127/32, rev 3266 Local binding: label: 16357 Remote bindings: (15 peers) Peer Label ----------------- -------- 172.31.253.1:0 178 172.31.253.9:0 320 172.31.253.11:0 84 172.31.253.14:0 261 172.31.253.17:0 137 172.31.253.100:0 55 172.31.253.124:0 535 172.31.253.130:0 329 172.31.253.133:0 92 172.31.253.135:0 633 172.31.253.137:0 134 172.31.253.138:0 66 172.31.253.142:0 16250 172.31.253.143:0 16367 172.31.253.252:0 54 ! The following command shows the best next hop for the prefix RP/0/RP0/CPU0:crs1#sh ip route 172.31.253.127 Routing entry for 172.31.253.127/32 Known via "isis", distance 115, metric 20 Tag 5, type level-2 Routing Descriptor Blocks 172.17.10.50, from 172.31.253.127, via POS0/1/1/0 Route metric is 20 ! linking the above information we build LFIB entries RP/0/RP0/CPU0:crs1#sh mpls forwarding prefix 172.31.253.127/32 Local Outgoing Prefix Outgoing Next Hop Bytes Label Label or ID Interface Switched ------ ----------- ------------------ ------------ --------------- ------------ 16357 16367 172.31.253.127/32 PO0/1/1/0 172.17.10.50 388711956444
Done for today; In the next post I will describe the details of the label exchange using Label mappings messages. Please feel free to comment or request verifications if needed.