mls qos cos

mls qos cos

To define the default Multilayer Switching (MLS) class of service (CoS) value of a port or to assign the default CoS value to all incoming packets on the port, use the mls qos cos command in interface configuration mode. To return to the default CoS setting, use the no form of this command.
mls qos cos {default-cos | override}
no mls qos cos {default-cos | override}

Syntax Description

default-cos
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-Differentiated Services Code Point (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.

Defaults

The default CoS value for a port is 0.
CoS override is disabled.

Command Modes

Interface configuration

Command History

Release
Modification
12.1(6)EA2
This command was introduced. It replaced the switchport priority command.
12.2(15)ZJ
This command was implemented on the following platforms: Cisco 2600 series, Cisco 3600 series, and Cisco 3700 series routers.
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.

Usage Guidelines

You can assign the default CoS and 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 entering 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

The following example shows how to assign 4 as the default port CoS:
Router(config)# interface gigabitethernet0/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 entering the port:
Router(config)# interface gigabitethernet0/1
Router(config-if)# mls qos cos 4
Router(config-if)# mls qos cos override

Related Commands

Command
Description
mls qos map
Defines the CoS-to-DSCP map or the DSCP-to-CoS map.
mls qos trust
Configures the port trust state.
show interface fax/y switchport
Displays switch port interfaces.
show mls qos interface
Displays QoS information.

mls qos map

To define the Multilayer Switching (MLS) class of service (CoS)-to-Differentiated Services Code Point (DSCP) map or DSCP-to-CoS map, use the mls qos map command in global configuration mode. To return to the default map, use the no form of this command.
mls qos map {cos-dscp dscp1...dscp8 | dscp-cos dscp-list to cos}
no mls qos map {cos-dscp | dscp-cos}

Syntax Description

cos-dscp dscp1...dscp8
Defines the CoS-to-DSCP map.
For dscp1...dscp8, enter eight DSCP values that correspond to CoS values 0 to 7. Separate consecutive DSCP values from each other with a space.
The supported DSCP values are 0, 8, 10, 16, 18, 24, 26, 32, 34, 40, 46, 48, and 56.
dscp-cos dscp-list to cos
Defines the DSCP-to-CoS map.
For dscp-list, enter up to 13 DSCP values separated by spaces. Then enter the to keyword. The supported DSCP values are 0, 8, 10, 16, 18, 24, 26, 32, 34, 40, 46, 48, and 56.
For cos, enter the CoS value to which the DSCP value or values correspond. The CoS range is 0 to 7.

Defaults

Table 1 shows the default CoS-to-DSCP map.
Table 1 Default CoS-to-DSCP Map
CoS Value
0
1
2
3
4
5
6
7
DSCP Value
0
8
16
26
32
46
48
56

Table 2 shows the default DSCP-to-CoS map.
Table 2 Default DSCP-to-CoS Map
DSCP Values
0
8, 10
16, 18
24, 26
32, 34
40, 46
48
56
CoS Value
0
1
2
3
4
5
6
7

Command Modes

Global configuration

Command History

Release
Modification
12.1(6)EA2
This command was introduced.
12.2(15)ZJ
This command was implemented on the following platforms: Cisco 2600 series, Cisco 3600 series, and Cisco 3700 series routers.
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.

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

Related Commands

Command
Description
mls qos cos
Defines the default CoS value of a port or assigns the default CoS to all incoming packets on the port.
mls qos trust
Configures the port trust state.
show mls qos maps
Displays QoS mapping information.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章