MPLS QoS Modes
Last updated
Last updated
There are three MPLS QoS modes which are sometimes referred to as “tunneling” MPLS DiffServ. The three modes are: uniform mode, short-pipe mode, and pipe mode. The IP Precedence (or first three bits of the DSCP value) of a received customer packet is always mapped to the MPLS EXP value by default. The modes differ in whether the SP’s MPLS marking is transferred to the customer IP packet’s marking on egress at the PE-CE point.
Uniform mode means that the customer and SP QoS domain is one in the same. If the SP changes the MPLS EXP value at some point in the LSP, this change is reflected to the customer’s packet on egress. This is typically not desirable - in uniform mode the SP is overwriting the customer’s packet. However, if a single entity controls both the MPLS and customer network (as in a large enterprise running their own MPLS network) then it may make sense to use this.
Pipe and short-pipe mode means that the customer and SP QoS domains are separate. In this case, if the SP changes the MPLS EXP value in the LSP, this change is not reflected on the customer’s packet at egress. The customer’s QoS markings are left unaltered.
The difference between pipe and short-pipe is whether the egress PE uses the SP marking or customer marking when preforming QoS on the egress interface facing the CE. In short-pipe mode, the policy on the egress interface is based on the DSCP of the customer packet. The service provider’s “pipe” is shorter. In pipe mode, the pipe is “longer” because the SP controls a longer stretch of QoS control. The SP’s pipe extends to the egress interface of the egress PE, where policy is based off the MPLS EXP value, not the IP marking.
Mode
Use
Uniform
The MPLS EXP value is translated to the IP packet on egress. The customer’s packet may be altered when they receive it on egress.
Short-Pipe
The IP packet marking is independent of the MPLS EXP marking. The customer’s packet is never altered. The egress PE does policy based on the customer’s marking.
Pipe
Same as short-pipe, but the egress PE does policy based on the MPLS marking, not the customer marking.
What mode is this?
Answer: Uniform mode
What mode is this?
Answer: Pipe mode or short-pipe mode. (Not enough information to differentiate here).
What mode would you use if you want to preserve the customer’s original marking?
Answer: Pipe or short-pipe
Let’s breifly lab uniform and pipe mode. We’ll reuse our lab from the previous article.
First let’s examine what the default behavior is of our topology right now. Does it operate in uniform mode or pipe mode by default? To test we’ll need to change the EXP marking somewhere in the core network and see if it maps to the IPP value on egress.
Let’s configure P3 to re-mark data traffic from EXP 0 to EXP 2 as traffic comes from C2 destined to C1.
On C1 we’ll ping C2 and see which IPP value the return traffic (C2 to C1) has as seen on C1.
The IPP_2 counters are not incrementing on C1. Let’s take a look at the packet on the link between PE1 and P3:
The packet has a single MPLS label with EXP=0. What happened? P3 set the topmost label to EXP=2 but then popped it off. Let’s configure PE1 to signal P3 to use an explicit-null label instead of preforming PHP.
Here is a pcap taken on the same link again:
The IPP_2 counters are still not incrementing on C1. This is because, by default, the MPLS EXP value is not mapped to the IP Precedence when the label is removed.
So by default, which mode is configured right now?
The answer is pipe mode. In pipe mode, the SP and Customer have two separate QoS domains. The SP markings do not affect the Customer’s traffic. This is the default behavior because the MPLS EXP value is not mapped to the IP Precedence value.
Let’s configure uniform mode now. On PE1 we will match EXP 2 and set the IPP to 2. We cannot map the MPLS EXP directly to the IPP on ingress of Gi2, because it is only label switching the traffic and the hardware is not inspecting the IP layer. Instead we will map the MPLS EXP to a QoS-Group, and then map the QoS-Group to the IPP on egress.
When we ping again, we see the IPP has been changed to 2:
In this lab we covered the need for explicit null, and uniform/pipe modes. Uniform mode maps the EXP marking onto the IP packet. Pipe mode leaves the customer packet alone and does not map the EXP marking to the IP packet.
You’ve seen that by default, the IP packet’s IPP value is mapped to the MPLS EXP value on ingress, but the reverse is not true. The MPLS EXP value is not mapped to the customer’s IP packet on egress.
This makes sense for most deployments. You want to rely on your customer to mark voice traffic, and not require your PE to do packet inspection to figure out if it is SIP traffic, etc. Yet, if the SP uses the EXP bits to de-prioritize the traffic (perhaps because some traffic exceeded the CIR), you don’t want this to change the customer’s IP packet. The customer should be able to expect that an IP packet sent to one PE will egress the other PE unchanged.
Therefore you will likely see pipe mode in the real world. If the service provider is altering the EXP value in the LSP, then perhaps it wants to use this all the way to the egress interface of the egress PE. We saw how you must translate the EXP value to the QoS group. The QoS group is an internal marking that is not part of the actual packet, but can be used on egress.
If the SP is not changing the EXP value, then it will likely use short-pipe mode, and simply use the customer’s IP marking in the egress policy.
As you can see, these concepts are a bit wordy to explain but hopefully are fairly intuitive once you have configured it and seen it in action!
MPLS Fundamentals, Luc De Ghein, Chapter 12