- Classification Overview
- IPv6 Quality of Service
- Configuring Committed Access Rate
- IPv6 QoS: MQC Packet Marking/Remarking
- Marking Network Traffic
- QoS Tunnel Marking for GRE Tunnels
- IPv6 QoS: MQC Packet Classification
- Classifying Network Traffic
- Class-Based Ethernet CoS Matching and Marking
- Quality of Service for VPNs
Contents
- Class-Based Ethernet CoS Matching and Marking
- Finding Feature Information
- Prerequisites for Class-Based Ethernet CoS Matching and Marking
- Information About Class-Based Ethernet CoS Matching and Marking
- Layer 2 CoS Values
- How to Configure Class-Based Ethernet CoS Matching and Marking
- Configuring Class-Based Ethernet CoS Matching
- Configuring Class-Based Ethernet CoS Marking
- Configuration Examples for Class-Based Ethernet CoS Matching and Marking
- Example: Configuring Class-Based Ethernet CoS Matching
- Example: Class-Based Ethernet CoS Marking
- Additional References for Class-Based Ethernet CoS Matching and Marking
- Feature Information for Class-Based Ethernet CoS Matching & Marking
Class-Based Ethernet CoS Matching and Marking
The Class-Based Ethernet CoS Matching and Marking (801.1p and ISL CoS) feature allows you to mark and match packets using Class of Service (CoS) values.
- Finding Feature Information
- Prerequisites for Class-Based Ethernet CoS Matching and Marking
- Information About Class-Based Ethernet CoS Matching and Marking
- How to Configure Class-Based Ethernet CoS Matching and Marking
- Configuration Examples for Class-Based Ethernet CoS Matching and Marking
- Additional References for Class-Based Ethernet CoS Matching and Marking
- Feature Information for Class-Based Ethernet CoS Matching & Marking
Finding Feature Information
Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Prerequisites for Class-Based Ethernet CoS Matching and Marking
When configuring this feature, you must first create a policy map (sometimes referred to as a service policy or a traffic policy) using the Modular QoS Command-Line Interface (CLI) (MQC). Therefore, you should be familiar with the procedure for creating a policy map using the MQC.
For more information about creating a policy map (traffic policy) using the MQC, see the “Applying QoS Features Using the MQC” module.
Information About Class-Based Ethernet CoS Matching and Marking
Layer 2 CoS Values
Layer 2 (L2) Class of Service (CoS) values are relevant for IEEE 802.1Q and Interswitch Link (ISL) types of frames. The Class-based Ethernet CoS Matching and Marking feature extends Cisco software capabilities to match packets by looking at the CoS value of the packet and marking packets with user-defined CoS values. This feature can be used for L2 CoS to L3 Terms of Service (TOS) mapping. CoS matching and marking can be configured via the Cisco Modular QoS CLI framework.
How to Configure Class-Based Ethernet CoS Matching and Marking
Configuring Class-Based Ethernet CoS Matching
In the following task, classes named voice and video-and-data are created to classify traffic based on the CoS values. The classes are configured in the CoS-based-treatment policy map, and the service policy is attached to all packets leaving Gigabit Ethernet interface 1/0/1.
1.
enable
2.
configure
terminal
3.
class-map
class-map-name
4.
match
cos
cos-value
5.
exit
6.
class-map
class-map-name
7.
match
cos
cos-value
8.
exit
9.
policy-map
policy-map-name
10.
class
{class-name |
class-default}
11.
priority
level
level
12.
exit
13.
class
{class-name |
class-default}
14.
bandwidth
remaining
percent
percentage
15.
exit
16.
exit
17.
interface
type
number
18. service-policy {input| output} policy-map-name
19.
end
DETAILED STEPS
Configuring Class-Based Ethernet CoS Marking
In the following task, the policy map called cos-set is created to assign different CoS values for different types of traffic.
Note | This task assumes that the class maps called voice and video-and-data have already been created. |
1.
enable
2.
configure
terminal
3.
policy-map
policy-map-name
4.
class
{class-name |
class-default}
5.
set
cos
cos-value
6.
exit
7.
class
{class-name |
class-default}
8.
set
cos
cos-value
9.
end
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable
Example: Device> enable |
Enables privileged EXEC mode. |
Step 2 |
configure
terminal
Example: Device# configure terminal |
Enters global configuration mode. |
Step 3 |
policy-map
policy-map-name
Example: Device(config)# policy-map cos-set |
Specifies the name of the policy map created earlier and enters policy-map configuration mode. |
Step 4 |
class
{class-name |
class-default}
Example: Device(config-pmap)# class voice |
Specifies the name of the class whose policy you want to create and enters policy-map class configuration mode. This class is associated with the class map created earlier. |
Step 5 |
set
cos
cos-value
Example: Device(config-pmap-c)# set cos 1 |
Sets the packet’s CoS value. |
Step 6 |
exit
Example: Device(config-pmap-c)# exit |
Exits policy-map class configuration mode. |
Step 7 |
class
{class-name |
class-default}
Example: Device(config-pmap)# class video-and-data |
Specifies the name of the class whose policy you want to create and enters policy-map class configuration mode. This class is associated with the class map created earlier. |
Step 8 |
set
cos
cos-value
Example: Device(config-pmap-c)# set cos 2 |
Sets the packet’s CoS value. |
Step 9 |
end
Example: Device(config-pmap-c)# end |
(Optional) Exits policy-map class configuration mode and returns to privileged EXEC mode. |
Configuration Examples for Class-Based Ethernet CoS Matching and Marking
Example: Configuring Class-Based Ethernet CoS Matching
This example creates two classes, voice and video-and-data, to classify traffic based on the CoS values. The CoS-based-treatment policy map is used to set priority and bandwidth values for the classes. The service policy is attached to all packets leaving interface Gigabit Ethernet1/0/1.
Note | The service policy can be attached to any interface that supports service policies. |
Device(config)# class-map voice Device(config-cmap)# match cos 7 Device(config-cmap)# exit Device(config)# class-map video-and-data Device(config-cmap)# match cos 5 Device(config-cmap)# exit Device(config)# policy-map cos-based-treatment Device(config-pmap)# class voice Device(config-pmap-c)# priority level 1 Device(config-pmap-c)# exit Device(config-pmap)# class video-and-data Device(config-pmap-c)# bandwidth remaining percent 20 Device(config-pmap-c)# exit Device(config-pmap)# exit Device(config)# interface gigabitethernet1/0/1 Device(config-if)# service-policy output cos-based-treatment
Example: Class-Based Ethernet CoS Marking
Device(config)# policy-map cos-set Device(config-pmap)# class voice Device(config-pmap-c)# set cos 1 Device(config-pmap-c)# exit Device(config-pmap)# class video-and-data Device(config-pmap-c)# set cos 2 Device(config-pmap-c)# end
Additional References for Class-Based Ethernet CoS Matching and Marking
Related Documents
Related Topic |
Document Title |
---|---|
Cisco commands |
|
QoS commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples |
Cisco IOS Quality of Service Solutions Command Reference |
Classifying network traffic |
“Classifying Network Traffic” module |
MQC |
“Applying QoS Features Using the MQC” module |
Marking network traffic |
“Marking Network Traffic” module |
Technical Assistance
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
Feature Information for Class-Based Ethernet CoS Matching & Marking
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Feature Name |
Releases |
Feature Information |
---|---|---|
Class-Based Ethernet CoS Matching and Marking |
12.2(5)T 15.0(1)S Cisco IOS XE Release 2.1 Cisco IOS XE Release 3.2SE |
This feature allows you to mark and match packets using Class of Service (CoS) values. The following commands were introduced or modified: match cos, set cos. |
User Priority Based QoS Marking for Wireless Deployments |
Cisco IOS XE Release 3.2SE |
This features allows you to mark and match packets on wireless deployments using the user-priority (CoS) vlaues. |