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 *
send(IP(dst=”192.168.1.200″,tos=184)/ICMP(id=1,length=256,seq=57))
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 *
send(IP(dst=”192.168.1.200″,tos=184)/ICMP(id=1,length=256,seq=57))
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
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.
#
# FILTER CONFIGURATION
#
filter acl 1 type inPort name “SBCb1b2int”
filter acl port 1 1/27,1/30
filter acl ace 1 1001 name “SBCqosbits”
filter acl ace action 1 1001 permit remark-dot1p 3
filter acl ace ethernet 1 1001 ether-type eq 0x800
filter acl ace 1 1001 enable
!
! *** QOS ***
!
qos if-group name “Trusted_Ports” class trusted
qos if-assign port 1/50,3/50,4/49-50 name Trusted_Ports