Configuring Queuing and Scheduling

This chapter contains the following sections:

About Queuing and Scheduling

Traffic queuing is the ordering of packets and applies to both input and output of data. Device modules can support multiple queues, which you can use to control the sequencing of packets in different traffic classes. You can also set weighted random early detection (WRED) and taildrop thresholds. The device drops packets only when the configured thresholds are exceeded.

Traffic scheduling is the methodical output of packets at a desired frequency to accomplish a consistent flow of traffic. You can apply traffic scheduling to different traffic classes to weight the traffic by priority.

The queuing and scheduling processes allow you to control the bandwidth that is allocated to the traffic classes so that you achieve the desired trade-off between throughput and latency for your network.

Modifying Class Maps

System-defined queuing class maps are provided.


Note

The provided system-defined queuing class maps cannot be modified.


Congestion Avoidance

You can use the following methods to proactively avoid traffic congestion on the device:

  • Apply WRED to TCP or non-TCP traffic.

  • Apply tail drop to TCP or non-TCP traffic.

Congestion Management

For egress packets, you can choose one of the following congestion management methods:

  • Specify a bandwidth that allocates a minimum data rate to a queue.

  • Impose a minimum and maximum data rate on a class of traffic so that excess packets are retained in a queue to shape the output rate.

  • Allocate all data for a class of traffic to a priority queue. The device distributes the remaining bandwidth among the other queues.

For information about configuring congestion management, see the Configuring WRED on Egress Queues section.

Explicit Congestion Notification

ECN is an extension to WRED that marks packets instead of dropping them when the average queue length exceeds a specific threshold value. When configured with the WRED ECN feature, routers and end hosts use this marking as a signal that the network is congested to slow down sending packets.


Note

Enabling WRED and ECN on a class on a system-qos policy implies that WRED and ECN is enabled for all ports in the system.


Traffic Shaping

Traffic shaping allows you to control the traffic going out of an interface in order to match its flow to the speed of the remote target interface and to ensure that the traffic conforms to policies contracted for it. You can shape traffic that adheres to a particular profile to meet downstream requirements. Traffic shaping eliminates bottlenecks in topologies with data-rate mismatches.

Traffic shaping regulates and smooths out the packet flow by imposing a maximum traffic rate for each port’s egress queue. Packets that exceed the threshold are placed in the queue and are transmitted later. Traffic shaping is similar to traffic policing, but the packets are not dropped. Because packets are buffered, traffic shaping minimizes packet loss (based on the queue length), which provides better traffic behavior for TCP traffic.

Using traffic shaping, you can control access to available bandwidth, ensure that traffic conforms to the policies established for it, and regulate the flow of traffic to avoid congestion that can occur when the egress traffic exceeds the access speed of its remote, target interface. For example, you can control access to the bandwidth when policy dictates that the rate of a given interface should not, on average, exceed a certain rate even though the access rate exceeds the speed.

Queue length thresholds are configured using the WRED configuration.

Licensing Requirements for Queuing and Scheduling

The following table shows the licensing requirements for this feature:

Product

License Requirement

Cisco NX-OS

The QoS feature does not a require license. Any feature not included in a license package is bundled with the NX-OS image and is provided at no extra charge to you. For a complete explanation of the Cisco NX-OS licensing scheme, see the Cisco NX-OS Licensing Guide.

Prerequisites for Queuing and Scheduling

Queuing and scheduling have the following prerequisites:

  • You must be familiar with using modular QoS CLI.

  • You are logged on to the device.

Guidelines and Limitations for Queuing and Scheduling

Queuing and scheduling has the following guidelines and limitations:

  • Egress queue drop bytes information is an approximate calculation based on the number of cells used.

  • WRED burst optimized and mesh optimized configurations are not supported.

  • show commands with the internal keyword are not supported.

  • Approximate Fair Drop (AFD) is not supported.

  • Beginning with NX-OS release 9.2(2v), ingress queuing is supported.

  • The device supports a system-level queuing policy, so all ports in the system are impacted when you configure the queuing policy.

  • The device supports eight (8) egress queues on each port. There is not a separate queue for multicast or CPU traffic because they share the existing 8 queues. Both unicast and non-unicast traffic share the same egress queue.

  • Control packets by default share q7 while Span packets use default q0.

  • A type queuing policy can be attached to the system or to individual interfaces for output traffic.

  • Changes are disruptive. The traffic passing through ports of the specified port type experience a brief period of traffic loss. All ports of the specified type are affected.

  • Performance can be impacted. If one or more ports of the specified type do not have a queuing policy applied that defines the behavior for the new queue, the traffic mapping to that queue can experience performance degradation.

  • Traffic shaping can increase the latency of packets due to queuing because it falls back to store-and-forward mode when packets are queued.

  • When configuring priority for one class map queue (SPQ), configure the priority for QoS group 7. When configuring priority for more than one class map queue, configure the priority on the higher numbered QoS groups. In addition, the QoS groups must be next to each other. For example, if you want to have two SPQs, you have to configure the priority on QoS group 7 and on QoS group 6.

  • WRED is applicable only for TCP or UDP packets.

  • The maximum threshold for WRED must be equal to, or greater than, n times the minimum.

  • WRED statistics are supported per-port. Per-queue WRED statistics are not supported.

Configuring Queuing and Scheduling

Queuing and scheduling are configured by creating policy maps of type queuing that you apply to an egress interface. You can modify system-defined class maps, which are used in policy maps to define the classes of traffic to which you want to apply policies.

For information about configuring policy maps and class maps, see the "Using Modular QoS CLI" section.

You can configure the congestion-avoidance features, which include tail drop and WRED, in any queue.

You can configure one of the egress congestion management features, such as priority, traffic shaping, and bandwidth in output queues.

The system-defined policy map, default-out-policy, is attached to all ports to which you do not apply a queuing policy map. The default policy maps cannot be configured.

Configuring Type Queuing Policies

Type queuing policies for egress are used for scheduling and buffering the traffic of a specific system class. A type queuing policy is identified by its QoS group and can be attached to the system or to individual interfaces for input or output traffic.


Note

Ingress queuing policy is used to configure pause buffer thresholds. For more details, see the Priority Flow Control section.


SUMMARY STEPS

  1. configure terminal
  2. policy-map type queuing policy-name
  3. class type queuing class-name
  4. priority
  5. no priority
  6. shape {kbps | mbps | gbps} burst size min minimum bandwidth
  7. bandwidth percent percentage
  8. (Optional) no bandwidth percent percentage
  9. (Optional) priority level level
  10. (Optional) queue-limit queue size [dynamic dynamic threshold]

DETAILED STEPS

  Command or Action Purpose
Step 1

configure terminal

Enters global configuration mode.

Step 2

policy-map type queuing policy-name

Creates a named object that represents a set of policies that are to be applied to a set of traffic classes. Policy-map names can contain alphabetic, hyphen, or underscore characters, are case sensitive, and can be up to 40 characters.

Step 3

class type queuing class-name

Associates a class map with the policy map, and enters configuration mode for the specified system class.

Step 4

priority

Specifies that traffic in this class is mapped to a strict priority queue.

Step 5

no priority

(Optional) Removes the strict priority queuing from the traffic in this class.

Step 6

shape {kbps | mbps | gbps} burst size min minimum bandwidth

Specifies the burst size and minimum guaranteed bandwidth for this queue.

Step 7

bandwidth percent percentage

Assigns a weight to the class. The class will receive the assigned percentage of interface bandwidth if there are no strict-priority queues. If there are strict-priority queues, however, the strict-priority queues receive their share of the bandwidth first. The remaining bandwidth is shared in a weighted manner among the class configured with a bandwidth percent. For example, if strict-priority queues take 90 percent of the bandwidth, and you configure 75 percent for a class, the class will receive 75 percent of the remaining 10 percent of the bandwidth.

Note 

Before you can successfully allocate bandwidth to the class, you must first reduce the default bandwidth configuration on class-default and class-fcoe.

Step 8

(Optional) no bandwidth percent percentage

(Optional)

Removes the bandwidth specification from this class.

Step 9

(Optional) priority level level

(Optional)

Specifies the strict priority levels for the Cisco Nexus 3400-S switches. These levels can be 1, 2, or 3.

Step 10

(Optional) queue-limit queue size [dynamic dynamic threshold]

(Optional)

Specifies either the static or dynamic shared limit available to the queue for Cisco Nexus 3400-S switches. The static queue limit defines the fixed size to which the queue can grow.

The dynamic queue limit allows the queue's threshold size to be decided depending on the number of free cells available, in terms of the alpha value.

Configuring Congestion Avoidance

You can configure congestion avoidance with tail drop or WRED features. Both features can be used in egress policy maps.

Configuring Tail Drop on Egress Queues

You can configure tail drop on egress queues by setting thresholds. The device drops any packets that exceed the thresholds. You can specify a threshold that is based on the queue size or buffer memory that is used by the queue.

SUMMARY STEPS

  1. configure terminal
  2. policy-map [type queuing] [match-first] [policy-map-name]
  3. class type queuing class-name
  4. queue-limit {queue-size [bytes | kbytes | mbytes] | dynamic value}
  5. (Optional) Repeat Steps 3 and 4 to assign tail drop thresholds for other queue classes.
  6. show policy-map [type queuing [policy-map-name | default-8q-out-policy]]
  7. copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose
Step 1

configure terminal

Example:
switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

policy-map [type queuing] [match-first] [policy-map-name]

Example:
switch(config)# policy-map type queuing shape_queues
switch(config-pmap-que)#

Configures the policy map of type queuing and then enters policy-map mode for the policy-map name you specify. Policy-map names can contain alphabetic, hyphen, or underscore characters, are case-sensitive, and can be up to 40 characters.

Step 3

class type queuing class-name

Example:
switch(config-pmap-que)# class type queuing c-out-q1
switch(config-pmap-c-que)#

Configures the class map of type queuing and then enters policy-map class queuing mode. Class queuing names are listed in the previous System-Defined Type queuing Class Maps table.

Step 4

queue-limit {queue-size [bytes | kbytes | mbytes] | dynamic value}

Example:
switch(config-pmap-c-que)# queue-limit 1000 mbytes

Assigns a tail drop threshold that is based on the queue size in bytes, kilobytes, or megabytes or allows the queue’s threshold size to be determined dynamically depending on the number of free cells available. The device drops packets that exceed the specified threshold.

The Cisco Nexus 3400-S switches use a single egress queue for sending both unicast and non-unicast traffic. The buffer utilization for the respective traffic is defined by alpha values that are different for unicast and non-unicast. Queue limit changes affect only the unicast alpha values.

Value of queue limit/alpha

Unicast definition

Multicast definition

Max % per queue

1

1/16

1/4

~6%

2

1/8

1/4

~11%

3

1/4

1/4

20%

4

1/2

1/4

~33%

5

1

1/4

50%

6

2

1/4

~67%

7

4

1/4

80%

8

8

1/4

~89%

For example, if you configure a dynamic queue size of 6, then the alpha value is ½. If you configure a dynamic queue size of 7, then the alpha value is 1.

To calculate the queue-limit, consider the following:

queue-limit = (alpha/(1 + alpha)) x total buffers

For example, if you configure a queue-limit with a dynamic queue size of 7, then the queue-limit can grow up to (1/(1+1)) x total buffers. This means that the queue-limit = ½ x total buffers.

Step 5

(Optional) Repeat Steps 3 and 4 to assign tail drop thresholds for other queue classes.

Step 6

show policy-map [type queuing [policy-map-name | default-8q-out-policy]]

Example:
switch(config-pmap-c-que)# show policy-map type queuing shape_queues

(Optional) Displays information about all configured policy maps, all policy maps of type queuing, a selected policy map of type queuing, or the default output queuing policy.

Step 7

copy running-config startup-config

Example:
switch(config)# copy running-config
startup-config

(Optional) Saves the running configuration to the startup configuration.

Configuring WRED on Egress Queues

You can configure WRED on egress queues to set minimum and maximum packet drop thresholds. The frequency of dropped packets increases as the queue size exceeds the minimum threshold. When the maximum threshold is exceeded, all packets for the queue are dropped.

SUMMARY STEPS

  1. configure terminal
  2. policy-map type queuing {[match-first] policy-map-name}
  3. class type queuing class-name
  4. random-detect [minimum-threshold min-threshold {packets | bytes | kbytes | mbytes} maximum-threshold max-threshold {packets | bytes | kbytes | mbytes} drop-probability value weight value] [ecn | non-ecn]
  5. (Optional) Repeat Steps 3 and 4 to configure WRED for other queuing classes.

DETAILED STEPS

  Command or Action Purpose
Step 1

configure terminal

Example:
switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

policy-map type queuing {[match-first] policy-map-name}

Example:
switch(config)# policy-map type queuing p1
switch(config-pmap-que)#

Configures the policy map of type queuing and then enters policy-map mode for the policy-map name you specify. Policy-map names can contain alphabetic, hyphen, or underscore characters, are case-sensitive, and can be up to 40 characters.

Step 3

class type queuing class-name

Example:
switch(config-pmap-que)# class type queuing c-out-q1
switch(config-pmap-c-que)#

Configures the class map of type queuing and then enters policy-map class queuing mode. Class queuing names are listed in the previous System-Defined Type queuing Class Maps table.

Step 4

random-detect [minimum-threshold min-threshold {packets | bytes | kbytes | mbytes} maximum-threshold max-threshold {packets | bytes | kbytes | mbytes} drop-probability value weight value] [ecn | non-ecn]

Example:
switch(config-pmap-c-que)# random-detect
minimum-threshold 10 mbytes
maximum-threshold 20 mbytes
Example:
switch(config-pmap-c-que)# random-detect non-ecn
minimum-threshold 1000 kbytes
maximum-threshold 4000 kbytes 
drop-probability 100
switch# show queuing interface e1/1  | i WRED|AQM
| WRED/AQM & Tail Drop Pkts |       0            |
| WRED/AQM & Tail Drop Byts |       0            |
| WRED/AQM & Tail Drop Pkts |       0            |
| WRED/AQM & Tail Drop Byts |       0            |
| WRED/AQM & Tail Drop Pkts |       0            |
| WRED/AQM & Tail Drop Byts |       0            |
| WRED/AQM & Tail Drop Pkts |       0            |
| WRED/AQM & Tail Drop Byts |       0            |
| WRED/AQM & Tail Drop Pkts |       0            |
| WRED/AQM & Tail Drop Byts |       0            |
| WRED/AQM & Tail Drop Pkts |       0            |
| WRED/AQM & Tail Drop Byts |       0            |
| WRED/AQM & Tail Drop Pkts |       0            |
| WRED/AQM & Tail Drop Byts |       0            |
| WRED/AQM & Tail Drop Pkts |       0            |
| WRED/AQM & Tail Drop Byts |       0            |
|      Green WRED/AQM Drops (Pkts) |     0               |
|     Yellow WRED/AQM Drops (Pkts) |     0               |
|        Red WRED/AQM Drops (Pkts) |     0               

Configures WRED on the specified queuing class. You can specify minimum and maximum thresholds that are used to drop packets from the queue. You can configure these thresholds by the number of packets, bytes, kilobytes, or megabytes. The minimum and maximum thresholds must be of the same type. The thresholds are from 1 to 52428800.

Alternatively, you can configure WRED to drop packets that are based on explicit congestion notification (ECN). The Network Forwarding Engine (NFE) platform supports the non-ecn option to configure drop thresholds for non-ECN flows.

Step 5

(Optional) Repeat Steps 3 and 4 to configure WRED for other queuing classes.

(Optional)

Configuring Congestion Management

You can configure only one of the following congestion management methods in a policy map:

  • Allocate a minimum data rate to a queue by using the bandwidth and bandwidth remaining commands.

  • Allocate all data for a class of traffic to a priority queue by using the priority command. You can use the bandwidth remaining command to distribute remaining traffic among the nonpriority queues. By default, the system evenly distributes the remaining bandwidth among the nonpriority queues.

  • Allocate a minimum and maximum data rate to a queue by using the shape command.

In addition to the congestion management feature that you choose, you can configure one of the following queue features in each class of a policy map:

Configuring Bandwidth and Bandwidth Remaining

You can configure the bandwidth and bandwidth remaining on the egress queue to allocate a minimum percentage of the interface bandwidth to a queue.


Note

When a guaranteed bandwidth is configured, the priority queue must be disabled in the same policy map.


SUMMARY STEPS

  1. configure terminal
  2. policy-map type queuing {[match-first] policy-map-name}
  3. class type queuingclass-name
  4. Assign a minimum rate of the interface bandwidth or assign the percentage of the bandwidth that remains:
    • Bandwidth percent:

      bandwidth {percent percent}
    • Bandwidth remaining percent:

      bandwidth remaining percent percent
  5. (Optional) Repeat Steps 3 and 4 to assign tail drop thresholds for other queue classes.
  6. exit
  7. show policy-map [type queuing [policy-map-name | default-8q-out-policy]]
  8. copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose
Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

policy-map type queuing {[match-first] policy-map-name}

Example:

switch(config)# policy-map type queuing shape_queues
switch(config-pmap-que)#

Configures the policy map of type queuing and then enters policy-map mode for the policy-map name you specify. Policy-map names can contain alphabetic, hyphen, or underscore characters, are case sensitive, and can be up to 40 characters.

Step 3

class type queuingclass-name

Example:

switch(config-pmap-que)# class type queuing c-out-q1
switch(config-pmap-c-que)#

Configures the class map of type queuing and then enters policy-map class queuing mode. Class queuing names are listed in the previous System-Defined Type queuing Class Maps table.

Step 4

Assign a minimum rate of the interface bandwidth or assign the percentage of the bandwidth that remains:

  • Bandwidth percent:

    bandwidth {percent percent}
  • Bandwidth remaining percent:

    bandwidth remaining percent percent

Example:

  • Bandwidth percent:

    switch(config-pmap-c-que)# bandwidth percent 25
  • Bandwidth remaining percent:

    switch(config-pmap-c-que)# bandwidth remaining percent 25
  • Bandwidth percent:

    Assigns a minimum rate of the interface bandwidth to an output queue as the percentage of the underlying interface link rate. The range is from 0 to 100.

    The example shows how to set the bandwidth to a minimum of 25 percent of the underlying link rate.

  • Bandwidth remaining percent:

    Assigns the percentage of the bandwidth that remains to this queue. The range is from 0 to 100.

    The example shows how to set the bandwidth for this queue to 25 percent of the remaining bandwidth.

Step 5

(Optional) Repeat Steps 3 and 4 to assign tail drop thresholds for other queue classes.

Step 6

exit

Example:

switch(config-cmap-que)# exit
switch(config)#

Exits policy-map queue mode and enters global configuration mode.

Step 7

show policy-map [type queuing [policy-map-name | default-8q-out-policy]]

Example:

switch(config-pmap-c-que)# show policy-map type queuing shape_queues

(Optional) Displays information about all configured policy maps, all policy maps of type queuing, a selected policy map of type queuing, or the default output queuing policy.

Step 8

copy running-config startup-config

Example:

switch(config)# copy running-config
startup-config

(Optional) Saves the running configuration to the startup configuration.

Configuring Priority

If you do not specify the priority, the system-defined egress pq queues behave as normal queues. For information on the system-defined type queuing class maps, see the "Using Modular QoS CLI" section.

You can configure only one level of priority on an egress priority queue. You use the system-defined priority queue class for the type of module to which you want to apply the policy map.

For the nonpriority queues, you can configure how much of the remaining bandwidth to assign to each queue. By default, the device evenly distributes the remaining bandwidth among the nonpriority queues.


Note

When a priority queue is configured, the other queues can only use the remaining bandwidth in the same policy map.



Note

When configuring priority for one class map queue (SPQ), you need to configure the priority for QoS group 7. When configuring priority for more than one class map queue, you need to configure the priority on the higher numbered QoS groups. In addition, the QoS groups need to be adjacent to each other. For example, if you want to have two SPQs, you have to configure the priority on QoS group 7 and on QoS group 6.


SUMMARY STEPS

  1. configure terminal
  2. policy-map type queuing {[match-first] policy-map-name}
  3. class type queuing class-name
  4. priority [level value]
  5. class type queuingclass-name
  6. bandwidth remaining percent percent
  7. (Optional) Repeat Steps 5 to 6 to assign the remaining bandwidth for the other nonpriority queues.
  8. exit
  9. show policy-map [type queuing [policy-map-name | default-8q-out-policy]]
  10. copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose
Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

policy-map type queuing {[match-first] policy-map-name}

Example:

switch(config)# policy-map type queuing priority_queue1
switch(config-pmap-que)#

Configures the policy map of type queuing and then enters policy-map mode for the policy-map name you specify. Policy-map names can contain alphabetic, hyphen, or underscore characters, are case sensitive, and can be up to 40 characters.

Step 3

class type queuing class-name

Example:

switch(config-pmap-que)# class type queuing c-out-q1
switch(config-pmap-c-que)#

Configures the class map of type queuing and then enters policy-map class queuing mode. Class queuing names are listed in the previous System-Defined Type queuing Class Maps table.

Step 4

priority [level value]

Example:

switch(config-pmap-c-que)# priority

Selects this queue as a priority queue. Only one priority level is supported.

Step 5

class type queuingclass-name

Example:

switch(config-pmap-que)# class type queuing c-out-q2
switch(config-pmap-c-que)#

(Optional) Configures the class map of type queuing and then enters policy-map class queuing mode. Class queuing names are listed in the previous System-Defined Type queuing Class Maps table.

Choose a nonpriority queue where you want to configure the remaining bandwidth. By default, the system evenly distributes the remaining bandwidth among the nonpriority queues.

Step 6

bandwidth remaining percent percent

Example:

switch(config-pmap-c-que)# bandwidth remaining percent 25

(Optional) Assigns the percent of the bandwidth that remains to this queue. The range is from 0 to 100.

Step 7

(Optional) Repeat Steps 5 to 6 to assign the remaining bandwidth for the other nonpriority queues.

Step 8

exit

Example:

switch(config-cmap-que)# exit
switch(config)#

Exits policy-map queue mode and enters global configuration mode.

Step 9

show policy-map [type queuing [policy-map-name | default-8q-out-policy]]

Example:

switch(config)# show policy-map type queuing priority_queue1

(Optional) Displays information about all configured policy maps, all policy maps of type queuing, a selected policy map of type queuing, or the default output queuing policy.

Step 10

copy running-config startup-config

Example:

switch(config)# copy running-config
startup-config

(Optional) Saves the running configuration to the startup configuration.

Configuring Traffic Shaping

You can configure traffic shaping on an egress queue to impose a minimum and maximum rate on it.


Note

Configuring traffic shaping for a queue is independent of priority or bandwidth in the same policy map.


SUMMARY STEPS

  1. configure terminal
  2. policy-map type queuing {[match-first] policy-map-name}
  3. class type queuing class-name
  4. shape min value {bps | gbps | kbps | mbps | pps} max value {bps | gbps | kbps | mbps | pps}
  5. (Optional) Repeat Steps 3 and 4 to assign tail drop thresholds for other queue classes.
  6. show policy-map [type queuing [policy-map-name | default-8q-out-policy]]
  7. copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose
Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

policy-map type queuing {[match-first] policy-map-name}

Example:

switch(config)# policy-map type queuing shape_queues
switch(config-pmap-que)#

Configures the policy map of type queuing and then enters policy-map mode for the policy-map name you specify. Policy-map names can contain alphabetic, hyphen, or underscore characters, are case sensitive, and can be up to 40 characters.

Step 3

class type queuing class-name

Example:

switch(config)# class type queuing c-out-q-default
switch(config-pmap-c-que)#

Configures the class map of type queuing and then enters policy-map class queuing mode. Class queuing names are listed in the previous System-Defined Type queuing Class Maps table.

Step 4

shape min value {bps | gbps | kbps | mbps | pps} max value {bps | gbps | kbps | mbps | pps}

Example:

switch(config-pmap-c-que)# shape min 10 bps max 100 bps

Assigns a minimum and maximum bit rate on an output queue. The default bit rate is in bits per second (bps).

The example shows how to shape traffic to a minimum rate of 10 bits per second (bps) and a maximum rate of 100 bps.

Step 5

(Optional) Repeat Steps 3 and 4 to assign tail drop thresholds for other queue classes.

Step 6

show policy-map [type queuing [policy-map-name | default-8q-out-policy]]

Example:

switch(config)# show policy-map type queuing shape_queues

(Optional) Displays information about all configured policy maps, all policy maps of type queuing, a selected policy map of type queuing, or the default output queuing policy.

Step 7

copy running-config startup-config

Example:

switch(config)# copy running-config
startup-config

(Optional) Saves the running configuration to the startup configuration.

Applying a Queuing Policy on a System

You apply a queuing policy globally on a system.

SUMMARY STEPS

  1. configure terminal
  2. system qos
  3. service-policy type queuing output {policy-map-name | default-8q-out-policy}

DETAILED STEPS

  Command or Action Purpose
Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

system qos

Example:

switch (config)# system qos
switch (config-sys-qos)#

Enters system qos mode.

Step 3

service-policy type queuing output {policy-map-name | default-8q-out-policy}

Example:

switch (config-sys-qos)# service-policy type queuing map1

Adds the policy map to the input or output packets of system.

Note 

The output keyword specifies that this policy map should be applied to traffic transmitted from an interface.

Note 

To restore the system to the default queuing service policy, use the no form of this command.

Verifying the Queuing and Scheduling Configuration

Use the following commands to verify the queuing and scheduling configuration:

Command

Purpose

show class-map [type queuing [class-name]]

Displays information about all configured class maps, all class maps of type queuing, or a selected class map of type queuing.

show policy-map [type queuing [policy-map-name | default-8q-out-policy]]

Displays information about all configured policy maps, all policy maps of type queuing, a selected policy map of type queuing, or the default output queuing policy.

show policy-map system

Displays information about all configured policy maps on the system.

Managing Dynamic Buffer Sharing

Dynamic buffer sharing (egress buffering) within slices is configured with the global hardware qos dynamic-buffer-sharing command. This enables the sharing of buffers between drop and no-drop partitions. Following the command, you must save the configuration and reload the switch to enable dynamic buffering.

Example:

switch(config)# hardware qos dynamic-buffer-sharing
Warning: Please save config and reload the system for the configuration to take effect.

Note

Dynamic buffer sharing requires a configured network QoS policy. For more information on configuring and applying a network QoS policy, see Configuring a User-Defined Network QoS Policy and Applying a Network QoS Policy on a System.


Monitoring the QoS Packet Buffer

The Cisco Nexus 3400-S switches have a 54MB buffer that divides into a dedicated per port and dynamic shared memory. Each front-panel port has eight queues in egress. For burst or congestion situations, each egress port consumes buffers from the dynamic shared memory.

You can display the real-time and peak status of the shared buffer per port. All counters are displayed in terms of the number of cells. Each cell is 224 bytes in size. You can also display the global level buffer in terms of consumption and the available number of cells.


Note

In the examples shown in this section, the port numbers are Broadcom ASIC ports.


This example shows how to clear the system buffer maximum cell usage counter:

switch# clear counters buffers
Max Cell Usage has been reset successfully

This example shows how to display the interface hardware mappings:

eor15# show interface hardware-mappings 
Legends:
       SMod  - Source Mod. 0 is N/A
       Unit  - Unit on which port resides. N/A for port channels
       HPort - Hardware Port Number or Hardware Trunk Id:
       FPort - Fabric facing port number. 255 means N/A
       NPort - Front panel port number
       VPort - Virtual Port Number. -1 means N/A

--------------------------------------------------------------------
Name       Ifindex  Smod Unit HPort FPort NPort VPort
--------------------------------------------------------------------
Eth2/1     1a080000 4    0    13    255   0     -1   
Eth2/2     1a080200 4    0    14    255   1     -1   
Eth2/3     1a080400 4    0    15    255   2     -1   
Eth2/4     1a080600 4    0    16    255   3     -1   
Eth2/5     1a080800 4    0    17    255   4     -1   
Eth2/6     1a080a00 4    0    18    255   5     -1   
Eth2/7     1a080c00 4    0    19    255   6     -1   
Eth2/8     1a080e00 4    0    20    255   7     -1   
Eth2/9     1a081000 4    0    21    255   8     -1   
Eth2/10    1a081200 4    0    22    255   9     -1   
Eth2/11    1a081400 4    0    23    255   10    -1   
Eth2/12    1a081600 4    0    24    255   11    -1   
Eth2/13    1a081800 4    0    25    255   12    -1   
Eth2/14    1a081a00 4    0    26    255   13    -1   
Eth2/15    1a081c00 4    0    27    255   14    -1   
Eth2/16    1a081e00 4    0    28    255   15    -1   
Eth2/17    1a082000 4    0    29    255   16    -1   
Eth2/18    1a082200 4    0    30    255   17    -1   
Eth2/19    1a082400 4    0    31    255   18    -1   
Eth2/20    1a082600 4    0    32    255   19    -1   
Eth2/21    1a082800 4    0    33    255   20    -1   
Eth2/22    1a082a00 4    0    34    255   21    -1   
Eth2/23    1a082c00 4    0    35    255   22    -1   
Eth2/24    1a082e00 4    0    36    255   23    -1 

Configuration Examples for Queuing and Scheduling

In this section you can find examples of configuring queuing and scheduling.

Example: Configuring WRED on Egress Queues

The following example shows how to configure the WRED feature on an egress queue:

configure terminal
  class-map type queuing match-any c-out-q1
    match qos-group 1
  class-map type queuing match-any c-out-q2
    match qos-group 1
  policy-map type queuing wred
    class type queuing c-out-q1
      random-detect minimum-threshold 10 bytes maximum-threshold 1000 bytes
    class type queuing c-out-q2
      random-detect threshold burst-optimized ecn

Example: Configuring Traffic Shaping

The following example shows how to configure traffic shaping using 1000 packets per second (pps)::

configure terminal
  class-map type queuing match-any c-out-q1
    match qos-group 1
  class-map type queuing match-any c-out-q2
    match qos-group 1
policy-map type queuing pqu
	class type queuing c-out-q1
		shape min 100 pps max 500 pps
	class type queuing c-out-q2
		shape min 200 pps max 1000 pps
show policy-map type queuing pqu