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 *

send(IP(dst=”192.168.1.200″,tos=184)/ICMP(id=1,length=256,seq=57))

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: x.show())

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s