Scapy QOS Ping

Example below uses Python Scapy module to generate an ICMP Request with the TOS value 184 (DSCP 46/EF) which is useful for testing QOS.

from scapy.all import *


Can run from Python 3 in Windows. Open two Python 3 instances and send an ICMP packet with tos=184.

In the second session use the following to see sniff and filter on the interface and check the TOS field of the ICMP response.

from scapy.all import *

sniff(iface=’eth0′, filter=’icmp’, prn=lambda x:

Type show_interfaces() to list the network adapter names and replace “eth0” with the description of the adapter you wish to sniff.

If you get an undefined literal error it maybe due to the way the above example is copied and pasted so pay attention to the use of double or single quotes.


ERS 3500 QOS VLAN Policy

qos if-group name Trusted class trusted
qos if-group name Unrestricted class unrestricted
qos action 253 name baseAct253 update-dscp 46 update-1p 6
qos l2-element 253 name l2Clfr405 vlan-min 253 vlan-max 253 ethertype 0x800
qos classifier 253 set-id 253 name clfrComp253 element-type l2 element-id 253
qos if-assign port 1/1-23 name Unrestricted
qos if-assign port 1/24 name Trusted
qos if-assign port 2/ALL name Unrestricted
qos policy 253 name policy253 if-group Unrestricted clfr-type classifier clfr-id 253 in-profile-action 253 precedence 1



Ubuntu Server QOS Test

Running Ubuntu Server in Virtual Box in Windows can allow for some useful extra networking utilities. I was searching for alternative to ping -V since this parameter has been deprecated and found the Ubuntu ping command offered more. Assumption being that the VM is connected to a network where you need to test.

Using Ping -Q tos option (ie 0xB8) to send ICMP requests with DSCP 46 set.

Tip: Toggle through multiple TTY terminal screens using Alt + left or right arrow. Run ping from one window and TCPDUMP from another.