Class of Service Commands

Use these commands to configure and view Class of Service (CoS) settings for the switch.

The commands in this section allow you to control the priority and transmission rate of traffic.

Note: Commands you issue in the Interface Config mode only affect a single interface. Commands you issue in the Global Config mode affect all interfaces.

classofservice dot1p-mapping

M4250

M4350

This command maps an 802.1p priority to an internal traffic class. The 802.1p-priority value can range from 0 to 7.

The traffic-class value depends on the switch model:

  • For an M4250 series switch, the range is from 0 to 7.
  • For an M4350 series switch, the range is from 0 to 6.
Format classofservice dot1p-mapping 802.1p-priority traffic-class
Modes

Global Config

Interface Config

no classofservice dot1p-mapping

This command maps each 802.1p priority to its default internal traffic class value.

Format no classofservice dot1p-mapping [802.1p-priority]
Modes

Global Config

Interface Config

classofservice ip-dscp-mapping

M4250

M4350

This command maps an IP DSCP value to an internal traffic class. The ipdscp value is specified as either an integer from 0 to 63, or symbolically through one of the following keywords: af11, af12, af13, af21, af22, af23, af31, af32, af33, af41, af42, af43, be, cs0, cs1, cs2, cs3, cs4, cs5, cs6, cs7, ef.

The traffic-class value depends on the switch model:

  • For an M4250 series switch, the range is from 0 to 7.
  • For an M4350 series switch, the range is from 0 to 6.
Format classofservice ip-dscp-mapping ipdscp traffic-class
Mode Global Config

no classofservice ip-dscp-mapping

This command maps each IP DSCP value to its default internal traffic class value.

Format no classofservice ip-dscp-mapping
Mode Global Config

dante

M4250

M4350

This command sets the IGMP snooping querier interval to 30 seconds and configures the following class of service parameters:

  • set igmp querier query-interval 30
  • classofservice ip-dscp-mapping 46 5
  • classofservice ip-dscp-mapping 48 5
  • classofservice ip-dscp-mapping 56 6
Default Disabled
Format dante
Modes Global Config

no dante

This command sets the following commands to the default values:

  • set igmp querier query-interval
  • classofservice ip-dscp-mapping
Format no dante
Modes Global Config

dante vlan

M4250

M4350

This command configures the following class of service parameters for all member ports of a particular VLAN:

  • classofservice trust ip-dscp
  • cos-queue strict 5 6

The vlan argument can be a VLAN from 1 to 4093.

This command applies the class of service parameters to all member ports of the specified VLAN. However, if a port is a member of multiple VLANs and one of those VLANs is configured for Dante but other VLANs are not, the Dante configuration takes precedence and is applied to the port.

Default Disabled
Format dante vlan
Modes Global Config

no dante vlan

This command sets the following commands for all member ports of a particular VLAN to the default values:

  • classofservice trust
  • cos-queue strict

The vlan argument can be a VLAN from 1 to 4093.

Format no dante vlan
Modes Global Config

classofservice trust

M4250

M4350

This command sets the class of service trust mode of an interface or range of interfaces. You can set the mode to trust one of the Dot1p (802.1p), IP DSCP, or IP Precedence packet markings. You can also set the interface mode to untrusted. If you configure an interface to use Dot1p, the mode does not appear in the output of the show running-config command because Dot1p is the default.

Default dot1p
Format classofservice trust {dot1p | ip-dscp | untrusted}
Modes

Global Config

Interface Config

no classofservice trust

This command sets the interface mode to the default value.

Format no classofservice trust
Modes

Global Config

Interface Config

cos-queue min-bandwidth

M4250

M4350

This command specifies the minimum transmission bandwidth (bw) guarantee for each interface queue on an interface, on a range of interfaces, or globally on all interfaces. The total number of queues supported per interface depends on the switch model.

A value from 0-100 (percentage of link rate) must be specified for each supported queue, with 0 indicating no guaranteed minimum bandwidth. The sum of all values entered must not exceed 100.

Format cos-queue min-bandwidth bw-0 bw-1 … bw-n
Modes

Global Config

Interface Config

no cos-queue min-bandwidth

This command restores the default for each queue's minimum bandwidth value.

Format no cos-queue min-bandwidth
Modes

Global Config

Interface Config

cos-queue random-detect

M4250

M4350

This command activates weighted random early discard (WRED) for each specified queue on the interface. Specific WRED parameters are configured using the random-detect queue-parms and the random-detect exponential-weighting-constant commands.

Format cos-queue random-detect queue-id-1 [queue-id-2 … queue-id-n]
Modes

Global Config

Interface Config

When specified in Interface Config mode, this command affects a single interface only, whereas in Global Config mode, it applies to all interfaces.

At least one, but no more than n queue-id values are specified with this command. Duplicate queue-id values are ignored. Each queue-id value ranges from 0 to (n–1), in which n is the total number of queues supported per interface. In the queue-id-n argument, the number n = 7 for M4250 series switches and n = 6 for M4350 series switches. The number corresponds to the number of supported queues (traffic classes).

no cos-queue random-detect

Use this command to disable WRED, thereby restoring the default tail drop operation for the specified queues on the interface.

Format no cos-queue random-detect queue-id-1 [queue-id-2 … queue-id-n]
Modes

Global Config

Interface Config

cos-queue strict

M4250

M4350

This command activates the strict priority scheduler mode for each specified queue for an interface queue on an interface, a range of interfaces, or all interfaces.

At least one, but no more than n queue-id values are specified with this command. Duplicate queue-id values are ignored. Each queue-id value ranges from 0 to (n–1), in which n is the total number of queues supported per interface. In the queue-id-n argument, the number n = 7 for M4250 series switches and n = 6 for M4350 series switches. The number corresponds to the number of supported queues (traffic classes).

Format cos-queue strict queue-id-1 [queue-id-2 … queue-id-n]
Modes

Global Config

Interface Config

no cos-queue strict

This command restores the default weighted scheduler mode for each specified queue.

Format no cos-queue strict queue-id-1 [queue-id-2 … queue-id-n]
Modes

Global Config

Interface Config

random-detect exponential-weighting-constant

M4250

M4350

This command is used to configure the WRED decay exponent for a CoS queue interface. The number argument is a value in the range of 0–15.

Format random-detect exponential-weighting-constant number
Modes

Global Config

Interface Config

no random-detect exponential-weighting-constant

Use this command to set the WRED decay exponent back to the default.

Format no random-detect exponential-weighting-constant
Modes

Global Config

Interface Config

random-detect queue-parms

M4250

M4350

This command is used to configure WRED parameters for each drop precedence level supported by a queue. It is used only when per-COS queue configuration is enabled (using the cos-queue random-detect command).

At least one, but no more than n queue-id values are specified with this command. Duplicate queue-id values are ignored. Each queue-id value ranges from 0 to (n–1), in which n is the total number of queues supported per interface. In the queue-id-n argument, the number n = 7 for M4250 series switches and n = 6 for M4350 series switches. The number corresponds to the number of supported queues (traffic classes).

The minimum and maximum threshold values can be configured in KB or percentage.

Each parameter is specified for each possible drop precedence (color of TCP traffic). The last precedence applies to all non-TCP traffic. For example, in a three-color system, three colors and one non-TCP precedence are specified for each parameter: green TCP, yellow TCP, red TCP, and non-TCP, respectively.

As an option, you can select ECN marking during congestion. When ECN is enabled, packets that are not marked as ECN capable are dropped when selected for discard by WRED.

Default
  • WRED is not enabled for any CoS queue and ECN is not enabled for any CoS queue.
  • Minimum and maximum threshold units are percentage. The thresholds for each color and CoS queue are configured independently and can overlap.
  • WRED Minimum Threshold
    • Precedence level 0........................... 40
    • Precedence level 1........................... 30
    • Precedence level 2........................... 20
    • Precedence level 3........................... 99
  • WRED Maximum Threshold
    • Precedence level 0........................... 100
    • Precedence level 1........................... 90
    • Precedence level 2........................... 80
    • Precedence level 3........................... 100
  • WRED Drop Probability
    • Precedence level 0........................... 10
    • Precedence level 1........................... 10
    • Precedence level 2........................... 10
    • Precedence level 3........................... 10
Format random-detect queue-parms {queue-id-1 [queue-id-2 … queue-id-n]} {units {KB | percentage} {min-thresh minthresh-green minthresh-yellow minthresh-red minthresh-nontcp} {max-thresh max-thresh-green max-thresh-yellow max-thresh-red maxthresh-nontcp} {drop-prob dropprob-green dropprob-yellow dropprob-red dropprob-nontcp} [ecn]
Modes

Global Config

Interface Config

Term Definition
min-thresh The minimum threshold is the queue depth (as a percentage or KB) where WRED starts marking and dropping traffic. Specify the value for each color and for non-TCP.
max-thresh The maximum threshold is the queue depth (as a percentage or KB) above which WRED marks/drops all traffic. Specify the value for each color and for non-TCP.
drop-prob

The percentage probability (as a percentage or KB) that WRED will mark or drop a packet, when the queue depth is at the maximum threshold. Specify the value for each color and for non-TCP.

(The drop probability increases linearly from 0 just before the minimum threshold, to this value at the maximum threshold, then goes to 100% for larger queue depths).

no random-detect queue-parms

Use this command to set the WRED configuration back to the default.

Format no random-detect queue-parms queue-id-1 [queue-id-2 … queue-id-n]
Modes

Global Config

Interface Config

traffic-shape

M4250

M4350

This command specifies the maximum transmission bandwidth (bw) limit for the interface as a whole. The bandwidth values are from 0-100 in increments of 1. You can also specify this value for a range of interfaces or all interfaces. Also known as rate shaping, traffic shaping has the effect of smoothing temporary traffic bursts over time so that the transmitted traffic rate is bounded.

Format traffic-shape bw
Modes

Global Config

Interface Config

no traffic-shape

This command restores the interface shaping rate to the default value.

Format no traffic-shape
Modes

Global Config

Interface Config

show classofservice dot1p-mapping

M4250

M4350

This command displays the current Dot1p (802.1p) priority mapping to internal traffic classes for a specific interface.

The unit/slot/port parameter is optional and is only valid on platforms that support independent per-port class of service mappings. If specified, the 802.1p mapping table of the interface is displayed. If omitted, the most recent global configuration settings are displayed. For more information, see Voice VLAN Commands.

To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command description and format.
Format show classofservice dot1p-mapping [unit/slot/port]
Mode Privileged EXEC

The following information is repeated for each user priority.

Term Definition
User Priority The 802.1p user priority value.
Traffic Class The traffic class internal queue identifier to which the user priority value is mapped.

show classofservice ip-dscp-mapping

M4250

M4350

This command displays the current IP DSCP mapping to internal traffic classes for the global configuration settings.

Format show classofservice ip-dscp-mapping
Mode Privileged EXEC

The following information is repeated for each user priority.

Term Definition
IP DSCP The IP DSCP value.
Traffic Class The traffic class internal queue identifier to which the IP DSCP value is mapped.

show classofservice trust

M4250

M4350

This command displays the current trust mode setting for a specific interface. The unit/slot/port parameter is optional and is only valid on platforms that support independent per-port class of service mappings. If you specify an interface, the command displays the port trust mode of the interface. If you do not specify an interface, the command displays the most recent global configuration settings.

To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command description and format.
Format show classofservice trust [unit/slot/port]
Mode Privileged EXEC
Term Definition
Class of Service Trust Mode The trust mode, which is either Dot1P, IP DSCP, or Untrusted.
Non-IP Traffic Class (IP DSCP mode only) The traffic class used for non-IP traffic.
Untrusted Traffic Class (Untrusted mode only) The traffic class used for all untrusted traffic.

show interfaces cos-queue

M4250

M4350

This command displays the class-of-service queue configuration for the specified interface. The unit/slot/port parameter is optional and is only valid on platforms that support independent per-port class of service mappings. If specified, the class-of-service queue configuration of the interface is displayed. If omitted, the most recent global configuration settings are displayed.

To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command description and format.
Format show interfaces cos-queue [unit/slot/port]
Mode Privileged EXEC
Term Definition
Interface Shaping Rate The global interface shaping rate value.
WRED Decay Exponent The global WRED decay exponent value.
Queue Id An interface supports n queues numbered 0 to (n-1). The specific n value is platform dependent.
Minimum Bandwidth The minimum transmission bandwidth guarantee for the queue, expressed as a percentage. A value of 0 means bandwidth is not guaranteed and the queue operates using best-effort. This is a configured value.
Maximum Bandwidth The maximum transmission bandwidth guarantee for the queue, expressed as a percentage. A value of 0 means bandwidth is not guaranteed and the queue operates using best-effort. This is a configured value.
Scheduler Type Indicates whether this queue is scheduled for transmission using a strict priority or a weighted scheme. This is a configured value.
Queue Management Type The queue depth management technique used for this queue (tail drop).

If you specify the interface, the command also displays the following information.

Term Definition
Interface The unit/slot/port of the interface. If displaying the global configuration, this output line is replaced with a Global Config indication.
Interface Shaping Rate The maximum transmission bandwidth limit for the interface as a whole. It is independent of any per-queue maximum bandwidth value(s) in effect for the interface. This is a configured value.
WRED Decay Exponent The configured WRED decay exponent for a CoS queue interface.

show interfaces random-detect

M4250

M4350

This command displays the global WRED settings for each CoS queue. If you use the optional unit/slot/port argument, the command displays the WRED settings for each CoS queue on the specified interface. Valid interfaces include physical ports and port channels. To specify an actual interface or port, do the following:

  • For an M4250 series switch, use the argument slot/port.
  • For an M4350 series switch, use the argument unit/slot/port, as shown in the command description and format.

Explicit Congestion Notification (ECN) capability is also displayed.

The per CoS queue display for an interface displays the threshold, drop probability, and ECN capability per color in the order of green, yellow, red, and non-TCP.

Format show interfaces random-detect [unit/slot/port]
Mode Privileged EXEC
Term Definition
Queue ID The queue ID. An interface supports n queues numbered 0 to (n-1). The specific n value depends on the switch model.
WRED Minimum Threshold The configured minimum threshold is the queue depth (as a percentage) where WRED starts marking and dropping traffic.
WRED Maximum Threshold The configured maximum threshold is the queue depth (as a percentage) above which WRED marks or drops all traffic.
WRED Drop Probability The configured percentage probability that WRED will mark or drop a packet when the queue depth is at the maximum threshold. (The drop probability increases linearly from 0 just before the minimum threshold to this value at the maximum threshold, then goes to 100% for larger queue depths).
ECN Identifies if ECN is enabled.

Command example:

This output shows that ECN is enabled on CoS queues 0 and 1 with a minimum threshold of 40% for green colored packets, 30% for yellow colored packets, 20% for red colored packets and 100% for non-TCP packets.

CODE
(NETGEAR Switch)#show interfaces random-detect

Global Configuration
Queue ID....................................... 0
Threshold Units................................ Percentage
WRED Minimum Threshold
  Precedence level 0........................... 40
  Precedence level 1........................... 30
  Precedence level 2........................... 20
  Precedence level 3........................... 99
WRED Drop Probability
  Precedence level 0........................... 10
  Precedence level 1........................... 10
  Precedence level 2........................... 10
  Precedence level 3........................... 10
ECN Enabled.................................... No

Queue ID....................................... 1
Threshold Units................................ Percentage
WRED Minimum Threshold
  Precedence level 0........................... 40
  Precedence level 1........................... 30
  Precedence level 2........................... 20
  Precedence level 3........................... 99
WRED Drop Probability
  Precedence level 0........................... 10
  Precedence level 1........................... 10
  Precedence level 2........................... 10
  Precedence level 3........................... 10
ECN Enabled.................................... No