To configure the quality of service (QoS) port trust state and to classify traffic by examining the class of service (CoS)
or differentiated services code point (DSCP) value, use the
mlsqostrust command in interface configuration mode. To return a port to its untrusted state, use the
no form of this command.
mls qos trust [cos | device cisco-phone | dscp | ip-precedence]
no mls qos trust
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
mlsqostrustdscp ,
mlsqostrustip-precedence , or
mlsqostrustcos 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,
mlsqostrustdscp 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.
|
Command Default
The defaults are as follows:
-
If you enable global QoS, the port is not trusted.
-
If no keyword is specified or the global QoS is disabled, the default is
dscp .
Command Modes
Interface configuration (config-if)
Command History
Release
|
Modification
|
12.1(6)EA2
|
This command was introduced.
|
12.2(14)SX
|
This command was modified. Support for this command was introduced on the Catalyst 6500 series switches and the Cisco 7600
series routers.
|
12.2(15)ZJ
|
This command was implemented on the following platforms: Cisco 2600 series routers, Cisco 3600 series routers, and Cisco
3700 series routers.
|
12.2(17d)SXB
|
This command was implemented on the Cisco 7600 series routers and integrated into Cisco IOS Release 12.2(17d)SXB.
|
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
devicecisco-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
mlsqostrust 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
devicecisco-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
mlsqoscosoverride 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-policyinput policy-map-name ) are mutually exclusive. The last one configured overwrites the previous configuration.
The following conditions apply to the
mlsqostrust 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
mlsqostrustcos command on 4-port Gigabit Ethernet WAN modules.
Note
|
Use the
setqos-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