Computers
Read books online » Computers » ADSL Bandwidth Management HOWTO by Dan Singletary (best sci fi novels of all time .TXT) 📖

Book online «ADSL Bandwidth Management HOWTO by Dan Singletary (best sci fi novels of all time .TXT) 📖». Author Dan Singletary



1 2 3 4 5 6 7 8
Go to page:
MYSHAPER-OUT 2> /dev/null > /dev/null

iptables -t mangle -F MYSHAPER-OUT 2> /dev/null > /dev/null

iptables -t mangle -X MYSHAPER-OUT 2> /dev/null > /dev/null

iptables -t mangle -D PREROUTING -i $DEV -j MYSHAPER-IN 2> /dev/null > /dev/null

iptables -t mangle -F MYSHAPER-IN 2> /dev/null > /dev/null

iptables -t mangle -X MYSHAPER-IN 2> /dev/null > /dev/null

ip link set imq0 down 2> /dev/null > /dev/null

rmmod imq 2> /dev/null > /dev/null

if [ "$1" = "stop" ]

then

echo "Shaping removed on $DEV." exit

fi

##################################################### Outbound Shaping (limits total bandwidth to RATEUP) set queue size to give latency of about 2 seconds on low-prio packets

ip link set dev $DEV qlen 30

changes mtu on the outbound device. Lowering the mtu will result in lower latency but will also cause slightly lower throughput due to IP and TCP protocol overhead.

ip link set dev $DEV mtu 1000

add HTB root qdisc

tc qdisc add dev $DEV root handle 1: htb default 26

add main rate limit classes

tc class add dev $DEV parent 1: classid 1:1 htb rate ${RATEUP}kbit

add leaf classes - We grant each class at LEAST it's "fair share" of bandwidth. this way no class will ever be starved by another class. Each class is also permitted to consume all of the available bandwidth if no other classes are in use.

tc class add dev $DEV parent 1:1 classid 1:20 htb rate $[$RATEUP/7]kbit ceil ${RATEUP}kbit prio 0

tc class add dev $DEV parent 1:1 classid 1:21 htb rate $[$RATEUP/7]kbit ceil ${RATEUP}kbit prio 1

tc class add dev $DEV parent 1:1 classid 1:22 htb rate $[$RATEUP/7]kbit ceil ${RATEUP}kbit prio 2

tc class add dev $DEV parent 1:1 classid 1:23 htb rate $[$RATEUP/7]kbit ceil ${RATEUP}kbit prio 3

tc class add dev $DEV parent 1:1 classid 1:24 htb rate $[$RATEUP/7]kbit ceil ${RATEUP}kbit prio 4

1 2 3 4 5 6 7 8
Go to page:

Free ebook «ADSL Bandwidth Management HOWTO by Dan Singletary (best sci fi novels of all time .TXT) 📖» - read online now

Comments (0)

There are no comments yet. You can be the first!
Add a comment