MPLS

Multi Protocol Label Switching (MPLS) is a high-performance method for forwarding packets (frames) through a network. It enables routers at the edge of a network to apply simple labels to packets (frames). ATM switches or existing routers in the network core can switch packets according to the labels with minimal lookup overhead.

MPLS integrates the performance and traffic management capabilities of Data Link Layer 2 with the scalability and flexibility of Network Layer 3 routing. It is applicable to networks using any Layer 2 switching, but has particular advantages when applied to ATM networks. It integrates IP routing with ATM switching to offer scalable IP-over-ATM networks.

MPLS Network Structure

The basic elements in a label switching network are:

  1. Edge Label Switch Routers
Edge Label Switch Routers are located at the boundaries of a network, performing value-added network layer services and applying labels to packets. These devices can be either routers or multilayer LAN switches.
  1. Label Switches
These devices switch labeled packets or cells based on the labels. Label switches may also support full Layer 3 routing or Layer 2 switching in addition to label switching.
  1. Label Distribution Protocol
The Label Distribution Protocol (LDP) is used in conjunction with standard network layer routing protocols to distribute label information between devices in a label switched network.

An MPLS network consists of Edge Label Switch Routers (Edge LSRs around a core of Label Switch Routers (LSRs). Customer sites are connected to the provider MPLS network.
Typically there are several hundred customer sites per edge LSR. The Customer Premises Equipment (CPE) runs ordinary IP forwarding but usually does not run MPLS.

MPLS Label Stack

The MPLS label, or more specifically the MPLS label stack, is com-posed of four octets (32 bits).
 
Label
 
This field is the label itself, and it is 20 bits in length. With 20 bits, there can be over one million labels.

Experimental (EXP)
 
The Experimental (EXP) field is three bits in length and is used to map the standard IP packet ToS (type of service) into the Experimental field for MPLS CoS (class of service).

S

MPLS labels can be stacked one on top of the other. The S, or stack bit, is used to indicate the bottom of the stack. A value of 1 in this field indi-cates the bottom, or last label, of the stack.

TTL 

The TTL (Time-to-Live) field from the IP TTL (or Ipv6 Hop Limit field) is decremented by 1 and then copied into the MPLS label TTL field. Upon exiting the MPLS network, the MPLS label TTL value is copied back into the IP TTL field. If this field is set to 0, the packet will be dis-carded. The TTL field is 8 bits in length.

When taking about MPLS label, it is located between Layer 2 and Layer 3 of OSI models. Following figure shows where the MPLS label located in Ethernet frame. The MPLS label stack is sometimes referred to as a shim header because of how it is placed between the Layer 2 header and the Layer 3 payload.


MPLS Network Components

Study following example. There are three type of routers, which are named as CE, PE and P.

CE
Customer Edge. This is a router that connects to the customer network and to a service provider.
PE
Provider Edge. This is a service provider piece of equipment that connects to a customer and into the provider (P) network.
P
Provider device. This is a service provider piece of equipment that exists entirely in the provider (P) network and only connects to other service provider devices.

In addition, the PE and P routers are label switch routers. 

There are two types of label switch routers.
  1. LSR
A label switch router (LSR) is a Cisco IOS router/switch that is capable of forwarding packets based on labels. The CE, or customer, devices are not LSRs and can handle regular unlabeled IP packets.

  1. Edge-LSR
An edge label switch router (edge-LSR) is a more specific term for the PE routers. An edge-LSR is an edge device that is also an LSR For an MPLS network, this is the device that takes unlabeled IP traffic and imposes, or in MPLS terms, pushes an MPLS label and switches the traffic to the next LSR.  The edge-LSR also takes labeled traffic and deposes, or in MPLS terms, pops the label and forwards it to the next hop.  A PE device is an edge-LSR in MPLS-based networks.

MPLS Applications

One of the basic principles of MPLS is that packets are switched instead of routed. When a packet enters the service provider network from a customer, it is unlabeled IP. The router at the edge of the service provider network accepts the incoming unlabeled packet and applies a label.

The newly labeled packet follows an LSP through the service provider network and is label-switched, not forwarded. When the packet leaves the MPLS-enabled service provider network, the label is removed and it again becomes an unlabeled IP packet.

Following figure simply explain what happens to an IP packet as it moves through an MPLS-enabled service provider network.

 

L = Label
Since packets receive labels at the edge of the network by the edge-LSR, and those labels are used by every LSR in the service provider network to switch traffic, many applications exist for MPLS, such as MPLS virtual private networks (VPNs), traffic engineering, and QoS.

More Topics;