Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Cisco CCIP MPLS Study Guide - James Reagan.pdf
Скачиваний:
250
Добавлен:
24.05.2014
Размер:
6.47 Mб
Скачать

Label Distribution 49

Label Distribution

Since you already know that packets are switched instead of routed, let’s look at the details of how labels are exchanged between LSRs. If you remember in Chapter 1, I asked you to repeat to yourself that labels get bound to routes (more specifically, non-BGP routes) in the routing table. This section goes into a little more detail about that operation.

TDP

As you learned in Chapter 1, there are two ways you can implement a switching solution. First, if you have all Cisco equipment, you can use tag switching. Tag switching is Cisco proprietary and was the precursor to MPLS. Tag switching relies on Tag Distribution Protocol (TDP) to exchange packets between tag switching routers (TSRs).

Once TDP has been configured on an interface, neighbor discovery is automatic. TDP uses UDP broadcast or multicast packets to discover a neighbor. To configure tag switching, Cisco Express Forwarding (CEF) must be enabled, and then tag switching must be enabled on the appropriate interface(s). The IOS commands to configure tag switching on a router are as follows:

P1#config t

P1(config)#ip cef

P1(config)#tag-switching advertise-tags

P1(config-if)#interface serial 0/0

P1(config-if)#tag-switching ip

You can control which labels are distributed by configuring an access list and

associating it with the tag-switching advertise-tags command.

Once a neighbor is discovered, TDP uses well-known TCP port 711 to exchange tags with its peer. Just like OSPF or BGP, TDP uses an identifier that is the highest IP address of the configured loopback addresses. If there are no loopback interfaces configured, the identifier is chosen from the highest IP address of all the active interfaces.

Copyright ©2002 SYBEX, Inc., Alameda, CA

www.sybex.com

50 Chapter 2 Frame-Mode MPLS

To verify that you have established TDP neighbors, use the IOS command show tag-switching tdp-neighbor, which produces the following output:

P1# show tag-switching tdp-neighbor

Peer TDP Ident: 192.168.1.1:0; Local TDP Ident 192.168.1.2:0 TCP connection: 192.168.1.1:11004 - 192.168.1.2.678

State: Oper; PIEs sent/rcvd: 1506/1500; ; Downstream Up time: 12:36:08

TDP discovery sources: Serial 0/0

Addresses bound to peer TDP Ident: 192.168.1.10 192.168.1.1

LDP

Since MPLS came after tag switching, much of its operation is the same as tag switching, and even their configurations are quite similar. However, there are a few differences to note.

MPLS relies on Label Distribution Protocol (LDP) to exchange labels with neighboring LSRs. Once LDP has been configured on an interface, neighbor discovery is automatic, just like in TDP. LDP uses UDP broadcast or multicast packets to discover a neighbor. To configure MPLS, CEF must be enabled and then MPLS must be enabled on the appropriate interface(s). The IOS commands to configure MPLS on a router are as follows:

P1#config t

P1(config)#ip cef

P1(config)#mpls ip

P1(config-if)#interface serial 0/0

P1(config-if)#mpls ip

Just like TDP, LDP provides for automatic neighbor discovery. Once a neighbor is established, TCP port 646 is used to exchange labels. The LDP identifier is chosen in the same method as TDP. To verify LDP neighbor establishment, use the IOS command show mpls ldp neighbor, which produces the following output:

P1# show mpls ldp neighbor

Peer LDP Ident: 192.168.1.1:0; Local TDP Ident 192.168.1.2:0 TCP connection: 192.168.1.1:11033 - 192.168.1.2.647

Copyright ©2002 SYBEX, Inc., Alameda, CA

www.sybex.com

Label Distribution 51

State: Oper; PIEs sent/rcvd: 8/8; ; Downstream Up time: 00:02:15

LDP discovery sources: Serial 0/0

Addresses bound to peer LDP Ident: 192.168.1.10 192.168.1.1

Assigning Labels

There might be some confusion about how labels are assigned. Almost all of this confusion has to do with downstream and upstream in relation to MPLS terminology.

I’ll take a little creative license here and explain these terms like I do in class. In Figure 2.5, there are three routers: R1, R2, and R3. Router R1 advertises a subnet (204.134.83.0) that R2 will learn. R3 will learn the route from R2. Traffic destined for the advertised subnet (204.134.83.0) must eventually get to R1 (the original source of the route). The terms upstream or downstream are in relation to the flow of user packets, not in relation to the flow of a routing update. For example, traffic destined for subnet 204.134.83.0 flows from upstream routers (R2 and R3) to the downstream router (R1). Confused yet?

F I G U R E 2 . 5 Upstream/downstream

Packet flow

Downstream

 

 

 

 

 

 

 

204.134.83.0

 

 

 

 

 

 

 

 

 

 

 

 

R1

R2

R3

 

 

 

 

Creates route

Learns route

Learns route

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Routing updates

Upstream

An alternative, and easier, way to think of upstream and downstream is illustrated in Figure 2.6. In Figure 2.6, R1 is at the mouth of the river. R2 and R3 are upstream from R1. The flow of packets, as represented by the ship, is from upstream to downstream. From the perspective of R1, R2 and R3 are upstream. From the perspective of R2, R1 is downstream and R3 is upstream. From R3, R1 and R2 are downstream.

Copyright ©2002 SYBEX, Inc., Alameda, CA

www.sybex.com

52 Chapter 2 Frame-Mode MPLS

F I G U R E 2 . 6 Upstream/downstream alternative

Source

 

 

I have

Destination

To R2

a route! To R3

I have

R3

a route!

 

 

R2

 

 

R1

 

 

Now that you can identify upstream and downstream, the way in which labels are bound can make a little more sense. Let’s define all the necessary terminology:

Independent control When a new forwarding equivalence class (FEC) appears on an LSR, a label is bound to it immediately and can be advertised to its neighbors at any time. Since there is no waiting on a label from the downstream LSR, it is possible for the upstream LSRs to be labelswitching without a complete LSP. Independent control provides for the fastest LSP setup and is the control method used by the routers (LSRs).

Ordered control Ordered control occurs when an upstream LSR must wait on a label to be received from its downstream LSR. Ordered control takes longer to set up an LSP and is used by MPLS-enabled ATM switches (ATM-LSRs).

Downstream-on-demand Downstream-on-demand occurs when an upstream LSR, using the Label Request message, requests a label from its downstream neighbor.

Unsolicited downstream Unsolicited downstream occurs when a downstream LSR advertises labels to its neighbors automatically without the need of a Label Request message.

The official way to describe label distribution in frame-mode MPLS is to say that it is independent control with unsolicited downstream. Remember

Copyright ©2002 SYBEX, Inc., Alameda, CA

www.sybex.com