Rick Gallaher, CISSP, is owner of Dragonfly Associates LLC http://dragonfly-associates.com and author of Rick Gallaher's MPLS Training Guide
- Introductory MPLS Label Distribution and Signaling
- Advanced MPLS Signaling
- MPLS Network Reliance and Recovery
- Traffic Engineering, MPLambdaS and GMPLS
INTRODUCTION
What is this new protocol that leading telecommunication experts claim “will take over the world”? Well, you can rest your worried mind – IP and ATM are not on death row. In fact, it is my belief that MPLS will breathe new life into the marriage of IP and ATM.
The best way to describe the function of MPLS is by using an analogy of a large national firm with campuses located throughout the United States. Each campus has a central mail-processing point through which mail is sent around the world, as well as to its other campuses. Since its beginning, the mailroom has been under orders to send all intercampus correspondence via standard first-class mail. The cost of this postage is calculated into the company’s operational budget.
| 
KEY                  ACRONYMS | |
| MPLS | Multiple Protocol Label Switching; also, Multiple Protocol Lambda Switching | 
| LER | Label Edge Router | 
| LSR | Label Switch Router | 
| LIB | Label Information Base | 
| LSP | Label Switch Path | 
| FEC | Forward Equivalence Class; also, Functional Equivalent Class | 
| 
MPLS HIGHLIGHTS 
 | 
However, for months now, some departments have             been complaining that they require overnight delivery and             package-tracking services.  As a manager, you set up a system to send             three levels of mail between campuses – first class, priority, and             express mail.  In order to offset the increased expense of the new             services, you bill the departments that use these premium services             at the regular USPS rate plus 10%.
Priority and express mail are processed by placing           the package into a special envelope with a distinctive label.  These           special packets with distinctive labels assure the package priority           handling and tracking capability within the postal network.  In order           to avoid slowdowns and bottlenecks, the postal facilities in the           network created a system that uses sorting tables or sorting databases           to expedite these special packets.  
The Construction of an MPLS Network
In an IP network, you can think of routers as post           offices or postal sorting stations.  Without a means to mark,           classify, and monitor mail, there would be no way to process different           classes of mail.  In IP networks, you find a similar situation.            Figure 1 below shows a typical IP network with traffic having no           specified route. 
            Figure 1: An IP Network
In order to             designate different classes of service or service priorities,             traffic must be marked with special labels as it enters the             network.  Special routers called LER (Label Edge Routers) provide             this labeling function (Figure 2).  The LER converts IP packets into             MPLS packets, and MPLS packets into IP packets.  On the ingress             side, the LER examines the incoming packet to determine whether the             packet should be labeled.  A special database in the LER matches the             destination address to the label.  An MPLS shim header             (Figure 3) is           attached and the packet is sent on its way.
Figure 2: IP Network with LERs and an IP packet           with Shim header attached
To further explain the MPLS shim header, let's look           at the OSI model.  Figure 3 (a) shows OSI layers layer 7 through layer           3 (L7-L3) in red and layer 2 (L2) in yellow.  When an IP packet           (layers 2-7) is presented to the LER, it pushes the shim header (b)           between layers 2 and 3.  Note that the shim header is neither a part           of layer 2 or layer 3; however, it provides a means to relate both           layer 2 and layer 3 information. 
The Shim Header (c) consists of 32 bits in four parts            – twenty bits are used for the label, three bits for experimental           functions, one bit for stack function, and eight bits for time to live           (TTL).  It allows for the marriage of ATM (a layer-2 protocol) and IP           (a layer-3 protocol).
Figure 3: The MPLS Shim Header and Format
A shim header is a special             header placed between layer two and layer 3 of the OSI model. The             shim header contains the label used to forward the MPLS packets.
In order to route traffic across the network once             labels have been attached, the non-edge routers serve as LSR (Label             Switch Routers).  Note that these devices are still routers.  Packet             analysis determines whether they serve as MPLS switches or routers.
The function of LSR is to examine incoming packets.            Providing that a label is present, the LSR will look up and follow the           label instructions, and then forward the packet according to the           instructions.  In general, the LSR performs a label swapping           function.  Figure 4 shows LSR within a network. 
Figure 4: LSR           (Label Switch Routers)
Paths are established between the           LER and the LSR.  These paths are called LSP (Label Switch Paths).            The paths are designed for their traffic characteristics; as such,           they are very similar to ATM path engineering.  The traffic-handling           capability of each path is calculated.  These characteristics can           include peak traffic load, inter-packet variation, and dropped packet           percentage calculation.
Figure 5 shows the LSP established between           MPLS-aware devices.  Because MPLS works as an overlay protocol to IP,           the two protocols can co-exist in the same cloud without interference.
Figure 5: LSP           (Label Switch Paths)
BRIEF REVIEW
To review the construction of an MPLS network, the           LER adds and/or removes (pops or pushes) labels.  The LSR examines           packets, swaps labels, and forwards packets, while the LSP are the           pre-assigned, pre-engineered paths that MPLS packets could take.
Right about now, you may be asking whether the           advantages of MPLS are worth the extra effort.  Consider for yourself:
Your company uses a database application that is           intolerant of packet loss or jitter.  In order to ensure that your           prime traffic will get through, you have secured a high-cost circuit,           and you have over-provisioned the circuit by 60%.  In other words, you           are sending all of your mail as “express mail” for $13.50.
With MPLS, you can           have the LER sort your packets and place only your highest priority           traffic on the most expensive circuits, while allowing your routine           traffic to take other paths.  You have the ability to classify traffic           in MPLS terms, and your LER sorts traffic into FECs (Forward           Equivalence Classes).  Figure 6 shows the network now broken down into           FECs.
          Figure 6: An MPLS Network with Two FECs
Data Flow in an MPLS Network
The simplest form of data “flow” occurs when IP           packets are presented to the ingress router (acting as the LER)
Figure 7:             Ingress LER Attaches a Shim Header
Much like the mail room that           classifies mail to your branch location into routine, priority and           overnight mail, the Label Edge Router classifies traffic. In MPLS,           this classification process is called forward equivalence class, or           FEC for short. 
The LER are the big decision           points. LER are responsible for classifying incoming IP traffic and           relating the traffic to the appropriate label.  This traffic           classification process is called the FEC (Forward Equivalence Class).
             
LER use several             different modes to label traffic.  In the simplest example, the IP             packets are “nailed up” to a label and an FEC using preprogrammed             tables such as the example shown in Table 1.
| Destination / IP | Port Number | FEC | Next Hop | Label | 
Instruction | 
| 199.50.5.1 | 80 | B | x.x.x.x. | 80 | 
Push | 
| 199.50.5.1 | 443 | A | y.y.y.y | 17 | Push | 
| 199.50.5.1 | 25 | IP | z.z.z.z | (Do nothing; native IP) | 
Table 1: LER Instruction Set
When           the MPLS packets leave the LER, they are destined for LSR where they           are examined for the presence of labels.  The LSR looks to its           forwarding table (called a Label Information Base [LIB] or a           connectivity table) for instructions.  The LSR will swap labels           according to the LIB instructions.  Table 2 shows an example of a           Label Information Base.
| Label/In | Port In | Label/Out | Port/Out | FEC | Instruction Next Hop | 
| 80 | B | 40 | B | B | Swap | 
| 17 | A | 18 | C | A | Swap | 
Table 2: A Label Switch           Router’s Label Information Base (LIB)
Figure 8 demonstrates the LSR performing its           label-swapping functions.
At the egress of the network, the           LER removes the MPLS header and forwards the packet to an IP network.            Label swapping greatly simplifies MPLS packet flow.
The LER performs many packet           analysis functions:  mapping layer 2 to MPLS; mapping MPLS to layer 3;           and classifying traffic with great granularity.  In addition, the LER           decides what traffic becomes an MPLS packet. One decision-making           method is called “triggered mode.” Using this method, when a           predetermined number of packets are addressed to a single location           within a specified time window, the router will determine that there           is a "traffic stream," and will reroute the stream of traffic for MPLS           processing.
Even further enhancements and            flexibility are available to MPLS by using the label-stacking            method, as shown in figure 9.
Consider this scenario:              You own Network 1; however, your traffic must proceed across a             network that is not owned by your company (Network 2). You must             ensure that Network 2 handles your traffic according to your             service-level agreements (SLA), but they are not using the same             label criteria as your company.  
In this case, you would stack           labels and build a tunnel across Network 2. This configuration would           preserve the integrity of your network's labels while allowing the           other network to operate independently.
Figure 9 Stacked Labels with           Tunneled Network
IN SUMMARY
The concept of processing by labels is not new; it           has been implemented successfully for the US Postal Service, Federal           Express, and many other package-handling systems. In networking, this           process has been used in Frame Relay and ATM. What is new is that the           ubiquitous, uncontrolled Internet Protocol (IP) is now under a new set           of rules where it can be classified, managed, and policed across any           type of network.   
A nice feature           about MPLS is that it is not a fork lift           modification.  In some cases it only requires           software modifications to existing IP routers.  For a fraction of the           expense of installing a dedicated network,           MPLS allows IP traffic to be classified, marked and policed while           providing a method of layers two and layers 3 exchanging data.
MPLS does not replace IP – it supplements IP so that           traffic and be marked, classified and policed.  With the use of MPLS,           end-to-end quality of service can finally be achieved.
             | 
More                    on MPLS | 
| 
 | 
Rick Gallaher, CISSP, is owner of Dragonfly Associates LLC http://dragonfly-associates.com and author of Rick Gallaher's MPLS Training Guide
 
















 
 
 
 
 
