Hi !
I have a Linux box with two interfaces eth0 to the local network and
eth1 to internet with cable modem - download 64K upload 16K. So i
wanted to shape the traffic using HTB. I wanted 40K to go to my IP -
192.168.0.21 when i want to download, and 24K to go to other IPs in
the local network. NAT and MASQUERADE are working, and i have internet
access in the local area, but when IP in the defaul class 12 starts
downloading i get less than 40K in class 1:10. I can't find where's
the problem. Here is my rc.shape ( very simple one ).
Why i can't get 40K when i've set rate to 40K ?
( User from other IPs have many connections to the internet )
Are the prio params correct ( low number for classes means higher
priority, high for filters means the same ) ?
10x
#****************************************
#rc.shape
#****************************************
tc qdisc add dev eth0 root handle 1: htb default 12
tc class add dev eth0 parent 1: classid 1:1 htb rate 64kbps ceil
64kbps burst 2k
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 40kbps ceil
64kbps burst 10k prio 0
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 15kbps ceil
64kbps burst 2k prio 7
tc filter add dev eth0 protocol ip parent 1: prio 7 u32 match ip dst
192.168.0.21 flowid 1:10
|