Skip to content

Instantly share code, notes, and snippets.

@ryd994
Created July 2, 2017 11:02
Show Gist options
  • Save ryd994/b31b97af5be07cf1a58b8b07777f7d1f to your computer and use it in GitHub Desktop.
Save ryd994/b31b97af5be07cf1a58b8b07777f7d1f to your computer and use it in GitHub Desktop.
# Device to be limited
DEVICE=eth0
# Average rate you want
RATE=500mbit
# Amount of burst data. I suggest RATE / 10
BURST=50mbit
tc qdisc del dev $DEVICE root
tc qdisc add dev %i root handle 1: tbf rate $RATE burst $BURST latency 1s
tc qdisc add dev %i parent 1: handle 11: pfifo_fast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment