Recently i have been working on a Cisco Telepresence Video roll out for my employer. One of the challenges i had was to configure QoS classes with the service provider – which manages our WAN. I provided to them what dscp (layer 3) tags the traffic would be marked as and how much bandwidth they should dedicate to video for these tags.

For Cisco Telepresence Video i used the following setup:
DSCP Marking – AF41 = ToS of 34
For our large bandwidth sites – 100mbit i reserved 16mbit in a QoS class based on a 720p video call @ 60fps equaling 4mbit of bandwidth. So 4 calls at 720p guaranteed over the WAN service.

I needed a way to test WAN configs on the router with purely sending traffic from Site A to Site B with the correct DSCP tag so it would be honored by the router. After a bit if research if found that the Linux networking stack still allows the ToS bit to be set with the inbuilt ping command like so:

ping -Q 34 10.1.1.1

The -Q option sets the Type of Service bit – which is a decimal value in IPv4 – if your using IPv6 it has to be a hex value. For this article im working with IPv4. How do you know which decimal value to use? Well they marry up to DSCP and CoS, i use a very useful table by the website tucny:

http://www.tucny.com/Home/dscp-tos

Really handy resource to work out what CoS, DSCP and ToS values you need for your QoS config. So when testing from a Linux host with the above command and at the same time running a shell session to the Cisco router – issuing the following command:

show policy-map interface gi0/0 (where gi0/0 is your inbound wan interface)

You should see the incremental qos class packet matches rise with every
re-iteration of the above command. Also FYI, Windows deprecated the use of the ToS bit in its ping command, so testing qos with extended ping can only be done from non-windows operating systems.