Pages

Monday 8 February 2021

CONFIGURING MPLS

Contents

  1. Introduction
  2. Data Plane
  3. Control Plane
  4. Label Exchange
  5. Configuration
  6. Authentication
  7. Verification
  8. Troubleshooting

Introduction

Multiprotocol Label Switching (MPLS) is a service provider packet forwarding technology for routing customer traffic between different customer sites such as enterprise headquarters and branches. MPLS may also be used by enterprises to separate traffic between different business units; this is usually implemented through MPLS Layer 2 or Layer 3 VPNs.

MPLS was developed to replace legacy remote-site-connectivity technologies such as ATM circuits, frame relay circuits, dedicated serial lines. MPLS supports many layer 3 protocols such as IP (multicasts,unicasts) and IPv6.

Originally Cisco-proprietary, MPLS was referred to as tag switching. Cisco later handed it to IETF for open standardization. It is defined by RFC 3031.

MPLS provides support for the transportation of multiple payloads:

  • Layer 2 payloads: Ethernet (Ethernet over MPLS), Frame Relay, ATM, PPP, HDLC, etc.
  • Layer 3 payloads: IPv4, IPv6, etc.
  • MPLS is extensible to support future payloads.

By default, MPLS traffic will follow the same path as regular IP traffic. This is because MPLS uses the routing table to create paths to switch the labels. When MPLS is configured on a router, by default, all routes in the routing table (RIB) i.e. static, connected, and learned routes will have a label assigned automatically. MPLS can also be configured to generate labels only for specific networks. These locally generated labels are exchanged in the MPLS domain by a label exchange protocol such as LDP (label distribution protocol). MPLS operates like an overlay over the layer 3 protocol because it attaches labels to known networks. MPLS uses these labels to forward packets throughout the MPLS domain; a process referred to as label switching.

Label switching feature of MPLS forwards traffic based on the label forwarding information base which contains labels assigned to networks as received by the neighboring MPLS devices. This is similar to legacy virtual circuit switching in Frame Relay with input/output DLCI or ATM with input/output VPI/VCI.

With previous remote site connectivity technologies such as frame relay, separate dedicated connections were provided for Internet access and remote-site connectivity. Additionally, the neighborship relationships were formed between devices at the local site and remote site. With MPLS, the same connectivity can be used for remote-site connectivity as well as Internet access. The neighbor peering is formed between the local device and the service provider devices. The customer site devices form a neighbor peering with the service provider devices and not directly with the remote site devices; two different site devices will not form peering with each other like frame-relay but with the ISP.

When operating MPLS, it should never be run on client / customer facing interfaces of the service provider devices.

MPLS consists of the MPLS data plane and the control plane:

  • The data plane forwards MPLS labels within the MPLS domain. By default, MPLS traffic follows the same path as regular IP traffic (in an IP network).
  • Control plane deals with how the labels are assigned and exchanged in the MPLS network. Label Distribution Protocol (LDP) is the main open standard protocol used for label exchange between routers in the MPLS domain.

Need for MPLS

MPLS provides several benefits to customers as well as service providers:

  • Without MPLS, customer sites would have to run eBGP sessions with the service provider network to enable connectivity with remote sites.
  • Implementation of MPLS makes it possible to implement tunneling over the BGP free core. This saves routing table space on the provider routers.
  • With MPLS, it is possible to have transparent tunneling over the service provider network.
  • Using MPLS, service providers are able to offer layer 2 and layer 3 VPN services to customers.
  • MPLS is more cost effective than legacy remote site connectivity options such as dedicated serial links, Frame relay etc.
  • MPLS provides the possibility of traffic engineering where:
    • Load distribution can be carried out over under-utilized links.
    • Give bandwidth guarantees to clients.
    • Route based on service type (QoS).
    • Detect and repair failures quickly i.e., fast reroute (FRR).

Data Plane

All routers in the MPLS-domain are referred to as Label Switched Routers (LSRs). Ingress edge LSRs are at the entry point of the MPLS domain where enterprise traffic enters the MPLS domain through the provider edge (PE) LSR. The ingress LSR receives IP packets from the CE (customer-edge device) then adds MPLS labels to the packets based on the destination. The ingress LSR then switches the packet to the intermediate LSR in the data path using a label. The egress edge LSR is the LSR in the service provider network at the opposite end of the LSP in the MPLS domain, from the ingress LSR, connecting to the CE at remote site of the customer; it is the LSR at egress-end of the MPLS domain where customer traffic leaves the MPLS domain towards the customer network.

The MPLS label stack is deleted at the egress LSR resulting in customer traffic being subsequently routed using IP to the destination. An MPLS-enabled router can act as both an ingress and egress LSR of traffic from the same customer.

Intermediate LSRs are in the middle of the MPLS domain. They are alternatively referred to as P (provider) routers. Intermediate LSRs interconnect the edge LSRs and forward network traffic primarily using labels.

A Label Switched Path (LSP) is the complete unidirectional end-to-end path that the labeled packet will take through the MPLS domain. The LSP for ingress traffic is usually the same as the egress LSP unless asynchronous routing is implemented in the network where the return traffic LSP may be different for the original LSP. The ingress LSR is the first LSR in LSP and the egress LSR is the last.

MPLS forwarding reduces the lookup process by all routers in the path of a packet. When a packet arrives at an ingress LSR, the label Forwarding Information Base (LFIB) is consulted and the exit interface and label number is determined.

MPLS Devices

MPLS domains consist of three types of devices:

  • Customer Edge (CE):
    • Usually the first and last hop device in the customer's network and connects to the provider's network.
    • MPLS is usually not configured on this device.
    • It is configured for layer 2 or layer 3 connectivity services from MPLS i.e., device can be a switch or router.
  • Provider Edge (PE):
    • First and last hop router in the provider's network connecting the CE to the P devices.
    • PE performs IP routing lookups.
    • If MPLS Layer 3 VPNs are implemented, PE devices share routes with the CE devices i.e., they have knowledge of the customer's prefixes.
    • Devices are LSRs
  • Provider (P):
    • Also referred to as label switch routers (LSR)
    • Core devices in the provider's network connecting the PEs.
    • Switch traffic based on the labels.

Control Plane

The control plane is responsible for exchanging MPLS labels with neighboring MPLS enabled devices (LSRs). This is accomplished using a label exchange mechanism. To operate effectively, MPLS requires the following;

  • Routing table (RIB)
  • CEF - Forwarding Information Base (FIB)
  • Label Information Base (LIB)
  • Label Distribution Protocol (LDP)
  • Label Forwarding Information Base (LFIB)

MPLS labels

An MPLS label is a 4-byte (32-bit) shim header inserted between the layer 2 and layer 3 headers of an IP packet.

It is used to switch packets in the MPLS domain. It is defined by RFC 3032. It contains the following fields:

  • Label: 20-bit field used for the label number or ID and its value is used by the LDP neighbors to forward traffic.
  • Exp (Experimental bits): 3 bit field used for QoS operations (Class of Service - CoS)
  • S bit: 1 bit to indicate if a label is the last (bottom) of a stack. This directly indicates that more than one label is present on the MPLS packet. A label stack contains an ordered set of labels. The label close to the Layer 2 header is called the outer label (or stack top label). The label close to the Layer 3 header is called the stack bottom label or inner label; this is the label that has the S-bit set to 1. The S-bit field is also referred to as BoS (Bottom of Stack) field by some network equipment vendors.

  • Time To Live (TTL): 8-bits field indicating the time to live (TTL). This field implements the same function as the TTL field in IP packets. It may also contain the same value.

Routers in the MPLS domain use the LFIB to switch traffic instead of the routing table.

PE and P devices perform the following operations:

  • Push: a label is pushed onto the label stack. When inserting a new label, a push operation takes place. This may alternatively be known as label imposition. This operation is usually implemented by ingress LSRs and intermediate LSRs.
  • Swap: The top-most label is swapped i.e., replaced with another label. When switching packets, from one LSR to another along the LSP, swap operations take place. The label swap operation is usually implemented by intermediate LSRs.
  • Pop: The top-most label is removed from the stack. Also known as label disposition. It is performed by the egress LSR. With penultimate hop popping, it is performed by the penultimate hop.
  • Delete: The entire label stack is destroyed on the packet (resulting in a need for the packet to be routed using IP).

All known networks are assigned a label locally identified by the label ID:

  • The assignable label ID is in the range 16 – 1048575. These labels assigned to all known networks are usually referred to as transport labels.
  • Labels IDs 1-15 are reserved. These label IDs are referred to as special-purpose MPLS label values.
    • 0 IPv4 Explicit NULL Label [RFC3032]
    • 1 Router Alert Label [RFC3032]
    • 2 IPv6 Explicit NULL Label [RFC3032]
    • 3 Implicit NULL Label [RFC3032]
    • 4-6 Unassigned
    • 7 Entropy Label Indicator (ELI) [RFC6790]
    • 8-12 Unassigned
    • 13 Generic Associated Channel Label [RFC5586]
    • 14 OAM Alert Label [RFC3429]
    • 15 Extension Label (XL) [RFC7274][RFC9017]
  • Label ID 0 is referred to as explicit null is used for Type of Service (ToS) or Quality of Service (QoS).
  • Label 3 is the implicit null

This is in contrast to VPN labels used in MPLS Layer 3 VPNs (L3VPN), where directly connected networks are flagged with the symbol [V] assigned next to the locally generated label to indicate that the label is a VPN label and not a transport label. This VPN label is advertised to the PE LSR (iBGP peer) at the other end of the L3VPN using BGP.

Labels are dynamically generated and uniquely assigned for every known network by each LSR independent of the other LSRs. Different LSRs may assign a network the same label number. However, this does not cause any conflict during packet forwarding as the labels are unique to each LSR.

It is recommended that each LSR assigns label IDs from a specific range that is unique to that particular LSR in the MPLS domain. This helps during troubleshooting to easily identify the LSR that a packet with a specific label originated from.

Forwarding Equivalence Class

MPLS labels are bound to forwarding equivalency class (FEC). A FEC is a group of IP packets that have similar characteristics and therefore are treated the same way i.e.;

  • QoS (queueing)
  • same path (next hop)
  • egress interface

A FEC might correspond to a destination IP subnet but it also might correspond to any traffic class that the Edge-LSR considers significant. For example, all traffic with a certain value of IP precedence might constitute a FEC.

In MPLS, FEC is determined only once, at the ingress LSR rather than at every LSR in the LSP. A FEC can be mapped to multiple incoming labels to balance loads, but a label represents only a single FEC on an LSR.

How labels are Assigned

Data structures utilised by MPLS include;

  • Routing Information Base (RIB)
  • Forwarding Information Base (FIB) or CEF
  • Label Information Base (LIB)
  • Label Forwarding Information Base (LFIB)

Information from RIB (Routing Information Base) is converted into a Layer 2 data structure known as the forwarding information base (FIB) by Cisco Express Forwarding (CEF). You can view this data structure by running the command show ip cef.

A directly connected network is assigned the label ID 3 which is also known as an implicit null (impl-null) in the LIB. Directly connected networks are not added to the LFIB table. This is because MPLS packets are not used to switch packets to locally connected networks; IP routing is used to route packets to locally connected networks.

The FIB, additionally, contains information on layer 2 to layer 3 mappings from sources such as ARP tables, frame relay maps etc. The LIB contains data from the RIB and label exchange protocols such as LDP, TDP, BGP, RSVP or static labels. The data from the LFIB is sourced from the LIB, RIB and FIB. The FIB and LFIB are sourced from CEF.

For MPLS to switch packets, the IP network must be fully converged. MPLS will operate with any routing protocol such as RIP, OSPF, EIGRP, etc., including static routes. If running MPLS with BGP, an IGP needs to be configured in the network. An LSR assigns a locally significant label for all connected prefixes and those learned from another routing protocol. The router will learn the downstream neighboring LSR's labels and store that label information as remote labels.

When an IP packet enters the ingress LSR, a lookup of the Label Forwarding Information Base (LFIB) takes place. The LFIB contains the networks, locally assigned labels, remote labels, next hop and exit interface. This information is sufficient to enable the LSR to switch received packets to towards their destination. For example, given a packet B arriving in LSR R1:

  1. The next hop is R2 and exit interface is g1/0 with the label 53
  2. The packet is then forwarded out the interface g1/0 to R2.
  3. In R2's LFIB, the next hop is R3 and exit interface is G2/0 with label 71.
  4. When transmitting this packet, R2 will swap label 53 and replace it with label 71.

Label Exchange

The two compatible label exchange protocols used for MPLS are label distribution protocol (LDP) and tag distribution protocol (TDP). Tag is the old name used by Cisco for labels. TDP is Cisco properietary while LDP is an open standard and supported by many vendors. The operation of TDP and LDP is identical and they share the same databases. IETF developed LDP based on TDP. Other label exchange protocols include:

  • MP-BGP: defined by RFC 3107 and advertises labels for BGP learned routes.
  • RSVP: defined by RFC 3209 and is used for MPLS traffic engineering (MPLS TE).
  • STATIC

Label Distribution Protocol (LDP)

Label Distribution Protocol (LDP) is used to exchange labels with neighboring LSRs. These labels are generated for all the routes in the routing table i.e, local/connected networks, IGP learned routes and static routes. It is defined by RFC 5036.

Like IGPs, LDP automatically discovers neighbors with a Hello protocol. Hello messages are sent to the all routers multicast IP address 224.0.0.2 using UDP port 646 and destination UDP port 646. Hello messages include the "IPv4 transport address" field. This field defines the address to use for the TCP session. This address usually defaults to the LDP Router-ID which also defaults to the highest IP address of any loopback interface. The LDP sessions are TCP sessions formed using these transport addresses. These transport addresses could be modified by changing the LDP ID or manually using the interface configuration command mpls ldp discovery transport-address [interface | <ip-address>].

Once the LDP session is established, the label is advertised for FEC i.e., label to IPv4 prefix mapping. Label distribution can be implicit or explicit;

  • Unsolicited downstream vs downstream on demand.
  • Depends on implementation and config options.

The ultimate result is that one label is assigned to learned prefixes. Labels could be advertised for some or all routes. On Cisco devices, the default is for all routes in the RIB to have labels assigned.

Label information is used to populate the label Information Base (LIB) that MPLS uses to forward packets from source to destination in the MPLS domain. LDP and TDP use TCP and UDP as their transport protocols. The LDP uses port number 646 for both UDP and TCP communication. For TDP, the port number is 711 for UDP and TCP. TDP and LDP are nearly identical in their operation utilising the same tables. It is technically possible to have both TDP and LDP operating in different sections of an MPLS domain and label switching will still take place.

It is important to note that the MPLS control plane initially uses UDP to detect neighbors and exchange information before the formation of an LDP session between the neighbors. TCP is then used to start the formation of the LDP session was well as maintenance of the LDP session. Subsequently TCP is used at the data plane after the LDP session has been formed.

An intermediate LSR in the MPLS domain that is connected to an egress LSR is known as a penultimate hop. The egress LSR gives directly connected networks a label with label ID 3. This implicit null label is sent to the penultimate hop LSR. When a penultimate hop receives a packet with a label ID of 3 (implicit-null) from the egress LSR, it is a signal from the egress LSR that the penultimate hop should delete the MPLS label stack before forwarding the packet to that egress LSR (ultimate) using IP routing. This causes the penultimate LSR to remove the label from the packet and send the IP packet to the egress LSR. This process, known as Penultimate Hop Popping (PHP), avoids two lookups taking place on the egress LSR i.e., the MPLS label lookup in the Label Forwarding Information Base (LFIB) and the route look-up from the routing table.

LDP Message Types

The various LDP message types include the following:

  • Hello messages
  • Label Address Mapping Message
  • Initialization message
  • Keepalive messages

Depending on the size of the LDP message, it can contain more than one message type.

Hello messages

Hello messages are used to detect neighboring LSRs. They contain information that is used when forming the LDP peering. Hello messages are sent every 5 seconds, by default. The LDP hello message is sent with the following parameters:

  • Protocol: UDP
  • Source port: 646
  • Destination port: 646
  • Source IP address: exit interface IP
  • Destination port: 224.0.0.2 (all routers' multicast)

Hello messages sent in multicast are to directly connected peers. If LDP peers are not directly connected (targeted LDP Discovery), the Hello messages are sent in unicast.

It contains the following fields;

  • LDP version
  • LDP ID
  • Hold time: default is 15 seconds
  • IP transport address: usually the LDP ID

The following is a Wireshark packet capture of an LDP Hello message:

🢖Frame 43: 76 bytes on wire (608 bits), 76 bytes captured (608 bits) on interface -, id 0
🢖Ethernet II, Src: ca:04:04:6c:00:1c (ca:04:04:6c:00:1c), Dst: IPv4mcast_02 (01:00:5e:00:00:02)
🢖Internet Protocol Version 4, Src: 30.255.24.2, Dst: 224.0.0.2
🢖User Datagram Protocol, Src Port: 646, Dst Port: 646
🢗Label Distribution Protocol                        
     Version: 1                                      
     PDU Length: 30                                  
     LSR ID: 30.255.4.4                              
     Label Space ID: 0                              
    🢗Hello Message                                  
        0... .... = U bit: Unknown bit not set      
        Message Type: Hello Message (0x100)        
        Message Length: 20                          
        Message ID: 0x00000000                      
        Common Hello Parameters                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Common Hello Parameters (0x400)
            TLV Length: 4                          
            Hold Time: 15                          
            0... .... .... .... = Targeted Hello: Link Hello
            .0.. .... .... .... = Hello Requested: Source does not request periodic hellos
            ..0. .... .... .... = GTSM Flag: Not set
                [Expert Info (Chat/Protocol): GTSM is not supported by the source]
                    [GTSM is not supported by the source]
                    [Severity level: Chat]          
                    [Group: Protocol]              
            ...0 0000 0000 0000 = Reserved: 0x0000  
        IPv4 Transport Address                      
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: IPv4 Transport Address (0x401)
            TLV Length: 4                          
            IPv4 Transport Address: 30.255.4.4      
                                                    

Initialization message

Initialization messages are sent at the start of the formation of the LDP peering session and are used to exchange:

  1. Capability information
  2. Session parameters such as loop detection information
  3. Protocol version
  4. Configured max PDU length

LDP initialization messages are sent using the following parameters:

  • Transport protocol: TCP
  • TCP Source port: ephemeral
  • TCP Destination port: 646
  • Source IP address: LDP ID
  • Destination IP address: neighbor's LDP ID

LDP session parameters are exchanged between neighboring routers during the start of the formation of the LDP peering session. These parameters include:

  • Session protocol: usually version 1
  • Session keepalive time: usually 180
  • Session receiver LDP ID: The LDP ID of the detected neighboring LSR. This information is obtained from the received LDP hello messages
  • Session receiver label space identifier.

The following is a Wireshark packet capture of an LDP initialization message:

Frame 55: 100 bytes on wire (800 bits), 100 bytes captured (800 bits) on interface -, id 0
Ethernet II, Src: ca:04:04:6c:00:1c (ca:04:04:6c:00:1c), Dst: ca:02:04:45:00:1c (ca:02:04:45:00:1c)
Internet Protocol Version 4, Src: 30.255.4.4, Dst: 30.255.2.2
Transmission Control Protocol, Src Port: 34749, Dst Port: 646, Seq: 1, Ack: 1, Len: 46
Label Distribution Protocol
    Version: 1            
    PDU Length: 42        
    LSR ID: 30.255.4.4    
    Label Space ID: 0    
    Initialization Message
        0... .... = U bit: Unknown bit not set
        Message Type: Initialization Message (0x200)
        Message Length: 32
        Message ID: 0x00000001
        Common Session Parameters
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Common Session Parameters (0x500)
            TLV Length: 14
            Parameters    
                Session Protocol Version: 1
                Session KeepAlive Time: 180
                0... .... = Session label Advertisement Discipline: Downstream Unsolicited proposed
                .0.. .... = Session Loop Detection: Loop Detection Disabled
                Session Path Vector Limit: 0
                Session Max PDU Length: 0
                Session Receiver LSR Identifier: 30.255.2.2
                Session Receiver label Space Identifier: 0
        Dynamic Capability Announcement
            10.. .... = TLV Unknown bits: Unknown TLV, do not Forward (0x2)
            TLV Type: Dynamic Capability Announcement (0x506)
            TLV Length: 1
            TLV Value: 80
        Typed Wildcard FEC Capability
            10.. .... = TLV Unknown bits: Unknown TLV, do not Forward (0x2)
            TLV Type: Typed Wildcard FEC Capability (0x50B)
            TLV Length: 1
            TLV Value: 80

Label Address Mapping Message (Address Message)

This LDP message type contains the actual mapping of label to network address information that provider routers exchange with each other. Label address mapping messages are sent using the following parameters:

  • Transport protocol: TCP
  • TCP Source port: 646
  • TCP Destination port: ephemeral
  • Source IP address: LDP ID
  • Destination IP address: neighbor's LDP IP

The following is a Wireshark packet capture of an address message:

Frame 63: 371 bytes on wire (2968 bits), 371 bytes captured (2968 bits) on interface -, id 0
Ethernet II, Src: ca:02:04:45:00:1c (ca:02:04:45:00:1c), Dst: ca:04:04:6c:00:1c (ca:04:04:6c:00:1c)
Internet Protocol Version 4, Src: 30.255.2.2, Dst: 30.255.4.4
Transmission Control Protocol, Src Port: 646, Dst Port: 34749, Seq: 591, Ack: 601, Len: 317
[2 Reassembled TCP Segments (853 bytes): #60(536), #63(317)]
    [Frame: 60, payload: 0-535 (536 bytes)]
    [Frame: 63, payload: 536-852 (317 bytes)]
    [Segment count: 2]                    
    [Reassembled TCP length: 853]        
    [Reassembled TCP Data: 000103511eff0202000003000042000000030101003a00011eff0c021e0201011e020201…]
Label Distribution Protocol              
    Version: 1                            
    PDU Length: 849                      
    LSR ID: 30.255.2.2                    
    Label Space ID: 0                    
    Address Message                      
        0... .... = U bit: Unknown bit not set
        Message Type: Address Message (0x300)
        Message Length: 66                
        Message ID: 0x00000003            
        Address List                      
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Address List (0x101)
            TLV Length: 58                
            Address Family: IPv4 (1)      
            Addresses                    
                Address 1: 30.255.12.2    
                Address 2: 30.2.1.1      
                Address 3: 30.2.2.1      
                Address 4: 30.2.3.1      
                Address 5: 30.2.4.1      
                Address 6: 30.2.5.1      
                Address 7: 30.2.6.1      
                Address 8: 30.2.7.1      
                Address 9: 30.2.8.1      
                Address 10: 30.2.9.1      
                Address 11: 30.2.10.1    
                Address 12: 30.255.2.2    
                Address 13: 30.255.24.1  
                Address 14: 30.255.112.1  
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x00000004            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 32
                    Prefix: 30.255.2.2    
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0000 0000 0011 = Generic label: 3 (0x00003)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x00000005            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 30
                    Prefix: 30.255.12.0  
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0000 0000 0011 = Generic label: 3 (0x00003)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x00000006            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 30
                    Prefix: 30.255.24.0  
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0000 0000 0011 = Generic label: 3 (0x00003)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x00000007            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 30
                    Prefix: 30.255.112.0  
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0000 0000 0011 = Generic label: 3 (0x00003)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 23                
        Message ID: 0x00000008            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 7                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 24
                    Prefix: 30.2.1.0      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0000 0000 0011 = Generic label: 3 (0x00003)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 23                
        Message ID: 0x00000009            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 7                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 24
                    Prefix: 30.2.2.0      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0000 0000 0011 = Generic label: 3 (0x00003)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 23                
        Message ID: 0x0000000a            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 7                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 24
                    Prefix: 30.2.3.0      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0000 0000 0011 = Generic label: 3 (0x00003)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 23                
        Message ID: 0x0000000b            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 7                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 24
                    Prefix: 30.2.4.0      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0000 0000 0011 = Generic label: 3 (0x00003)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 23                
        Message ID: 0x0000000c            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 7                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 24
                    Prefix: 30.2.5.0      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0000 0000 0011 = Generic label: 3 (0x00003)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 23                
        Message ID: 0x0000000d            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 7                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 24
                    Prefix: 30.2.6.0      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0000 0000 0011 = Generic label: 3 (0x00003)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 23                
        Message ID: 0x0000000e            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 7                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 24
                    Prefix: 30.2.7.0      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0000 0000 0011 = Generic label: 3 (0x00003)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 23                
        Message ID: 0x0000000f            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 7                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 24
                    Prefix: 30.2.8.0      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0000 0000 0011 = Generic label: 3 (0x00003)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 23                
        Message ID: 0x00000010            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 7                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 24
                    Prefix: 30.2.9.0      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0000 0000 0011 = Generic label: 3 (0x00003)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 23                
        Message ID: 0x00000011            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 7                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 24
                    Prefix: 30.2.10.0    
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0000 0000 0011 = Generic label: 3 (0x00003)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x00000012            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 32
                    Prefix: 30.255.4.4    
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0111 1101 0000 = Generic label: 2000 (0x007d0)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x00000013            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 30
                    Prefix: 30.255.114.0  
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0111 1101 0001 = Generic label: 2001 (0x007d1)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x00000014            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 30
                    Prefix: 30.255.46.0  
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0111 1101 0010 = Generic label: 2002 (0x007d2)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x00000015            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 32
                    Prefix: 30.4.10.1    
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0111 1101 0011 = Generic label: 2003 (0x007d3)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x00000016            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 32
                    Prefix: 30.4.9.1      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0111 1101 0100 = Generic label: 2004 (0x007d4)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x00000017            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 32
                    Prefix: 30.4.8.1      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0111 1101 0101 = Generic label: 2005 (0x007d5)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x00000018            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 32
                    Prefix: 30.4.7.1      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0111 1101 0110 = Generic label: 2006 (0x007d6)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x00000019            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 32
                    Prefix: 30.4.6.1      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0111 1101 0111 = Generic label: 2007 (0x007d7)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x0000001a            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 32
                    Prefix: 30.4.5.1      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0111 1101 1000 = Generic label: 2008 (0x007d8)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x0000001b            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 32
                    Prefix: 30.4.4.1      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0111 1101 1001 = Generic label: 2009 (0x007d9)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x0000001c            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 32
                    Prefix: 30.4.3.1      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0111 1101 1010 = Generic label: 2010 (0x007da)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x0000001d            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 32
                    Prefix: 30.4.2.1      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0111 1101 1011 = Generic label: 2011 (0x007db)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 24                
        Message ID: 0x0000001e            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 8                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 32
                    Prefix: 30.4.1.1      
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0111 1101 1100 = Generic label: 2012 (0x007dc)
    Label Mapping Message                
        0... .... = U bit: Unknown bit not set
        Message Type: label Mapping Message (0x400)
        Message Length: 23                
        Message ID: 0x0000001f            
        FEC                              
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: FEC (0x100)        
            TLV Length: 7                
            FEC Elements                  
                FEC Element 1            
                    FEC Element Type: Prefix FEC (2)
                    FEC Element Address Type: IPv4 (1)
                    FEC Element Length: 24
                    Prefix: 30.4.40.0    
        Generic label                    
            00.. .... = TLV Unknown bits: Known TLV, do not Forward (0x0)
            TLV Type: Generic label (0x200)
            TLV Length: 4                
            .... .... .... 0000 0000 0111 1101 1101 = Generic label: 2013 (0x007dd)

Keep Alive Message

LSRs that have formed a TCP session periodically send keepalive messages to maintain the session. By default, these keepalive messages are sent every 60 seconds on Gigabit-Ethernet interfaces. The default holdtime is 180 seconds. If Keep Alive messages are not received from a peer after 180 seconds, the LDP session gets terminated.

These are sent to maintain the LDP session between LSRs. They are sent in 90 - 100 second intervals. The keepalive message type is sent with the following paramters:

    • Transport protocol: TCP
    • TCP Source port: 646
    • TCP Destination port: ephemeral
    • Source IP address: LDP ID
    • Destination IP address: neighbor's LDP IP

The following is a Wireshark packet capture of a KeepAlive message:

Frame 1737: 72 bytes on wire (576 bits), 72 bytes captured (576 bits) on interface -, id 0
Ethernet II, Src: ca:02:04:45:00:1c (ca:02:04:45:00:1c), Dst: ca:04:04:6c:00:1c (ca:04:04:6c:00:1c)
Internet Protocol Version 4, Src: 30.255.2.2, Dst: 30.255.4.4
Transmission Control Protocol, Src Port: 646, Dst Port: 34749, Seq: 2834, Ack: 2838, Len: 18
Label Distribution Protocol
    Version: 1
    PDU Length: 14
    LSR ID: 30.255.2.2
    Label Space ID: 0
    Keep Alive Message
        0... .... = U bit: Unknown bit not set
        Message Type: Keep Alive Message (0x201)
        Message Length: 4
        Message ID: 0x00000134

It is important to note that because the Initialization message and Keep Alive messages are sent using TCP, the LDP peer will send a TCP ACK message when it receives the Initialization or Keep Alive messages.

LDP ID

By default, the LDP ID is determined in the following order:

  1. Manually configured using the command mpls ldp router-id <interface>.
  2. Highest IP address of any loopback interface
  3. Highest IP address of any physical interface

Regardless of the configured/operational LDP ID, the LDP ID can be modified explicitly with the change taking immediate effect using the global config command;

mpls ldp router-id <interface> force

Label Exchange

IOS uses unsolicited exchange of labels with liberal retention. Liberal retention implies that an LSR keeps label information that it does not use; each LSR stores all labels received by all neighbors, even if the neighbor is not currently the next-hop for the route. The other alternative label mode is conservative where the label retention is only for actively used labels. This uses less memory.

LDP operates in downstream unsolicited mode. This means that the LSR doesn’t wait for its LDP neighbor to request a label for a FEC. The LSR sends bindings for all routes to all of its LDP peers. In comparison, RSVP-TE operates in downstream-on-demand mode.

LDP Sessions

When MPLS is enabled, LDP Hello messages start being sent out of configured interfaces. The LSRs attempt to form a TCP session. The LSR with a higher LDP ID becomes the active router and initiates the TCP three-way handshake to start the formation of a TCP session i.e. it initiates the TCP session. LSRs form TCP sessions with each other using port 646. Communication between any two LSRs to form an adjacency is done using the LDP ID as the source IP address of one LSR and destination IP address destination LDP ID of the neighbor. Therefore, unlike routing protocols such as OSPF, EIGRP, the LDP ID should be a routable IP address. An IGP should, therefore, advertise the IP addresses on the loopback interfaces for MPLS to fully function. A deterministic TCP session is initiated between the two LSRs. Once the TCP session has been created, LDP messages such as Initialization, Keepalive, Address Message, exchanged using TCP.

Only one TCP session is formed between two LSRs regardless of the number of routing paths between them. The reason for having the TCP session is that the two LSRs may have multiple interconnecting links through which hello messages are sent. This helps with preventing multiple sessions between the same LSRs. The TCP session between the LDP peers can be verified using the command: show tcp brief

R11>show tcp brief
TCB       Local Address              Foreign Address             (state)
67FE0A48  30.255.11.11.25761         30.255.5.5.646              ESTAB
67FE5F38  30.255.11.11.64283         30.255.3.3.646              ESTAB
6B241AD4  30.255.11.11.25306         30.255.2.2.646              ESTAB
6B230CB0  30.255.11.11.28662         30.255.4.4.646              ESTAB

From the above output, it can be confirmed that the LSR with the higher LDP ID initiated the TCP connection (as a client with the ephemeral port number).

LDP sessions by default maintain a session keep alive interval of 60 seconds and hold time interval of 180 seconds. The session hold time and keepalive intervals can be modified using the global configuration command mpls ldp holdtime <15-65535>; the hold time interval value is in seconds. The session keep alive interval is updated to one third of the session holdtime. After modifying the session hold time, the LDP session needs to be reset because the changes do not take effect on existing sessions as indicated by the message:

%Previously established sessions may not use the new holdtime.

R7(config)#mpls ldp holdtime 90
%Previously established sessions may not use the new holdtime.
R7(config)#end
R7#show mpls ldp parameters
LDP Feature Set Manager: State Initialized
  LDP features:
    Basic
    IP-over-MPLS
    TDP
    IGP-Sync
    Auto-Configuration
    TCP-MD5-Rollover
Protocol version: 1
Session hold time: 90 sec; keep alive interval: 30 sec
Discovery hello: holdtime: 45 sec; interval: 15 sec
Discovery targeted hello: holdtime: 90 sec; interval: 10 sec
Downstream on Demand max hop count: 255
LDP for targeted sessions
LDP initial/maximum backoff: 15/120 sec
LDP loop detection: off
R7#

LDP sessions can be verified using the command show mpls ldp neighbor.

Building the MPLS Domain

MPLS runs with any routing protocol, though, Interior Gateway Protocols (IGPs) specifically link- state routing protocols such as OSPF and IS-IS are recommended for optimum operation. MPLS is as fast as the convergence of routing protocols.

When MPLS is enabled, entries are made to the CEF table. A layer 2 data structure i.e. CEF FIB is a representation of the routing table. Disabling CEF on a router breaks MPLS because labels are assigned to every entry in the CEF table. From a client Cisco IOS device, to verify the MPLS operation, run the traceroute command to a destination on the other end of an MPLS network. During label switching, local labels are not used to make switching decisions. They are used by upstream LSRs.

Configuration

MPLS has the following prerequisites;

  • Fully operational IP routing: In the following configuration, it is assumed that IP routing is enabled using a routing protocol.
  • IP CEF
  • Label exchange on interfaces using a protocol such as LDP or TDP.
The following topology is used for the MPLS configurations. It has a fully converged OSPF network.

Step 1: Enable IP CEF

Without the CEF database, the LIB will not be created making MPLS operation not possible.

R1(config)#ip cef distributed

The distributed keyword is optional.

Step 2: Configure the LDP ID

By default, LDP selects the highest IP address of any loopback interface as the LDP ID. However, the LDP ID can be explicitly configured using the global configuration command: mpls ldp router-id <interface> force; interface is the interface whose IP address is to be used as LDP ID.

R1(config)#mpls ldp router-id loopback255 force

It is recommended to use IP addresses configured on loopback interfaces as LDP IDs because they are always up. MPLS, by default, uses the highest IP address of any active loopback interface as the LDP ID. It is important to note that the IP address used as an LDP ID should be reachable from a neighboring LSR or else no neighborship can be formed. The LDP ID must be reachable as it will be used in the establishment of the TCP session between neighboring LSRs.

Step 3 (Optional): Define a label range

A label range refers to the range of label ID values that the LSR can use when creating labels. To help with troubleshooting efforts or ease of network traffic monitoring, the label ranges for each LSR needs to be unique. Additionally, the label range should be wide enough to enable the creation of unique label IDs for all IGP learned routes. This ensures that the LSR does not run out of label ID values to use for newly learned networks. Tip: Try to configure the label range so that the source of the label is instantly recognisable, for example, on LSR R1 the range can be 1000-1999, R2: 2000–2999 etc: mpls label range <16 – 1048575>.

R1(config)#mpls label range 1000 1999

If MPLS is already operational and you would like to define MPLS label ranges for LSRs, MPLS will have to be turned off and turned on for the configured label range to start being used.
Take extra caution when doing this on a production network.

Step 4: Configure the label exchange protocol

Enable LDP on the appropriate interface using the interface command mpls label protocol ldp.

R1(config)#interface gigabitethernet0/0
R1(config-if)#mpls label protocol ldp

It is possible to migrate from one label exchange protocol to another. To change protocol from using LDP to TDP;

R1(config)#interface gigabitethernet1/1
R1(config-if)#mpls label protocol tdp

It is important to note that LDP supports authentication while TDP does not support authentication.

Step 5: Enable MPLS

MPLS is enabled using the interface command : mpls ip:

R1(config)#interface g0/0
R1(config-if)#mpls ip

Configuration Example

The configuration snippets are based on the following network; Configuration edge LSR R7, the following configuration activates MPLS on interfaces GigabitEthernet 2/0, GigabitEthernet 3/0 and FastEthernet6/0.

R7(config)#ip cef
R7(config)#mpls ip
R7(config)#mpls label protocol ldp
R7(config)#mpls label range 7000 7999
R7(config)#mpls ldp router-id Loopback10 force
R7(config)#interface gigabitethernet 3/0
R7(config-if)#mpls ip
R7(config-if)#interface gigabitethernet 2/0
R7(config-if)#mpls ip
R7(config-if)#interface fastethernet 6/0
R7(config-if)#mpls ip

MPLS Packet

The following Wireshark packet capture is of an MPLS packet:

Frame 2032: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface -, id 0
Ethernet II, Src: ca:01:04:35:00:1c (ca:01:04:35:00:1c), Dst: ca:03:04:5c:00:1c (ca:03:04:5c:00:1c)
MultiProtocol Label Switching Header, Label: 3001, Exp: 6, S: 1, TTL: 255
    0000 0000 1011 1011 1001 .... .... .... = MPLS Label: 3001 (0x00bb9)
    .... .... .... .... .... 110. .... .... = MPLS Experimental Bits: 6
    .... .... .... .... .... ...1 .... .... = MPLS Bottom Of Label Stack: 1
    .... .... .... .... .... .... 1111 1111 = MPLS TTL: 255
Internet Protocol Version 4, Src: 30.255.1.1, Dst: 30.255.6.6
Transmission Control Protocol, Src Port: 54917, Dst Port: 179, Seq: 58, Ack: 77, Len: 0
    Source Port: 54917                          
    Destination Port: 179                      
    [Stream index: 4]                          
    [Conversation completeness: Incomplete, DATA (15)]
    [TCP Segment Len: 0]                        
    Sequence Number: 58    (relative sequence number)
    Sequence Number (raw): 3128650382          
    [Next Sequence Number: 58    (relative sequence number)]
    Acknowledgment Number: 77    (relative ack number)
    Acknowledgment number (raw): 932588975      
    0101 .... = Header Length: 20 bytes (5)    
    Flags: 0x010 (ACK)                          
    Window: 16308                              
    [Calculated window size: 16308]            
    [Window size scaling factor: -2 (no window scaling used)]
    Checksum: 0xc993 [unverified]              
    [Checksum Status: Unverified]              
    Urgent Pointer: 0                          
    [Timestamps]                                
    [SEQ/ACK analysis]                          

MPLS Optimization

LDP Autoconfiguration

OSPF and IS-IS (link-state protocols) support the activation of MPLS on interfaces where OSPF/IS-IS has been enabled from within the routing protocol configuration. In OSPF router configuration mode, this is accomplished using the command; mpls ldp autoconfig [area <area-id>]. All interfaces in the specified areas will have MPLS activated.

R1(config)#router ospf 1
R1(config-router)#mpls ldp autoconfig area 0

The optional area <area-id> adds the flexibility of enabling LDP on interfaces in the configured OSPF area.

Another alternative is to configure the autoconfiguration at the interface:

R1(config)#interface g0/0
R1(config-if)#mpls ldp igp autoconfig

NOTE: setting the label range on an LSR that has an active TCP session with another LSR will not take effect immediately. To enforce the new label range; disable MPLS on the interface using the command no mpls ip, then enable MPLS on the interface. However, if MPLS was enabled through the routing protocol, then disabling LDP in the interface with the interface sub-mode command no mpls ip will return the following message;

R7(config)#interface g2/0
R7(config-if)#no mpls ip
%LDP remains enabled on interface Gi2/0 by autoconfig.
Autoconfig can be removed from Gi2/0 with 'no mpls ldp igp autoconfig.'

As indicated in the message, to completely disable LDP on such interfaces, issue the following command in interface sub-mode;

R7(config-if)#interface g2/0
R7(config-if)#no mpls ldp igp autoconfig
R7(config-if)#exit
R7(config)#mpls ip
R7(config)#mpls label protocol ldp
R7(config)#mpls label range 7000 7999
R7(config)#mpls ldp router-id loopaback10 force
R7(config)#interface g2/0
R7(config-if)#mpls ip

LDP IGP Synchronization

Synchronization between the IGP and LDP can be configured where the IGP advertises a route only after LDP converges. Before LDP convergence, the route is advertised with a maximum metric. MPLS traffic runs the risk of being black-holed if LDP has not fully converged. The path through the unsynchronized link is only used if it is the only path.

Synchronization can be enabled through the following methods:

  • All IGP interfaces: using the IGP mode command mpls ldp sync. This form of sychronization can be disabled for a particular interface using the interface mode command no mpls ldp igp sync
  • Specific interface: using the interface mode command mpls ldp igp sync [delay <5-60>]. The optional delay parameter (in seconds) can be configured so that LDP synchronizes with the IGP after the configured delay interval. This can help guard against synchronizing due to a flapping route.

The default wait time for LDP synchronization is infinity; to configure a holddown time for LDP synchronization, the global configuration command used is mpls ldp igp sync holddown <1-2147483647>; the holddown time is in milliseconds.

Synchronization can be verified using the command show mpls ldp igp sync

R1#show mpls ldp igp sync
    GigabitEthernet0/0:
        LDP configured; LDP-IGP Synchronization enabled.
        Sync status: sync achieved; peer reachable.
        Sync delay time: 0 seconds (0 seconds left)
        IGP holddown time: 50000 milliseconds.
        Peer LDP Ident: 2.2.2.2:0
        IGP enabled: OSPF 1

If the IGP is OSPF, synchronization can be verified using the command show ip ospf mpls ldp interface [<interface-id>]:

R1#show ip ospf mpls ldp interface
Loopback0
  Process ID 1, Area 0
  LDP is not configured through LDP autoconfig
  LDP-IGP Synchronization : Not required
  Holddown timer is disabled
  Interface is up
GigabitEthernet0/0
  Process ID 1, Area 0
  LDP is not configured through LDP autoconfig
  LDP-IGP Synchronization : Required
  Holddown timer is configured : 50000 msecs
  Holddown timer is not running
  Interface is up
R1#

Targeted LDP Sessions

LDP sessions can be configured for LDP peers that are not directly connected but have IP connectivity. This can be accomplished in a number of ways:

  1. Static LDP neighbors on both routers: both LSRs are configured to to point to each other's LDP ID using the command mpls ldp neighbor <peer-ldp-id> targeted .
  2. Static LDP neighbor on one LSR using the command mpls ldp neighbor <peer-ldp-id> targeted and accept targeted hellos on the other using the command mpls ldp discovery targeted-hello accept

LDP Hello and Hold Timer Intervals

The default interval for LDP neighbor discovery Hello timer is 5 seconds and hold timer is 15 seconds as indicated in the output of the command show mpls ldp parameters.

R2#show mpls ldp parameters
LDP Feature Set Manager: State Initialized
  LDP features:
    Basic
    IP-over-MPLS
    TDP
    IGP-Sync
    Auto-Configuration
    TCP-MD5-Rollover
Protocol version: 1
Session hold time: 180 sec; keep alive interval: 60 sec
Discovery hello: holdtime: 15 sec; interval: 5 sec
Discovery targeted hello: holdtime: 90 sec; interval: 10 sec
Downstream on Demand max hop count: 255
LDP for targeted sessions
LDP initial/maximum backoff: 15/120 sec

These default values can be modified using the command mpls ldp discovery hello interval <1-65535> where the hello interval value is in seconds. Modifying the hello interval does not automatically update the hold timer interval; this has to manually be done using the global configuration command mpls ldp discovery hello holdtime <1-65535> and the value is in seconds.

R1(config)#mpls ldp discovery hello interval 15
R1(config)#mpls ldp discovery hello holdtime 45
R1#show mpls ldp parameters
LDP Feature Set Manager: State Initialized
  LDP features:
    Basic
    IP-over-MPLS
    TDP
    IGP-Sync
    Auto-Configuration
    TCP-MD5-Rollover
Protocol version: 1
Session hold time: 180 sec; keep alive interval: 60 sec
Discovery hello: holdtime: 45 sec; interval: 15 sec
Discovery targeted hello: holdtime: 90 sec; interval: 10 sec
Downstream on Demand max hop count: 255
LDP for targeted sessions
LDP initial/maximum backoff: 15/120 sec

Authentication

LDP supports authentication for the LDP TCP session between peers. By default, MD5 is used to hash the password. The password can be configured:

  • Per neighbor: using the global configuration command mpls ldp neighbor <ip-address> password <password>
  • For a group of neighbors: using the global configuration command mpls ldp password option <1-32767> for <ACL> <password>. <1-32767> represents the sequence number of the LDP password option. The ACL contains the list of neighbors to whom the password is applicable.
  • default password for all neighbors: using the global configuration command mpls ldp password fallback <password>.

R1(config)#mpls ldp neighbor 30.255.2.2 password simplesimple

The output confirms that authentication has been configured:

R1#show mpls ldp neighbor detail
    Peer LDP Ident: 30.255.3.3:0; Local LDP Ident 30.255.1.1:0
        TCP connection: 30.255.3.3.41182 - 30.255.1.1.646; MD5 on
        Password: not required, neighbor, in use            
        State: Oper; Msgs sent/rcvd: 210/190; Downstream; Last TIB rev sent 210
        Up time: 01:44:12; UID: 2; Peer Id 1;              
        LDP discovery sources:                              
          GigabitEthernet1/0; Src IP addr: 30.255.13.2      
            holdtime: 15000 ms, hello interval: 5000 ms    
        Addresses bound to peer LDP Ident:                  
          30.3.1.1        30.3.2.1        30.3.3.1        30.3.4.1
          30.3.5.1        30.3.6.1        30.3.7.1        30.3.8.1
          30.3.9.1        30.3.10.1       30.255.3.3      30.255.35.1
          30.255.13.2     30.255.113.1    99.255.255.14    
        Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab
        Capabilities Sent:                                  
          [Dynamic Announcement (0x0506)]                  
          [Typed Wildcard (0x050B)]                        
        Capabilities Received:                              
          [Dynamic Announcement (0x0506)]                  
          [Typed Wildcard (0x050B)]                        
R1#

The peer LSR (R2) does not have authentication configured:

R2#show mpls ldp neighbor detail
    Peer LDP Ident: 30.255.4.4:0; Local LDP Ident 30.255.2.2:0          
        TCP connection: 30.255.4.4.30399 - 30.255.2.2.646              
        Password: not required, none, in use                            
        State: Oper; Msgs sent/rcvd: 187/187; Downstream; Last TIB rev sent 216
        Up time: 01:24:45; UID: 2; Peer Id 1;                          
        LDP discovery sources:                                          
          GigabitEthernet1/0; Src IP addr: 30.255.24.2                  
            holdtime: 15000 ms, hello interval: 5000 ms                
        Addresses bound to peer LDP Ident:                              
          30.255.46.1     30.255.24.2     30.255.114.1    30.4.40.1    
          30.4.1.1        30.4.2.1        30.4.3.1        30.4.4.1      
          30.4.5.1        30.4.6.1        30.4.7.1        30.4.8.1      
          30.4.9.1        30.4.10.1       30.255.4.4                    
        Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab
        Capabilities Sent:                                              
          [Dynamic Announcement (0x0506)]                              
          [Typed Wildcard (0x050B)]                                    
        Capabilities Received:                                          
          [Dynamic Announcement (0x0506)]                              
          [Typed Wildcard (0x050B)]                                    
    Peer LDP Ident: 30.255.11.11:0; Local LDP Ident 30.255.2.2:0        
        TCP connection: 30.255.11.11.25306 - 30.255.2.2.646            
        Password: not required, none, in use                            
        State: Oper; Msgs sent/rcvd: 189/193; Downstream; Last TIB rev sent 216
        Up time: 01:24:37; UID: 3; Peer Id 2;                          
        LDP discovery sources:                                          
          GigabitEthernet2/0; Src IP addr: 30.255.112.2                
            holdtime: 15000 ms, hello interval: 5000 ms                
        Addresses bound to peer LDP Ident:                              
          30.255.112.2    30.11.1.1       30.11.2.1       30.11.3.1    
          30.11.4.1       30.11.5.1       30.11.6.1       30.11.7.1    
          30.11.8.1       30.11.9.1       30.11.10.1      30.255.11.11  
          30.255.114.2    30.255.113.2    30.255.115.2                  
        Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab
        Capabilities Sent:                                              
          [Dynamic Announcement (0x0506)]                              
          [Typed Wildcard (0x050B)]                                    
        Capabilities Received:                                          
          [Dynamic Announcement (0x0506)]                              
          [Typed Wildcard (0x050B)]                                    
R2#

Authentication of LDP messages between peers is optional. However, to enforce authentication requirement, the command is;

R1(config)#mpls ldp password required
*Mar 18 14:48:38.799: %LDP-5-NBRCHG: LDP Neighbor 30.255.2.2:0 (1) is DOWN (Session's MD5 password changed)
*Mar 18 14:48:39.871: %TCP-6-BADAUTH: No MD5 digest from 30.255.2.2(23503) to 30.255.1.1(646) tableid - 0

Configuration of authentication on one end of an active LDP session may not take down the TCP session between the neighbors on some versions of IOS. To reset the LDP session and force the authentication reequirement, run the following command;

R1#clear mpls ldp neighbor [<ip-address> | * ]

LDP neighbors that do not have authentication configured will result in the generation the following log messages:

R7#
*Feb 8 01:32:46.594: %TCP-6-BADAUTH: No MD5 digest from 4.4.4.4 (646) to 7.7.7.7 (53621)
tableid - 0
R7#configure te
*Feb 8 01:32:48.466: %TCP-6-BADAUTH: No MD5 digest from 4.4.4.4 (646) to 7.7.7.7 (53621)
tableid - 0
*Feb 8 01:32:48.466: %TCP-6-BADAUTH: No MD5 digest from 4.4.4.4 (646) to 7.7.7.7 (53621)
tableid - 0 R7#

LDP Filtering

The default LDP behaviour is to allocate labels for all prefixes in the FIB. Label filtering can be applied in the following ways:

  • Inbound label filtering labels from LDP peers can be filtered using the command mpls ldp neighbor <peer-ip-address> labels accept <acl>. The ACL contains a list of LDP peers whose labels are to be filtered.
  • Outbound label filtering: Local labels advertised to LDP peers can be filtered using the command mpls ldp advertised-labels for <prefix-acl> to <peers-acl> where:
    • prefix-acl: is an ACL of prefixes whose labels are to be advertised to LDP peers.
    • peers-acl: LDP peers to receive label advertisements.

To implement LDP filtering using ACLs, the command no mpls ldp advertised-labels needs to be configured first.

R5(config)#no mpls ldp advertise-labels
R5(config)#ip access-list standard ACL_MPLS_LINKS
R5(config-std-nacl)#deny 45.1.1.0 0.0.0.255
R5(config-std-nacl)#deny 56.1.1.0 0.0.0.255
R5(config-std-nacl)#permit any
R5(config-std-nacl)#exit
R5(config#mpls ldp advertise-labels for ACL_MPLS_LINKS
R5(config)#do show access-lists
Standard IP access list ACL_MPLS_LINKS
    10 deny   45.1.1.0, wildcard bits 0.0.0.255 (3 matches)
    20 deny   56.1.1.0, wildcard bits 0.0.0.255 (2 matches)
    30 permit any (39 matches)

R5#show mpls forwarding-table
Local      Outgoing   Prefix           Bytes Label   Outgoing   Next Hop
Label      Label      or Tunnel Id     Switched      interface  
502        No Label   4.4.4.4/32       0             Gi1/0      45.1.1.4
503        404        3.3.3.3/32       0             Gi1/0      45.1.1.4
504        401        2.2.2.2/32       0             Gi1/0      45.1.1.4
505        400        1.1.1.1/32       0             Gi1/0      45.1.1.4
506        402        12.1.1.0/24      0             Gi1/0      45.1.1.4
507        409        23.1.1.0/24      0             Gi1/0      45.1.1.4
508        No Label   34.1.1.0/24      0             Gi1/0      45.1.1.4
509        609        7.7.7.7/32       0             Gi0/0      56.1.1.6
510        No Label   6.6.6.6/32       0             Gi0/0      56.1.1.6
511        No Label   67.1.1.0/24      1140          Gi0/0      56.1.1.6

R5#show mpls ldp bindings detail
Advertisement spec:
        Prefix acl = ACL_MPLS_LINKS    
                                        
  lib entry: 1.1.1.1/32, rev 75, chkpt: none
        local binding:  label: 505 (owner LDP)
          Advertised to:                
          6.6.6.6:0              4.4.4.4:0
        remote binding: lsr: 6.6.6.6:0, label: 604
        remote binding: lsr: 4.4.4.4:0, label: 400
        Advert acl(s): Prefix acl ACL_MPLS_LINKS
  lib entry: 2.2.2.2/32, rev 76, chkpt: none
        local binding:  label: 504 (owner LDP)
          Advertised to:                
          6.6.6.6:0              4.4.4.4:0
        remote binding: lsr: 6.6.6.6:0, label: 603
        remote binding: lsr: 4.4.4.4:0, label: 401
        Advert acl(s): Prefix acl ACL_MPLS_LINKS
  lib entry: 3.3.3.3/32, rev 77, chkpt: none
        local binding:  label: 503 (owner LDP)
          Advertised to:                
          6.6.6.6:0              4.4.4.4:0
        remote binding: lsr: 6.6.6.6:0, label: 602
        remote binding: lsr: 4.4.4.4:0, label: 404
        Advert acl(s): Prefix acl ACL_MPLS_LINKS
!!Additional output omitted.....

LDP Session Protection

LDP session protection stores received labels from an LDP peer even after the connecting link to the peer goes down. LDP session protection is useful particularly when the connecting link between LDP peers experiences link-flaps. LDP session protection is configured to ensure that LDP TCP sessions are maintained even when the primary IP path between the LDP peers fails and a backup path is being utilized to ensure connectivity. When the primary link is restored, label bindings do not need to be re-exchanged. MPLS can converge as soon as IP converges.

When the connecting link between the LDP peers goes down, targeted hello messages are sent. A minimum of nine hello messages are sent before the LDP TCP session is ended. The main difference between a targeted hello messages and the LDP session protection is that the unicast peering is limited in time.

LDP session protection can be enabled:

  • For all LDP peers using the command mpls ldp session protection
  • For specific LDP peers using an ACL mpls ldp session protection for <ACL> duration [<30-2147483> | infinite]. The duration value is in seconds.

LDP session protection can be implemented in the following ways:

  • Both peers must be configured for session protection
  • One LSR configured for session protection and the other LSR must simply respond to targeted hellos

Verification

LDP Operational State

R2#show mpls ldp parameters
LDP Feature Set Manager: State Initialized
  LDP features:      
    Basic            
    IP-over-MPLS      
    TDP              
    IGP-Sync          
    Auto-Configuration
    TCP-MD5-Rollover  
Protocol version: 1
Session hold time: 180 sec; keep alive interval: 60 sec
Discovery hello: holdtime: 15 sec; interval: 5 sec
Discovery targeted hello: holdtime: 90 sec; interval: 10 sec
Downstream on Demand max hop count: 255
LDP for targeted sessions
LDP initial/maximum backoff: 15/120 sec
LDP loop detection: off
R2#

The command show mpls ldp parameters can be used to verify the following:

  • Hello interval: default is 5 seconds
  • Hello holdtime interval: default 15 seconds
  • Keepalive interval: default is 60 seconds
  • Session hold time: default is 180 seconds
  • LDP features

MPLS Interfaces

The command to display interfaces on which LDP is configured is show mpls interface.

R11#show mpls interfaces
Interface              IP            Tunnel   BGP Static Operational
GigabitEthernet0/0     Yes (ldp)     No       No  No     Yes
GigabitEthernet1/0     Yes (ldp)     No       No  No     Yes
GigabitEthernet2/0     Yes (ldp)     No       No  No     Yes
GigabitEthernet3/0     Yes (ldp)     No       No  No     Yes
R11#show mpls interfaces detail
Interface GigabitEthernet0/0:
        Type Unknown
        IP labeling enabled (ldp):
          Interface config
        LSP Tunnel labeling not enabled
        IP FRR labeling not enabled
        BGP labeling not enabled
        MPLS operational
        MTU = 1500
Interface GigabitEthernet1/0:
        Type Unknown
        IP labeling enabled (ldp):
          Interface config
        LSP Tunnel labeling not enabled
        IP FRR labeling not enabled
        BGP labeling not enabled
        MPLS operational
        MTU = 1500
Interface GigabitEthernet2/0:
        Type Unknown
        IP labeling enabled (ldp):
          Interface config
        LSP Tunnel labeling not enabled
        IP FRR labeling not enabled
        BGP labeling not enabled
        MPLS operational
        MTU = 1500
Interface GigabitEthernet3/0:
        Type Unknown
        IP labeling enabled (ldp):
          Interface config
        LSP Tunnel labeling not enabled
        IP FRR labeling not enabled
        BGP labeling not enabled
        MPLS operational
        MTU = 1500      

Forwarding Information Base (FIB)

The FIB is created using data from the RIB and layer 2 sources such as the ARP table. Its contents can be viewed using the command show ip cef. Adding the detail keyword displays the MPLS labels.

R1>show ip cef
Prefix               Next Hop             Interface
0.0.0.0/0            no route                  
0.0.0.0/8            drop                      
...                                            
30.2.1.1/32          30.255.12.2          GigabitEthernet0/0
30.2.2.1/32          30.255.12.2          GigabitEthernet0/0
30.2.3.1/32          30.255.12.2          GigabitEthernet0/0
30.2.4.1/32          30.255.12.2          GigabitEthernet0/0
30.2.5.1/32          30.255.12.2          GigabitEthernet0/0
...                                            
                                              
                     30.255.13.2          GigabitEthernet1/0
30.6.3.1/32          30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.6.4.1/32          30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.6.5.1/32          30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.6.6.1/32          30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.6.7.1/32          30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.6.8.1/32          30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.6.9.1/32          30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.6.10.1/32         30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.11.1.1/32         30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.11.2.1/32         30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.11.3.1/32         30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.11.4.1/32         30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.11.5.1/32         30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.11.6.1/32         30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.11.7.1/32         30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.11.8.1/32         30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
30.11.9.1/32         30.255.12.2          GigabitEthernet0/0
                     30.255.13.2          GigabitEthernet1/0
...                                            
127.0.0.0/8          drop                      
224.0.0.0/4          drop                      
224.0.0.0/24         receive                  
240.0.0.0/4          drop                      
255.255.255.255/32   receive                  
R1>                                            
R1>show ip cef 30.11.6.1/32 detail      
30.11.6.1/32, epoch 0, per-destination sharing
  local label info: global/1025                
  nexthop 30.255.12.2 GigabitEthernet0/0 label 2033
  nexthop 30.255.13.2 GigabitEthernet1/0 label 3022

Label Forwarding Information Base (LFIB)

The LFIB table is built from Routing Information Base (RIB), Forwarding Information Base (FIB) and label Information Base (LIB) tables. On egress edge LSR, a connected network has no LFIB entry. It uses IP for normal routing. It operates at the data plane of MPLS. The LFIB is displayed using the command show mpls forwarding-table [detail]. The LFIB table shows the number of packets switched by MPLS. It also displays the LDP, TDP receive labels. ‘No label’ indicates that the LSR on which this command is executed will perform PHP for traffic to these networks.

R1>show mpls forwarding-table
Local      Outgoing   Prefix           Bytes label   Outgoing   Next Hop    
Label      Label      or Tunnel Id     Switched      interface              
1000       3007       30.255.5.5/32    0             Gi1/0      30.255.13.2
1001       Pop label  30.255.35.0/30   0             Gi1/0      30.255.13.2
1002       Pop label  30.255.112.0/30  0             Gi0/0      30.255.12.2
1003       Pop label  30.255.24.0/30   0             Gi0/0      30.255.12.2
1004       Pop label  30.255.2.2/32    0             Gi0/0      30.255.12.2
1005       No label   30.2.10.1/32     0             Gi0/0      30.255.12.2
1006       No label   30.2.9.1/32      0             Gi0/0      30.255.12.2
1007       No label   30.2.8.1/32      0             Gi0/0      30.255.12.2
1008       No label   30.2.7.1/32      0             Gi0/0      30.255.12.2
1009       No label   30.2.6.1/32      0             Gi0/0      30.255.12.2
1010       No label   30.2.5.1/32      0             Gi0/0      30.255.12.2
1011       No label   30.2.4.1/32      0             Gi0/0      30.255.12.2
1012       No label   30.2.3.1/32      0             Gi0/0      30.255.12.2
1013       No label   30.2.2.1/32      0             Gi0/0      30.255.12.2
1014       No label   30.2.1.1/32      0             Gi0/0      30.255.12.2
1015       2026       30.255.11.11/32  0             Gi0/0      30.255.12.2
           3005       30.255.11.11/32  0             Gi1/0      30.255.13.2
1016       2012       30.255.4.4/32    0             Gi0/0      30.255.12.2
                                                                            
                                                                            
R1>show mpls forwarding-table detail                                        
Local      Outgoing   Prefix           Bytes label   Outgoing   Next Hop    
Label      Label      or Tunnel Id     Switched      interface              
1000       3007       30.255.5.5/32    0             Gi1/0      30.255.13.2
        MAC/Encaps=14/18, MRU=1500, label Stack{3007}                      
        CA03045C001CCA010435001C8847 00BBF000                              
        No output feature configured                                        
1001       Pop label  30.255.35.0/30   0             Gi1/0      30.255.13.2
        MAC/Encaps=14/14, MRU=1504, label Stack{}                          
        CA03045C001CCA010435001C8847                                        
        No output feature configured                                        
1002       Pop label  30.255.112.0/30  0             Gi0/0      30.255.12.2
        MAC/Encaps=14/14, MRU=1504, label Stack{}                          
        CA0204450008CA01043500088847                                        
        No output feature configured                                        
1003       Pop label  30.255.24.0/30   0             Gi0/0      30.255.12.2
        MAC/Encaps=14/14, MRU=1504, label Stack{}                          
        CA0204450008CA01043500088847                                        
        No output feature configured                                        
1004       Pop label  30.255.2.2/32    0             Gi0/0      30.255.12.2
        MAC/Encaps=14/14, MRU=1504, label Stack{}                          
        CA0204450008CA01043500088847                                        
        No output feature configured                                        
1005       No label   30.2.10.1/32     0             Gi0/0      30.255.12.2
Local      Outgoing   Prefix           Bytes label   Outgoing   Next Hop    
Label      Label      or Tunnel Id     Switched      interface              
        MAC/Encaps=14/14, MRU=1504, label Stack{}                          
        CA0204450008CA01043500080800                                        
        No output feature configured                                        
1006       No label   30.2.9.1/32      0             Gi0/0      30.255.12.2
        MAC/Encaps=14/14, MRU=1504, label Stack{}                          
        CA0204450008CA01043500080800                                        
        No output feature configured                                        
1007       No label   30.2.8.1/32      0             Gi0/0      30.255.12.2
        MAC/Encaps=14/14, MRU=1504, label Stack{}                          
        CA0204450008CA01043500080800                                        
        No output feature configured                                        
1008       No label   30.2.7.1/32      0             Gi0/0      30.255.12.2
        MAC/Encaps=14/14, MRU=1504, label Stack{}                          
        CA0204450008CA01043500080800                                        
        No output feature configured                                        
1009       No label   30.2.6.1/32      0             Gi0/0      30.255.12.2
        MAC/Encaps=14/14, MRU=1504, label Stack{}                          
        CA0204450008CA01043500080800                                        
No output feature configured

The "Pop label" value indicates that the label stack will be deleted. The detail keyword displays the label stack if available.

Trace the LSP

The traceroute command can be used to confirm the end-to-end operation of label switching. When an ICMP packet is sent and the TTL packet expires at a hop, the value of the labels is placed in the ICMP packets. This is displayed in the traceroute ICMP expired packet. To verify operation of MPLS, issue a traceroute from R1 to R8:

R1>traceroute 30.255.6.6
Type escape sequence to abort.
Tracing the route to 30.255.6.6
VRF info: (vrf in name/id, vrf out name/id)
  1 30.255.13.2 [MPLS: label 3006 Exp 0] 88 msec
    30.255.12.2 [MPLS: label 2039 Exp 0] 80 msec
    30.255.13.2 [MPLS: label 3006 Exp 0] 24 msec
  2 30.255.24.2 [MPLS: label 4038 Exp 0] 44 msec
    30.255.35.2 [MPLS: label 5001 Exp 0] 16 msec
    30.255.24.2 [MPLS: label 4038 Exp 0] 40 msec
  3 30.255.56.2 60 msec
    30.255.46.2 8 msec *

LSRs can be configured to not include the label IDs in the ICMP replies for locally generated traffic or transit traffic or both. This is accomplished using the global configuration command no mpls ip propagate-ttl [local | forwarded | cir]:

  • local: ICMP replies will not contain label IDs for locally generated traffic.
  • forwarded: ICMP replies will not contain label IDs for transit traffic; this option is usually configured in service provider networks to hide the MPLS details from the clients.
  • CIR: applies to both.

R1(config)#no mpls ip propagate-ttl local

The result;

R1#traceroute 30.255.6.6
Type escape sequence to abort.
Tracing the route to 30.255.6.6
VRF info: (vrf in name/id, vrf out name/id)
  1 30.255.46.2 56 msec
    30.255.56.2 60 msec *

Label Information Base (LIB)

The LIB operates at the MPLS control plane. If BGP is used for label exchange, then the command is show ip bgp labels. The LIB stores all labels.

R1#show mpls ldp bindings
  lib entry: 30.1.1.0/24, rev 8      
        local binding:  label: imp-null
  lib entry: 30.1.1.1/32, rev 74    
        remote binding: lsr: 30.255.3.3:0, label: 3077
        remote binding: lsr: 30.255.2.2:0, label: 2011
  lib entry: 30.1.2.0/24, rev 10    
        local binding:  label: imp-null
  lib entry: 30.1.2.1/32, rev 73    
        remote binding: lsr: 30.255.3.3:0, label: 3076
        remote binding: lsr: 30.255.2.2:0, label: 2010
  lib entry: 30.1.3.0/24, rev 12    
        local binding:  label: imp-null
  lib entry: 30.1.3.1/32, rev 72    
        remote binding: lsr: 30.255.3.3:0, label: 3075
        remote binding: lsr: 30.255.2.2:0, label: 2009
  lib entry: 30.1.4.0/24, rev 14    
        local binding:  label: imp-null
  lib entry: 30.1.4.1/32, rev 71    
        remote binding: lsr: 30.255.3.3:0, label: 3074
        remote binding: lsr: 30.255.2.2:0, label: 2008
  lib entry: 30.1.5.0/24, rev 16    
        local binding:  label: imp-null
  lib entry: 30.1.5.1/32, rev 70    
        remote binding: lsr: 30.255.3.3:0, label: 3073
                                    
R1#show mpls ldp bindings detail
  lib entry: 30.1.1.0/24, rev 8, chkpt: none
        local binding:  label: imp-null (owner LDP)
          Advertised to:            
          30.255.3.3:0           30.255.2.2:0
  lib entry: 30.1.1.1/32, rev 74, chkpt: none
        remote binding: lsr: 30.255.3.3:0, label: 3077
        remote binding: lsr: 30.255.2.2:0, label: 2011
  lib entry: 30.1.2.0/24, rev 10, chkpt: none
        local binding:  label: imp-null (owner LDP)
          Advertised to:            
          30.255.3.3:0           30.255.2.2:0
  lib entry: 30.1.2.1/32, rev 73, chkpt: none
        remote binding: lsr: 30.255.3.3:0, label: 3076
        remote binding: lsr: 30.255.2.2:0, label: 2010
  lib entry: 30.1.3.0/24, rev 12, chkpt: none
        local binding:  label: imp-null (owner LDP)
          Advertised to:            
          30.255.3.3:0           30.255.2.2:0
  lib entry: 30.1.3.1/32, rev 72, chkpt: none
        remote binding: lsr: 30.255.3.3:0, label: 3075
        remote binding: lsr: 30.255.2.2:0, label: 2009
  lib entry: 30.1.4.0/24, rev 14, chkpt: none
        local binding:  label: imp-null (owner LDP)
          Advertised to:            
          30.255.3.3:0           30.255.2.2:0
  lib entry: 30.1.4.1/32, rev 71, chkpt: none
        remote binding: lsr: 30.255.3.3:0, label: 3074
        remote binding: lsr: 30.255.2.2:0, label: 2008
  lib entry: 30.1.5.0/24, rev 16, chkpt: none
        local binding:  label: imp-null (owner LDP)
          Advertised to:            
          30.255.3.3:0           30.255.2.2:0
  lib entry: 30.1.5.1/32, rev 70, chkpt: none
        remote binding: lsr: 30.255.3.3:0, label: 3073
        remote binding: lsr: 30.255.2.2:0, label: 2007

At the penultimate LSR, CEF does not show a label for the destination network; the command show mpls ldp binding displays this as ‘impl-null’ label and mpls forwarding-table displays ‘Pop label’. By default, the Layer 3 TTL value of a packet is copied to the MPLS header TTL section.

LDP Discovery

The command show mpls ldp discovery displays the LSR's LDP ID and neighboring LSRs and the respective interfaces through which the neighbor LSR is reachable. If the interface status shows xmit, then the LSR neighbor relationship has a problem. Hello messages are no longer being received on the interface from this neighbor. An interface's operational status should be xmit/recv.

The LDP ID values has the suffix value of zero(0). This value will always be zero unless running MPLS in cell mode which require specially configured ATM interfaces. This command also verifies the exchange of Hello messages using UDP.

R1#show mpls ldp discovery
Local LDP Identifier:
    30.255.1.1:0
    Discovery Sources:
    Interfaces:
        GigabitEthernet0/0 (ldp): xmit/recv
            LDP Id: 30.255.2.2:0
        GigabitEthernet1/0 (ldp): xmit/recv
            LDP Id: 30.255.3.3:0

LDP Neighbors

LDP peers can be viewed using the command show mpls ldp neighbor. To view neighboring LSRs. The optional detail shows authentication information. This command also verifies the operational state of the TCP session between the LDP neighbors.

R1#show mpls ldp neighbor
    Peer LDP Ident: 30.255.3.3:0; Local LDP Ident 30.255.1.1:0
        TCP connection: 30.255.3.3.20931 - 30.255.1.1.646      
        State: Oper; Msgs sent/rcvd: 156/126; Downstream      
        Up time: 00:56:03                                      
        LDP discovery sources:                                
          GigabitEthernet1/0, Src IP addr: 30.255.13.2        
        Addresses bound to peer LDP Ident:                    
          30.3.1.1        30.3.2.1        30.3.3.1        30.3.4.1
          30.3.5.1        30.3.6.1        30.3.7.1        30.3.8.1
          30.3.9.1        30.3.10.1       30.255.3.3      30.255.35.1
          30.255.13.2     30.255.113.1    99.255.255.14        
    Peer LDP Ident: 30.255.2.2:0; Local LDP Ident 30.255.1.1:0
        TCP connection: 30.255.2.2.45754 - 30.255.1.1.646      
        State: Oper; Msgs sent/rcvd: 150/127; Downstream      
        Up time: 00:51:41                                      
        LDP discovery sources:                                
          GigabitEthernet0/0, Src IP addr: 30.255.12.2        
        Addresses bound to peer LDP Ident:                    
          30.255.12.2     30.2.1.1        30.2.2.1        30.2.3.1
          30.2.4.1        30.2.5.1        30.2.6.1        30.2.7.1
          30.2.8.1        30.2.9.1        30.2.10.1       30.255.2.2
          30.255.24.1     30.255.112.1                        
R1#                                                            
R1#show mpls ldp neighbor detail                        
    Peer LDP Ident: 30.255.3.3:0; Local LDP Ident 30.255.1.1:0
        TCP connection: 30.255.3.3.20931 - 30.255.1.1.646; MD5 on
        Password: required, neighbor, in use                  
        State: Oper; Msgs sent/rcvd: 156/126; Downstream; Last TIB rev sent 220
        Up time: 00:56:07; UID: 3; Peer Id 0;                  
        LDP discovery sources:                                
          GigabitEthernet1/0; Src IP addr: 30.255.13.2        
            holdtime: 15000 ms, hello interval: 5000 ms        
        Addresses bound to peer LDP Ident:                    
          30.3.1.1        30.3.2.1        30.3.3.1        30.3.4.1
          30.3.5.1        30.3.6.1        30.3.7.1        30.3.8.1
          30.3.9.1        30.3.10.1       30.255.3.3      30.255.35.1
          30.255.13.2     30.255.113.1    99.255.255.14        
        Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab
        Capabilities Sent:                                    
          [Dynamic Announcement (0x0506)]                      
          [Typed Wildcard (0x050B)]                            
        Capabilities Received:                                
          [Dynamic Announcement (0x0506)]                      
          [Typed Wildcard (0x050B)]                            
    Peer LDP Ident: 30.255.2.2:0; Local LDP Ident 30.255.1.1:0
        TCP connection: 30.255.2.2.45754 - 30.255.1.1.646; MD5 on
        Password: required, neighbor, in use                  
        State: Oper; Msgs sent/rcvd: 150/127; Downstream; Last TIB rev sent 220
        Up time: 00:51:46; UID: 4; Peer Id 1;                  
        LDP discovery sources:                                
          GigabitEthernet0/0; Src IP addr: 30.255.12.2        
            holdtime: 15000 ms, hello interval: 5000 ms        
        Addresses bound to peer LDP Ident:                    
          30.255.12.2     30.2.1.1        30.2.2.1        30.2.3.1
          30.2.4.1        30.2.5.1        30.2.6.1        30.2.7.1
          30.2.8.1        30.2.9.1        30.2.10.1       30.255.2.2
          30.255.24.1     30.255.112.1                        
        Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab
        Capabilities Sent:                                    
          [Dynamic Announcement (0x0506)]                      
          [Typed Wildcard (0x050B)]                            
        Capabilities Received:                                
          [Dynamic Announcement (0x0506)]                      
          [Typed Wildcard (0x050B)]                            
R1#

Authentication

The configuration of a password can be verified using the command show mpls ldp neighbor detail. From the output of this command, the stale state indicates that the configuration of the password has not been enforced. Applying the configuration using the command R7#clear mpls ldp neighbor <ip-address | * > results in the output showing the status of in-use.

R2#show mpls ldp neighbor detail
    Peer LDP Ident: 30.255.4.4:0; Local LDP Ident 30.255.2.2:0                
        TCP connection: 30.255.4.4.30399 - 30.255.2.2.646                      
        Password: not required, none, in use                                  
        State: Oper; Msgs sent/rcvd: 208/199; Downstream; Last TIB rev sent 226
        Up time: 01:42:26; UID: 2; Peer Id 1;                                  
        LDP discovery sources:                                                
          GigabitEthernet1/0; Src IP addr: 30.255.24.2                        
            holdtime: 15000 ms, hello interval: 5000 ms                        
        Addresses bound to peer LDP Ident:                                    
          30.255.46.1     30.255.24.2     30.255.114.1    30.4.40.1            
          30.4.1.1        30.4.2.1        30.4.3.1        30.4.4.1            
          30.4.5.1        30.4.6.1        30.4.7.1        30.4.8.1            
          30.4.9.1        30.4.10.1       30.255.4.4                          
        Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab    
        Capabilities Sent:                                                    
          [Dynamic Announcement (0x0506)]                                      
          [Typed Wildcard (0x050B)]                                            
        Capabilities Received:                                                
          [Dynamic Announcement (0x0506)]                                      
          [Typed Wildcard (0x050B)]                                            
    Peer LDP Ident: 30.255.11.11:0; Local LDP Ident 30.255.2.2:0              
        TCP connection: 30.255.11.11.25306 - 30.255.2.2.646                    
        Password: not required, none, in use                                  
        State: Oper; Msgs sent/rcvd: 209/208; Downstream; Last TIB rev sent 226
        Up time: 01:42:18; UID: 3; Peer Id 2;                                  
        LDP discovery sources:                                                
          GigabitEthernet2/0; Src IP addr: 30.255.112.2                        
            holdtime: 15000 ms, hello interval: 5000 ms                        
        Addresses bound to peer LDP Ident:                                    
          30.255.112.2    30.11.1.1       30.11.2.1       30.11.3.1            
          30.11.4.1       30.11.5.1       30.11.6.1       30.11.7.1            
          30.11.8.1       30.11.9.1       30.11.10.1      30.255.11.11        
          30.255.114.2    30.255.113.2    30.255.115.2                        
        Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab    
        Capabilities Sent:                                                    
          [Dynamic Announcement (0x0506)]                                      
          [Typed Wildcard (0x050B)]                                            
        Capabilities Received:                                                
          [Dynamic Announcement (0x0506)]                                      
          [Typed Wildcard (0x050B)]                                            
    Peer LDP Ident: 30.255.1.1:0; Local LDP Ident 30.255.2.2:0                
        TCP connection: 30.255.1.1.646 - 30.255.2.2.45754; MD5 on              
        Password: not required, neighbor, in use                              
        State: Oper; Msgs sent/rcvd: 91/91; Downstream; Last TIB rev sent 226  
        Up time: 00:00:13; UID: 4; Peer Id 0;                                  
        LDP discovery sources:                                                
          GigabitEthernet0/0; Src IP addr: 30.255.12.1                        
            holdtime: 15000 ms, hello interval: 5000 ms                        
        Addresses bound to peer LDP Ident:                                    
          30.255.12.1     30.1.1.1        30.1.2.1        30.1.3.1            
          30.1.4.1        30.1.5.1        30.1.6.1        30.1.7.1            
          30.1.8.1        30.1.9.1        30.1.10.1       30.255.1.1          
          30.255.13.1                                                          
        Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab    
        Capabilities Sent:                                                    
          [Dynamic Announcement (0x0506)]                                      
          [Typed Wildcard (0x050B)]                                            
        Capabilities Received:                                                
          [Dynamic Announcement (0x0506)]                                      
          [Typed Wildcard (0x050B)]                                            
R2#

Troubleshooting

LDP Neighbors not forming

  • show mpls ldp neighbor to identify neighbors.
  • show mpls interface: to identify if MPLS is running
  • traceroute
  • Ensure that the LDP ID is reachable; of the local LSR or remote LSR. To easily identify where MPLS is broken, from one PE use the command ping mpls ipv4 to the remote PE device. Status code of B indicates that the packet was sent using unlabeled packets. On affected LSR, use show mpls interfaces.

When troubleshooting MPLS data plane traffic, follow the labels when running the traceroute command. If run from a customer to customer site, the first label is the transport label, the second label is the Layer 3 VPN (L3VPN) . A fast way of identifying where LDP is broken at the PE LSR is to run the command; ping mpls ipv4 <remote-PE-loopback> source <local-loopback> verbose.

R1#ping mpls ipv4 30.255.6.6/32 source 30.255.1.1
Sending 5, 100-byte MPLS Echos to 30.255.6.6/32,
     timeout is 2 seconds, send interval is 0 msec:
      
Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
  'L' - labeled output interface, 'B' - unLabeled output interface,
  'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
  'M' - malformed request, 'm' - unsupported tlvs, 'N' - no label entry,
  'P' - no rx intf label prot, 'p' - premature termination of LSP,
  'R' - transit router, 'I' - unknown upstream index,
  'X' - unknown return code, 'x' - return code 0
      
Type escape sequence to abort.
BBBBB
Success rate is 0 percent (0/5)
R1#

R1#traceroute mpls ipv4 30.255.6.6/32 source 30.255.1.1
Tracing MPLS label Switched Path to 30.255.6.6/32, timeout is 2 seconds
  
Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
  'L' - labeled output interface, 'B' - unLabeled output interface,
  'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
  'M' - malformed request, 'm' - unsupported tlvs, 'N' - no label entry,
  'P' - no rx intf label prot, 'p' - premature termination of LSP,
  'R' - transit router, 'I' - unknown upstream index,
  'X' - unknown return code, 'x' - return code 0
  
Type escape sequence to abort.
  0 30.255.12.1 MRU 1500 [Labels: 2039 Exp: 0]
L 1 30.255.12.2 MRU 1500 [Labels: 4038 Exp: 0] 12 ms
B 2 30.255.24.2 MRU 1504 [No label] 16 ms
. 3 *
B 4 30.255.24.2 MRU 1504 [No label] 36 ms
B 5 30.255.24.2 MRU 1504 [No label] 40 ms
B 6 30.255.24.2 MRU 1504 [No label] 40 ms
B 7 30.255.24.2 MRU 1504 [No label] 40 ms
B 8 30.255.24.2 MRU 1504 [No label] 40 ms
B 9 30.255.24.2 MRU 1504 [No label] 40 ms
B 10 30.255.24.2 MRU 1504 [No label] 44 ms
B 11 30.255.24.2 MRU 1504 [No label] 40 ms
B 12 30.255.24.2 MRU 1504 [No label] 40 ms
B 13 30.255.24.2 MRU 1504 [No label] 40 ms
B 14 30.255.24.2 MRU 1504 [No label] 44 ms
B 15 30.255.24.2 MRU 1504 [No label] 40 ms
B 16 30.255.24.2 MRU 1504 [No label] 40 ms
B 17 30.255.24.2 MRU 1504 [No label] 40 ms
B 18 30.255.24.2 MRU 1504 [No label] 52 ms
B 19 30.255.24.2 MRU 1504 [No label] 36 ms
B 20 30.255.24.2 MRU 1504 [No label] 40 ms
B 21 30.255.24.2 MRU 1504 [No label] 36 ms
B 22 30.255.24.2 MRU 1504 [No label] 40 ms
B 23 30.255.24.2 MRU 1504 [No label] 40 ms
B 24 30.255.24.2 MRU 1504 [No label] 56 ms
B 25 30.255.24.2 MRU 1504 [No label] 36 ms
B 26 30.255.24.2 MRU 1504 [No label] 48 ms
B 27 30.255.24.2 MRU 1504 [No label] 52 ms
B 28 30.255.24.2 MRU 1504 [No label] 36 ms
B 29 30.255.24.2 MRU 1504 [No label] 48 ms
B 30 30.255.24.2 MRU 1504 [No label] 60 ms

The following output displays output of successful connectivity using ping and traceroute and commands.

R1#ping mpls ipv4 30.255.6.6/32 source 30.255.1.1 verbose
Sending 5, 100-byte MPLS Echos to 30.255.6.6/32,
     timeout is 2 seconds, send interval is 0 msec:
          
Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
  'L' - labeled output interface, 'B' - unLabeled output interface,
  'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
  'M' - malformed request, 'm' - unsupported tlvs, 'N' - no label entry,
  'P' - no rx intf label prot, 'p' - premature termination of LSP,
  'R' - transit router, 'I' - unknown upstream index,
  'X' - unknown return code, 'x' - return code 0
          
Type escape sequence to abort.
!    size 100, reply addr 30.255.46.2, return code 3
!    size 100, reply addr 30.255.46.2, return code 3
!    size 100, reply addr 30.255.46.2, return code 3
!    size 100, reply addr 30.255.46.2, return code 3
!    size 100, reply addr 30.255.46.2, return code 3
          
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/43/44 ms
          
R1#traceroute mpls ipv4 30.255.6.6/32 source 30.255.1.1
Tracing MPLS label Switched Path to 30.255.6.6/32, timeout is 2 seconds
          
Codes: '!' - success, 'Q' - request not sent, '.' - timeout,
  'L' - labeled output interface, 'B' - unLabeled output interface,
  'D' - DS Map mismatch, 'F' - no FEC mapping, 'f' - FEC mismatch,
  'M' - malformed request, 'm' - unsupported tlvs, 'N' - no label entry,
  'P' - no rx intf label prot, 'p' - premature termination of LSP,
  'R' - transit router, 'I' - unknown upstream index,
  'X' - unknown return code, 'x' - return code 0
          
Type escape sequence to abort.
  0 30.255.12.1 MRU 1500 [Labels: 2039 Exp: 0]
L 1 30.255.12.2 MRU 1500 [Labels: 4038 Exp: 0] 40 ms
L 2 30.255.24.2 MRU 1504 [Labels: implicit-null Exp: 0] 36 ms
! 3 30.255.46.2 36 ms
R1#      

A code ‘B’ indicates unLabeled output interface. To cause LDP to use a physical interface IP address instead of LDP ID, issue the following command;

R1(config)#interface g0/0
R1(config-if)#mpls ldp discovery transport-address interface

With the above command, the router ID (LDP ID) is the loopback but the TCP session uses the interface IP

No comments: