Guest

Cisco IOS Software Releases 12.2 S

MPLS Label Distribution Protocol (LDP)

Table Of Contents

MPLS Label Distribution Protocol (LDP)

Feature Overview

Benefits

Related Documents

Supported Platforms

Supported Standards, MIBs, and RFCs

Prerequisites

Configuration Tasks

Configuring LDP

Verifying LDP Configuration

Saving Configurations: MPLS/Tag Switching Commands

Configuration Examples

LDP Configuration Overview

Label Bindings, Label Spaces, and LDP Identifiers

LDP Discovery

LDP TCP Connections and Session Establishment

Configuring LDP for Packet Interfaces

Configuring LDP for Label-Controlled ATM Interfaces

Configuring LDP for Targeted Sessions

Transitioning a Network from TDP to LDP

CLI Command Summary

Command Reference

debug mpls atm-ldp api

debug mpls atm-ldp failure

debug mpls atm-ldp routes

debug mpls atm-ldp states

debug mpls ldp advertisements

debug mpls ldp backoff

debug mpls ldp bindings

debug mpls ldp messages

debug mpls ldp peer state-machine

debug mpls ldp prev-label

debug mpls ldp session io

debug mpls ldp session state-machine

debug mpls ldp targeted-neighbors

debug mpls ldp transport connections

debug mpls ldp transport events

mpls ip (global configuration)

mpls ip (interface configuration)

mpls label protocol (global configuration)

mpls label protocol (interface configuration)

mpls ldp address-message

mpls ldp advertise-labels

mpls ldp advertise-labels old-style

mpls ldp atm control-mode

mpls ldp atm vc-merge

mpls ldp backoff

mpls ldp discovery

mpls ldp discovery transport-address

mpls ldp explicit-null

mpls ldp holdtime

mpls ldp loop-detection

mpls ldp maxhops

mpls ldp neighbor

mpls ldp router-id

show mpls atm-ldp bindings

show mpls atm-ldp bindwait

show mpls atm-ldp capability

show mpls atm-ldp summary

show mpls interfaces

show mpls ip binding

show mpls ldp backoff

show mpls ldp bindings

show mpls ldp discovery

show mpls ldp neighbor

show mpls ldp parameters

Glossary


MPLS Label Distribution Protocol (LDP)


Feature History

Release
Modification

12.0(10)ST

This feature was introduced in Cisco IOS Release 12.0(10)ST, incorporating a new set of multiprotocol label switching (MPLS) CLI commands implemented for use with Cisco routers and switches. The CLI commands in this release reflected standard MPLS IETF command syntax and terminology, thus facilitating the orderly transition from a network using the Tag Distribution Protocol (TDP) to one using the Label Distribution Protocol (LDP). With respect to TDP, the MPLS CLI commands associated with this release were of three types: a) new CLI commands altogether for support of new MPLS/LDP functionality; b) functionally equivalent, but syntactically different, MPLS/LDP commands; and c) functionally and syntactically equivalent MPLS/LDP commands.

12.0(14)ST

This feature was integrated into Cisco IOS Release 12.0(14)ST. This release introduced several new MPLS CLI commands, provided support for MPLS VPNs by means of a new vrf vpn-name parameter in certain existing commands, and modified other commands to ensure consistent interpretation of associated prefix-access-list arguments by Cisco IOS.

12.1(2)T

This feature was integrated into Cisco IOS 12.2(2)T. Also, the debug mpls atm-ldp api, debug mpls atm-ldp routes, and debug mpls atm-ldp states commands were modified.

12.1(8a)E

This feature was integrated into Cisco IOS Release 12.1(8a)E.

12.2(2)T

This feature was integrated into Cisco IOS Release 12.2(2)T.

12.2(4)T

This feature was integrated into Cisco IOS Release 12.2(4)T. Also, support was added for Cisco MGX 8850 and MGX 8950 switches equipped with a Cisco MGX RPM-PR card, and the VPI range in the show mpls atm-ldp bindings and show mpls ip binding commands was changed to 4095.

12.0(21)ST

This feature was integrated into Cisco IOS Release 12.0(21)ST. This release introduced the implicit-withdraw keyword for the mpls ldp neighbor command. Also, support was added for the Cisco 10720 Internet router.

12.2(11)S

This feature was integrated into Cisco IOS Release 12.2(11)S.


This document describes the use of the MPLS Label Distribution Protocol (LDP), which enables peer label switch routers (LSRs) in an MPLS network to exchange label binding information for supporting hop-by-hop forwarding along normally routed paths. The document includes the following sections:

Feature Overview

Supported Platforms

Supported Standards, MIBs, and RFCs

Prerequisites

Configuration Tasks

Configuring LDP

Verifying LDP Configuration

Saving Configurations: MPLS/Tag Switching Commands

Configuration Examples

Transitioning a Network from TDP to LDP

CLI Command Summary

Command Reference

Glossary

Feature Overview

Cisco's MPLS label distribution protocol (LDP), as standardized by the Internet Engineering Task Force (IETF) and as enabled by Cisco IOS software, allows the construction of highly scalable and flexible IP Virtual Private Networks (VPNs) that support multiple levels of services.

LDP provides a standard methodology for hop-by-hop, or dynamic label, distribution in an MPLS network by assigning labels to routes that have been chosen by the underlying Interior Gateway Protocol (IGP) routing protocols. The resulting labeled paths, called label switch paths or LSPs, forward label traffic across an MPLS backbone to particular destinations. These capabilities enable service providers to implement Cisco's MPLS-based IP VPNs and IP+ATM services across multivendor MPLS networks.

LDP provides the means for label switching routers (LSRs) to request, distribute, and release label prefix binding information to peer routers in a network. LDP enables LSRs to discover potential peers and to establish LDP sessions with those peers for the purpose of exchanging label binding information.

From an historical and functional standpoint, LDP is a superset of Cisco's prestandard Tag Distribution Protocol (TDP), which also supports MPLS forwarding along normally routed paths. For those features that LDP and TDP share in common, the pattern of protocol exchanges between network routing platforms is identical. The differences between LDP and TDP for those features supported by both protocols are largely embedded in their respective implementation details, such as the encoding of protocol messages, for example.

This release of LDP, which supports both the LDP and TDP protocols, provides the means for transitioning an existing network from a TDP environment to an LDP environment. Thus, you can run LDP and TDP simultaneously on any router platform. The routing protocol that you select can be configured on a per-interface basis for directly connected neighbors and on a per-session basis for nondirectly connected (targeted) neighbors. In addition, a label switch path (LSP) across an MPLS network can be supported by LDP on some hops and by TDP on other hops.

Benefits

LDP is an IETF standards tracking protocol. The primary benefit of LDP over the prestandard TDP protocol is that the former increases the number of platforms on which MPLS interoperability can be achieved.

Related Documents

For additional information about MPLS functionality running on routers or switches in a network, consult the following documentation:

Multiprotocol Label Switching on Cisco Routers—This feature, implemented on Cisco routers and ATM switches, combines the performance of Layer 2 (data link layer) switching with the scalability of Layer 3 (network layer) routing. This combination enables service providers to handle the explosive growth now occurring in network utilization and to differentiate services without having to alter the existing network infrastructure. MPLS supports the dynamic creation of different routes between source and destination nodes, thus enabling IP services to be delivered efficiently by means of Internet backbones.

MPLS Class of Service—This feature enables network administrators to provide a range of differentiated services across an MPLS network. Such services are implemented by means of an appropriate setting of the IP precedence bit in each transmitted IP packet.

MPLS Traffic Engineering and Enhancements—This feature enables an MPLS backbone to replicate and expand upon the traffic engineering capabilities of Layer 2 ATM and Frame Relay networks. In service provider and Internet service provider (ISP) backbones, traffic engineering provides an effective means of managing networks. Such backbones must support high transmission capacities and be resilient to link or node failures.

MPLS Virtual Private Networks (VPNs)—This feature enables users to deploy and administer IPv4 Layer 3, value-added services and business applications across a public network infrastructure. By deploying business applications on a broad scale over wide area networks (WANs), MPLS VPN users can reduce costs, increase revenue, and develop new business opportunities.

Supported Platforms

LDP is supported on the following platforms:

Cisco 7200 series routers

Cisco 7400 series routers

Cisco 7500 series routers

Determining Platform Support Through Cisco Feature Navigator

Cisco IOS software is packaged in feature sets that support specific platforms. To get updated information regarding platform support for this feature, access Cisco Feature Navigator. Cisco Feature Navigator dynamically updates the list of supported platforms as new platform support is added for the feature.

Cisco Feature Navigator is a web-based tool that enables you to determine which Cisco IOS software images support a specific set of features and which features are supported in a specific Cisco IOS image. You can search by feature or release. Under the release section, you can compare releases side by side to display both the features unique to each software release and the features in common.

To access Cisco Feature Navigator, you must have an account on Cisco.com. If you have forgotten or lost your account information, send a blank e-mail to cco-locksmith@cisco.com. An automatic check will verify that your e-mail address is registered with Cisco.com. If the check is successful, account details with a new random password will be e-mailed to you. Qualified users can establish an account on Cisco.com by following the directions at http://www.cisco.com/register.

Cisco Feature Navigator is updated regularly when major Cisco IOS software releases and technology releases occur. For the most current information, go to the Cisco Feature Navigator home page at the following URL:

http://www.cisco.com/go/fn

Availability of Cisco IOS Software Images

Platform support for particular Cisco IOS software releases is dependent on the availability of the software images for those platforms. Software images for some platforms may be deferred, delayed, or changed without prior notice. For updated information about platform support and availability of software images for each Cisco IOS software release, refer to the online release notes or, if supported, Cisco Feature Navigator.

Supported Standards, MIBs, and RFCs

This feature supports the IETF draft document entitled LDP Specification, draft-ietf-mpls-ldp-08.txt. The document can be accessed at the following URL:

http://www2.ietf.org/internet-drafts/draft-ietf-mpls-ldp-08.txt

Prerequisites

Label switching on a router requires that Cisco Express Forwarding (CEF) be enabled on that router. Refer to the chapters on CEF in the following documents for configuration information:

Cisco IOS Switching Services Release 12.2

Cisco IOS Command Reference Release 12.2

Configuration Tasks

In most situations, the use of LDP is associated with a router or a switch interface. To configure LDP to operate in an MPLS network with such an interface, you must:

1. Configure an MPLS application, such as hop-by-hop forwarding (sometimes called dynamic tag switching or dynamic MPLS), for the desired interfaces.

2. Configure the use of LDP for either of the following:

Label distribution for all interfaces

Label distribution for a specific interface

Configuring LDP

The table below illustrates the configuration tasks listed in the preceding section.

 
Command
Purpose

Step 1 

Router# configure terminal
Router(config)# ip cef [distributed]
Router(config)# interface interface
Router(config-if)# mpls ip

Configure MPLS hop-by-hop forwarding for an interface.

Step 2 

Router# configure terminal
Router(config)# mpls label protocol ldp

Configure the use of LDP on all interfaces.

The global mpls label protocol ldp command sets the default label distribution protocol for all interfaces to be LDP.

Step 3 

Router# configure terminal
Router(config)# interface interface
Router(config)# mpls label protocol ldp

Configure the use of LDP for a specific interface.

The interface mpls label protocol ldp command sets the label distribution protocol for the specified interface to be LDP, overriding any default set by the global mpls label protocol command in Step 2.


Note MPLS requires CEF.



Note The mpls ip command is equivalent to the tag-switching ip command. For more information about the mpls ip command, see Table 3.



Note Targeted sessions are usually not configured explicitly. For example, configuring mpls ip for a traffic engineering tunnel interface initiates establishment of a targeted session with the tunnel tail end.


Verifying LDP Configuration

To verify LDP configuration for an interface (Step 1 through Step 3 in the table above), issue the following commands:

show mpls interfaces—To verify that the interfaces in question have been configured to use LDP

show mpls ldp discovery—To verify that the interface is up and sending LDP Discovery Hello messages (as opposed to TDP Hello messages).

In addition, you can issue the show run command to verify the acceptance of the configuration commands.


Note If you issue the show run command as part of the verification process, be aware that commands you entered by typing mpls . . . may be shown as tag-switching . . . (see the next section entitled "Saving Configurations: MPLS/Tag Switching Commands."


Saving Configurations: MPLS/Tag Switching Commands

A number of configuration commands with both MPLS and tag switching forms will be supported during the transition from a tag switching environment to a standards-based MPLS environment. For example, the mpls ip command is equivalent to the tag-switching ip command.

Refer to Table 2 and Table 3 in the "CLI Command Summary" section for a complete list of commands related to LDP that have both MPLS and tag switching forms.

For commands that support both MPLS and tag switching forms, the tag switching form will be written to saved configurations during the transition period from TDP to LDP. Suppose, for example, that you configured an LC-ATM interface on a router by means of the following commands:

Router# configure terminal
Router(config)# interface ATM3/0.1 mpls
Router(config-if)# ip unnumbered Loopback0
router(config-if)# mpls ip
Router(config-if)# mpls label protocol ldp

In this example, the interface ATM3/0.1 mpls command and the mpls ip command have tag switching forms. After you enter these commands and save this configuration or display the running configuration by means of the show running command, the commands thus saved or displayed would appear as shown below:

interface ATM3/0.1 tag-switching
ip unnumbered Loopback0
tag-switching ip
mpls label protocol ldp

Writing the tag switching form of commands with both MPLS and tag switching forms to the saved configuration makes it possible for you to use a router software image that supports LDP to:

Modify and write interface configurations

At a later time, use interface configurations created by the LDP image with an earlier software version that does not support LDP

For the above example, older software that supports TDP, but not LDP, would be able to interpret all of the interface configuration commands, except for the mpls label protocol command. The older software would generate a warning message about the unrecognized command; nevertheless, the image would bring up the interface configured to run TDP.

Configuration Examples

This section provides the following configuration information:

LDP Configuration Overview

Configuring LDP for Packet Interfaces

Configuring LDP for Label-Controlled ATM Interfaces

Configuring LDP for Targeted Sessions

LDP Configuration Overview

The next three sections briefly describe aspects of MPLS LDP considered helpful to better understanding the configuration examples that follow later for packet interfaces, ATM interfaces, and targeted sessions.

Label Bindings, Label Spaces, and LDP Identifiers

An LDP label binding is an association between a destination prefix and a label. The label used in a label binding is allocated from a set of possible labels called a label space.

LDP supports two types of label spaces:

Interface-specific—An interface-specific label space uses interface resources for labels. For example, LC-ATM interfaces use VPIs/VCIs for labels. Depending on its configuration, an LDP platform may support zero, one, or more interface-specific label spaces.

Platform-wide—An LDP platform supports a single platform-wide label space for use by interfaces that can share the same labels. For Cisco platforms, all interface types except LC-ATM use the platform-wide label space.

LDP uses a 6-byte quantity called an LDP Identifier (or LDP ID) to name label spaces. The LDP convention is: a) the first four bytes of the LDP ID identify the LSR that owns the label space; and b) the last two bytes identify the label space within the LSR. For the platform-wide label space, the last two bytes of the LDP ID are always both 0.

The Cisco convention is that the first four bytes of an LDP ID is a platform IP address called the LDP router ID. The last two bytes are called the local label space ID. The display representation for an LDP ID takes the following form:

<LDP router ID> : <local label space ID>

The following are examples of this form:

133.0.0.33:0, 167.3.0.54:3

The LDP router ID is determined as described below. For purposes of this discussion, "S" represents the set of interfaces that are up and have IP addresses, while "I" represents the interface specified by the mpls ldp router-id command, if any.

a. If interface I is in S, then the IP address of interface I is the LDP router ID.

b. Otherwise, if there is a loopback interface in S, the largest IP address of the loopback addresses in S is the LDP router ID.

c. Otherwise, the largest IP address of the interfaces in S is the LDP router ID.

LDP Discovery

LDP discovery is a mechanism that reduces the amount of per-peer configuration required for LDP by enabling an LSR to discover potential LDP peers.

An LSR engages in discovery by periodically transmitting LDP Hello messages to signal its desire to advertise label bindings. The LSR sends the LDP Hello messages as UDP packets to the well known LDP port (646).

LDP defines two types of discovery which differ slightly from each other:

Basic discovery—This type is used to discover directly connected LDP LSRs. For basic discovery, an LSR sends Hellos messages to the "all routers on this subnet" multicast address on interfaces for which LDP has been configured.

Extended discovery—This type is used between nondirectly connected LDP LSRs. For extended discovery, an LSR sends targeted Hello messages to a specific IP address.

The Hello messages carry the LDP ID of the label space that the sending LSR wants to advertise, as well as other information.

When an LSR receives an LDP Hello message from another LSR, it considers that LSR and the specified label space to be "discovered." After two LSRs discover each other in this manner, they attempt to establish an LDP session (as described in the next section).

LDP TCP Connections and Session Establishment

LDP label distribution between two LSRs requires establishment of an LDP session. LSRs that have discovered each other establish an LDP session by:

Opening a TCP connection to be used to distribute label bindings.

For Cisco platforms, an LSR will use either its LDP router ID or the IP source address of its discovery Hello messages as the IP address for its endpoint of the TCP connection. The address it intends to use is specified to its LSR peer in the Hello messages it sends.

To establish the TCP connection, each LSR must have IP connectivity (that is, a route) to the IP address for the other LSR's endpoint for the connection.

Negotiating parameters for the LDP session.

Such parameters include the label distribution method (Downstream Unsolicited or Downstream on Demand) and other parameters.

After successfully opening the session TCP connection and agreeing to parameters for the session, LDP label distribution begins.

Configuring LDP for Packet Interfaces

Figure 1 shows a sample network for configuring the use of LDP for packet interfaces.


Note ATM point-to-point subinterfaces are considered "packet" interfaces when configuring LDP. ATM MPLS subinterfaces (and tag switching subinterfaces) are considered label-controlled ATM (LC-ATM) interfaces when configuring LDP (see the next section).


The three router configurations that follow accomplish the following:

Enable MPLS hop-by-hop forwarding for the POS links between Router 1 and Router 2 and between Router 1 and Router 3.

Configure the use of LDP for label distribution between Router 1 and Router 2.

Configure the use of TDP (the default) for label distribution between Router 1 and Router 3.

Configure a loopback interface and IP address for each LSR that can be used as the LDP router ID component of the LSR's LDP ID.

Figure 1 Configuration of LDP for Packet Interfaces


Note The configuration examples below show only the commands related to configuring LDP for Router 1, Router 2, and Router 3 in the sample network shown in Figure 1.


Router 1 Configuration

ip cef distributed                        !Assumes R1 supports distributed CEF 

interface Loopback0                       !Loopback interface for LDP ID.
ip address 131.25.0.11 255.255.255.255

interface POS3/0/0 
ip address 34.0.0.44 255.0.0.0 
mpls ip                                   !Enable hop-by-hop MPLS forwarding 
mpls label protocol ldp                   !Use LDP for this interface 

interface POS3/0/1 
ip address 45.0.0.44 255.0.0.0 
mpls ip                                   !Enable hop-by-hop MPLS forwarding 
                                          !Uses TDP (the default) 

Router 2 Configuration


ip cef distributed                        !Assumes R2 supports distributed CEF 

interface Loopback0                       !Loopback interface for LDP ID.
ip address 131.25.0.22 255.255.255.255

interface POS2/0/0 
ip address 34.0.0.33 255.0.0.0 
mpls ip                                   !Enable hop-by-hop MPLS forwarding 
mpls label protocol ldp                   !Use LDP for this interface 

Router 3 Configuration


ip cef                                    !Assumes R3 does not support 
                                          !distributed CEF 

interface Loopback0                       !Loopback interface for LDP ID.
ip address 131.25.0.33 255.255.255.255

interface POS1/0 
ip address 45.0.0.55 255.0.0.0
mpls ip                                   !Enable hop-by-hop MPLS forwarding 
                                          !Uses TDP (the default) 

The LDP configuration for Router 1 uses the interface mpls label protocol ldp command because some of its interfaces use LDP and some use TDP. Another way to configure Router 1 is to use the global mpls label protocol ldp command to configure LDP as the default protocol for interfaces and use the interface mpls label protocol tdp command to configure TDP for the POS3/0/1 link to Router 3. This alternative way to configure Router 1 is shown below:

Router 1 Configuration


ip cef distributed                        !Assumes R1 supports distributed CEF 

mpls label protocol ldp                   !Use LDP for the default protocol

interface Loopback0                       !Loopback interface for LDP ID.
ip address 131.25.0.11 255.255.255.255

interface POS3/0/0 
ip address 34.0.0.44 255.0.0.0 
mpls ip                                   !Enable hop-by-hop MPLS forwarding
                                          !Use LDP (configured i/f default)

interface POS3/0/1 
ip address 45.0.0.44 255.0.0.0 
mpls ip                                   !Enable hop-by-hop MPLS forwarding 
mpls label protocol tdp                   !Use TDP for this interface 

The configuration of Router 2 also uses the interface mpls label protocol ldp command. If all of its interfaces are to use LDP, then the global mpls label protocol ldp could be used without any interface mpls label protocol commands.


Note Use of the mpls ip command on an interface triggers the transmission of discovery Hello messages for the interface.



Note When two platforms are directly connected by multiple packet links, the same label distribution protocol (LDP or TDP) must be configured for all of the packet interfaces connecting the platforms.



Note If a loopback IP address has been configured, it will be selected as the router ID component of the local LDP ID unless the loopback interface has been explicitly shut down or the mpls ldp router-id command has been used to specify that some other interface should be preferred when determining the LDP router ID. Configuring a loopback interface and IP address on each router is not a requirement for LDP; however, doing so helps ensure a stable LDP ID for the router because the state of loopback addresses does not change, except in response to explicit configuration action.



Note If you use a loopback interface, make sure that the IP address for the loopback interface is configured with a /32 network mask. In addition, make sure that the routing protocol in use is configured to advertise the corresponding /32 network.


Configuring LDP for Label-Controlled ATM Interfaces

The commands required to configure LDP for a label controlled ATM (LC-ATM) interface depend upon the type of interface in use.

There are three different types of LC-ATM interfaces:

Interface type 1—LC-ATM interfaces on a router.

Interface type 2—LC-ATM interfaces on an ATM switch that runs routing and MPLS control plane software. The Cisco 8540 is an example of such an ATM switch.

Interface type 3—LC-ATM interfaces on an ATM switch whose MPLS operation is controlled by a label switch controller (LSC). The BPX and MGX are examples of such ATM switches.

The following example illustrates the configuration of LDP for LC-ATM interfaces of types 1 and 2.

The example given here is based on the network topology shown in Figure 2, which incorporates a router and an ATM switch connected by means of an ATM link.

Configuring LDP for a router ATM interface is a two-step process:

a. Creating an MPLS subinterface for the ATM interface

b. Configuring LDP for the MPLS subinterface

Configuring LDP for an ATM interface on an ATM switch that is running routing and MPLS control plane software (LC-ATM interface type 2) is similar to configuring LDP for a packet interface.

Figure 2 Configuration of LDP for LC-ATM Interfaces

In the following sample configurations, the use of LDP is configured for the ATM link between Router 1 and Switch 1 (see Figure 2).

Router 1 Configuration:


interface POS3/0/1 
ip address 45.0.0.44 255.0.0.0 
mpls ip                                   !Enable hop-by-hop MPLS forwarding 
mpls label protocol tdp                   !Use TDP for this interface 


ip cef distributed                        !Assumes R1 supports distributed CEF 

interface Loopback0
 ip address 133.0.0.33 255.255.255.255

interface ATM3/0.1 mpls                   !Create the MPLS sub-interface
 ip unnumbered Loopback0                  !Use IP address of loopback
                                          !interface 0 for this interface
mpls ip                                   !Enable hop-by-hop MPLS forwarding
mpls label protocol ldp                   !Use LDP for this interface

Switch 1 Configuration:


interface Loopback0
 ip address 121.0.0.21 255.255.255.255 

interface ATM1/1/1
 ip unnumbered Loopback0                  !Use IP address of loopback
                                          !interface 0 for this interface
mpls ip                                   !Enable hop-by-hop MPLS forwarding
mpls label protocol ldp                   !Use LDP for this interface

Note The use of unnumbered interfaces is not required for LDP, but it is recommended.


Configuring LDP for Targeted Sessions

Some situations require a label distribution session between platforms that are not directly connected. For example, when you issue the mpls ip command on an MPLS traffic engineering tunnel interface, a label distribution session must be established between the tunnel head end and the tail end platforms. Such a session is called a targeted session.

Session establishment for targeted sessions is supported by targeted Hello messages sent between the platforms. Normally the transmission of targeted Hello messages is triggered by some configuration action for the application that requires the targeted session. For example, using the mpls ip command on an MPLS traffic engineering tunnel initiates the transmission of targeted Hello messages from the tunnel head end platform to the tunnel tail end platform.

Unlike LDP sessions for directly connected peers, targeted sessions are asymmetrical. One peer initiates the session by transmitting targeted Hello messages that carry a "send targeted Hello messages in response" request. This request causes the target peer to respond with targeted Hello messages if its configuration permits it to do so.

The exchange of targeted Hello messages between two nondirectly connected neighbors, N1 and N2, may occur in the following ways:

N1 may initiate the transmission of targeted Hello messages carrying a response request to N2, and N2 may send targeted Hello messages in response if its configuration permits. In this situation, N1 is considered to be active and N2 is considered to be passive.

N1 and N2 may both be configured to initiate the transmission of targeted Hello messages to each other. In this situation, both are considered to be active. Both, one, or neither N1 nor N2 can also be passive, depending on whether they have been configured to respond to requests for targeted Hello messages from each other.

The default behavior of an LSR is to ignore requests from other LSRs to send targeted Hello messages. You can configure an LSR to respond to requests for targeted Hello messages by issuing the mpls ldp discovery targeted-hellos accept command.

The protocol used for a targeted session is controlled by the active LSR in the following sense: a passive LSR that is permitted to respond to requests from an active LSR will do so using the protocol of the received targeted Hello messages.

For applications in which targeted sessions are associated with interfaces, you can use the mpls label protocol global and interface configuration commands to specify the protocol for a given interface. For example, the following commands cause an LDP targeted session to be established with the tunnel tail end route:

interface Tunnel1
tunnel destination 133.0.0.33
mpls ip
mpls label protocol ldp

Tunnel1 is an MPLS traffic engineering tunnel interface.

The output of the show mpls ldp discovery command provides the following information for targeted Hello messages:

The protocol being used for each targeted LSR.

The characteristics of the discovery activity with the targeted LSR. This includes whether the local LSR is active (an initiator of targeted Hello messages that carry a response request), passive (a responder of requests for targeted Hello messages from the other LSR), or both.

Consider the following output from the show mpls ldp discovery command:

Router# show mpls ldp discovery
Local LDP Identifier:
	118.1.1.1:0
Discovery Sources:
Interfaces:
POS2/0 (ldp): xmit/recv
LDP Id: 155.0.0.55:0
Tunnel1 (ldp): Targeted -> 133.0.0.33
Targeted Hellos:
118.1.1.1 -> 133.0.0.33 (ldp): active, xmit/recv
LDP Id: 133.0.0.33:0
118.1.1.1 -> 168.7.0.16 (tdp): passive, xmit/recv
TDP Id: 168.7.0.16:0
Router#

This command output indicates that:

The local LSR (118.1.1.1) is sending LDP link Hello messages on interface POS2/0 and has discovered neighbor 155.0.0.55.

The local LSR is sending LDP targeted Hello messages associated with interface Tunnel1 to target 133.0.0.33. The LSR uses LDP for the target because the LSR was configured to do so by means of the mpls label protocol ldp command.

The local LSR is active for targeted discovery activity with 133.0.0.33; this means that the targeted Hello messages it sends to 133.0.0.33 carry a response request. This LSR is active due to the configuration of an application (mpls ip on Tunnel1, for example) that requires an LDP session with the nondirectly connected LSR 133.0.0.33.

The local LSR is not passive for the discovery activity with 133.0.0.33 because: a) the targeted Hello messages it receives from 133.0.0.33 do not carry a response request, or b) the Local LSR has not been configured to respond to such requests.

The local LSR is sending TDP directed Hello messages to the target LSR 168.7.0.16. This LSR uses TDP because the Hell messages received from the target LSR 168.7.0.16 were TDP directed Hello messages.

The local LSR is passive in discovery activity with LSR 168.7.0.16. This means that the directed Hello messages it receives from LSR 168.7.0.16 carry a response request and that the local LSR has been configured by means of the mpls ldp discovery targeted-hello accept command to respond to such requests from LSR 168.7.0.16.

The local LSR is not active in discovery activity with LSR 168.7.0.16 because no application that requires an LDP session with LSR 168.7.0.16 has been configured on the local LSR.

The following examples illustrate the configuration of platforms for targeted sessions using the sample network shown in Figure 3. Note that Routers 1, 4, 5, and 6 in this sample network are not directly connected to each other.

Figure 3 Sample Network for Configuring LDP for Targeted Sessions

The configuration examples presented below accomplish the following:

a. Use of LDP for targeted sessions between Router 1 and Router 4. The configurations below require that Router 1 and Router 4 both be active.

b. Use of LDP for targeted sessions between Router 1 and Router 6. The configurations below require that Router 1 be active and allow Router 6 to be passive.

c. Use of TDP (the default) for targeted sessions between Router 1 and platforms other than Routers 4 and 6 (for example, between Router 1 and Router 5). The configuration for Router 5 requires it to be active in such sessions.

These examples assume that the active ends of the targeted sessions are associated with tunnel interfaces, such as MPLS traffic engineering tunnels. They show only the commands related to configuring the use of LDP targeted sessions. The examples do not show configuration of the applications that initiate the targeted sessions.

Router 1 Configuration


ip cef distributed                        !Assumes Router1 supports distributed CEF 

interface Loopback0                       !Loopback interface for LDP ID.
ip address 131.25.0.11 255.255.255.255	

interface Tunnel14                        !Tunnel to Router 4 requires label dist 
tunnel destination 131.11.0.4             !Tunnel endpoint is Router 4
mpls label protocol ldp                   !Use LDP for session with Router 4
...                                       !Other configuration for Tunnel14

interface Tunnel15                        !Tunnel to Router 5 requires label dist 
tunnel destination 131.11.0.5             !Tunnel endpoint is Router 5
...                                       !Other configuration for Tunnel15

interface Tunnel16                        !Tunnel to Router 6 requires label dist 
tunnel destination 131.11.0.5             !Tunnel endpoint is Router 6
mpls label protocol ldp                   !Use LDP for session with Router 6
...                                       !Other configuration for Tunnel16

For Router 1, the default label protocol for interfaces is TDP because there is no global mpls label protocol ldp command. This requires that the configuration for tunnel interfaces Tunnel14 and Tunnel16 include mpls label protocol ldp commands to specify use of LDP for targeted sessions associated with these interfaces. Since TDP is desired for the targeted session with Router 5, there is no need to include an mpls label protocol tdp command as part of the Tunnel15 configuration because the default protocol for interfaces on Router 1 is TDP.

Router 4 Configuration


ip cef distributed                        !Assumes Router 4 supports distributed CEF 

mpls label protocol ldp                   !Use LDP as default for all interfaces

interface Loopback0                       !Loopback interface for LDP ID.
ip address 131.25.0.44 255.255.255.255	

interface Tunnel41                        !Tunnel to Router 1 requires label dist 
tunnel destination 131.11.0.1             !Tunnel endpoint is Router 1
...                                       !Other configuration for Tunnel41

For Router 4, the global mpls label protocol ldp command makes it unnecessary to explicitly specify LDP as part of the configuration for the Tunnel41 targeted session with Router 1.

Router 5 Configuration


ip cef	                                  !Assumes Router 5 doesn't support dCEF

interface Loopback0                       !Loopback interface for LDP ID.
ip address 131.25.0.55 255.255.255.255

interface Tunnel51                        !Tunnel to Router 1 requires label dist 
tunnel destination 131.11.0.1             !Tunnel endpoint is Router 1
...                                       !Other configuration for Tunnel51

Router 5 must use TDP for all targeted sessions it participates in as an active router because its configuration contains neither the global mpls label protocol ldp command nor the interface mpls label protocol ldp command.

Router 6 Configuration


ip cef distributed	                  !Assumes Router 6 supports dCEF 

interface Loopback0	                  !Loopback interface for LDP ID.
ip address 131.25.0.66 255.255.255.255	

mpls ldp discovery targeted-hellos accept from LDP_SOURCES
                                          !Respond to requests for targeted hellos
                                          !from sources permitted by acl LDP_SOURCES

ip access-list standard LDP_SOURCES       !Define acl for targeted hello sources.
permit 131.11.0.1                         !Accept targeted hello request from Router 1.
deny any                                  !Deny requests from other sources.

By default, a router cannot be a passive neighbor in targeted sessions. Therefore, Router 1, Router 4, and Router 5 can only be active neighbors in any targeted sessions they are part of because their configuration does not permit them to be passive. The mpls ldp discovery targeted-hello accept command permits Router 6 to be a passive target in targeted sessions with Router 1. Router 6 can also be an active neighbor in targeted sessions, although the example does not include such a configuration.

Transitioning a Network from TDP to LDP

The software for this release facilitates the orderly transition of a network that uses TDP to one that uses LDP. Key software features supporting this transition to LDP include the following:

LDP and TDP are both supported and can operate simultaneously on a given platform.

The protocol to be used for directly connected peers is configurable on a per-interface basis.

The protocol to be used for nondirectly connected peers is configurable on a per-session basis.

A label-switched path (LSP) across an MPLS network can be signaled by LDP on some hops and by TDP on other hops.

These software features enable a staged transition from TDP to LDP on a link-by-link or a targeted session-by-session basis.

In considering the steps involved in configuring the simple network shown in Figure 4 to use LDP, assume that the following conditions apply:

TDP is currently used for label distribution throughout the network.

Each link has been enabled by means of the tag-switching ip command.

Tag/label distribution sessions are required between the following nondirectly connected platforms:

Router 1 (active via Tunnel15) and Router 5 (active via Tunnel51)

Router 1 (active via Tunnel16) and Router 6 (passive)

Figure 4 Sample Network for Transitioning from TDP to LDP

To accomplish the transition from TDP to LDP for the network topology shown in Figure 4, perform the following steps:


Step 1 Convert the label distribution for Link 1 from TDP to LDP by invoking the mpls label protocol ldp command on Router 1 and Router 2 for their interfaces to Link 1.

Verify proper MPLS operation.

Step 2 Convert the label distribution between Router 1 and Router 3 for the Ethernet link from TDP to LDP by invoking the mpls label protocol both command on Router 1 and Router 3 for their interfaces to Link 3.

The mpls label protocol both command enables Router 1 and Router 3 to use LDP or TDP for label distribution sessions with neighbors directly connected to Link 3 (with a preference for LDP). The resulting configuration establishes:

An LDP session between Router 1 and Router 3

A TDP session between Router 1 and Router 4

A TDP session between Router 3 and Router 4

Verify proper MPLS operation.

Step 3 Convert the label distribution for Link 2 from TDP to LDP by invoking the mpls label protocol ldp command on Router 2 and Router 3 for their interfaces to Link 2.

Verify proper MPLS operation.

Step 4 Convert the label distribution for Link 4 and Link 5 from TDP to LDP by invoking the mpls label protocol ldp command on Router 3, Router 4, and Router 5 for the interfaces to Link 4 and Link 5.

Verify proper MPLS operation. You can do so in two separate steps, if desired—one for Link 4 and one for Link 5.

Step 5 Convert the label distribution for Link 6 and Link 7 from TDP to LDP by invoking the mpls label protocol ldp command on Router 2, Router 5, and Router 6 for the interfaces to Link 6 and Link 7.

Verify proper MPLS operation. You can do so in two separate steps, if desired—one for Link 6 and one for Link 7.

Step 6 Complete the conversion for Link 3 started in Step 2 by invoking the mpls label protocol ldp command on Router 4 for Link 3, and also on Router 1 and Router 3 for Link 3.

Verify proper MPLS operation.


Note The mpls label protocol both command in Step 2 enables both LDP and TDP discovery to occur for Router 1 and Router 3 on Link 3. Since TDP is no longer required by any of the routers connected to Link 3, replacing that command with the mpls label protocol ldp command disables TDP discovery on Router 1 and Router 3, leaving only LDP discovery enabled on Router 1, Router 3, and Router 4.


Step 7 Convert the targeted label distribution between Router 1 and Router 5 from TDP to LDP.

To do so, add the mpls label protocol ldp command to the configuration of Tunnel15 on Router 1. This assumes that Router 5, which is passive for targeted sessions between Router 1 and Router 5, has previously been configured to accept targeted Hello messages from Router 1 via the mpls ldp discovery targeted-hello accept command.

Verify proper MPLS operation.

Step 8 Convert the targeted label distribution between Router 1 and Router 6 from TDP to LDP by adding the mpls label protocol ldp command to the configurations of Tunnel16 on Router 1 and Tunnel61 Router 6.

Verify proper MPLS operation.

This step completes the transition of the network from TDP to LDP.

At this point, you could make the following additional changes to "clean up" each of the configurations:

a. Add the global mpls label protocol ldp command to each configuration.

b. Remove all interface mpls label protocol ldp commands from each configuration.


CLI Command Summary

The CLI commands described in this document fall into three categories:

CLI commands introduced initially in Cisco IOS 12.0(10)ST and 12.0(14)ST) for new LDP functionality (see Table 1)—These commands support new MPLS LDP functionality and are not derived from any existing TDP commands.

Functionally equivalent, but syntactically different, LDP commands (see Table 2)—These commands, although derived from existing TDP commands, have a command syntax that differs in some respects from their corresponding TDP counterparts. For example, some commands in this category incorporate new keywords or parameters that are specific to MPLS LDP functionality.

Functionally and syntactically equivalent LDP commands (see Table 3)—These commands were not only derived from existing TDP commands, but they also preserve the basic syntax of their TDP counterparts in implementing new MPLS LDP functionality.

Table 1 New CLI Commands Being Introduced in this Release for LDP Functionality 

Command
Description

mpls label protocol (global configuration)

Specifies the default label distribution protocol for the platform.

mpls label protocol (interface configuration)

Specifies the label distribution protocol to be used on a given interface.

mpls ldp address-message

Specifies advertisement of platform addresses to a label-controlled ATM (LC-ATM) LDP peer.

mpls ldp advertise-labels old-style

Causes the interpretation of the for prefix-access-list for mpls ldp advertise-labels commands to be interpreted according to the method used in earlier software versions.

mpls ldp backoff

Configures parameters for the LDP backoff mechanism.

mpls ldp discovery transport-address

Specifies the transport address advertised in LDP Discovery Hello messages sent on an interface.

mpls ldp explicit-null

Causes a router to advertise an Explicit Null label in situations where it would normally advertise an Implicit Null label.

mpls ldp loop-detection

Enables the LDP optional loop detection mechanism.

mpls ldp neighbor

Configures a password key for use with the TCP Message Digest 5 (MD5) Signature Option for the session TCP connection with the specified neighbor.

mpls ldp router-id

Specifies a preferred interface for determining the LDP router ID.

show mpls atm-ldp bindings

Configures the use of LDP for "targeted" sessions.

show mpls ip binding

Displays information about label bindings learned by LDP.

show mpls ldp backoff

Displays information about the configured session setup backoff parameters and any potential LDP peers with which session setup attempts are being throttled.


Table 2 LDP Commands with Syntactic Structure Different from Corresponding TDP Commands 

LDP Command
Corresponding TDP Command
Description

mpls ldp advertise-labels

tag-switching advertise-tags

Controls the distribution of locally-assigned (incoming) labels by means of LDP.

mpls ldp atm control-mode

tag-switching atm allocation-mode

Controls the mode used for handling label binding requests on LC-ATM interfaces.

mpls ldp atm vc-merge

tag-switching atm vc-merge

Controls whether the vc-merge (multipoint-to-point) capability is supported for unicast label VCs.

mpls ldp maxhops

tag-switching atm maxhops

Limits the number of hops permitted in an LSP established by the Downstream on Demand method of label distribution.

debug mpls ldp advertisements

debug tag-switching tdp advertisements

Incorporates two new keywords/parameters; displays information about the advertisement of labels and interface addresses to LDP peers.

debug mpls ldp bindings

debug tag-switching tdp bindings

Displays information about addresses and label bindings learned from LDP peers by means of LDP Downstream Unsolicited label distribution. Command incorporates two new keywords/parameters.

debug mpls ldp messages

debug tag-switching tdp pies sent

Displays specific information (such as message type, source, and destination) regarding LDP messages sent to and received from LDP peers. Command incorporates several new keywords/parameters.

debug mpls ldp session io

debug tag-switching tdp pies received

Displays the contents of LDP messages sent to and received from LDP peers. Command incorporates two new keywords/parameters.

debug mpls ldp session state-machine

debug tag-switching tdp session state-machine

Incorporates one new keyword/parameter; displays information about state transitions for LDP sessions.

debug mpls ldp transport connections

debug tag-switching tdp transport connections

Incorporates two new keywords/parameters; displays information about the TCP connections used to support LDP sessions.

debug mpls ldp transport events

debug tag-switching tdp transport events

Displays information about events related to the LDP peer discovery mechanism. Command incorporates two new keywords/parameters.


Table 3 LDP Commands with Same Syntactic Structure as Corresponding TDP Commands 

LDP Command
Corresponding TDP Command
Description

mpls ip (global configuration)

tag-switching ip (global configuration)

Enables MPLS forwarding of IPv4 packets along normally routed paths for the platform.

mpls ip (interface configuration)

tag-switching ip (interface configuration)

Enables MPLS forwarding of IPv4 packets along normally routed paths for a particular interface.

mpls ldp discovery

tag-switching tdp discovery

Configures the interval between transmission of consecutive LDP discovery Hello messages, or the hold time for a discovered LDP neighbor, or the neighbors from which requests for targeted Hello messages may be honored.

mpls ldp holdtime

tag-switching tdp holdtime

Changes the time for which an LDP session is maintained in the absence of LDP messages from the session peer.

show mpls atm-ldp bindings

show tag-switching atm-tdp bindings

Displays specified entries from the ATM LDP label binding database.

show mpls atm-ldp capability

show tag-switching atm-tdp capability

Displays the ATM MPLS capabilities negotiated with LDP neighbors for LC-ATM interfaces.

show mpls interfaces

show tag-switching interfaces

Displays information about one or more interfaces that have been configured for label switching.

show mpls ldp bindings

show tag-switching tdp bindings

Displays the contents of the label information base (LIB).

show mpls ldp discovery

show tag-switching tdp discovery

Displays the status of the LDP discovery process.

show mpls ldp neighbor

show tag-switching tdp neighbor

Displays the status of LDP sessions.

show mpls ldp parameters

show tag-switching tdp parameters

Displays current LDP parameters.

debug mpls atm-ldp api

debug tag-switching atm-tdp api

Display information about the VCI allocation of label VCs (LVCs), label-free requests, and cross-connect requests.

debug mpls atm-ldp routes

debug tag-switching atm-tdp routes

Displays information about the state of the routes for which VCI requests are being made.

debug mpls atm-ldp states

debug tag-switching atm-tdp states

Displays information about LVC state transitions as they occur.

debug mpls ldp peer state-machine

debug tag-switching tdp peer state-machine

Displays information about state transitions for LDP sessions.

debug mpls ldp targeted-neighbors

debug tag-switching tdp directed-neighbors

Displays information about the target neighbor mechanism.


Command Reference

This section describes the following MPLS debugging, configuration, and display commands:

debug mpls atm-ldp api

debug mpls atm-ldp failure

debug mpls atm-ldp routes

debug mpls atm-ldp states

debug mpls ldp advertisements

debug mpls ldp backoff