Sub topic 9
MPLS QoS Classes and Traffic Engineering
This chapter assumes you can read basic router CLI, understand IP routing and BGP at a conceptual level, and know how MPLS labels are pushed, swapped, and popped. It covers two things providers do on top of label switching: give some traffic better treatment, and steer traffic away from the shortest path.
Why MPLS needs QoS and TE
Label switching only forwards packets. It does not decide which packets get priority during congestion, and it follows the IGP shortest path by default. Two tools address these gaps:
- Quality of Service (QoS) gives different traffic classes different treatment, such as lower delay for voice.
- Traffic engineering (TE) places traffic on chosen paths so that links are used evenly and important flows get the capacity they need.
QoS: carrying the class in the label
An MPLS label is 32 bits. Three of them are the EXP bits, now officially called the Traffic Class (TC) field. They allow eight values (0 to 7).
When an ingress PE router pushes a label, it maps the packet's IP marking (usually DSCP) into the TC field. Core routers (P routers) then look only at the TC field. They do not need to inspect the IP header, which is hidden behind the label stack.
| Class | Typical traffic | Typical treatment |
|---|---|---|
| Real-time | Voice | Strict priority queue, low latency |
| Critical data | ERP, signaling | Guaranteed bandwidth |
| Best effort | General business data | Remaining bandwidth |
| Scavenger | Backups, bulk transfers | Dropped first |
The provider usually sells a small number of classes, often three to five, and maps the customer's DSCP values into them at the PE.
Tunnel modes
Providers choose how the customer's marking relates to the core marking:
- Uniform mode: the TC value and the IP marking are treated as one. If the core changes the TC value, the change is copied back to the IP header at the egress.
- Pipe and short-pipe modes: the provider sets its own TC value for core treatment, and the customer's DSCP is left unchanged end to end. This is the usual choice for VPN services, because the provider does not want to rewrite customer markings.
Traffic engineering
By default, the IGP sends all traffic along the lowest-cost path. The shorter path can become congested while a longer one sits idle. MPLS TE builds explicit label switched paths, called TE tunnels, that follow a route chosen for capacity or other constraints rather than only the IGP metric.
TE works in four steps:
- The IGP (OSPF or IS-IS) is extended to advertise link bandwidth and attributes.
- The head-end router computes a path that satisfies the constraints, using Constrained Shortest Path First (CSPF).
- RSVP-TE signals the path and reserves bandwidth hop by hop.
- Traffic is directed into the tunnel, for example by a static route or autoroute.
TE also supports Fast Reroute (FRR). A backup path is pre-computed so that traffic can switch in about 50 ms after a link failure, which is faster than waiting for the IGP to reconverge.
Common errors
- Assuming the TC field is copied from DSCP automatically in every case. Check the ingress marking policy.
- Forgetting that TE tunnels are unidirectional. Return traffic needs its own tunnel.
- Reserving bandwidth in RSVP-TE and assuming it limits actual traffic. The reservation is a signaling value. It does not police packets.
Exercise
A provider wants to give a customer's voice traffic strict priority in the core without changing the DSCP values the customer set. Which tunnel mode fits, and which field do core routers use to classify the traffic?
Show answer
Pipe (or short-pipe) mode. Core routers classify by the MPLS TC (EXP) bits, which the PE set when it pushed the label, so the customer's DSCP stays unchanged.
Exercise
Why can an MPLS TE tunnel from PE A to PE D not carry traffic from D back to A?
Show answer
TE tunnels are unidirectional. A separate tunnel must be configured from D to A for the return direction.