Networking Forums

Networking Forums > Computer Networking > Linux Networking > HTB problem

Reply
 
 
Marin Iakimov
Guest
Posts: n/a

 
      09-14-2003, 07:33 PM
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
 
Reply With Quote
 
 
 
 
Adam Dyga
Guest
Posts: n/a

 
      09-15-2003, 01:38 PM
Marin Iakimov wrote:




> 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


If your REAL bandwidth is 64kbps ten you HAVE TO set ceil at most 90-95% of
the real bandwidth (try it experimentally), then make your remaining
calculations, don't worry up/download rates in practice won't be worse too
much.

--
pozdr
adeon
 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange problem: no problem with Linux, when I boot windows 2K network is down... Santa Linux Networking 11 11-29-2004 06:46 AM



1 2 3 4 5 6 7 8 9 10 11