The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter describes how to configure QoS marking policies on Cisco Nexus 1000V to prioritize network traffic.
Policy maps prioritize network traffic by class. You create policy maps to define how to treat each class of traffic so that it is prioritized for the best quality of service.
Marking is the process of marking packets, that is, changing one of the following in the packet for QoS purposes:
You can map a traffic class to a DSCP, which is an indicator of the service level for a specified frame. The DSCP value ranges from 0 to 63, and the default is 0. A DSCP value of 46 is disallowed.
Service policies are specified using policy maps. Policy maps provide an ordered mapping of class maps to service levels. You can specify multiple class maps within a policy map, and map a class map to a high, medium, or low service level. The default priority is low. The policy map name is restricted to 63 alphanumeric characters.
The order of the class maps within a policy map is important to determine the order in which the frame is compared to class maps. The first matching class map has the corresponding priority marked in the frame.
Figure 3-1 Packet Fields Available for Marking
Marking is the setting of QoS information that is related to a packet. You can set the value of standard QoS fields IP precedence, DSCP and Class of Service (CoS), and internal labels that can be used in subsequent actions such as policing.
Once your traffic classes are defined, you can reference them in the policy map where you also define how they should be marked. We recommend that you keep the policy simple by using no more than four classes.
The fields available for marking are listed in Table 3-1 .
For a single class, you can set operations on any two out of the following five fields: CoS, IP Precedence, DSCP, QoS Group, and Discard Class.
Unless noted as a restriction, you can mark both incoming and outgoing packets.
Marking has the following prerequisites:
QoS policies have the following guidelines and limitations:
This section describes how to create QoS policies for the Cisco Nexus 1000V:
You can create a policy that marks the DSCP value in the IP header packet to prioritize traffic in a particular class.
Before beginning this procedure, you must know or do the following:
2. policy-map [ type qos ] [ match-first ] policy-map-name
3. class [ type qos ] { class_map_name | class-default }
|
|
|
---|---|---|
policy-map [ type qos ] [ match-first ] policy-map-name |
Places you into policy map QoS configuration mode for the specified policy map and configures the map name in the running configuration. The policy_map_name argument is an alphabetic string that can be up to 40 case-insensitive characters long, including hyphen (-) and underscore (_) characters. |
|
Creates a reference to class-map-name and enters policy-map class QoS configuration mode for the specified class map. By default, the class is added to the end of the policy map. Changes are saved in the running configuration. Use the class-default keyword to select all traffic that is not currently matched by classes in the policy map. |
||
Defines the DSCP value that should be used in all IP headers for the specified class and saves it in the running configuration. You can use a numeric value from 1 to 60 or one of the standard values from the “DSCP and Precedence Values” section. |
||
show policy-map policy_map_name n1000v(config-pmap-c-qos)# show policy-map policy1 |
Displays the policy map configuration for the specified map name. |
|
copy running-config startup-config |
(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration. |
You can mark IP Precedence to give priority to all packets in a particular traffic class.
Before beginning this procedure, you must know or do the following:
|
|
---|---|
2. policy-map [ type qos ] [ match-first ] policy-map-name
3. class [ type qos ] { class_map_name | class-default }
|
|
|
---|---|---|
policy-map [ type qos ] [ match-first ] policy-map-name |
Places you into policy map QoS configuration mode for the specified policy map and configures the map name in the running configuration. The policy_map_name argument is an alphabetic string that can be up to 40 case-insensitive characters long, including hyphen (-) and underscore (_) characters. |
|
Creates a reference to class-map-name and enters policy-map class QoS configuration mode for the specified class map. By default, the class is added to the end of the policy map. Changes are saved in the running configuration. Use the class-default keyword to select all traffic that is not currently matched by classes in the policy map. |
||
Adds the precedence value that should be used in all packets for the specified traffic class. The change is saved in the running configuration. You can use a numeric value from 0 to 7, as show in Table 3-2 . |
||
show policy-map policy_map_name n1000v(config-pmap-c-qos)# show policy-map policy1 |
Displays the policy map configuration for the specified map name. |
|
copy running-config startup-config |
(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration. |
You can mark the CoS field in the IEEE 802.1Q header for all traffic in a specific class. If you mark this field in an ingress or egress policy, it will only be set when a packet egresses an IEEE 802.1Q-capable interface.
Before beginning this procedure, you must know or do the following:
2. policy-map [ type qos ] [ match-first ] policy-map-name
3. class [ type qos ] { class_map_name | class-default }
This example shows how to create a class of service policy.
n1000v(config)# policy-map policy1
n1000v(config-pmap-qos)# class class1
n1000v(config-pmap-c-qos)# set cos 3
n1000v(config-pmap-c-qos)# show policy-map policy1
police cir 256000 bps bc 300 ms pir 256000 bps be 300 ms conform transmit exceed set dscp dscp table cir-mar
Before beginning this procedure, you must know or do the following:
2. policy-map [ type qos ] [ match-first ] policy-map-name
3. class [ type qos ] { class_map_name | class-default }
4. set qos-group qos-group-value
Before beginning this procedure, you must know or do the following:
For more information, see the Configuring Discard Class Classification.
2. policy-map [ type qos ] [ match-first ] policy-map-name
3. class [ type qos ] { class_map_name | class-default }
4. set discard-class discard-class-value
You can attach a policy map to an interface or a port profile so that the marking instructions are applied to the ingress or egress packets.
Before beginning this procedure, you must know or do the following:
Note You can attach only one input policy and one output policy to an interface or port profile.
2. Enter one of the following commands:
3. service-policy [ type qos ] { input | output } policy-map-name [ no-stats ]
This example shows how to configure an ingress policy on an Ethernet interface:
n1000v(config)# interface ethernet 1/1
n1000v(config-if)# service-policy input policy1
This example shows how to configure an ingress policy on a port profile:
n1000v(config)# port-profile accessprofile
n1000v(config-port-prof)# service-policy input policy1
You can mark the DSCP port for each class of traffic that is defined in a specified ingress or egress policy map.
Before beginning this procedure, you must know or do the following:
Note You can attach only one input policy and one output policy to an interface or port profile.
2. policy-map [ type qos ] [ match-first ] policy-map-name
3. class [ type qos ] { class_map_name | class-default }
5. Repeat steps 3. and 4. for each class map that you want to create.
8. Enter one of the following commands:
9. service-policy [ type qos ] { input | output } policy-map-name [ no-stats ]
|
|
|
---|---|---|
policy-map [ type qos ] [ match-first ] policy-map-name |
Places you into policy map QoS configuration mode for the specified policy map and configures the map name in the running configuration. The policy_map_name argument is an alphabetic string that can be up to 40 case-insensitive characters long, including hyphen (-) and underscore (_) characters. |
|
class [ type qos ] { class_map_name | class-default } |
Creates a reference to class-map-name and enters policy-map class QoS configuration mode for the specified class map. By default, the class is added to the end of the policy map. Changes are saved in the running configuration. Use the class-default keyword to select all traffic that is not currently matched by classes in the policy map. |
|
Sets a DSCP value. Valid values are shown in the “DSCP and Precedence Values” section. |
||
Repeat Step 3 and Step 4 for each class map that you want to create. |
||
Enter one of the following commands: |
Places you into the configuration mode for the specified Ethernet or vEthernet interface or port profile. |
|
service-policy [type qos] {input | output} policy-map-name [no-stats] |
(Optional) Attaches a policy map name that will be added to the input or output packets of the interface or port profile. Note You can attach only one input policy and one output policy to an interface or port profile. |
|
show policy-map policy_map_name n1000v(config-if)# show policy-map policy1 |
Displays the policy map configuration for the specified map name. |
|
copy running-config startup-config |
(Optional) Saves the running configuration persistently through reboots and restarts by copying it to the startup configuration. |
This example shows how to mark the DSCP port for each class of traffic defined in an ingress policy map on an Ethernet interface.
This example shows how to mark the DSCP port for each class of traffic defined in an ingress policy map on a port profile.
To verify the QoS policy configuration, perform one of the following tasks:
|
|
---|---|
This example shows how to display a specific policy-map policy:
This example shows how to display policy maps for all interfaces:
This section provides the QoS marking policies release history.