-
null
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 the Cisco NX-OS quality of service (QoS) commands that begin with S.
To attach a policy map to an interface, use the service-policy command. To remove a service-policy from an interface, use the no form of this command.
service-policy {input | type {qos input | queuing {input | output}}} policy-map-name
no service-policy {input | type {qos input | queuing {input | output}}} policy-map-name
None
Interface configuration mode
Subinterface configuration mode
Vlan configuration mode
|
|
5.2(1)N1(1) |
This command was introduced. |
You can attach one ingress and one egress type queuing policy map to an interface of type port, and port channel. Only one policy map can be attached to the input of a given interface for each of the policy type qos and queuing.
Beginning with Cisco NX-OS Release 5.0(3)N1(1), you can use this command on a Layer 3 routed interface or subinterfaces.
This example shows how to attach a queuing policy map to the ingress packets of a Layer 2 port interface:
switch# configure terminal
switch(
config)#
interface ethernet 2/1
switch(config-if)# service-policy type queuing input my_input_q_policy
switch(config-if)#
This example shows how to attach qos type policy maps to the incoming packets of a Layer 2 interface:
switch# configure terminal
switch(config)#
system qos
switch(config-sys-qos)# service-policy type qos input my_policy1
switch(config-sys-qos)#
This example shows how to attach a qos type policy map named set-dscp to the incoming packets of a Layer 2 interface:
switch# configure terminal
switch(config)# policy-map type qos set-dscp
switch(config-pmap-qos)# class class-0
switch(config-pmap-c-qos)# set dscp ef
switch(config-pmap-c-qos)# exit
switch(config-pmap-qos)# class class-1-2
switch(config-pmap-c-qos)# set precedence 4
switch(config-pmap-c-qos)# exit
switch(config-pmap-qos)# exit
switch(config)#
interface ethernet 2/1
switch(config-if)# service-policy type qos input set-dscp
switch(config-if)#
This example shows how to attach a queuing policy map to a Layer 3 interface:
switch# configure terminal
switch(
config)#
interface ethernet 1/5
switch(config-if)# no switchport
switch(config-if)# service-policy type queuing input my_input_q_policy
switch(config-if)#
To attach a policy map to a control plane for aggregate control plane services, use the service-policy command.
service-policy input policy-map-name
None
Control-plane configuration mode
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
After using the control-plane command, you should use the service-policy command to configure a quality of service (QoS) policy. This policy is attached to the control plane interface for aggregate control plane services, which can control the number or rate of packets that are going to the process level.
To attach a policy map to a system policy, use the service-policy command. To remove a service policy from a system policy, use the no form of this command.
service-policy {input | type {network-qos | qos input | queuing {input | output}}} policy-map-name
no service-policy {input | type {network-qos | qos input | queuing {input | output}}} policy-map-name
None
System QoS configuration mode
|
|
5.2(1)N1(1) |
This command was introduced. |
This example shows how to attach a queuing policy map to the system policy:
switch# configure terminal
switch(
config)#
system qos
switch(config-sys-qos)# service-policy type queuing input my_input_q_policy
switch(config-sys-qos)#
|
|
---|---|
show policy-map |
Displays policy maps. |
system qos |
Configures a system policy. |
To attach a policy map to a virtual Ethernet interface, use the service-policy command. To remove a service policy from a virtual Ethernet interface, use the no form of this command.
service-policy {input | type {qos input | queuing {input | output}}} policy-map-name
no service-policy {input | type {qos input | queuing {input | output}}} policy-map-name
None
Virtual Ethernet interface configuration mode
|
|
5.2(1)N1(1) |
This command was introduced. |
You can attach one ingress and one egress type queuing policy map to an interface of type port and port channel. Only one policy map can be attached to the input of a given interface for each of the policy type qos and queuing.
Note For more information on using service policies, see the Cisco Nexus 5000 Series NX-OS Quality of Service Configuration Guide.
This example shows how to attach a qos policy map to the ingress packets of a virtual Ethernet interface:
switch# configure terminal
switch(
config)#
interface vethernet 12
switch(config-if)# service-policy type qos input my_veth_policy
switch(config-if)#
This example shows how to attach a queuing policy that is configured for traffic shaping to the incoming packets of a virtual Ethernet interface:
switch(config)# policy-map type queuing p2
switch(config-pmap-que)# class type queuing class-default
switch(config-pmap-c-que)# shape 30 kbps 3000
switch(config-pmap-c-que)# exit
switch(config-pmap-que)# exit
switch(config)# interface vethernet 1
switch(config-if)# service-policy type queuing input p2
switch(config-if)#
To assign a class of service (CoS) value for a class of traffic in a type network-qos policy map, use the set command. To remove the assigned value from the class, use the no form of this command.
set cos cos-value
no set cos cos-value
cos-value |
CoS value to assign for this class of traffic. The range is from 0 to 7. |
None
Policy map type network-qos class configuration
|
|
5.2(1)N1(1) |
This command was introduced. |
You can use this command only on type network-qos policies that are attached to egress ports.
This example shows how to assign a CoS value for a class of traffic in a type network-qos policy map:
switch(
config)#
policy-map type network-qos my_policy1
switch(config-pmap-nq)# class type network-qos traffic_class2
switch(config-pmap-nq-c)# set cos 3
switch(config-pmap-nq-c)#
This example shows how to remove the assignment of CoS for a class of traffic in a type network-qos policy map:
switch(
config)#
policy-map type network-qos my_policy1
switch(config-pmap-nq)# class type network-qos traffic_class2
switch(config-pmap-nq-c)# no set cos 3
switch(config-pmap-nq-c)#
|
|
---|---|
show policy-map |
Displays policy maps. |
To assign a Differentiated Services Code Point (DSCP) value for a traffic class in a type qos policy map on a Cisco Nexus 5548 switch, use the set dscp command. To remove a previously set DSCP value, use the no form of this command.
set dscp dscp-value
no set dscp dscp-value
dscp-value |
DSCP value or parameter to assign for this class of traffic. Valid values are from 0 to 63. For a list of standard DSCP values, see Table 1. |
None
Policy map type qos configuration
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
Note This command is supported only on a Cisco Nexus 5548 switch.
Marking is a method that you use to modify the QoS fields of the incoming and outgoing packets.
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. Marking is used to identify the traffic type for use in policing, queuing, and scheduling traffic (only CoS is used in scheduling).
Use this command to classify the traffic based on the DSCP packet header field (either IPv4 or IPv6). When you set the DSCP value for a packet, make sure that you use a traffic class other than the class-default system class. For example, qos-group x, where x is any value from 1 to 5.
Note You cannot set the DSCP packet header field (either IPv4 or IPv6) if the traffic is in the class-default system class (qos-group 0).
You can set the DSCP value in the six most significant bits of the DiffServ field of the IP header to a specified value. You can enter numeric values from 0 to 63, as well as the standard DSCP values shown in Table 1.
If you set the values for more than two IP header fields (either IPv4 or IPv6), an error similar to the following appears:
ERROR: Only 2 sets out of qos-group/cos/dscp/precedence/discard-class are allowed. Please remove other set action before applying this one.
Note You can set DSCP or IP precedence but you cannot set both values because they modify the same field in the IP packet.
After you set the DSCP value, for the QoS policy map to work correct and create the specified QoS groups, make sure that you attach the QoS policy map to a system policy, then define a network-qos policy map and attach it to the system policy. Make sure that the QoS group of the QoS policy map matches that of the of the network-qos policy.
This example shows how to set the DSCP value for a QoS policy:
switch(config)# policy-map type qos my_policy
switch(config-pmap-qos)# class type qos my_class
switch(config-pmap-c-qos)# set dscp cs6
switch(config-pmap-c-qos)# set qos-group 2
switch(config-pmap-c-qos)# exit
switch(config-pmap-qos)# exit
switch(config)# system qos
switch(config-sys-qos)# service-policy type qos input my_policy
switch(config-sys-qos)# exit
switch(config)# class-map type network-qos nqos_class
switch(config-cmap-nq)# match qos-group 2
switch(config-cmap-nq)# exit
switch(config)# policy-map type network-qos nqos_policy
switch(config-pmap-nq)# class type network-qos nqos_class
switch(config-pmap-nq-c)# exit
switch(config-pmap-nq)# exit
switch(config)# system qos
switch(config-sys-qos)# service-policy type network-qos nqos_policy
switch(config-sys-qos)# exit
switch(config)#
To set the precedence value in an IP header (either IPv4 or IPv6) for a class of traffic in a type qos policy map on a Cisco Nexus 5548 switch, use the set precedence command. To leave the precedence value unchanged for the class, use the no form of this command.
set precedence precedence-value
no set precedence precedence-value
precedence-value |
IP precedence value to assign for this class of traffic. Valid values are from 0 to 7. For a list of standard precedence values, see Table 2. |
None
Policy map type qos configuration
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
Note This command is supported only on a Cisco Nexus 5548 switch.
Marking is a method that you use to modify the QoS fields of the incoming and outgoing packets.
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. Marking is used to identify the traffic type for use in policing, queuing, and scheduling traffic (only CoS is used in scheduling).
Use this command to classify the traffic based on the IP precedence packet header field. When you set the IP precedence value for a packet, make sure that you use a traffic class other than the class-default system class. For example, qos-group x, where x is any value from 1 to 5.
Note You cannot set the IP precedence packet header field if the traffic is in the class-default system class (qos-group 0).
If you set the values for more than two IP header fields, you see the following error message:
ERROR: Only 2 sets out of qos-group/cos/dscp/precedence/discard-class are allowed. Please remove other set action before applying this one.
Note You can set DSCP or IP precedence but you cannot set both values because they modify the same field in the IP packet.
After you set the IP precedence value, for the QoS policy map to work correct and create the specified QoS groups, make sure that you attach the QoS policy map to a system policy, then define a network-qos policy map and attach it to the system policy. Make sure that the QoS group of the QoS policy map matches that of the of the network-qos policy.
This example shows how to set the IP precedence value for a QoS policy:
switch(config)# policy-map type qos my_policy
switch(config-pmap-qos)# class type qos my_class
switch(config-pmap-c-qos)# set precedence 5
switch(config-pmap-c-qos)# set qos-group 2
switch(config-pmap-c-qos)# exit
switch(config-pmap-qos)# exit
switch(config)# system qos
switch(config-sys-qos)# service-policy type qos input my_policy
switch(config-sys-qos)# exit
switch(config)# class-map type network-qos nqos_class
switch(config-cmap-nq)# match qos-group 2
switch(config-cmap-nq)# exit
switch(config)# policy-map type network-qos nqos_policy
switch(config-pmap-nq)# class type network-qos nqos_class
switch(config-pmap-nq-c)# exit
switch(config-pmap-nq)# exit
switch(config)# system qos
switch(config-sys-qos)# service-policy type network-qos nqos_policy
switch(config-sys-qos)# exit
switch(config)#
To assign the QoS group identifier for a class of traffic in a type qos policy map, use the set qos-group command. To remove the assigned value from the class, use the no form of this command.
set qos-group qos-group-value
no set qos-group qos-group-value
1 on a Cisco Nexus 5548 switch.
Policy map type qos class configuration
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
You can set the QoS group identifier value only in ingress policies. You can set a maximum of 5 QoS groups in ingress policies.
If you set the values for more than two IP header fields in a policy map class, an error message similar to the following appears:
ERROR: Only 2 sets out of qos-group/cos/dscp/precedence/discard-class are allowed. Please remove other set action before applying this one.
This example shows how to assign a QoS group identifier for a class of traffic in a type qos policy map :
switch(config)# policy-map my_policy
switch(config-pmap-qos)# class my_class
switch(config-pmap-c-qos)# set qos-group 3
switch(config-pmap-c-qos)#
To configure shaping on an egress queue to impose a maximum rate on it, use the shape command. To remove a shaping configuration, use the no form of this command.
shape target-rate {kbps | mbps | gbps} burst-size
no shape target-rate {kbps | mbps | gbps} burst-size
None
Policy map type queuing class configuration mode
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
Traffic shaping is supported only on virtual Ethernet interfaces.
Shaping rate limits the traffic with a specified rate. You can configure shaping only in the ingress direction. All traffic on the virtual Ethernet interface is rate limited to the given shaping rate.
Note If you configure shaping, you cannot configure priority in the same policy map.
This command does not require a license.
This example shows how to configure shaping on a queuing policy map and apply the policy to a virtual Ethernet interface:
switch# configure terminal
switch(config)# policy-map type queuing p2
switch(config-pmap-que)# class type queuing class-default
switch(config-pmap-c-que)# shape 30 kbps 3000
switch(config-pmap-c-que)# exit
switch(config-pmap-que)# exit
switch(config)# interface vethernet 1
switch(config-if)# service-policy type queuing input p2
switch(config-if)#
|
|
---|---|
service-policy (virtual Ethernet interface) |
Applies a policy map to a virtual Ethernet interface. |
show policy-map |
Displays the policy map information. |
To define the upper bound of any maximum transmission unit (MTU) in the system, use the system jumbomtu command.
system jumbomtu [value]
value |
Jumbomtu value. The range is from 2158 to 9216. |
9216 bytes
Global configuration mode
|
|
5.2(1)N1(1) |
This command was introduced. |
This example shows how to define the upper bound of any MTU in the system:
switch(
config)#
system jumbomtu 9216
switch(config)#
|
|
---|---|
show interface |
Displays the jumbo MTU frames sent and received on the specified interface. |
To configure a system policy, use the system qos command.
system qos
This command has no arguments or keywords.
None
Global configuration mode
|
|
5.2(1)N1(1) |
This command was introduced. |
This example shows how to configure a system qos to apply a queuing policy to all interfaces in the system:
switch(config)#
system qos
switch(config-sys-qos)#
|
|
---|---|
service-policy |
Associates the system class policy-map to the service policy for the system. |