• Aucun résultat trouvé

LDP Session Establishment and Maintenance

Dans le document MPLS Fundamentals (Page 98-102)

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:

Timer values

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:

mmm

mppppllsllsss llllddddpp pp bbabbaaacccckkkkooooffffffff 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.

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#sssshhhhooooww ww iipiippp rrrroooouutuutttee ee 11110000....2202200000.00...222255554444..3..333 222255555555....2252255555.55...222255555555..2..22255555555

% Subnet not in table

Example 4-4 “No Route” Problem (Continued)

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.

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

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 | 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.

Example 4-5 LDP Neighbor Hold Time and KA Interval

london#sssshhhhooooww ww mmpmmpppllllssss lldlldddpp pp nnnneeeeiiiigghgghhhbbobbooorrrr 111100.00...220220000000....222255455444..5..555 ddddeeeettattaaaiiliilll

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

Example 4-6 show mpls ldp parameters

london#sssshhhhooooww ww mmpmmpppllllssss lldlldddpp pp ppppaaaarrrraamaammmeeteettteeeerrrrssss 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

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.

LDP Operation 75

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 transport-address. Notice in Example 4-7 that the used transport-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

Example 4-7 Changing the Default LDP Transport Address

!

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.

LDP Id: 10.200.254.1:0

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.

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

LDP Operation 77

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

Forallframe-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 ATM link. Because each LC-ATM link requires its own LDP session, there are two LDP sessions. (3) shows three LC-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-LC-ATM links have three LDP sessions.

Dans le document MPLS Fundamentals (Page 98-102)