Multiprotocol Label Switching

From Free net encyclopedia

Internet protocol suite
Layer Protocols
Application DNS, TLS/SSL, TFTP, FTP, HTTP, IMAP, IRC, NNTP, POP3, SIP, SMTP, SNMP, SSH, TELNET, BitTorrent, RTP, rlogin, ENRP, …
Transport TCP, UDP, DCCP, SCTP, IL, RUDP, …
Network IP (IPv4, IPv6), ICMP, IGMP, ARP, RARP, …
Link Ethernet, Wi-Fi, Token ring, PPP, SLIP, FDDI, ATM, DTM, Frame Relay, SMDS, …

In computer networking and telecommunications, Multiprotocol Label Switching (MPLS) is a data-carrying mechanism which emulates some properties of a circuit-switched network over a packet-switched network. MPLS operates at a OSI Model layer that is generally considered to lie between traditional definitions of Layer 2 (data link layer) and Layer 3 (network layer), and thus is often referred to as a "Layer 2.5" protocol. It was designed to provide a unified data-carrying service for both circuit-based clients and packet-switching clients which provide a datagram service model. It can be used to carry many different kinds of traffic, including IP packets, as well as native ATM, SONET, and Ethernet frames.

Contents

Background

A number of different technologies were previously deployed with essentially identical goals, such as frame relay and ATM. MPLS is now replacing these technologies in the marketplace, mostly because it is better aligned with current and future technology and needs.

In particular, MPLS dispenses with the cell-switching and signalling-protocol baggage of ATM. MPLS recognizes that small ATM cells are not needed in the core of modern networks, since modern optical networks (as of 2001) are so fast (at 10 Gbit/s and well beyond) that even full-length 1500 byte packets do not incur significant real-time queuing delays (the need to reduce such delays, to support voice traffic, having been the motivation for the cell nature of ATM).

At the same time, it attempts to preserve the traffic engineering and out-of-band control that made frame relay and ATM attractive for deploying large scale networks.

MPLS was originally proposed by a group of engineers from Cisco Systems, Inc.; it was called "Tag Switching" when it was a Cisco proprietary proposal, and was renamed "Label Switching" when it was handed over to the IETF for open standardization.

One original motivation was to allow the creation of simple high-speed switches, since it was at one point thought to be impossible to forward IP packets entirely in hardware. However, advances in VLSI have made such devices possible. The systemic advantages of MPLS, such as the ability to support multiple service models, do traffic management, etc, remain.

How MPLS works

MPLS works by prepending packets with an MPLS header, containing one or more 'labels'. This is called a label stack.

Image:MPLS packet.png

Each label stack entry contains four fields:

  • a 20-bit label value.
  • a 3-bit experimental field reserved for future use.
  • a 1-bit bottom of stack flag. If this is set, it signifies the current label is the last in the stack.
  • an 8-bit TTL (time to live) field.

These MPLS labeled packets are forwarded (switched is the correct term) after a Label Lookup/Switch instead of a lookup into the IP table. Label Lookup and Label Switching may be faster than usual RIB lookup because it can take place directly into fabric and not CPU.

The exit points of an MPLS network are called Label Edge Routers (LER). Routers that are performing routing based only on Label Switching are called Label Switch Routers (LSR). Remember that a LER is not usually the one that is popping the label. For more information see Penultimate Hop Popping.

Devices that function as ingress and/or egress routers are often called PE (Provider Edge) routers. Devices that function only as transit routers are similarly called P (Provider) routers. The job of a P router is significantly easier than that of a PE router, so they can be less complex and may be more dependable because of this.

When an unlabeled packet enters the ingress router and needs to be passed on to an MPLS tunnel, the router first determines the forwarding equivalence class the packet should be in, and then inserts one (or more) labels in the packet's newly created MPLS header. The packet is then passed on to the next hop router for this tunnel.

When a labeled packet is received by an MPLS router, the topmost label is examined. Based on the contents of the label a swap, push or pop operation can be performed on the packet's label stack. Routers can have prebuilt lookup tables that tell them which kind of operation to do based on the topmost label of the incoming packet so they can process the packet very quickly. In a swap operation the label is swapped with a new label, and the packet is forwarded along the path associated with the new label.

In a push operation a new label is pushed on top of the existing label, effectively "encapsulating" the packet in another layer of MPLS. This allows the hierarchical routing of MPLS packets. Notably, this is used by MPLS VPNs.

In a pop operation the label is removed from the packet, which may reveal an inner label below. This process is called "decapsulation". If the popped label was the last on the label stack, the packet "leaves" the MPLS tunnel. This is usually done by the egress router, but see PHP below.

During these operations, the contents of the packet below the MPLS Label stack are not examined. Indeed transit routers typically need only to examine the topmost label on the stack. The forwarding of the packet is done based on the contents of the labels, which allows "protocol independent packet forwarding" that does not need to look at a protocol-dependent routing table and avoids the expensive IP longest prefix match at each hop.

At the egress router, when the last label has been popped, only the payload remains. This can be an IP packet, or any of a number of other kinds of payload packet. The egress router must therefore have routing information for the packet's payload, since it must forward it without the help of label lookup tables. An MPLS transit router has no such requirement.

In some special cases, the last label can also be popped off at the penultimate hop (the hop before the egress router). This is called Penultimate Hop Popping (PHP). This may be interesting in cases where the egress router has lots of packets leaving MPLS tunnels, and thus spends inordinate amounts of CPU time on this. By using PHP, transit routers connected directly to this egress router effectively offload it, by popping the last label themselves. Since the egress router will do a higher-layer routing table lookup anyway, the amount of higher-layer work needed for a previously popped packet remains the same, and the actual label popping need not be done.

MPLS can make use of existing ATM network infrastructure, as its labelled flows can be mapped to ATM virtual circuit identifiers, and vice-versa.

Installing and removing MPLS paths

There are two standardized protocols for managing MPLS paths: LDP (Label Distribution Protocol) and RSVP-TE, an extension of the RSVP protocol for traffic engineering.

An MPLS header does not identify the type of data carried inside the MPLS path; if one wants to carry two different types of traffic between two routers, or ask for different treatment from the core routers for each type, one has to establish one MPLS path for each type of traffic.

The Experimental Bits and QoS

The undefined Experimental bits are used by most of the MPLS vendors to carry the latest 3 of 6 DSCP priority bits in the IPv4 header, as a simple emulation of prioritization. More priorities, Fair Queuing, Classification and Prioritization in the Core and some other achievements of the IP QoS are not possible with MPLS.

Comparison of MPLS versus IP

MPLS cannot be compared to IP as a separate entity because it works in conjunction with IP and IP's IGP routing protocols. MPLS gives IP networks simple traffic engineering, the ability to transport Layer3 (IP) VPNs with overlapping address spaces, and support for Layer2 pseudo wires (with Any Transport Over Mpls - ATOM - see Martini draft). Routers with programmable CPUs and without TCAM/CAM or another method for fast lookups may also see a limited increase in performance.

MPLS relies on IGP routing protocols to construct its label forwarding table, and the scope of any IGP is usually restricted to a single carrier for stability and policy reasons. As there is still no standard for carrier-carrier MPLS it is not possible to have the same MPLS service (Layer2 or Layer3 VPN) covering more than one operator.

Comparison of MPLS versus ATM

MPLS cannot be compared directly to ATM as they are totally different technologies with different goals. MPLS allows a very smooth migration for IP only services on ATM networks, without the need to support of complex signalling and routing protocols like PNNI. As a large proportion of the data transported over ATM networks in the late 1990s was IP, it was cheaper to upgrade some switches to support MPLS instead of PNNI.

MPLS packets can be much larger than ATM cells (with the difference that they have variable length, ATM cells have fixed size of 53 bytes). Today's networks usually must be able to transport packets at least 1500 bytes long (because this is the ubiquitous maximum size for Ethernet) but any MPLS payload size (being the size of the encapsulated payload plus the size required for all the labels) that the network interfaces in use will allow, can be transported. (Note that this requires the use of "baby jumbo packets" if Ethernet is used as the transport for MPLS). This compares well with the 48-byte cell of ATM, and reduces encapsulation overheads, particularly in the case of small packets: for example, it allows a minimum-length TCP packet to reside in a single MPLS packet, rather than two cells as in ATM.

The 16 bits of VCI and 8 bits of VPI in the ATM cell are replaced by a single label field of 20 bits, packed into a 32 bit label header. The 32 bit MPLS label field also contains an 8 bit time-to-live field, a "top of stack" bit, and three spare bits for expansion.

Although fewer bits are available for the label, labels can be stacked to create arbitrarily complex MPLS label stacks. This makes addressing and trunking in MPLS vastly more flexible than in ATM, as there is no need to impose an arbitrary boundary between VP and VC switching.

MPLS deployment

MPLS is currently in use in large "IP Only" networks, and is standardized by IETF in RFC 3031.

In practice, MPLS is mainly used to forward IP datagrams and Ethernet traffic. Major applications of MPLS are Telecommunications traffic engineering and MPLS VPN.

Competitors to MPLS

MPLS can exist currently only in an IPv4 environment (IPv4 routing protocols), and provides limited additional functionality. The major goal of MPLS development - the increase of routing speed - is no longer relevant because of the usage of ASIC, TCAM and CAM based switching. Therefore the major usage of MPLS is to implement limited traffic engineering and Layer3/Layer2 “service provider type” VPNs over existing IPv4 networks. The only competitors to MPLS are technologies like L2TPv3 that also provide services such as service provider Layer2 and Layer3 VPNs.

IEEE 1355 is a completely unrelated technology that does something similar in hardware.



External links

es:MPLS fr:Multiprotocol Label Switching nl:Multi Protocol Label Switching ja:Multi-Protocol Label Switching no:Multiprotocol Label Switching fi:MPLS ru:MPLS