MPLS – Part 6

We have three major issues that we need to deal with in order to successfully use routers within a WAN provider’s cloud:

  • Multiple routing tables in RAM
  • Excessive latency
  • Address-space collisions

Let’s assume that we have a WAN provider with two customers, “A” and “B”, each with three sites, as shown:

Now, let’s say that an IPv4 data packet enters the provider cloud from customer site A1, headed for site A3. When it leaves CE-A1, the packet is encapsulated within some standard Layer-2 frame type. Among others, this might be:

  • Ethernet
  • HDLC
  • PPP
  • Frame Relay

An example of an Ethernet frame encapsulating an IPv4 packet appears as the “Unlabeled Packet” below:

As the packet is processed by the PE1 router, the frame header and trailer encapsulating the incoming packet will be stripped, and after the IP header manipulations are complete, the packet will be encapsulated into a new frame, and then forwarded towards CE-A3 via either P1 or P2.

Now, imagine that the packet that is sent from PE1 towards the P router is not a normal packet. Instead, the PE “pushes” a label onto the front of the packet, and then encapsulates the modified packet into the outbound frame. The label will then appear within the frame between the Layer-2 and Layer-3 headers (for IP over Ethernet, this is just after the “EtherType” field, and just before the IP header). When the PE pushes the label, it also changes the EtherType from “0x0800” (unlabeled IP) to “0x8847” (labeled IP). An example appears as the “Labeled Packet” in Figure 2. The process of “pushing” the label is also referred to as “inserting” or “imposing” a label.

Note how the label appears between the “Type” field and the IP header. Upon receiving a labeled packet, a P router does a lookup in its label table, which tells it how to forward the packet. A label table looks something like this:

Inbound Label Outbound Label Outbound Interface
75 201 1
49 843 2
205 722 1
19 63 2

As the packet traverses the WAN core, the P routers perform label “swaps” (reminiscent of what occurs with Frame Relay DLCIs), and when the packet reaches the far side, the PE “pops” (removes) the label, sets the EtherType back to “0x0800”, and sends the unlabeled packet to the CE.

By the way, the sequence of routers and labels used for a particular path is referred to as a “LSP” (Label-Switched Path), and in general the LSP going between the sites in the reverse direction does not use the same label values. In fact, unlike a Frame Relay PVC, with MPLS there is no requirement that the same physical path be used in both directions. In other words, an MPLS LSP is unidirectional, whereas a Frame Relay PVC is bidirectional.

You might be wondering how the PE and P routers know which label values to use when doing a “push” or a “swap”. There are three protocols that can be used to advertise LSP labels (TDP, LDP and RSVP), and we’ll discuss them later.

The PE routers only need to know the routes for customers to which they are directly attached, and which labels to push. In the case of PE2, for example, that’s A, but not B. The P routers do not need to know *any* customer routes, for any protocol, because they’re making all of their forwarding decisions based on labels, not Layer-3 addresses.

Congratulations … we’re now doing MPLS, or “Multi-Protocol Label Switching”! It gets its name from the fact that the P routers are doing “Label Switching”, and therefore don’t care about the “Multi-Protocols” used by the customer (and thus it should support any routed protocols).

Now that we have an idea of how MPLS works, we can define some additional terms. We know that a “CE” (Customer Edge) router is located at a customer site, and thus is CPE (Customer Premises Equipment). A CE generally deals with unlabeled packets, sending them to, and receiving them from, a “PE” (Provider Edge) router.

A PE is located at one of the provider’s POPs (Points of Presence). A PE pushes labels onto packets it receives from a CE, and then forwards the packets to a P (Provider) router. PE routers also pop labels from packets received from “P” (Provider) routers before forwarding the packets to a CE.

The P routers are located within the core of the provider’s cloud, and primarily do label swaps. To denote the fact that P routers are doing label swaps, and not routing table lookups, a P router is sometimes referred to as a LSR (Label Switch Router). Likewise, a PE can be called an “Edge LSR”, or “LER” (Label Edge Router).

Here’s a summary of the terminology when it comes to the provider routers involved with MPLS:

  • PE = POP = Edge LSR = LER, they “push” and “pop” labels
  • P = LSR = Core, they “swap” labels

Next time, we’ll discuss MPLS in more detail, and see how it solves our three problems.

Author: Al Friebe

In this article

Join the Conversation