Configuring Mpls Qos
Configuring Mpls Qos
• The short pipe mode is not supported to transport packets through the MPLS network. You can transport
packets using any one of the following modes—uniform mode or pipe mode.
Note A policy map configured with set ip dscp is not supported on the provider edge device because the policy
action for MPLS label imposition node should be based on set mpls experimental imposition value. However,
a policy map with action set ip dscp is supported when both the ingress and egress interfaces are Layer 3
ports.
You can perform MPLS EXP marking operations using table-maps. It is recommended to assign QoS-group
to a different class of traffic in ingress policy and translate QoS-group to DSCP and EXP markings in egress
policy using table-map.
If a service provider does not want to modify the value of the IP precedence field in packets transported
through the network, they can use the MPLS EXP field value to classify and mark IP packets.
By choosing different values for the MPLS EXP field, you can mark critical packets so that those packets
have priority if network congestion occurs.
WRED monitors network traffic to anticipate and prevent congestion at common network and internetwork
bottlenecks. WRED can selectively discard lower priority traffic when an interface becomes congested. This
feature can also provide differentiated performance characteristics for different classes of service.
There are two ways to transport packets through the MPLS network:
Uniform mode: Uniform mode of transferring packets operates on one layer of QoS. The Provider Edge at
ingress copies the DSCP information from the incoming IP packet into the MPLS EXP bits of the imposed
labels and the IP precedence bits are mapped to the MPLS EXP field . As the EXP bits travel through the
core, they may or may not be modified by the intermediate devices on the network. The Provider Edge at
egress copies the EXP bits to the DSCP bits of the newly exposed IP packet.
Pipe mode: Pipe mode of transferring packets operates on two layers of QoS. An underlying QoS for the data
that remains unchanged when traversing the core. A per-core QoS, which is separate from that of the underlying
IP packets. The DSCP information is saved and stored as the packet travels through the MPLS network. The
MPLS EXP label is applied by the PE at ingress but the IP precedence bits are not stored. At egress, the
original IP precedence value is preserved.
Procedure
Device> enable
Step 3 class-map [match-all | match-any] Creates a class map to be used for matching
class-map-name traffic to a specified class, and enters class-map
configuration mode.
Example:
• Enter the class map name.
Device(config)# class-map exp3
Device(config-cmap)# end
Note For IP imposition marking, the IP precedence value is copied to the MPLS EXP value by default.
Note The egress policy on provider edge works with MPLS EXP class match, only if there is a remarking policy
at ingress. The provider edge at ingress is an IP interface and only DSCP value is trusted by default. If you
do not configure remarking policy at ingress the label for queueing is generated based on DSCP value and
not MPLS EXP value. However, a transit provider router works without configuring remarking policy at
ingress as the router works on MPLS interfaces.
Note The set mpls experimental imposition command works only on packets that have new or additional MPLS
labels added to them.
Procedure
Device> enable
Step 5 set mpls experimental imposition Sets the value of the MPLS EXP field on top
mpls-exp-value label.
Example:
Device(config-pmap-c)# end
Note The set mpls experimental topmost command marks EXP for the outermost label of MPLS traffic. Due to
this marking at ingress policy, the egress policy must include classification based on the MPLS EXP values.
Procedure
Device> enable
Step 5 set mpls experimental topmost Sets the MPLS EXP field value in the topmost
mpls-exp-value label on the output interface.
Example:
Device(config-pmap-c)# end
Note The set-mpls-exp-topmost-transmit action affects MPLS encapsulated packets only. The
set-mpls-exp-imposition-transmit action affects any new labels that are added to the packet.
Procedure
Device> enable
Step 5 police cir bps bc pir bps be Defines a policer for classified traffic and enters
policy-map class police configuration mode.
Example:
Step 7 exceed-action set-mpls-exp-topmost-transmit Defines the action to take on packets that exceed
exp table table-map-name the values specified by the policer.
Example:
Device(config-pmap-c-police)#
exceed-action
set-mpls-exp-topmost-transmit exp table
dscp2exp
Step 8 violate-action drop Defines the action to take on packets whose rate
exceeds the peak information rate (pir) and is
Example:
outside the bc and be ranges.
Device(config-pmap-c-police)# • You must specify the exceed action before
violate-action drop you specify the violate action.
• In this example, if the packet rate exceeds
the pir rate and is outside the bc and be
ranges, the packet is dropped.
Device(config-pmap-c-police)# end
Procedure
Device(config-pmap-c-police)# end
Defining a Policy Map and Applying the Policy Map to an Ingress Interface
The following example uses the class map created in the example above to define a policy map. This
example also applies the policy map to a physical interface for ingress traffic.
Device(config)# policy-map change-exp-3-to-2
Device(config-pmap)# class exp3
Device(config-pmap-c)# set mpls experimental topmost 2
Device(config-pmap)# exit
Device(config)# interface GigabitEthernet 0/0/0
Device(config-if)# service-policy input change-exp-3-to-2
Device(config-if)# exit
Defining a Policy Map and Applying the Policy Map to an Egress Interface
The following example uses the class map created in the example above to define a policy map. This
example also applies the policy map to a physical interface for egress traffic.
Device(config)# policy-map WAN-out
Device(config-pmap)# class exp3
Device(config-pmap-c)# shape average 10000000
Device(config-pmap-c)# exit
Device(config-pmap)# exit
Device(config)# interface GigabitEthernet 0/0/0
Device(config-if)# service-policy output WAN-out
Device(config-if)# exit
Device(config-pmap-c)# exit
Device(config-pmap)# exit
Applying the MPLS EXP Label Switched Packets Policy Map to a Main Interface
The following example shows how to apply the policy map to a main interface:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Device(config)# interface GigabitEthernet 0/0/0
Device(config-if)# service-policy input mark-up-exp-2
Device(config-if)# exit
Device(config-pmap-c-police)# exit
Device(config-pmap-c)# exit
Device(config-pmap)# exit
Device(config)# interface GigabitEthernet 0/0/1
Device(config-if)# service-policy input ip2tag
Additional References
Related Documents
Cisco IOS XE Everest 16.5.1a QoS MPLS EXP The QoS EXP Matching feature
allows you to classify, mark and
queue network traffic by modifying
the Multiprotocol Label Switching
(MPLS) experimental bits (EXP)
field.
Cisco IOS XE Amsterdam 17.3.1 MPLS QoS - WRED Introduces support for weighted
random early detection (WRED) in
MPLS Quality of Service (QoS).
This feature configures WRED to
use the MPLS experimental bits
(EXP) to calculate the drop
probability of a packet.
Use Cisco Feature Navigator to find information about platform and software image support. To access Cisco
Feature Navigator, go to http://www.cisco.com/go/cfn.