Wednesday, 29 May 2019

Configuring Auto QoS on Cisco Switches

Auto QoS is a great feature included with the majority of switches running at least the LAN Base feature set. It will likely require some further tweaking after it's setup however it's a great base for applying QoS.

Cisco provides support for it's own telephony devices (surprise, surprise!) through CDP broadcasts. However in my case I am working with a different vendor and since not all switches will provide classification of packets I'm relying on the tagging being performed by the downstream devices.

It's very simple to setup - simply apply the following to the switch ports in scope (i.e. the ones connected to the telephony devices):

conf t
int range gi1/0/1-10
auto qos trust dscp

This will instruct the switch ports in scope to trust DSCP markings applied by the downstream devices (as I'm sure you're aware by default DSCP marking are typically stripped.)

The 'auto qos trust dscp' also enables qos globally for us and also applies a few other directives on the interface - so in reality a lot of the setup is performed for you - however in reality it's still crucial that you understand what each directives means!

do show run int gi1/0/1

interface GigabitEthernet1/0/1
 switchport access vlan 2000
 switchport mode access
 speed auto
 srr-queue bandwidth share 1 30 35 5
 priority-queue out
 mls qos trust dscp
 auto qos trust dscp
 spanning-tree portfast
 spanning-tree bpduguard enable

To verify QoS is turned on globally we can review:

show mls qos

and to review interface specific QoS information:

show mls qos interface gi1/0/1

We can also test QoS is successfully prioritising packets with iperf (tagging the traffic with a non zero DSCP value) e.g.:

iperf -c -i 1 -S 0xB8 -t 0

'0xB8' is the hexadecimal equivalent of TOS's 184 - which equates to DSCP's 'ef' / 46. According to the man page (at least in mine) the value must be in hexadecimal TOS form. There is an list of all of them available here.

We can then review the QoS counters for the interface with:

show mls qos interface gi1/0/1 stat


Post a Comment