Skip to content

Instantly share code, notes, and snippets.

@oswaldoacauan
Created May 11, 2018 19:14
Show Gist options
  • Save oswaldoacauan/c54391b240a7861d3f25b7710230e995 to your computer and use it in GitHub Desktop.
Save oswaldoacauan/c54391b240a7861d3f25b7710230e995 to your computer and use it in GitHub Desktop.
# Throttle LO interface in port 3000
sudo tc qdisc add dev lo root handle 1: prio priomap 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
sudo tc qdisc add dev lo parent 1:2 handle 20: netem delay 250ms
sudo tc filter add dev lo parent 1:0 protocol ip u32 match ip sport 7000 0xffff flowid 1:2
# Go back to the way things were.
sudo tc qdisc del dev lo root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment