Skip to content

Instantly share code, notes, and snippets.

@EasyBB1
Created May 20, 2017 11:04
Show Gist options
  • Save EasyBB1/6af489c05f63ed9d1482340759ad46bf to your computer and use it in GitHub Desktop.
Save EasyBB1/6af489c05f63ed9d1482340759ad46bf to your computer and use it in GitHub Desktop.
Check whether your internet provider blocks certain DSCP values. Script is for Linux.
#!/bin/bash
#echo > dscp.txt
for i in {0..63}
do
TOS=$(($i * 4))
ping -W 1 -c 1 -Q $TOS google.com.au > /dev/null
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
echo "DSCP $i ToS $TOS: Passed!" # >> dscp.txt
else
echo "DSCP $i ToS $TOS: FAILED!" # >> dscp.txt
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment