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
Command Default
Command Modes
Interface configuration mode
Vlan configuration mode
Command History
|
|
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.
Examples
This example shows how to attach a queuing policy map to the ingress packets of a Layer 2 port interface:
switch(
config)#
interface ethernet 2/1
This example shows how to attach qos type policy maps to the incoming packets of a Layer 2 interface:
switch(config)#
system 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(config)#
interface ethernet 2/1
This example shows how to attach a queuing policy map to a Layer 3 interface:
switch(
config)#
interface ethernet 1/5
Related Commands
|
|
---|---|
Displays all interfaces and VLANs with attached service policies in a brief format. |
|
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
Applies the specified service policy to packets that are entering the control plane. |
|
Name of the control plane policy map to be attached. The name can be a maximum of 64 alphanumeric characters. |
Command Default
Command Modes
Control-plane configuration mode
Command History
|
|
---|---|
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.
Examples
This example shows how to attach a control-plane policy map to the control plane:
Related Commands
|
|
---|---|
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
Command Default
Command Modes
Command History
|
|
Examples
This example shows how to attach a queuing policy map to the system policy:
switch(
config)#
system qos
Related Commands
|
|
---|---|
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
Command Default
Command Modes
Virtual Ethernet interface configuration mode
Command History
|
|
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(
config)#
interface vethernet 12
This example shows how to attach a queuing policy that is configured for traffic shaping to the incoming packets of a virtual Ethernet interface:
Related Commands
|
|
---|---|
Displays all interfaces and VLANs with attached service policies in a brief format. |
|
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.
Syntax Description
CoS value to assign for this class of traffic. The range is from 0 to 7. |
Command Default
Command Modes
Policy map type network-qos class configuration
Command History
|
|
Usage Guidelines
You can use this command only on type network-qos policies that are attached to egress ports.
Beginning in Cisco NX-OS Release 5.0(3)N1(1), in Layer 3 topologies you must configure each qos-group in the network-qos policy with a unique cos value.
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
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
Related Commands
|
|
---|---|
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.
Syntax Description
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
Command Modes
Policy map type qos configuration
Command History
|
|
---|---|
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:
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:
Related Commands
|
|
---|---|
Copies the running configuration to the startup configuration file. |
|
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
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
Command Modes
Policy map type qos configuration
Command History
|
|
---|---|
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:
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:
Related Commands
|
|
---|---|
Copies the running configuration to the startup configuration 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.
no set qos-group qos-group-value
Syntax Description
Command Default
Command Modes
Policy map type qos class configuration
Command History
|
|
---|---|
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:
Examples
This example shows how to assign a QoS group identifier for a class of traffic in a type qos policy map in Cisco NX-OS release 4.1(3)N1(1):
This example shows how to assign a QoS group identifier for a class of traffic in a type qos policy map in Cisco NX-OS release 5.0(2)N1(1):
Related Commands
|
|
---|---|
Copies the running configuration to the startup configuration 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
Command Default
Command Modes
Policy map type queuing class configuration mode
Command History
|
|
---|---|
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.
Examples
This example shows how to configure shaping on a queuing policy map and apply the policy to a virtual Ethernet interface:
Related Commands
|
|
---|---|
system jumbomtu
To define the upper bound of any maximum transmission unit (MTU) in the system, use the system jumbomtu command.
Syntax Description
Command Default
Command Modes
Command History
|
|
Examples
This example shows how to define the upper bound of any MTU in the system:
switch(
config)#
system jumbomtu 9216
Related Commands
|
|
---|---|
Displays the jumbo MTU frames sent and received on the specified interface. |
system qos
To configure a system policy, use the system qos command.
Syntax Description
Command Default
Command Modes
Command History
|
|
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
|
|
---|---|
Associates the system class policy-map to the service policy for the system. |