LDP Session Establishment and Maintenance

If two LSRs have discovered each other by means of the LDP Hellos, they attempt to establish an LDP session between them. One LSR tries to open a TCP connection—to TCP port 646—to the other LSR. If the TCP connection is set up, both LSRs negotiate LDP session parameters by exchanging LDP Initialization messages. These parameters include such things as the following:

■ Label distribution method

■ Virtual path identifier (VPI)/virtual channel identifier (VCI) ranges for Label Controlled ATM (LC-ATM)

■ Data-link connection identifier (DLCI) ranges for LC-Frame Relay

If the LDP peers agree on the session parameters, they keep the TCP connection between them. If not, they retry to create the LDP session between them, but at a throttled rate. In Cisco IOS, the LDP backoff command controls this throttling rate:

mpls ldp backoff initial-backoff maximum-backoff

The initial-backoff parameter is a value between 5 and 2,147,483, with a default of 15 seconds. The maximum-backoff is a value between 5 and 2,147,483, with a default of 120 seconds. This command slows down the LDP session setup attempts of two LDP LSRs, when the two neighboring LDP peers are incompatible in terms of the parameters they exchange. If the session setup attempt fails, the next attempts are undertaken at an exponentially increased time, until the maximum backoff time is reached. One example in which the two LDP peers might disagree on the parameters and not form an LDP session is the case of LC-ATM, where the two peers are using different ranges of VPI/VCI values for the labels.

After the LDP session has been set up, it is maintained by either the receipt of LDP packets or a periodic keepalive message. Each time the LDP peer receives an LDP packet or a keepalive message, the keepalive timer is reset for that peer. The keepalive timer or Hold time for the LDP session can be configured, too. The command to change the LDP session keepalive timer is mpls ldp holdtime seconds. You can configure the value of the Hold time to be between 15 and 2,147,483 seconds, with a default of 180 seconds.

Example 4-5 shows an LDP peer with LDP router ID 10.200.254.2. The local TCP port used is 646, and the remote TCP port used is 11537. The session Hold time is 180 seconds, and the keepalive (KA) messages are sent with a 60-second interval.

Example 4-5 LDP Neighbor Hold Time and KA Interval london#show mpls ldp neighbor 10.200.254.5 detail

Peer LDP Ident: 10.200.254.5:0; Local LDP Ident 10.200.254.2:0 TCP connection: 10.200.254.5.11537 - 10.200.254.2.646 State: Oper; Msgs sent/rcvd: 16/19; Downstream; Last TIB rev sent 50 Up time: 00:00:36; UID: 9; Peer Id 1; LDP discovery sources:

Ethernet0/1/2; Src IP addr: 10.200.215.2 holdtime: 15000 ms, hello interval: 5000 ms Addresses bound to peer LDP Ident:

10.200.254.5 10.200.215.2 10.200.216.1 Peer holdtime: 180000 ms; KA interval: 60000 ms; Peer state: estab

You can also see the discovery and session timers with the command show mpls ldp parameters, as in Example 4-6.

Example 4-6 show mpls ldp parameters london#show mpls ldp parameters

Protocol version: 1

Downstream label generic region: min label: 16; max label: 100000

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

The LDP session is a TCP connection that is established between two IP addresses of the LSRs. Usually these IP addresses are used to create the LDP router Identifier on each router. However, if you do not want to use this IP address to create the LDP session, you can change it. To change the IP address, configure the command mpls ldp discovery transport-address {interface I ip-address} on the interface of the router and specify an interface or IP address to be used to create the LDP session. This transport IP address is advertised in the LDP Hellos that are sent on the LDP-enabled interfaces.

NOTE When a router has multiple links toward another LDP router, the same transport address must be advertised on all the parallel links that use the same label space.

In Figure 4-2, two routers are connected via two Ethernet links. On router new-york, the transport-address is changed to the loopback 1000 IP address. Notice in Example 4-7 that the used address for the TCP connection has changed from the IP address found in the LDP router ID to the IP address 10.200.255.1 of loopback 1000.

Figure 4-2 Changing the Default LDP Transport Address

LDP Hello

Transport IP Address = 10.200.255.1

Loopback 0 10.200.254.1/32

Loopback 1000 --f Eth 1/1

10.200.255.1/32

new-york

10.200.218.1

10.200.210.1

10.200.210.2

Eth 1/2

10.200.218.2

10.200.218.2

london

LDP Hello

Transport IP Address = 10.200.255.1

Example 4-7 Changing the Default LDP Transport Address hostname new-york

interface Ethernet1/1 ip address 10.200.210.1 255.255.255.0 mpls ldp discovery transport-address 10.200.255.1 mpls ip

interface Ethernet1/2 ip address 10.200.218.1 255.255.255.0 mpls ldp discovery transport-address 10.200.255.1 mpls ip london#show mpls ldp discovery detail

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

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

Hello interval: 5000 ms; Transport IP addr: 10.200.254.2

continues

Example 4-7 Changing the Default LDP Transport Address (Continued)

Src IP addr: 10.200.210.1; Transport IP addr: 10.200.255.1 Hold time: 15 sec; Proposed local/peer: 15/15 sec Reachable via 10.200.255.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.255.1 Hold time: 15 sec; Proposed local/peer: 15/15 sec Reachable via 10.200.255.1/32

NOTE When a router has multiple links toward another LDP router and a different transport address is advertised on those links, the TCP session is still formed, but there is a missing link from the LDP "discovery sources" on the other router. In the previous example, the LDP session is formed, but Ethernet 0/1/3 or Ethernet 0/1/4 is missing from the LDP discovery sources in the output of router london. As such, the traffic from router london toward router new-york is not load-balanced but uses only one outgoing Ethernet link.

Number of LDP Sessions

You might think that one LDP session between a pair of LSRs is enough to do the job. You might be right in most cases! When the per-platform label space is the only label space used between a pair of LSRs, one LDP session suffices. This is so because only one set of label bindings is exchanged between the two LSRs, no matter how many links are between them. Basically, the interfaces can share the same set of labels when the per-platform label space is used. The reason for this is that all the label bindings are relevant to all the links between the two LSRs, because they all belong to the same label space. Interfaces belong to the per-platform label space when they are frame-mode interfaces. Interfaces that are not frame-mode interfaces—such as LC-ATM interfaces—have a per-interface label space. With per-interface label space, each label binding has relevance only to that interface. Therefore, for each interface that has a per-interface label space, one LDP session must exist between the pair of routers. Look at Figure 4-3 to see some examples of the number of LDP sessions between a pair of LSRs.

Figure 4-3 Examples of the Number of LDP Sessions Between a Pair of LSRs

Figure 4-3 Examples of the Number of LDP Sessions Between a Pair of LSRs

LC-ATM

Frame Frame

LC-ATM

LC-ATM

LC-ATM

For all frame-mode links, only one LDP session should exchange the labels in per-platform label space. For each LC-ATM link, an LDP session should exchange the labels in the per-interface label space. In (1) of Figure 4-3, you see three frame links, so only one LDP session is required between the two LSRs. In (2), you see one frame link and one LC-ATM link. Because each LC-ATM link requires its own LDP session, there are two LDP sessions. (3) shows three LC-ATM links—therefore, the number of LDP sessions is three. (4) shows two frame links and three LC-ATM links. The two frame links have one LDP session, and the LC-ATM links have three LDP sessions.

Micro Expression Master

Micro Expression Master

If You Could Read Everyone Life A Book You Can Have Better Career, Great Relationships And Become Successful. This Book Is One Of The Most Valuable Resources In The World When It Comes To Reading the smallest and tiniest body Language and know what people are thinking about.

Get My Free Ebook


Post a comment