QoS queue configuration
QoS queue configuration reduces the number of outbound queues that all switch ports use to buffer packets for 802.1p user priorities. By default the switches covered in this guide use eight queues. Change the default QoS queue configuration to four-queue mode or two-queue mode to increase the available bandwidth per queue.
Use the following commands to change the number of queues per port and display the current priority queue configuration on the switch.
Syntax:
qos queue-config < 2-queues | 4-queues
| queue-servicing | traffic-template>
Configures the number of outbound priority queues for all ports on the switch using one of the following options: 2-queues, 4-queues.
(Default: 4-queues)
CAUTION: This command will execute a
write memory
followed by an immediate reboot, replacing the Startup configuration with the content of the current Running configuration.The new configuration will:
Remove any previously configured bandwidth-min output settings
Set the new number of outbound port queues
If you select anything but ‘yes’ for this operation, the operation is aborted and a message stating
Operation aborted
appears.
queue-servicing
: Set the outbound queue servicing algorithm to use on congested ports.
strict-priority
: Gives higher priority queues unconditional precedence over lower priority queues for maximum throughput of high priority traffic. This can result in lower priority traffic being completely blocked during periods of congestion.
weighted-round-robin
: Gives all outbound queues a weighted share of the port bandwidth so that lower priority queues are not completely blocked (default).
traffic-template
: Sets the traffic template to be used on all ports to define the mapping of 802.1p packet priority values to outbound queues.
Syntax:
show qos queue
config
Displays the current qos queue configuration.
Mapping of outbound port queues
This table shows the mapping of 802.1p priorities to outbound port queues:
Mapping 802.1p priorities to outbound port queues
802.1p priority | 4 Queues | 2 Queues |
---|---|---|
1 (lowest) | 1 | 1 |
2 | ||
0 (normal) | 2 | |
3 | ||
4 | 3 | 2 |
5 | ||
6 | 4 | |
7 (highest) |
Configuring the number of priority queues
To change the number of outbound priority queues
for all ports on the switch, use the qos queue-config
command.
CAUTION: The | |
Example:
To change the number of outbound priority queues for all ports on the switch from four queues (the default) to two:
Configure the number of outbound priority queues by using the
qos queue-config
command.switch(config)#: qos queue-config 2-queues
A caution message is displayed (see the Caution note above) concluding with the following prompt:
Do you want to save the current configuration? [y/n] Device will be rebooted, do you want to continue? [y/n]
Type ‘y’ (Yes) to initiate a write memory followed by an immediate reboot (entering ‘n’ (No) at either of the two prompts will cancel the command and maintain the current queue configuration on the switch).
The changes will be committed to the startup configuration and the switch will reboot automatically with the new priority queue changes in effect.
Configuring 802.1p priority-to-queue mapping
The switches covered in this guide currently implement priority-to-queue mapping as defined in the IEEE 802.1D-2004 Annex G standard. Another standard, IEEE 802.1Q-2005, defines a slightly different mapping where the ordering of priorities 0-2 are changed. This enhancement allows you to configure the switch to follow either standard.
The switch supports two or four outbound queues. When only two queues are configured, the priority-to-queue mapping is the same as that based on the IEEE 802.1Q-2005 standard. When four outbound queues are configured, the mappings currently are different, as shown in the grayed cells in the following table.
802.1p Priorities | IEEE 802.1Q-2005 Queue | IEEE 802.1D-2004 Annex G Queue |
---|---|---|
0 | 1 | 2 |
1 | 1 | 1 |
2 | 2 | 1 |
3 | 2 | 2 |
4 | 3 | 3 |
5 | 3 | 3 |
6 | 4 | 4 |
7 | 4 | 4 |
Syntax:
qos queue-config
< 2-queues | 4-queues > [traffic-template
<name>
]
Configures the number of outbound priority queues for each port. Packets are queued for transmission based on their 802.1p priority, with traffic in higher priority queues given precedence over lower priority queues. Increasing the number of outbound queues provides finer control over traffic priority on congested ports, but reduces the maximum size of each queue.
NOTE: Changing the number of outbound queues requires a reboot. This command will execute a
write memory
command to save the running configuration, and then reboot the switch.
traffic-template
: The traffic template to be used for all ports to define the mapping of 802.1p packet priority values to outbound queues.
traffic-template default-tcgt
: The mapping associated with the 802.1D-2004 Annex G standard.
traffic-template dot1q-tcgt
: The mapping associated with the 802.1Q-2005 standard.
Configuring a traffic template for 4 queues
switch(config)# qos queue-config 4-queues traffic-template dot1q-tcgt This command will modify the current running configuration, execute ‘write memory’ to replace the startup configuration, and then reboot. Egress queues will be configured as follows: 4-queues Traffic template: dot1q-tcgt Do you want to save current configuration [y/n^C]? y Device will be rebooted, do you want to continue {y/n]?
To view the current configuration setting for
priority-to-queue mapping, enter the show qos queue-config
command.
Output showing the queue configuration for 4 queues
switch(config)# show qos queue-config Egress Queue Configuration Traffic Template: dot1q-tcgt 802.1p Queue Priority ----- -------- 1 0,1 2 2,3 3 4,5 4 6,7
The running-config file displays the queue configuration.