Skip to content

Instantly share code, notes, and snippets.

@msimonin
Last active April 10, 2017 14:51
Show Gist options
  • Save msimonin/a281e19768c71bcb5f996c22d3eeb67f to your computer and use it in GitHub Desktop.
Save msimonin/a281e19768c71bcb5f996c22d3eeb67f to your computer and use it in GitHub Desktop.
# simple, only delay
IF=eth0
tc qdisc add dev $IF root netem delay 100ms
# complex with htb + delay + filtering
IF=eth0
tc qdisc del dev $IF root
tc qdisc add dev $IF root handle 1: htb
tc class add dev $IF parent 1: classid 1:10 htb rate 1mbit
tc qdisc add dev $IF parent 1:10 handle 10: netem delay 200ms
tc filter add dev $IF parent 1: protocol ip u32 match ip dst 8.8.4.4/32 flowid 1:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment