Qos m2
Qos m2
Qos m2
mls qos
no mls qos
Usage Guidelines If you enable QoS globally, QoS is enabled on all interfaces with the exception of the interfaces where
you disabled QoS. If you disable QoS globally, all traffic is passed in QoS pass-through mode.
In port-queueing mode, Policy Feature Card (PFC) QoS (marking and policing) is disabled, and packet
type of service (ToS) and class of service (CoS) are not changed by the PFC. All queueing on rcv and
xmt is based on a QoS tag in the incoming packet, which is based on the incoming CoS.
For 802.1Q or Inter-Switch Link (ISL)-encapsulated port links, queueing is based on the packet 802.1Q
or ISL CoS.
For the router main interfaces or access ports, queueing is based on the configured per-port CoS (the
default CoS is 0).
This command enables or disables ternary content addressable memory (TCAM) QoS on all interfaces
that are set in the OFF state.
This example shows how to disable QoS globally on the Cisco 7600 series router:
Router(config)# no mls qos
Router(config)#
mls qos
no mls qos
Usage Guidelines This command is deprecated on Cisco 7600 series routers that are configured with a Supervisor
Engine 2.
Although the CLI allows you to configure PFC-based QoS on the WAN ports on the OC-12 ATM OSMs
and on the WAN ports on the channelized OSMs, PFC-based QoS is not supported on the WAN ports on
these OSMs.
If you disable QoS globally, it is also disabled on all interfaces.
This command enables or disables TCAM QoS (classification, marking, and policing) for the interface.
Usage Guidelines When you enter the mls qos 10g-only command, a supervisor engine with both 1-Gigabit and 10-Gigabit
Ethernet uplink ports reallocates the interface queue capacity to improve the performance of its
10-Gigabit Ethernet ports. The reallocation is possible only in 10g-only mode, in which the supervisor
engine’s 1-Gigabit Ethernet ports are not used. In the normal mode, when all supervisor engine ports are
active, the queue structure is 2q4t on receive and 1p3q4t on transmit. In 10g-only mode, the queue
structure is 8q4t on receive and 1p7q4t on transmit.
Note To display detailed information about the queues, use the show queueing interface command.
When you switch between normal and 10g-only modes, any existing QoS configuration on the uplink
ports is lost, and you must reconfigure QoS. In addition, service will be temporarily lost on the ports
during the transition.
If you do not shut down the 1-Gigabit Ethernet ports before entering the mls qos 10g-only command,
the mls qos 10g-only command shuts down the ports.
When you switch from 10g-only mode to normal mode, you must enter the no shutdown command on
each of the 1-Gigabit Ethernet ports to resume QoS service on those ports.
In 10g-only mode, the 1-Gigabit Ethernet ports are visible, but they remain in an administratively down
state.
Examples The following example shows how to place the supervisor engine in the 10g-only mode:
Router# configure terminal
Router(config)# mls qos 10g-only
Syntax Description name Name of the aggregate policer. See the “Usage Guidelines” section for
naming conventions.
rate-bps Maximum bits per second. Range is 32000 to 10000000000.
normal-burst-bytes (Optional) Normal burst bytes. Range is 1000 to 31250000.
maximum-burst-bytes (Optional) Maximum burst bytes. Range is 1000 to 31250000 (if entered,
this value must be set equal to normal-burst-bytes).
pir peak-rate-bps (Optional) Keyword and argument that set the peak information rate
(PIR). Range is 32000 to 10000000000. Default is equal to the normal
(cir) rate.
action-type action (Optional) Action type keyword. This command may include multiple
action types and corresponding actions to set several actions
simultaneously. Valid values are:
• conform-action—Keyword that specifies the action to be taken when
the rate is not exceeded. Valid actions are:
– drop—Drops the packet.
– set-dscp-transmit value—Sets the DSCP value and sends the
packet. Valid entries are: 0 to 63 (differentiated code point
value), af11 to af43 (match packets with specified AF DSCP),
cs1 to cs7 (match packets with specified CS DSCP), default, or
ef (match packets with the EF DSCP).
– set-mpls-exp-imposition-transmit number—Sets experimental
(exp) bits at the tag imposition. Valid range is 0 to 7.
– set-prec-transmit—Rewrites packet precedence and sends the
packet.
– transmit—Transmits the packet. This is the default.
• exceed-action—Keyword that specifies the action to be taken when
QoS values are exceeded. Valid actions are:
– drop—Drops the packet. This is the default.
– policed-dscp-transmit—Changes the DSCP value according to
the policed-dscp map and sends the packet.
– transmit—Transmits the packet.
• violate-action—Keyword that specifies the action to be taken when
QoS values are violated. Valid actions are:
– drop—Drops the packet.
– policed-dscp-transmit—Changes the DSCP value according to
the policed-dscp map and sends the packet.
– transmit—Transmits the packet.
Release Modification
12.3 This command was implemented on the Cisco 6500 and Cisco 7600.
12.2(33)SRA This command was integrated into Cisco IOS Release 12.2(33)SRA.
Usage Guidelines This policer can be shared by different policy map classes and on different interfaces. The Cisco 7600
series router supports up to 1023 aggregates and 1023 policing rules.
The mls qos aggregate-policer command allows you to configure an aggregate flow and a policing rule
for that aggregate. When you enter the rate and burst parameters, the range for the average rate is 32 kbps
to 10 Gbps (entered as 32000 and 10000000000) and the range for the burst size is 1 KB (entered as
1000) to 31.25 MB (entered as 31250000). Modifying an existing aggregate rate limit entry causes that
entry to be modified in NVRAM and in the Cisco 7600 series router if that entry is currently being used.
Note Because of hardware granularity, the rate value is limited, so the burst that you configure may not be the
value that is used.
Modifying an existing microflow or aggregate rate limit modifies that entry in NVRAM as well as in the
Cisco 7600 series router if it is currently being used.
When you enter the aggregate policer name, follow these naming conventions:
• Maximum of 31 characters and may include a-z, A-Z, 0-9, the dash character (-), the underscore
character (_), and the period character (.).
• Must start with an alphabetic character and must be unique across all ACLs of all types.
• Case sensitive.
• Cannot be a number.
• Must not be a keyword; keywords to avoid are all, default-action, map, help, and editbuffer.
Aggregate policing works independently on each DFC-equipped switching module and independently
on the PFC2, which supports any non-DFC-equipped switching modules. Aggregate policing does not
combine flow statistics from different DFC-equipped switching modules. You can display aggregate
policing statistics for each DFC-equipped switching module, PFC2, and any non-DFC-equipped
switching modules that are supported by the PFC2 by entering the show mls qos aggregate policer
command.
Examples The following example shows how to configure a QoS aggregate policer to allow a maximum of 100000
bits per second with a normal burst byte size of 10000, to set DSCP to 48 when these rates are not
exceeded, and to drop packets when these rates are exceeded:
Router(config)# mls qos aggregate-policer micro-one 100000 10000 conform-action
set-dscp-transmit 48 exceed-action drop
Examples This example shows how to enable the microflow policing for bridged traffic on a VLAN interface:
Router(config-if)# mls qos bridged
Usage Guidelines The mls qos channel-consistency command is supported on port channels only.
Examples This example shows how to enable the QoS-port attribute checks on the EtherChannel bundling:
Router(config-if)# mls qos channel-consistency
This example shows how to disable the QoS-port attribute checks on the EtherChannel bundling:
Router(config-if)# no mls qos channel-consistency
Cisco 3660, 3845, 6500, 7200, 7400, and 7500 Series Routers
Syntax Description cos-value Assigns a default CoS value to a port. If the port is CoS trusted and packets are
untagged, the default CoS value is used to select one output queue as an index into
the CoS-to-DSCP map. The CoS range is 0 to 7. The default is 0.
override Overrides the CoS of the incoming packets and applies the default CoS value on the
port to all incoming packets.
Usage Guidelines Cisco 3660, 3845, 6500, 7200, 7400, and 7500 Series Routers
You can assign the default CoS and differentiated services code point (DSCP) value to all packets
entering a port if the port has been configured by use of the override keyword.
Use the override keyword when all incoming packets on certain ports deserve a higher or lower priority
than packets the enter from other ports. Even if a port was previously set to trust DSCP or CoS, this
command overrides that trust state, and all the CoS values on the incoming packets are changed to the
default CoS value that is configured with the mls qos cos command. If an incoming packet is tagged, the
CoS value of the packet is modified at the ingress port. It is changed to the default CoS of that port.
Use the show mls qos interface privileged EXEC command to verify your settings.
Examples Cisco 3660, 3845, 6500, 7200, 7400, and 7500 Series Routers
The following example shows how to assign 4 as the default port CoS:
Router(config)# interface gigabitethernet 0/1
Router(config-if)# mls qos trust cos
Router(config-if)# mls qos cos 4
The following example shows how to assign 4 as the default port CoS value for all packets the enter the
port:
Router(config)# interface gigabitethernet0/1
Router(config-if)# mls qos cos 4
Router(config-if)# mls qos cos override
Usage Guidelines This command is not supported on Cisco 7600 series routers that are configured with a Supervisor
Engine 2.
Examples This example shows how to attach the ingress-CoS mutation map named mutemap2:
Router(config-if)# mls qos cos-mutation mutemap2
Usage Guidelines This command is not supported on Cisco 7600 series routers that are configured with a Supervisor
Engine 2.
Examples This example shows how to attach the egress-DSCP mutation map named mutemap1:
Router(config-if)# mls qos dscp-mutation mutemap1
Examples This example shows how to attach the egress-exp mutation map named mutemap2:
Router(config-if)# mls qos exp-mutation mutemap2
Router(config-if)#
Usage Guidelines With mls qos loopback applied at the interface, the packets are not forwarded to the destination.
Before you enter the mls qos loopback command, you must specify a MAC address for the Optical
Services Modules (OSM) interface. The MAC address must be different from the LAN router MAC
address that is used in PFC2 hardware switching.
Examples This example shows how to prevent packets from being forwarded to the destination:
Router(config-if)# mls qos loopback
CoS Value 0 1 2 3 4 5 6 7
DSCP Value 0 8 16 26 32 46 48 56
Release Modification
12.3(4)T This command was integrated into Cisco IOS Release 12.3(4)T on the
following platforms: Cisco 2600 series, Cisco 3600 series, and Cisco 3700
series routers.
12.2(33)SRA This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.2SX This command is supported in the Cisco IOS Release 12.2SX train. Support
in a specific 12.2SX release of this train depends on your feature set,
platform, and platform hardware.
Usage Guidelines All of the CoS-to-DSCP and DSCP-to-CoS maps are globally defined. You apply all maps to all ports.
If you enter the mls qos trust cos command, the default CoS-to-DSCP map is applied.
If you enter the mls qos trust dscp command, the default DSCP-to-CoS map is applied.
After a default map is applied, you can define the CoS-to-DSCP or DSCP-to-CoS map by entering
consecutive mls qos map commands.
If the mls qos trust dscp command is entered and a packet with an untrusted DSCP value is at an ingress
port, the packet CoS value is set to 0.
Use the show mls qos maps privileged EXEC command to verify your settings.
Examples The following example shows how to define the DSCP-to-CoS map. DSCP values 16, 18, 24, and 26 are
mapped to CoS 1. DSCP values 0, 8, and 10 are mapped to CoS 0.
Router# configure terminal
Router(config)# mls qos map dscp-cos 16 18 24 26 to 1
Router(config)# mls qos map dscp-cos 0 8 10 to 0
The following example shows how to define the CoS-to-DSCP map. CoS values 0 to 7 are mapped to
DSCP values 8, 8, 8, 8, 24, 32, 56, and 56.
Router# configure terminal
Router(config)# mls qos map cos-dscp 8 8 8 8 24 32 56 56
CoS 0 1 2 3 4 5 6 7
DSCP 0 8 16 24 32 40 48 56
Usage Guidelines All of the CoS-to-DSCP and DSCP-to-CoS maps are globally defined. You apply all maps to all ports.
If you enter the mls qos trust cos command, the default CoS-to-DSCP map is applied.
If you enter the mls qos trust dscp command, the default DSCP-to-CoS map is applied.
After a default map is applied, you can define the CoS-to-DSCP or DSCP-to-CoS map by entering
consecutive mls qos map commands.
If the mls qos trust dscp command is entered and a packet with an untrusted DSCP value is at an ingress
port, the packet CoS value is set to 0.
Use the show mls qos maps privileged EXEC command to verify your settings.
Examples The following example shows how to define the CoS-to-DSCP map. CoS values 0 to 7 are mapped to
DSCP values 8, 8, 8, 8, 24, 32, 56, and 56.
Router# configure terminal
Router(config)# mls qos map cos-dscp 8 8 8 8 24 32 56 56
Command Default If the CoS-to-CoS mutation map is not configured, the default CoS-to-CoS mutation mapping is listed
in Table 15.
CoS-in 0 1 2 3 4 5 6 7
CoS-out 0 1 2 3 4 5 6 7
Usage Guidelines This command is not supported on the Catalyst 6500 series switches and the Cisco 7600 series routers
that are configured with a Supervisor Engine 2.
This command is supported on the Catalyst 6500 series switches and the Cisco 7600 series routers that
are configured with the following modules only:
• WS-X6704-10GE
• WS-X6724-SFP
• WS-X6748-GE-TX
CoS mutation is not supported on non-802.1Q tunnel ports.
When you enter the mls qos map cos-mutation command, you are configuring the mutated-CoS values
map to sequential ingress-CoS numbers. For example, by entering the mls qos map cos-mutation 2 3 4
5 6 7 0 1 command, you configure this map:
CoS-in 0 1 2 3 4 5 6 7
CoS-out 2 3 4 5 6 7 0 1
Usage Guidelines The DSCP-to-CoS map is used to map the final DSCP classification to a final CoS. This final map
determines the output queue and threshold to which the packet is assigned. The CoS map is written into
the Inter-Switch Link (ISL) header or 802.1Q tag of the transmitted packet on trunk interfaces and
contains a table of 64 DSCP values and the corresponding CoS values. The Catalyst 6500 series switch
and the Cisco 7600 series router have one map.
All of the CoS-to-DSCP and DSCP-to-CoS maps are globally defined. You apply all maps to all ports.
If you enter the mls qos trust cos command, the default CoS-to-DSCP map is applied.
If you enter the mls qos trust dscp command, the default DSCP-to-CoS map is applied.
After a default map is applied, you can define the CoS-to-DSCP or DSCP-to-CoS map by entering
consecutive mls qos map commands.
If the mls qos trust dscp command is entered and a packet with an untrusted DSCP value is at an ingress
port, the packet CoS value is set to 0.
Use the show mls qos maps privileged EXEC command to verify your settings.
Examples The following example shows how to define the DSCP-to-CoS map. DSCP values 16, 18, 24, and 26 are
mapped to CoS 1. DSCP values 0, 8, and 10 are mapped to CoS 0.
Router# configure terminal
Router(config)# mls qos map dscp-cos 16 18 24 26 to 1
Router(config)# mls qos map dscp-cos 0 8 10 to 0
Syntax Description dscp-values DSCP values; valid values are from 0 to 63.
to Defines mapping.
exp-values EXP values; valid values are from 0 to 7.
Examples This example shows how to configure the final DSCP value to a final EXP value:
Router(config)# mls qos map dscp-exp 20 25 to 3
Usage Guidelines This command is not supported on the Catalyst 6500 series switches and the Cisco 7600 series routers
that are configured with a Supervisor Engine 2.
When configuring a named DSCP mutation map, note the following:
• You can enter up to eight input DSCP values that map to a mutated DSCP value.
• You can enter multiple commands to map additional DSCP values to a mutated DSCP value.
• You can enter a separate command for each mutated DSCP value.
You can configure 15 egress-DSCP mutation maps to mutate the internal DSCP value before it is written
as the egress-DSCP value. You can attach egress-DSCP mutation maps to any interface that Policy
Feature Card (PFC) QoS supports.
PFC QoS derives the egress-class-of-service (CoS) value from the internal DSCP value. If you configure
egress-DSCP mutation, PFC QoS does not derive the egress-CoS value from the mutated DSCP value.
Examples This example shows how to map DSCP 30 to mutated DSCP value 8:
Router(config)# mls qos map dscp-mutation mutemap1 30 to 8
Syntax Description dscp-values Defines the ingress EXP value to the internal DSCP map. Range: 0 to 63.
EXP 0 1 2 3 4 5 6 7
DSCP 0 8 16 24 32 40 48 56
Examples This example shows how to configure the received EXP value to an internal DSCP value:
Router(config)# mls qos map exp-dscp 20 25 30 31 32 32 33 34
Command Default If the EXP-to-EXP mutation map is not configured, the default EXP-to-EXP mutation mapping is listed
in Table 19.
EXP-in 0 1 2 3 4 5 6 7
EXP-out 0 1 2 3 4 5 6 7
Usage Guidelines This command is not supported on the Catalyst 6500 series switch and the Cisco 7600 series router that
are configured with a Supervisor Engine 2.
This command is supported in PFC3BXL or PFC3B mode only.
When you enter the mls qos map exp-mutation command, you are configuring the mutated EXP values
map to the sequential EXP numbers. For example, by entering the mls qos map exp-mutation 2 3 4 5 6
7 0 1 command, you configure the map as shown in Table 20 below:
EXP-in 0 1 2 3 4 5 6 7
EXP-out 2 3 4 5 6 7 0 1
Examples This example shows how to map the EXP value of a packet to a new EXP value:
Router(config)# mls qos map exp-mutation mutemap1 1 2 3 4 5 6 7 0
Syntax Description dscp-values DSCP values corresponding to IP precedence values 0 to 7; valid values are
from 0 to 63.
IP-Precedence 0 1 2 3 4 5 6 7
DSCP 0 8 16 24 32 40 48 56
Usage Guidelines Use the mls qos map ip-prec-dscp command to map the IP precedence of IP packets arriving on trusted
interfaces (or flows) to a DSCP when the trust type is trust-ipprec.
You can enter up to eight DSCP values separated by a space.
This map is a table of eight precedence values (0 through 7) and their corresponding DSCP values. The
Catalyst 6500 series switch and the Cisco 7600 series router have one map. The IP precedence values
are as follows:
• network 7
• internet 6
• critical 5
• flash-override 4
• flash 3
• immediate 2
• priority 1
• routine 0
Examples This example shows how to configure the ingress-IP precedence-to-DSCP mapping for trusted
interfaces:
Router(config)# mls qos map ip-prec-dscp 20 30 1 43 63 12 13 8
mls qos map policed-dscp {normal-burst | max-burst} dscp1 [dscp2 [dscp3 [dscp4 [dscp5 [dscp6
[dscp7 [dscp8]]]]]]] to policed-dscp
Syntax Description normal-burst Configures the markdown map used by the exceed-action
policed-dscp-transmit keywords.
max-burst Configures the markdown map used by the violate-action
policed-dscp-transmit keywords.
dscp1 DSCP value. Range: 0 to 63.
dscp2 through dscp8 (Optional) DSCP values. Range: 0 to 63.
to Defines mapping.
policed-dscp Policed-to-DSCP values; valid values are from 0 to 63.
Usage Guidelines The DSCP-to-policed-DSCP map determines the marked-down DSCP value that is applied to
out-of-profile flows. The Catalyst 6500 series switch and the Cisco 7600 series router have one map.
You can enter up to eight DSCP values separated by a space.
You can enter up to eight policed DSCP values separated by a space.
Note To avoid out-of-sequence packets, configure the DSCP-to-policed-DSCP map so that marked-down
packets remain in the same queue as the in-profile traffic.
Examples This example shows how to map multiple DSCPs to a single policed-DSCP value:
Router(config)# mls qos map policed-dscp 20 25 43 to 4
Usage Guidelines Use the mls qos marking ignore port-trust command to mark packets even if the interface is trusted.
Examples This example shows how to mark packets even if the interface is trusted:
mls qos marking ignore port-trust
Usage Guidelines This command is not supported on Cisco 7600 series routers that are configured with a Supervisor
Engine 2.
Use the show policy-map interface command to display policy-map statistics.
Examples This example shows how to disable allocation of the policer-traffic class identification with set actions:
Router(config)# mls qos marking statistics
This example shows how to allow allocation of the policer-traffic class identification with set actions:
Router(config)# no mls qos marking statistics
Command Default With the trusted state enabled, the defaults are as follows:
• Untrusted—The packets are marked to 0 or by policy.
• trust-cos.
With the trusted state disabled, the defaults are as follows:
• trust-exp—The port or policy trust state is ignored.
• The packets are marked by policy.
Usage Guidelines You can enter the mls qos mpls trust experimental command to treat MPLS packets as other Layer 2
packets for class of service (CoS) and egress queueing purposes (for example, to apply port or policy
trust). All trusted cases (trust CoS/IP/Differentiated Services Code Point (DSCP)) are treated as
trust-cos.
Class of Service (CoS) refers to three bits in either an ISL header or an 802.1Q header that are used to
indicate the priority of the Ethernet frame as it passes through a switched network. The CoS bits in the
802.1Q header are commonly referred to as the 802.1p bits. To maintain QoS when a packet traverses
both Layer 2 and Layer 3 domain, the ToS and CoS values can be mapped to each other.
Examples This example shows how to set the trusted state of MPLS packets to trust-cos:
Router(config-if)# mls qos mpls trust experimental
This example shows how to set the trusted state of MPLS packets to untrusted:
Router(config-if)# no mls qos mpls trust experimental
Usage Guidelines This command is supported on PFC3BXL or PFC3B mode only. With Release 12.2(17b)SXA, enter the
show platform earl-mode command to display the PFC3 mode.
This command is not supported on Cisco 7600 series routers that are configured with a Supervisor
Engine 2.
Use the no mls qos police redirected command whenever you require NetFlow Data Export (NDE)
accuracy (if you do not require QoS-redirected packets).
Examples This example shows how to turn on the ACL-redirected packet policing:
Router(config)# mls qos police redirected
This example shows how to turn off the ACL-redirected packet policing:
Router(config)# no mls qos police redirected
Usage Guidelines You can use the mls qos police serial command to configure the PFC3C or PFC3CXL ingress and egress
policers to operate independently of each other (in serial mode). Normally, ingress and egress policers
operate in parallel mode, where action by one policer causes a corresponding action in the other. For
example, if the egress policer drops a packet, the ingress policer does not count the packet either. In serial
mode, however, action by one policer does not cause a corresponding action in the other.
Examples The following command example shows how to enable serial policing mode on the PFC3C or PFC3CXL:
Router(config)# mls qos police serial
Syntax Description protocol-name Protocol name. Valid values include the following:
• arp
• bfd-ctrl
• bfd-echo
• bgp
• eigrp
• glbp
• igrp
• isis
• ldp
• nd
• ospf
• rip
• vrrp
pass-through Specifies pass-through mode.
police rate Specifies the maximum bits per second (bps) to be policed. Valid values are from
32000 to 4000000000.
burst (Optional) Normal burst bytes. Valid values are from 1000 to 31250000.
precedence value Specifies the IP-precedence value of the protocol packets to rewrite. Valid values
are from 0 to 7.
Usage Guidelines This command does not support ARP, ISIS, or EIGRP on Cisco 7600 series routers that are configured
with a Supervisor Engine 2.
If you enter the precedence value keyword and arguments without entering the police rate burst
keyword and arguments, only the packets from an untrusted port are marked.
You can make the protocol packets avoid the per-interface policy maps by entering the police rate,
pass-through, or precedence value keywords and arguments.
The mls qos protocol command allows you to define the routing-protocol packet policing as follows:
• When you specify the pass-through mode, the DSCP value does not change and is not policed.
• When you set the police rate, the DSCP value does not change and is policed.
• When you specify the precedence value, the DSCP value changes for the packets that come from
an untrusted port, the class of service (CoS) value that is based on DSCP-to-CoS map changes, and
the traffic is not policed.
• When you specify the precedence value and the police rate, the DSCP value changes, the CoS value
that is based on DSCP-to-CoS map changes, and the DSCP value is policed. In this case, the DSCP
value changes are based on the trust state of the port; the DSCP value is changed only for the packets
that come from an untrusted port.
• If you do not enter a precedence value, the DSCP value is based on whether or not you have enabled
multilayer switching (MLS) QoS as follows:
– If you enabled MLS QoS and the port is untrusted, the internal DSCP value is overwritten to
zero.
– If you enabled MLS QoS and the port is trusted, then the incoming DSCP value is maintained.
You can make the protocol packets avoid policing completely if you choose the pass-through mode. If
the police mode is chosen, the committed information rate (CIR) specified is the rate that is used to
police all the specified protocol’s packets, both entering or leaving the Cisco 7600 series router.
To protect the system by ARP broadcast, you can enter the mls qos protocol arp police bps command.
Examples This example shows how to define the routing-protocol packet policing:
Router(config)# mls qos protocol arp police 43000
This example shows how to define the IP-precedence value of the protocol packets to rewrite:
Router(config)# mls qos protocol bgp precedence 4
This example shows how to define the IP-precedence value of the protocol packets to rewrite and police
the DSCP value:
Router(config)# mls qos protocol bgp precedence 4 police 32000 1200
Usage Guidelines In port-queueing mode, Policy Feature Card (PFC) QoS (marking and policing) is disabled, and packet
type of service (ToS) and class of service (CoS) are not changed by the PFC. All queueing on rcv and
xmt is based on a QoS tag in the incoming packet, which is based on the incoming CoS.
For 802.1Q or Inter-Link Switch (ISL)-encapsulated port links, queueing is based on the packet 802.1Q
or ISL CoS.
For router main interfaces or access ports, queueing is based on the configured per-port CoS (the default
CoS is 0).
Examples This example shows how to enable the port-queueing mode globally:
Router(config)# mls qos queueing-only
Command Default The queuing mode of an interfaces is class of service (CoS) mode.
Examples This example shows how to set the queuing mode to DSCP on an interface:
mls qos queue-mode mode-dscp
Syntax Description slot slot (Optional) Specifies the slot number. Use the mls qos rewrite ip dscp slot ?
command to determine the valid slots for your chassis.
Usage Guidelines This command is not supported on Cisco 7600 series routers that are configured with a Supervisor
Engine 2.
If you disable ToS-to-DSCP rewrite, and QoS is enabled globally, the following occurs:
• Final ToS-to-DSCP rewrite is disabled, and the DSCP packet is preserved.
• Policing and marking function according to the QoS configuration.
• Marked and marked-down class of service (CoS) is used for queueing.
• In QoS disabled mode, both ToS and CoS are preserved.
The no mls qos rewrite ip dscp command is incompatible with Multiprotocol Label Switching (MPLS).
The default mls qos rewrite ip dscp command must remain enabled in order for the PFC3BXL or
PFC3B to assign the correct MPLS Experimental (EXP) value for the labels that it imposes. This
restriction does not apply to PFC3C or PFC3CXL forward.
The mls qos rewrite ip dscp slot command can be used for disabling ToS-to-DSCP rewrite on
supervisors or DFC linecards. Although the command will be accepted for non-DFC linecard slots, it
does not come into effect unless a DFC linecard is inserted into that slot.
To disable rewrite on packets that are coming in on non-DFC linecards, disable the rewrite on the
supervisor slots. Note that this disables the rewrite on packets that are coming in on all non-DFC
linecards on the system.
Examples The following example shows how to enable ToS-to-DSCP rewrite in slot 4:
Router(config)# mls qos rewrite ip dscp slot 4
Usage Guidelines You must enable data export globally to set up data export on your Cisco 7600 series router.
QoS-statistics data export is not supported on OSM interfaces.
For QoS-statistics data export to perform correctly, you should set the export-destination hostname or
IP address and the User Datagram Port (UDP) number.
For example, if you have QoS-statistics data export that is enabled on FastEthernet4/5, the exported
records could be (in this example, the delimiter is a | [pipe]) as follows:
|1|4/5|123|80|12500|6800|982361894|
Usage Guidelines QoS-statistics data export is not supported on Optical Services Modules (OSM) interfaces.
You must enable data export on the shared aggregate policer and globally to set up data export on your
Cisco 7600 series router.
QoS-statistics data is exported using delimiter-separated fields. You can set the delimiter by entering the
mls qos statistics-export delimiter command.
For each data export-enabled shared aggregate or named policer, statistics data per policer per EARL is
exported. For each data export-enabled shared aggregate or named policer, the following information is
exported:
• Type (3 denotes aggregate policer export type)
• Aggregate name
• Direction (in or out)
• Encoded Address Recognition Logic (EARL) identification
• Accepted packets (accumulated hardware-counter values)
• Exceeded normal-rate packets (accumulated hardware-counter values)
• Exceeded excess-rate packets (accumulated hardware-counter values)
• Time stamp (time in seconds since January 1, 1970 UTC relative)
If a shared aggregate policer is attached to policies in both directions, two records are exported (one in
each direction). Each record will contain the same counter values for accepted packets, exceeded normal
packet rates, and exceeded excess packet rates.
For example, if you have the following configuration:
• QoS-statistics data export that is enabled on the shared aggregate policer named “aggr_1”
• An EARL in the supervisor engine that is installed in slot 1
• An EARL on the Distributed Forwarding Card (DFC) that is installed in slot 3
the exported records could be (note that in this example, the delimiter is a | [pipe]) as follows:
|3|agg_1|in|1|45543|2345|982361894|
|3|agg_1|in|3|45543|2345|982361894|
Examples This example shows how to enable per-shared aggregate or named-policer data export:
Router(config)# mls qos statistics-export aggregate-policer aggr1M
If the interface is a Cisco 7600 series router VLAN, the following information is exported:
• Type (5 denotes class-map VLAN export)
• Class-map name
• Direction (in or out)
• Encoded Address Recognition Logic (EARL) identification (slot number in which the EARL is
installed)
• VLAN number
• Accepted packets (cumulated hardware-counter values)
• Exceeded normal-rate packets (cumulated hardware-counter values)
• Exceeded excess-rate packets (cumulated hardware-counter values)
• Time stamp (time in seconds since January 1, 1970 UTC relative)
If the interface is a Cisco 7600 series router port channel, the following information is exported:
• Type (6 denotes class-map port-channel export)
• Class-map name
• Direction (in or out)
• EARL identification (slot number in which the EARL is installed)
• Port-channel number
• Accepted packets (cumulated hardware-counter values)
• Exceeded normal-rate packets (cumulated hardware-counter values)
• Exceeded excess-rate packets (cumulated hardware-counter values)
• Time stamp (time in seconds since January 1, 1970 UTC relative)
For example, if you have the following configuration:
• QoS-statistics data export enabled on the class map named “class_1”
• An EARL in the supervisor engine that is installed in slot 1
• An EARL on the Distributed Forwarding Card (DFC) that is installed in slot 3
• The Cisco 7600 series router is in the policy map named “policy_1”
• policy_1 is attached to the following interfaces in the ingress direction:
– FastEthernet4/5
– VLAN 100
– Port-channel 24
The exported records could be (in this example, the delimiter is a | [pipe]) as follows:
|4|class_1|in|4/5|45543|2345|2345|982361894|
|5|class_1|in|1|100|44000|3554|36678|982361894|
|5|class_1|in|3|100|30234|1575|1575|982361894|
Examples This example shows how to enable QoS-statistics data export for a class map:
Router(config)# mls qos statistics-export class-map class3
Usage Guidelines QoS-statistics data export is not supported on Optical Service Module (OSM) interfaces.
You must enable data export globally to set up data export on your Cisco 7600 series router.
Examples This example shows how to set the QoS-statistics data-export field delimiter (a comma) and verify the
configuration:
Router(config)# mls qos statistics-export delimiter ,
Command Default The default is none unless syslog is specified. If syslog is specified, the defaults are as follows:
• port is 514.
• facility is local6.
• severity is debug.
Usage Guidelines QoS-statistics data export is not supported on Optical Service Module (OSM) interfaces.
Valid facility values are as follows:
• authorization—Security/authorization messages
• cron—Clock daemon
• daemon—System daemon
• kernel—Kernel messages
• local0—Local use 0
• local1—Local use 1
• local2—Local use 2
• local3—Local use 3
• local4—Local use 4
• local5—Local use 5
• local6—Local use 6
• local7—Local use 7
• lpr—Line printer subsystem
• mail—Mail system
• news—Network news subsystem
• syslog—Messages that are generated internally by syslogd
• user—User-level messages
• uucp—UNIX-to-UNIX Copy Program (UUCP) subsystem
Valid severity levels are as follows:
• alert—Action must be taken immediately
• critical—Critical conditions
• debug—Debug-level messages
• emergency—System is unusable
• error—Error conditions
• informational—Informational
• notice—Normal but significant conditions
• warning—Warning conditions
Examples This example shows how to specify the destination host address and syslog as the UDP port number:
Router(config)# mls qos statistics-export destination 172.20.52.3 syslog
Syntax Description interval Export time; valid values are from 30 to 65535 seconds.
Usage Guidelines QoS-statistics data export is not supported on Optical Services Module (OSM) interfaces.
The interval needs to be short enough to avoid counter wraparound with the activity in your
configuration.
Caution Be careful when decreasing the interval because exporting QoS statistics imposes a noticeable load on
the Cisco 7600 series router.
Examples This example shows how to set the QoS-statistics data-export interval:
Router(config)# mls qos statistics-export interval 250
Usage Guidelines The RSP720-10GE has both 10GE and 1GE uplink ports. You can configure the RSP720-10GE to run
QoS features on all uplink ports (mixed mode) or on 10GE ports only. The number of queues available
for QoS depends on which mode is used:
• In mixed mode (10GE and 1GE ports), the default, only four queues are available for QoS.
The QoS port architecture for fixed mode for 1GE ports is (Rx/Tx): 2q8t/1p3q8t.
• In 10GE only mode, eight queues are available for QoS.
The QoS port architecture for 10GE only mode is as follows (Rx/Tx):
– 8q8t/1p7q8t (CoS)
– 16q8t/1p15q8t (DSCP)
– 16q1t/1p15q1t (VLAN)
When you switch between mixed-mode QoS and 10GE only mode, service is temporarily lost on the
RSP720-10GE uplinks. In addition, when you switch between modes, any existing QoS configuration
on the uplinks is lost. You must reconfigure QoS.
When you switch from 10GE only to mixed-mode QoS, you must issue the no shutdown command on
each of the three 1GE ports to resume QoS service on those ports.
In 10GE only mode, the 1GE ports are visible but they remain in an administratively down state.
Note To obtain more information on queues, use the show queueing interface command.
Examples The following example shows how to configure the RSP720-10GE to run QoS on 10GE ports only:
Router(config)# mls qos supervisor 10g-only
The following ports will be shut to enable 10g-only mode:
Gix/1 Gix/2 Gix/3
The following example shows how in a redundant setup (High Availability), the 1GE uplink ports on
both supervisors are shut down even though the redundant links are not used:
Router(config)# mls qos supervisor 10g-only
The following ports will be shut to enable 10g-only mode:
Gi6/1 Gi6/2 Gi6/3 Gi5/1 Gi5/2 Gi5/3
Syntax Description cos (Optional) Classifies incoming packets that have packet CoS values. The CoS
bits in incoming frames are trusted. The internal DSCP value is derived from the
CoS bits. The port default CoS value should be used for untagged packets.
device cisco-phone (Optional) Configures Cisco Discovery Protocol (CDP) to detect whether or not
a Cisco IP phone is attached to the port.
• If CDP detects a Cisco IP phone, QoS applies a configured mls qos trust
dscp, mls qos trust ip-precedence, or mls qos trust cos interface command.
• If CDP does not detect a Cisco IP phone, QoS ignores any configured
nondefault trust state.
dscp (Optional) Classifies incoming packets that have packet DSCP values (the most
significant 6 bits of the 8-bit service-type field). The ToS bits in the incoming
packets contain the DSCP value. For non-IP packets, the packet CoS value is 0.
If you do not enter a keyword, mls qos trust dscp is assumed.
ip-precedence (Optional) Specifies that the ToS bits in the incoming packets contain an IP
precedence value. The internal DSCP value is derived from the IP-precedence
bits.
Release Modification
12.2(33)SRA This command was integrated into Cisco IOS Release 12.2(33)SRA.
12.3(4)T This command was integrated into Cisco IOS Release 12.3(4)T on the
following platforms: Cisco 2600 series, Cisco 3600 series, and Cisco 3700
series routers.
12.2(33)SXI This command was modified. The device cisco-phone keywords were added.
Usage Guidelines Packets that enter a QoS domain are classified at its edge. Because the packets are classified at the edge,
the switch port within the QoS domain can be configured to a trusted state. It is not necessary to classify
the packets at every switch within the domain. Use the mls qos trust command to set the trusted state
of an interface and to indicate which fields of the packet are used to classify traffic.
When a port is configured with trust DSCP or trust IP precedence and the incoming packet is a non-IP
packet, the CoS-to-DSCP map is used to derive the corresponding DSCP value from the CoS value. The
CoS can be the packet CoS for trunk ports or the port default CoS for nontrunk ports.
If the DSCP is trusted, the DSCP field of the IP packet is not modified. However, it is still possible that
the CoS value of the packet is modified (according to DSCP-to-CoS map).
If the CoS is trusted, the CoS field of the packet is not modified, but the DSCP can be modified
(according to CoS-to-DSCP map) if the packet is an IP packet.
The trusted boundary with Cisco device verification feature, implemented with the device cisco-phone
keywords, prevents security problems if users connect a non-phone device to a switch port that is
configured to support a Cisco IP phone. You must globally enable CDP on the switch and on the port
connected to the IP phone. If a Cisco IP phone is not detected, QoS does not apply any configured
nondefault trust setting, which prevents misuse of a high-priority queue.
If you configure the trust setting for DSCP or IP precedence, the DSCP or IP precedence values in the
incoming packets are trusted. If you configure the mls qos cos override interface configuration
command on the switch port connected to the IP phone, the switch overrides the CoS of the incoming
voice and data packets and assigns the default CoS value to them.
For an inter-QoS domain boundary, you can configure the port to the DSCP-trusted state and apply the
DSCP-to-DSCP-mutation map if the DSCP values are different between the QoS domains.
Classification using a port trust state (for example, mls qos trust [cos | dscp | ip-precedence] and a
policy map (for example, service-policy input policy-map-name) are mutually exclusive. The last one
configured overwrites the previous configuration.
The following conditions apply to the mls qos trust command running on the Catalyst 6500 series
switches or the Cisco 7600 series routers:
• The cos keyword is not supported for pos or atm interface types.
• The trust state does not apply to FlexWAN modules.
• The trust state does not apply to 1q4t LAN ports except for Gigabit Ethernet ports.
• Incoming queue drop thresholds are not implemented when you enter the mls qos trust cos
command on 4-port Gigabit Ethernet WAN modules.
Note Use the set qos-group command to set the trust state on Catalyst 6500 series switch and Cisco 7600
series router Layer 2 WAN interfaces.
Examples The following example shows how to set the trusted state of an interface to IP precedence:
Router(config-if)# mls qos trust ip-precedence
The following example shows how to configure CDP to detect a Cisco IP phone connected to the port:
Router(config-if)# mls qos trust device cisco-phone
Syntax Description cos value (Optional) Specifies the class of service (CoS) value that is used to remark the
packets from the PC; valid values are from 0 to 7.
Examples This example shows how to set the phone that is attached to the switch port in trust mode:
Router(config-if)# interface fastethernet5/1
Router(config-if)# mls qos trust extend
This example shows how to change the mode to untrusted and set the remark CoS value to 3:
Router(config-if)# interface fastethernet5/1
Router(config-if)# mls qos trust extend cos 3
This example shows how to set the configuration to the default mode:
Router(config-if)# interface fastethernet5/1
Router(config-if)# no mls qos trust extend
Command Default No marking operation is performed on the incoming packets or the GRE headers.
Usage Guidelines This command is supported on Supervisor Engine 4/PFC3C systems only.
Enter the show mls qos command to verify the configuration.
Examples The following example shows how to enable the original QoS marking of ingress packets to be copied
into the DSCP field and copied in the GRE header:
Router(config-if)# mls qos tunnel gre input uniform-mode
Usage Guidelines This command is supported on switch-port and port-channel interfaces only.
In VLAN-based mode, the policy map that is attached to the Layer 2 interface is ignored, and QoS is
driven by the policy map that is attached to the corresponding VLAN interface.
You can configure per-VLAN QoS only on Layer 2 interfaces.
Note Layer 3 interfaces are always in interface-based mode. Layer 3 VLAN interfaces are always in
VLAN-based mode.
Examples This example shows how to enable per-VLAN QoS for a Layer 2 interface:
Router(config-if)# mls qos vlan-based
monitor pids
To configure the program identifiers (PIDs) to be monitored in the Media Delivery Index (MDI) flow,
use the monitor pids command in the monitor metric mdi mode. To auto-learn the PIDs, use the no form
of this command.
no monitor pids
Syntax Description pid1 [pid2] [pid3] PIDs you monitor in the MDI flows. The PID value range is 2 to 8190.
[pid4] [pid5] (Corresponding hexadecimal format range for PIDs: 0x2 to 0x1FFE)
Usage Guidelines Use the monitor pids command to configure the PIDs to monitor in a MDI flow. By default, the first five
PIDs in a new MDI flow stream are logged for monitoring. These PIDs can be video, audio or caption PIDs.
However, monitoring PIDs for audio or caption data is not a priority for a customer implementing inline
video monitoring, and is optional.
mpls experimental
To configure Multiprotocol Label Switching (MPLS) experimental (EXP) levels for a virtual circuit
(VC) class that can be assigned to a VC bundle and thus applied to all VC members of that bundle, use
the mpls experimental command in VC-class configuration mode. To remove the MPLS EXP levels
from the VC class, use the no form of this command.
To configure the MPLS EXP levels for a VC member of a bundle, use the mpls experimental command
in bundle-vc configuration mode. To remove the MPLS EXP levels from the VC, use the no form of this
command.
no mpls experimental
Syntax Description other (Optional) Specifies any MPLS EXP levels in the range from 0 to 7 that are
not explicitly configured. This is the default.
range (Optional) A single MPLS EXP level specified as a number from 0 to 7, or
a range of levels, specified as a hyphenated range.
Defaults Defaults to other, that is, any MPLS EXP levels in the range from 0 to 7 that are not explicitly
configured.
Usage Guidelines Assignment of MPLS EXP levels to VC bundle members allows you to create differentiated service
because you can distribute the MPLS EXP levels over the different VC bundle members. You can map
a single level or a range of levels to each discrete VC in the bundle, thereby enabling VCs in the bundle
to carry packets marked with different levels. Alternatively, you can configure a VC with the mpls
experimental other command to indicate that it can carry traffic marked with levels not specifically
configured for it. Only one VC in the bundle can be configured with the mpls experimental other
command to carry all levels not specified. This VC is considered the default one.
To use this command in VC-class configuration mode, enter the vc-class atm global configuration
command before you enter this command. This command has no effect if the VC class that contains the
command is attached to a standalone VC, that is, if the VC is not a bundle member.
To use this command to configure an individual bundle member in bundle-VC configuration mode, first
enter the bundle command to enact bundle configuration mode for the bundle to which you want to add
or modify the VC member to be configured. Then use the pvc-bundle command to specify the VC to be
created or modified and enter bundle-VC configuration mode.
VCs in a VC bundle are subject to the following configuration inheritance guidelines (listed in order of
next highest MPLS EXP level):
• VC configuration in bundle-VC mode
• Bundle configuration in bundle mode (with the effect of assigned VC class configuration)
• Subinterface configuration in subinterface mode
Note If you are using an ATM interface, you must configure all MPLS EXP levels (ranging from 0 to 7) for
the bundle. For this configuration, Cisco recommends configuring one member of the bundle with the
mpls experimental other command. The other keyword defaults to any MPLS EXP level in a range
from 0 to 7 that is not explicitly configured.
Examples The following example configures a class named control-class that includes an mpls experimental
command that, when applied to a bundle, configures all VC members of that bundle to carry MPLS EXP
level 7 traffic. Note that VC members of that bundle can be individually configured with the mpls
experimental command at the bundle-vc level, which would supervene.
vc-class atm control-class
mpls experimental 7
The following example configures permanent virtual circuit (PVC) 401, named control-class, to carry
traffic with MPLS EXP levels in the range of 4 to 2, overriding the level mapping set for the VC through
VC-class configuration:
pvc-bundle control-class 401
mpls experimental 4-2