[Contents] [Prev] [Next] [Index] [Report an Error]

# Configuring EXP Bits for Differentiated Services

MPLS matches on the EXP bits for incoming traffic to set the traffic class/color combination, and sets the EXP bits for outgoing traffic based on the traffic class/color combination.

## Incoming Traffic

For incoming MPLS traffic, the traffic class/color combination is set according to the EXP bits in the outermost label, either per the policy attached to the label or per the per-VR rules. The policy has precedence over the per-VR rules. Therefore, fabric queuing is always based on the outer label's EXP bits.

If the traffic is label-switched through the router, the EXP bits value associated with the incoming label that is used for switching—which can be either an outermost label or an inner label after popping one or more outer labels—is passed onto the egress line module. This behavior enables the EXP bits value to be copied to outgoing labels, used to reset the traffic class/color combination on the egress module, or both.

## Outgoing Traffic

Outgoing traffic is queued according to traffic class/color combinations. The applied combination can be the same as was set on the ingress line module, or it can be reset on the egress line module by egress IP policy.

Figure 62 illustrates how the initial value of the EXP bits is set for the first label pushed. Figure 63 illustrates how the EXP bits can be changed for all labels, including the first label, by attached policies or per-VR EXP rules. The following section describes in detail how the EXP bits value is set for outgoing traffic.

## Setting the EXP Bits for Outgoing Traffic

Different types of packets distributed into LSPs by the router have different default settings for the EXP bits. For IP packets, the EXP bits value is set to match the IP precedence value from the TOS field of the packet header. For non-IP packets, such as Martini or VPLS packets, the EXP bits value is set to 000. You can use the mpls copy-upc-to-exp command to free the EXP bits value in IP packets from being tied to the IP precedence value. Instead, this command sets the EXP bits value to match the user packet class (UPC) value.

The IP precedence value can be copied back into the IP precedence field of the IP packet header at the LSP endpoint on the ingress line module. This action takes place only if the IP header is exposed after popping the MPLS labels and if the uniform tunnel model is employed. The remaining bits of the TOS field are not touched.

In contrast, when you issue mpls copy-upc-to-exp command, the EXP bits value is not copied to the UPC field at the LSP endpoint, because the UPC value might have been set by a lower layer policy for a different purpose.

| Note: For control traffic originated from this router, if an attached per-LSP policy has rules to modify the EXP bits, or if per-VR EXP rules are configured, the EXP bits value copied from the IP precedence value might be overwritten incorrectly because the default traffic class/color combination for control traffic is best-effort/green. You can avoid this situation by establishing an outgoing IP policy that sets the traffic class/color combination for control traffic so that the policy or rules have the correct traffic class/color to work with.

If per-LSP policies are used or per-VR rules are configured, by default all labels pushed by the router for the same packet have the same EXP bits value. That value is determined by the policies or rules.

You can use the mpls preserve-vpn-exp command to specify that the EXP bits value for the VPN or Martini or VPLS label pushed by the router cannot be modified by either policy for outer labels or by per-VR rules. This capability is useful if you want the inner labels to have a different value for the EXP bits than do the outer labels. For example, in a VPN you might want the inner label’s EXP bits value to be the copied IP precedence value. You might want the base label’s EXP bits value set according to the mapping of EXP bits to traffic class/color combination that is defined in your network.

Figure 62: Flow for Initial Setting of EXP Bits for the First Label Pushed

Figure 62 shows how packet type and configuration determine how the EXP bits are set for the first label pushed.

Figure 63: Flow for Setting EXP Bits for All Pushed Labels

To set the initial value of the EXP bits to the UPC value associated with the packets:

- Issue the mpls copy-upc-to-exp command.
  `
  host1(config)#mpls copy-upc-to-exp
  `

To prevent the value of the EXP bits for a VPN/VC label from being modified by a per-LSP policy applied for the outer labels or by per-VR traffic class/color rules:

- Issue the mpls preserve-vpn-exp command.
  `
  host1(config)#mpls preserve-vpn-exp
  `

#### Related Topics

- Configuring MPLS and Differentiated Services
- Example Differentiated Services Application and Configuration
- mpls copy-upc-to-exp
- mpls preserve-vpn-exp

[Contents] [Prev] [Next] [Index] [Report an Error]