Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Designing and Developing Scalable IP Networks.pdf
Скачиваний:
36
Добавлен:
15.03.2015
Размер:
2.95 Mб
Скачать

7

Multiprotocol Label Switching (MPLS)

Back in the mid to late 1990s, when most routers were predominantly based on software forwarding rather than hardware forwarding, a number of vendors devised proprietary mechanisms to switch packets far more efficiently than was possible with forwarding based entirely on hop-by-hop longest match IP address lookups. Various aspects of these proprietary mechanisms were effectively merged and developed by the MPLS working group at the IETF and produced what we know today as MPLS.

Subsequent developments in hardware-based router design have made these forwarding performance improvements unnecessary, since these hardware-based routers are capable of performing longest-match IP lookups at exactly the same speed as fixed-length label lookups.

MPLS’ forwarding decision is based entirely on the contents of a fixed-length label assigned to the packet at the ingress of the network. This label forms a part of the 32-bit MPLS header as shown in Figure 7.1.

The label is 20-bits long giving 1048576 label combinations. There are three experimental (EXP) bits for which only one purpose has currently been proposed (class of service marking). The S bit indicates whether this label is at the bottom of the label stack (1 indicates that this label is the bottom of the stack, 0 indicates it is not). Finally, there is an 8-bit TTL that is used to limit the impact of any routing loops.

The fact that a label is defined for each hop effectively means that the entire path is predefined creating a unidirectional ‘circuit’ from ingress to egress. These ‘circuits’ are called Label Switched Paths (LSPs). This circuit-like behaviour makes MPLS ideal for a number of functions including integration of IP networks with ATM networks,

Designing and Developing Scalable IP Networks G. Davies

2004 Guy Davies ISBN: 0-470-86739-6

98

 

MULTIPROTOCOL LABEL SWITCHING (MPLS)

 

 

 

32 bits

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Label

 

EXP

S

TTL

 

 

 

20 bits

 

3 bits

1

8 bits

 

 

 

 

 

 

 

 

 

 

Figure 7.1 MPLS label

traffic engineering of IP networks and the provision of Layer 2 and Layer 3 Virtual Private Networks.

Any device which supports MPLS is known as a Label Switching Router (LSR). These devices can include both traditional routers, ATM switches and, with the introduction of Generalized MPLS (described towards the end of this chapter), Optical Cross Connects and Add-Drop Multiplexers. This is the basis of the integration of frame-based IP networks with ATM and optical transmission networks.

7.1 TRAFFIC ENGINEERING

LSPs have many of the characteristics of a circuit and can, to some extent, be manipulated in much the same way as an ATM or Frame Relay PVC. This behaviour can be exploited for IP traffic engineering.

Traffic engineering is all about the ability to place traffic onto particular paths so that no resource in the network is overloaded while other resources are under-utilized. As stated earlier in this book, it is essential in today’s market to be able to make the most of your assets. If you can spread traffic through your network across all available paths, then you should need to buy new capacity later than would be necessary if traditional routing were used. This is a significant benefit to your company’s cash flow.

In addition to the benefits associated with placing traffic on particular links for the purposes of load sharing, it can also be useful to be able to place traffic associated with different classes of service onto different links. For example, consider two locations on your network between which there is a large aggregate amount of data, of which a small proportion is associated with a latency intolerant application. Your customers are prepared to pay more for the latency intolerant traffic to be given a higher priority as long as the latency intolerant packets get through within the application’s requirements. You have a very expensive link directly connecting the ingress and egress points on your network but it has limited capacity. An alternative path goes via several cities and is significantly longer than the direct path. However, it has very much larger capacity and is much cheaper.

You can create two LSPs between the ingress and egress, one of which is forced via the expensive, low latency link, and the other, which is forced via the low cost, higher latency link (see Figure 7.2). Traffic for the low latency application is placed on the direct path. All other traffic is placed on the cheaper path.

Traffic engineering requires the distribution of extra information about links over and above the basic metric information carried by traditional IP routing protocols. This information includes available bandwidth, reserved bandwidth, over-subscription rates and

7.2 LABEL DISTRIBUTION PROTOCOLS

99

 

low

latency,

 

 

 

cost,

 

high

bandwidth

low

 

 

 

latency,

low

high

bandwidth

cost,

high

 

Figure 7.2 Traffic engineering with MPLS

administrative colours. It is this information, in combination with the standard metrics associated with routing protocols, which is used to select the ‘best’ path. The process of selecting the best path using this information is known as constrained shortest path first (CSPF). As the name suggests, it is based on the same shortest path first (SPF) algorithm used by OSPF and IS-IS with the ability to consider added constraints (bandwidth, administrative colour, etc.) in the calculation of the shortest path. Put simply, links that do not comply with the required constraints are pruned from the tree of available links prior to the calculation of the shortest path based on the link metrics. In fact, CSPF is based on extended versions of OSPF or IS-IS. These are described below in more detail.

7.2LABEL DISTRIBUTION PROTOCOLS

While it is possible to statically define labels for all LSPs on the LSRs throughout the network, this is the equivalent of operating a network entirely using static routes. It works but it is not flexible, not resilient and most certainly not scalable.

Label distribution protocols (note the lower case) are mechanisms whereby one LSR informs another LSR of the label to be associated with a particular forwarding equivalence class (FEC). This is a fundamental part of the MPLS system. MPLS can be operated without a label distribution protocol by the configuration of static label pushes, swaps and pops. However, this is certainly not a scalable way of doing things and, other than as a means of familiarizing yourself with the label swapping process in the lab, static