Created
June 17, 2014 12:42
-
-
Save bbqsrc/1dcfb422fee286232ac1 to your computer and use it in GitHub Desktop.
Suggested solution to shape the speed of the Monero daemon
This file contains 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
#!/bin/sh | |
LINK_SPEED="1gbit" | |
RATE="128kbit" | |
IFACE="eth0" | |
PORT="18080" | |
tc qdisc add dev $IFACE root handle 2 htb default 1 | |
tc class add dev $IFACE parent 2: classid 2:6 htb rate $LINK_SPEED | |
tc class add dev $IFACE parent 2:6 classid 2:100d htb rate $RATE | |
tc filter add dev $IFACE parent 2: protocol ip pref 4 u32 match ip sport $PORT 0xffff classid 2:100d | |
tc filter add dev $IFACE parent 2: protocol ip pref 4 u32 match ip dport $PORT 0xffff classid 2:100d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment