Table Of Contents
S Commands
service-policy
service-policy (control-plane)
service-policy (system qos)
service-policy (virtual Ethernet interface)
set cos (policy map type network-qos)
set dscp
set precedence
set qos-group
shape (virtual Ethernet interface)
system jumbomtu
system qos
S Commands
This chapter describes the Cisco NX-OS quality of service (QoS) commands that begin with S.
service-policy
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
Syntax Description
input
|
Applies this policy map to packets coming into this interface.
|
type
|
Specifies whether the policy map is of type qos or queuing.
|
qos
|
Specifies a policy map of type qos.
|
queuing
|
Specifies a policy map of type queuing.
|
output
|
Applies this policy map to packets going out of this interface.
|
policy-map-name
|
Name of the policy map to attach to this interface. Only one policy map can be attached to the input and one to the output of a given interface for each of the policy type qos and queuing.
The policy map name can be a maximum of 40 alphanumeric characters.
|
Command Default
None
Command Modes
Interface configuration mode
Subinterface configuration mode
Vlan configuration mode
Command History
Release
|
Modification
|
5.2(1)N1(1)
|
This command was introduced.
|
Usage Guidelines
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.
Examples
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
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
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
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
Related Commands
Command
|
Description
|
no switchport
|
Configures an interface as a Layer 3 routed interface.
|
show policy-map interface brief
|
Displays all interfaces and VLANs with attached service policies in a brief format.
|
system qos
|
Configures a system policy.
|
service-policy (control-plane)
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
Syntax Description
input
|
Applies the specified service policy to packets that are entering the control plane.
|
policy-map-name
|
Name of the control plane policy map to be attached. The name can be a maximum of 64 alphanumeric characters.
|
Command Default
None
Command Modes
Control-plane configuration mode
Command History
Release
|
Modification
|
5.2(1)N1(1)
|
This command was introduced.
|
Usage Guidelines
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.
Related Commands
Command
|
Description
|
control-plane
|
Enters control-plane configuration mode.
|
policy-map type control-plane
|
Creates or modifies a control plane policy map.
|
show policy-map control-plane
|
Displays the configuration of a class or all classes for the policy map of a control plane.
|
service-policy (system qos)
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
Syntax Description
input
|
Applies this policy map to packets coming into this interface.
|
type
|
Specifies whether the policy map is of type network-qos, qos, or queuing.
|
network-qos
|
Specifies a policy map of type network-qos.
|
qos
|
Specifies a policy map of type qos.
|
queuing
|
Specifies a policy map of type queuing.
|
output
|
Applies this policy map to packets going out of this interface.
|
policy-map-name
|
Name of the policy map to attach to this interface. The policy map name can be a maximum of 40 alphanumeric characters.
|
Command Default
None
Command Modes
System QoS configuration mode
Command History
Release
|
Modification
|
5.2(1)N1(1)
|
This command was introduced.
|
Examples
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
Related Commands
Command
|
Description
|
show policy-map
|
Displays policy maps.
|
system qos
|
Configures a system policy.
|
service-policy (virtual Ethernet interface)
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
Syntax Description
input
|
Applies this policy map to packets coming into this virtual interface.
|
type
|
Specifies the policy map of type qos.
|
qos
|
Specifies a policy map of type qos.
|
queuing
|
Specifies a policy map of type queuing.
|
input
|
Applies the policy map to packets coming into this interface.
|
output
|
Applies the policy map to packets going out of this interface.
|
policy-map-name
|
Name of the policy map to attach to this interface. Only one policy map can be attached to the input of a given interface for the policy type qos.
The policy map name can be a maximum of 40 alphanumeric characters.
|
Command Default
None
Command Modes
Virtual Ethernet interface configuration mode
Command History
Release
|
Modification
|
5.2(1)N1(1)
|
This command was introduced.
|
Usage Guidelines
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.
Examples
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
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
Related Commands
Command
|
Description
|
interface vethernet
|
Configures a virtual Ethernet interface.
|
policy-map type queuing
|
Configures a queuing policy map.
|
show policy-map interface brief
|
Displays all interfaces and VLANs with attached service policies in a brief format.
|
system qos
|
Configures a system policy.
|
set cos (policy map type network-qos)
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
Syntax Description
cos-value
|
CoS value to assign for this class of traffic. The range is from 0 to 7.
|
Command Default
None
Command Modes
Policy map type network-qos class configuration
Command History
Release
|
Modification
|
5.2(1)N1(1)
|
This command was introduced.
|
Usage Guidelines
You can use this command only on type network-qos policies that are attached to egress ports.
Examples
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)#
Related Commands
Command
|
Description
|
show policy-map
|
Displays policy maps.
|
set dscp
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
Syntax Description
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.
|
Command Default
None
Command Modes
Policy map type qos configuration
Command History
Release
|
Modification
|
5.2(1)N1(1)
|
This command was introduced.
|
Usage Guidelines
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.
Examples
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
Related Commands
Command
|
Description
|
copy running-config startup-config
|
Copies the running configuration to the startup configuration file.
|
show policy-map type qos
|
Displays the QoS policy maps.
|
show running-config ipqos
|
Displays the QoS running configuration.
|
set precedence
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
Syntax Description
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.
|
Command Default
None
Command Modes
Policy map type qos configuration
Command History
Release
|
Modification
|
5.2(1)N1(1)
|
This command was introduced.
|
Usage Guidelines
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.
Examples
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
Related Commands
Command
|
Description
|
copy running-config startup-config
|
Copies the running configuration to the startup configuration file.
|
show policy-map type qos
|
Displays the QoS policy maps.
|
show running-config ipqos
|
Displays the QoS running configuration.
|
show startup-config ipqos
|
Displays the QoS configuration stored in the startup file.
|
set qos-group
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
Syntax Description
qos-group-value
|
QoS group value to assign for this class of traffic. The range is from 2 to 5 for a Cisco Nexus 5020 switch, 1 to 5 for a Cisco Nexus 5548 switch, and 0 to 5 for all other Cisco Nexus 5000 Series switches.
Note On a Cisco Nexus 5548 switch, the default is 1.
|
Command Default
1 on a Cisco Nexus 5548 switch.
Command Modes
Policy map type qos class configuration
Command History
Release
|
Modification
|
5.2(1)N1(1)
|
This command was introduced.
|
Usage Guidelines
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.
Examples
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)#
Related Commands
Command
|
Description
|
copy running-config startup-config
|
Copies the running configuration to the startup configuration file.
|
show policy-map type qos
|
Displays the QoS policy maps.
|
show running-config ipqos
|
Displays the QoS running configuration.
|
show startup-config ipqos
|
Displays the QoS configuration stored in the startup file.
|
shape (virtual Ethernet interface)
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
Syntax Description
target-rate
|
Traffic rate. The range is from 1 to 10,000,000,000.
|
kbps
|
Specifies the units of 1000 bits per second.
|
mbps
|
Specifies the units of megabits per second.
|
gbps
|
Specifies the units of gigabits per second.
|
burst-size
|
Burst size in bytes. The range is from 1500 to 65535.
|
Command Default
None
Command Modes
Policy map type queuing class configuration mode
Command History
Release
|
Modification
|
5.2(1)N1(1)
|
This command was introduced.
|
Usage Guidelines
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.
Examples
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
Related Commands
Command
|
Description
|
service-policy (virtual Ethernet interface)
|
Applies a policy map to a virtual Ethernet interface.
|
show policy-map
|
Displays the policy map information.
|
system jumbomtu
To define the upper bound of any maximum transmission unit (MTU) in the system, use the system jumbomtu command.
system jumbomtu [value]
Syntax Description
value
|
Jumbomtu value. The range is from 2158 to 9216.
|
Command Default
9216 bytes
Command Modes
Global configuration mode
Command History
Release
|
Modification
|
5.2(1)N1(1)
|
This command was introduced.
|
Examples
This example shows how to define the upper bound of any MTU in the system:
switch(
config)#
system jumbomtu 9216
Related Commands
Command
|
Description
|
show interface
|
Displays the jumbo MTU frames sent and received on the specified interface.
|
system qos
To configure a system policy, use the system qos command.
system qos
Syntax Description
This command has no arguments or keywords.
Command Default
None
Command Modes
Global configuration mode
Command History
Release
|
Modification
|
5.2(1)N1(1)
|
This command was introduced.
|
Examples
This example shows how to configure a system qos to apply a queuing policy to all interfaces in the system:
switch(config)#
system qos
Related Commands
Command
|
Description
|
service-policy
|
Associates the system class policy-map to the service policy for the system.
|