Sub topic 5
MPLS: why providers moved beyond point-to-point circuits
This chapter assumes you know IPv4 addressing, basic routing, and the difference between Layer 2 and Layer 3. It also assumes you have read the leased line chapters. Labels and VPNs get their own chapters later. Here we cover why MPLS exists and what it changes.
The problem with one circuit per pair of sites
A leased line gives you a dedicated circuit between two sites. That works for a few sites. It gets expensive as the network grows.
A full mesh of n sites needs n(n-1)/2 circuits. Ten sites need 45 circuits. Twenty sites need 190. Each circuit has a monthly fee and ports on both routers. A hub-and-spoke design needs fewer circuits, but spoke-to-spoke traffic must cross the hub, which adds latency.
The provider has a matching problem. Dedicating capacity to each customer circuit wastes it whenever the circuit is idle.
What MPLS is
Multiprotocol Label Switching (MPLS) is a forwarding method. A router forwards a packet by looking up a short fixed-length label instead of the destination IP address. The label is added in front of the IP packet, in a 4-byte header placed between the Layer 2 and Layer 3 headers. For that reason MPLS is often called a "Layer 2.5" technology.
The provider runs one shared MPLS core. Each customer connects once, from its customer edge (CE) router to a provider edge (PE) router. The core then carries traffic between any pair of that customer's sites. You buy one access link per site, not one circuit per pair of sites.
Why providers prefer it
- One network, many customers. The provider operates a single core and keeps customers separate logically. Layer 3 VPNs, covered later, do this.
- Faster core forwarding. Early label lookups were cheaper than longest-prefix IP lookups. Modern hardware has erased most of that gap, so speed is no longer the main reason.
- Services beyond plain routing. Labels let the provider create paths that do not follow the IGP shortest path. They also let it apply QoS classes and offer VPNs.
- Easy to add sites. A new site needs one access link and some PE configuration. No new circuits are needed between sites.
Roles of the routers
| Router | Location | Job |
|---|---|---|
| CE | Customer site | Sends ordinary IP packets to the PE. It does not need MPLS. |
| PE | Provider edge | Adds labels to packets entering the core and removes them on exit. |
| P | Provider core | Forwards packets using labels only. |
What you configure
MPLS needs CEF, a label distribution protocol such as LDP, and mpls ip on core-facing interfaces. This is a Cisco IOS example from a provider router.
ip cef
mpls label protocol ldp
!
interface GigabitEthernet0/1
ip address 10.0.0.1 255.255.255.252
mpls ip
no shutdownip cef builds the forwarding table that MPLS depends on. mpls ip turns on label switching for that link. Both ends must enable it, or LDP will not form a session. The next chapter covers how labels are pushed, swapped, and popped.
Common mistakes
- Treating MPLS as encryption. MPLS separates customers logically but does not encrypt anything. Add IPsec if you need confidentiality.
- Expecting the CE to run MPLS. In a typical service the CE speaks plain IP and a routing protocol with the PE.
- Forgetting that it is a service. You rely on the provider's SLA, routing, and failure handling. You have little visibility inside the core.
- Forgetting an IGP underneath. LDP follows the IGP. If the IGP has no route to a neighbor's loopback, no label path forms.
Exercise
A company has 12 sites and wants a full mesh of leased lines. How many circuits does it need? How many access links would it need with an MPLS service? Name one thing the MPLS service does not provide by default.
Show answer
A full mesh needs 12 x 11 / 2 = 66 circuits. An MPLS service needs 12 access links, one per site. MPLS does not provide encryption by default.