The Discovery of LSRs That Are Running LDP

LSRs that are running LDP send LDP Hello messages on all links that are LDP enabled. These are all the interfaces with mpls ip configured on them. First, however, you must enable CEF with the global ip cef command. Then you must enable LDP globally with the mpls ip command. Example 4-1 shows you the basic global and interface commands to enable LDP.

Example 4-1 Basic MPLS LDP Configuration hostname london

ip cef

mpls ldp router-id Loopback0 force mpls label protocol ldp

interface Loopback0 ip address 10.200.254.2 255.255.255.255

interface Ethernet0/1/3

ip address 10.200.210.2 255.255.255.0 mpls ip

NOTE Some Cisco IOS commands still have the old "tag-switching" instead of "mpls" in them. They are functionally the same. In the same way, there are still Tag Distribution Protocol (TDP) references in the commands, although the command can refer to LDP, too.

LDP Hello messages are UDP messages that are sent on the links to the "all routers on this subnet" multicast IP address—in other words, to the 224.0.0.2 group IP multicast address. The UDP port used for LDP is 646. The LSR that is receiving this LDP Hello message on a certain interface is then aware of the presence of this LDP router on that interface. The Hello message contains a Hold time. If no Hello message is received from that LSR before the Hold time expires, the LSR removes that LSR from the list of discovered LDP neighbors. To discover whether the LSR sends and receives LDP Hellos, the Hello interval, and the Hold time, use the show mpls ldp discovery [detail] command. If LDP Hello messages are sent and received on an interface, there is an LDP adjacency across the link between two LSRs that are running LDP. Example 4-2 shows the LDP discovery on links.

Example 4-2 LDP Discovery london#show mpls ldp discovery detail

Local LDP Identifier: 10.200.254.2:0 Discovery Sources: Interfaces:

Ethernet0/1/2 (ldp): xmit/recv Enabled: Interface config

Hello interval: 5000 ms; Transport IP addr: 10.200.254.2 LDP Id: 10.200.254.5:0

Src IP addr: 10.200.215.2; Transport IP addr: 10.200.254.5 Hold time: 15 sec; Proposed local/peer: 15/15 sec Reachable via 10.200.254.5/32 Ethernet0/1/3 (ldp): xmit/recv Enabled: Interface config

Hello interval: 5000 ms; Transport IP addr: 10.200.254.2 LDP Id: 10.200.254.1:0

Src IP addr: 10.200.210.1; Transport IP addr: 10.200.254.1 Hold time: 15 sec; Proposed local/peer: 15/15 sec Reachable via 10.200.254.1/32 Ethernet0/1/4 (ldp): xmit/recv Enabled: Interface config

Hello interval: 5000 ms; Transport IP addr: 10.200.254.2 LDP Id: 10.200.254.1:0

Src IP addr: 10.200.218.1; Transport IP addr: 10.200.254.1 Hold time: 15 sec; Proposed local/peer: 15/15 sec Reachable via 10.200.254.1/32 POS5/0/0 (ldp): xmit/recv

Enabled: Interface config

Hello interval: 5000 ms; Transport IP addr: 10.200.254.2 LDP Id: 10.200.254.3:0

Example 4-2 LDP Discovery (Continued)

Src IP addr: 10.200.211.2; Transport IP addr: 10.200.254.3 Hold time: 15 sec; Proposed local/peer: 15/15 sec Reachable via 10.200.254.3/32

The show mpls interfaces command allows you to quickly see which interfaces are running LDP. Look at Example 4-3 to view the output of the show mpls interfaces command.

Example 4-3 show mpls interfaces

london#show mpls

interfaces

Interface

IP

Tunnel

Operational

Ethernet0/1/2

Yes

(ldp)

Yes

Yes

Ethernet0/1/3

Yes

(ldp)

Yes

Yes

Ethernet0/1/4

Yes

(ldp)

No

Yes

POS5/0/0

Yes

(ldp)

Yes

Yes

To change the interval between sending Hello messages or to change the LDP Hold time, you can use the command mpls ldp discovery {hello {holdtime I interval} seconds.

The default value for the holdtime keyword is 15 seconds for link Hello messages, and the default value for the interval keyword is 5 seconds. Example 4-2 has three discovered LDP neighbors: 10.200.254.1, 10.200.254.3, and 10.200.254.5. As you can see, the LSR 10.200.254.1 is discovered on two interfaces: Ethernet 0/1/3 and Ethernet 0/1/4. The Hello interval and Hold time are set to the defaults of 5 and 15 seconds. If the two LDP peers have different LDP Hold times configured, the smaller of the two values is used as the Hold time for that LDP discovery source. Cisco IOS might overwrite the configured LDP Hello interval. It will choose a smaller LDP Hello interval than configured so that it can send at least three LDP Hellos before the Hold time expires. (At least nine Hellos are sent in the case of a targeted LDP session; see the section "Targeted LDP Session" for more information on targeted LDP sessions.) If the Hold time expires for one link, that link is removed from the LDP discovery sources list. If the last link from the LDP discovery sources is removed for one LDP neighbor, the LDP session is torn down. If you do change the Hello interval and Hold time for LDP discovery sources, make sure you do not set the Hold time too small or too big. If the Hold time is too small, the session can be lost immediately even when only a few packets are lost, for example due to congestion on the link. If the Hold time is set too big, the LDP session might be up too long in the case of a serious problem, and the reaction might be too slow. As a result, too many labeled packets are lost.

Notice that LSRs that are running LDP have an LDP Identifier, or LDP ID. This LDP ID is a 6-byte field that consists of 4 bytes identifying the LSR uniquely and 2 bytes identifying the label space that the LSR is using. If the last two bytes are 0, the label space is the platform-wide or per-platform label space. If they are non-zero, a per-interface label space is used. If that is the case, multiple LDP IDs are used, where the first 4 bytes are the same value, but the last two bytes indicate a different label space. Per-interface label space is used for LC-ATM links. Refer to Chapter 5, "MPLS and ATM Architecture," for an example depicting per-interface label spaces. The first 4 bytes of the LDP ID are an IP address taken from an operational interface on the router. If loopback interfaces exist, the highest IP address of the loopback interfaces is taken for the LDP ID or LDP router ID. If no loopback interfaces exist, the highest IP address of an interface is taken. In Example 4-2, the local LDP ID or LDP router ID of the router is 10.200.254.2:0, where

10.200.254.2 happens to be the highest IP address of any loopback interface and :0 refers to the platform-wide label space. You can change the LDP router ID manually by using the command mpls ldp router-id interface [force]. If you use the force keyword, the LDP router ID is changed immediately. Without this keyword, the LDP router ID is changed only the next time it is necessary to select the router ID after configuring this command. This happens when the interface that determines the current LDP router ID is shut down.

In Cisco IOS, the MPLS LDP router ID needs to be present in the routing table of the LDP neighboring routers. If it is not, the LDP session is not formed. Therefore, the IP address that is the LDP router ID on the router must be included in the routing protocol of the LSR. If for that IP address there is no route in the routing table, the LDP session is not established. In Example 4-4, the route to the IP address 10.200.254.3 is not in the routing table of the router london. The result is that the LSR london does not form an LDP neighborship/session with the LSR rome, which has

10.200.254.3 as the LDP router ID.

Example 4-4 "No Route" Problem london#show mpls ldp discovery

Local LDP Identifier: 10.200.254.2:0 Discovery Sources: Interfaces:

Ethernet0/1/2 (ldp): xmit/recv

LDP Id: 10.200.254.5:0 Ethernet0/1/3 (ldp): xmit/recv

LDP Id: 10.200.254.1:0 Ethernet0/1/4 (ldp): xmit/recv

LDP Id: 10.200.254.3:0; no route london#show mpls ldp discovery detail Local LDP Identifier: 10.200.254.2:0 Discovery Sources: Interfaces:

Enabled: Interface config

Hello interval: 5000 ms; Transport IP addr: 10.200.254.2 LDP Id: 10.200.254.3:0; no route to transport addr

Example 4-4 "No Route" Problem (Continued)

Src IP addr: 10.200.211.2; Transport IP addr: 10.200.254.3 Hold time: 15 sec; Proposed local/peer: 15/15 sec london#show ip route 10.200.254.3 255.255.255.255 % Subnet not in table

0 0

Post a comment