Created
July 16, 2016 16:33
-
-
Save lancechentw/68d57bb1b5bdc7c08d1bfdc2fb89c3d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tc qdisc del dev eth0 root | |
tc qdisc add dev eth0 root handle 10: htb default 256 | |
tc class add dev eth0 parent 10: classid 10:1 htb rate 100mbit ceil 100mbit | |
tc class add dev eth0 parent 10:1 classid 10:10 htb rate 300kbit ceil 300kbit prio 1 | |
tc qdisc add dev eth0 parent 10:10 handle 101: sfq perturb 10 | |
tc filter add dev eth0 parent 10: protocol ip prio 10 handle 1 fw classid 10:10 | |
# Limit speed of downloading to 192.168.1.100 | |
iptables -t mangle -A POSTROUTING -d 192.168.1.100 -j MARK --set-mark 1 | |
iptables -t mangle -A POSTROUTING -d 192.168.1.100 -j RETURN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment