Your software release may not support all the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to http://www.cisco.com/go/cfn. An account on Cisco.com is not required.
Prerequisites for Auto-QoS
The prerequisites for auto-QoS are the same as the prerequisites for standard QoS.
Restrictions for
Auto-QoS
The
following are restrictions for auto-QoS:
Auto-qos is not
supported on SVI interfaces.
Auto-qos is not
supported on interfaces which are bundled in an EtherChannel.
The trust devicedevice_type interface configuration command is
only supported in an auto-QoS configuration, and not as a stand-alone command
on the
switch. When using the
trust devicedevice_type interface configuration command in an
auto-QoS configuration, if the connected peer device is not a corresponding
device (defined as a device matching your trust policy), both CoS and DSCP
values are set to "0" and any input policy will not take effect.
When upgrading your software release from a pre-
3.2.2 software version to a 3.2.2 or later software version, you must follow
the auto-QoS upgrade procedure described in this chapter.
You can use the auto-QoS feature to simplify the deployment of QoS features. Auto-QoS determines the network design and enables QoS configurations so that the switch can prioritize different traffic flows.
The switch employs the MQC model. This means that instead of using certain global configurations, auto-QoS applied to any interface on a switch configures several global class maps and policy maps.
Auto-QoS matches traffic and assigns each matched packet to qos-groups. This allows the output policy map to put specific qos-groups into specific queues, including into the priority queue.
QoS is needed in both directions, both on inbound and outbound. When inbound, the switch port needs to trust the DSCP in the packet (done by default). When outbound, the switch port needs to give voice packets "front of line" priority. If voice is delayed too long by waiting behind other packets in the outbound queue, the end host drops the packet because it arrives outside of the receive window for that packet.
Auto-QoS Global Configuration Templates
In general, an auto-QoS command generates a series of class maps that either match on ACLs or on DSCP and/or CoS values to differentiate traffic into application classes. An input policy is also generated, which matches the generated classes and in some cases, polices the classes to a set bandwidth. Eight egress-queue class maps are generated. The actual egress output policy assigns a queue to each one of these eight egress-queue class maps.
The auto-QoS commands only generate templates as needed. For example, the first time any new auto-QoS command is used, global configurations that define the eight queue egress service-policy are generated. From this point on, auto-QoS commands applied to other interfaces do not generate templates for egress queuing because all auto-QoS commands rely on the same eight queue models, which have already been generated from the first time a new auto-QoS command was used.
Auto-QoS Policy and Class Maps
After entering the appropriate auto-QoS command, the following actions occur:
Specific class maps are created.
Specific policy maps (input and output) are created.
Policy maps are attached to the specified interface.
When auto-QoS is enabled, the auto qos interface configuration commands and the generated global configuration are added to the running configuration.
The switch applies the auto-QoS-generated commands as if the commands were entered from the CLI. An existing user configuration can cause the application of the generated commands to fail or to be overridden by the generated commands. These actions may occur without warning. If all the generated commands are successfully applied, any user-entered configuration that was not overridden remains in the running configuration. Any user-entered configuration that was overridden can be retrieved by reloading the switch without saving the current configuration to memory. If the generated commands are not applied, the previous running configuration is restored.
How to Configure Auto-QoS
Configuring Auto-QoS
(CLI)
For
optimum QoS performance, configure auto-QoS on all the devices in your network.
SUMMARY STEPS
1.configureterminal
2.interface interface-id
3.Depending on your
auto-Qos configuration, use one of the following commands:
auto qos voip
{cisco-phone |
cisco-softphone |
trust}
auto qos video
{cts |
ip-camera | media-player}
auto qos classify [police]
auto qos trust {cos |
dscp}
4.end
5.show auto qos
interface interface-id
DETAILED STEPS
Command or Action
Purpose
Step 1
configureterminal
Example:
Switch# configure terminal
Enters the global configuration mode.
Step 2
interface interface-id
Example:
Switch(config)# interface
gigabitethernet 3/0/1
Specifies the
port that is connected to a VoIP port, video device, or the uplink port that is
connected to another trusted switch or router in the network interior, and
enters the interface configuration mode.
Step 3
Depending on your
auto-Qos configuration, use one of the following commands:
auto qos voip
{cisco-phone |
cisco-softphone |
trust}
auto qos video
{cts |
ip-camera | media-player}
auto qos classify [police]
auto qos trust {cos |
dscp}
Example:
Switch(config-if)# auto qos trust dscp
The following
commands enable auto-QoS for VoIP:
auto qos voip
cisco-phone—If the port is connected to a Cisco IP Phone, the QoS
labels of incoming packets are only trusted (conditional trust through CDP)
when the telephone is detected.
auto qos voip
cisco-softphone—The port is connected to device running the Cisco
SoftPhone feature. This command generates a QoS configuration for interfaces
connected to PCs running the Cisco IP SoftPhone application and mark, as well
as police traffic coming from such interfaces. Ports configured with this
command are considered untrusted.
auto qos voip
trust—The uplink port is connected to a trusted switch or router,
and the VoIP traffic classification in the ingress packet is trusted.
The following
commands enable auto-QoS for the specified video device (system, camera, or
media player):
auto qos video
cts—A port connected to a Cisco Telepresence system. QoS labels
of incoming packets are only trusted (conditional trust through CDP) when a
Cisco TelePresence is detected.
auto qos video
ip-camera—A port connected to a Cisco video surveillance camera.
QoS labels of incoming packets are only trusted (conditional trust through CDP)
when a Cisco camera is detected.
auto qos video
media-player—A port connected to a CDP-capable Cisco digital
media player. QoS labels of incoming packets are only trusted (conditional
trust through CDP) when a digital media player is detected.
The following command enables auto-QoS for
classification:
auto qos classify
police— This command generates a QoS configuration for untrusted
interfaces. The configuration places a service-policy on the interface to
classify traffic coming from untrusted desktops/devices and mark them
accordingly. The service-policies generated do police.
The following
commands enable auto-QoS for trusted interfaces:
auto qos trust
cos—Class of service.
auto qos trust
dscp—Differentiated Services Code Point.
<cr>—Trust interface.
Step 4
end
Example:
Switch(config-if)# end
Returns to
privileged EXEC mode.
Step 5
show auto qos
interface interface-id
Example:
Switch# show auto qos interface
gigabitethernet 3/0/1
(Optional)
Verifies your entries.
This command
displays the auto-QoS command on the interface on which auto-QoS was enabled.
You can use the
show
running-config privileged EXEC command to display the auto-QoS
configuration and the user modifications.
This procedure should only be followed when upgrading
your software release from a pre- 3.2.2 software version to a 3.2.2 or later
software version.
Before You Begin
Prior to upgrading, you need to remove all auto-QoS
configurations currently on the switch. This sample procedure describes that
process.
After following
this sample procedure, you must then reboot the switch with the new or upgraded
software image and reconfigure auto-QoS.
SUMMARY STEPS
1. show auto qos
2.no auto qos
3.show running-config | i autoQos
4.no policy-mappolicy-map_name
5.show running-config
| i
AutoQoS
6.show auto qos
7.write memory
DETAILED STEPS
Step 1
show auto qos
Example:
Switch# show auto qos
GigabitEthernet2/0/3
auto qos voip cisco-phone
GigabitEthernet2/0/27
auto qos voip cisco-softphone
In privileged
EXEC mode, record all current auto QoS configurations by entering this command.
Step 2
no auto qos
Example:
Switch(config-if)#no auto qos
In interface
configuration mode, run the appropriate
no auto qos
command on each interface that has an auto QoS configuration.
Step 3
show running-config | i autoQos
Example:
Switch# show running-config | i autoQos
Return to
privileged EXEC mode, and record any remaining auto QoS maps class maps, policy
maps, access lists, table maps, or other configurations by entering this
command.
Step 4
no policy-mappolicy-map_name
Example:
Switch)config# no policy-map pmap_101Switch)config# no class-map cmap_101Switch)config# no ip access-list extended AutoQos-101Switch)config# no table-map 101Switch)config# no table-map policed-dscp
In global
configuration mode, remove the QoS class maps, policy maps, table maps, and any
other auto QoS configurations by entering these commands:
no policy-mappolicy-map-name
no class-mapclass-map-name
no ip access-list
extendedAuto-QoS-x
no table-maptable-map-name
no table-map policed-dscp
Step 5
show running-config
| i
AutoQoS
Example:
Switch# show running-config | i AutoQos
Return to
privileged EXEC mode, run this command again to ensure that no auto-QoS
configuration or remaining parts of the auto-QoS configuration exists
Step 6
show auto qos
Example:
Switch# show auto qos
Run this command
to ensure that no auto-QoS configuration or remaining parts of the
configuration exists.
Step 7
write memory
Example:
Switch# write memory
Write the
changes to the auto QoS configuration to NV memory by entering the
write memory
command.
What to Do Next
Reboot the switch
with the new or upgraded software image.
After rebooting
with the new or upgraded software image, re-configure auto-QoS for the
appropriate switch interfaces as determined by running the
show auto qos
command described in step 1.
Note
There is only
one table-map for exceed and another table-map for violate markdown per switch
or stack. If the switch already has a table-map under the exceed action, then
the auto-qos policy cannot be applied.
You can compare the show auto qos and the show running-config command output to identify the user-defined QoS settings.
show running-config
Displays information about the QoS configuration that might be affected by auto-QoS.
You can compare the show auto qos and the show running-config command output to identify the user-defined QoS settings.
Troubleshooting Auto-QoS
To troubleshoot auto-QoS, use the debug auto qos privileged EXEC command. For more information, see the debug auto qos command in the command reference for this release.
To disable auto-QoS on a port, use the no form of the auto qos command interface configuration command, such as no auto qos voip. Only the auto-QoS-generated interface configuration commands for this port are removed. If this is the last port on which auto-QoS is enabled and you enter the no auto qos voip command, auto-QoS is considered disabled even though the auto-QoS-generated global configuration commands remain (to avoid disrupting traffic on other ports affected by the global configuration).
Configuration Examples for Auto-QoS
Example: auto qos trust cos
The following is an example of the auto qos trust cos command and the applied policies and class maps.
The following policy maps are created and applied when running this command:
AutoQos-4.0-Trust-Cos-Input-Policy
AutoQos-4.0-Output-Policy
The following class maps are created and applied when running this command:
The Cisco
Support website provides extensive online resources, including documentation
and tools for troubleshooting and resolving technical issues with Cisco
products and technologies.
To receive
security and technical information about your products, you can subscribe to
various services, such as the Product Alert Tool (accessed from Field Notices),
the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS)
Feeds.
Access to
most tools on the Cisco Support website requires a Cisco.com user ID and
password.