Re: htb limiting trouble: no overlimit or dropped packets

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 17 October 2002 00:33, Walter Haidinger wrote:
> Hi!
>
> I'm trying to limit the uplink bandwidth using htb but no packets are
> overlimit or dropped. :-(
>
> My router config:
> * Linux kernel 2.4.20-pre10 (htb v3.7) with everything built as
>   modules in QoS, iptables in use.
> * tc binary from htb3.6-020525.tgz
> * external interface eth0: Internet access, 512 kbit/s uplink speed
> * internal interface eth1: internal LAN, 100 Mbit/s
>
> The hosts in the internal lan should be bandwidth limited and are
> masqueraded by the router.
>
> Q: Must the versions of the kernel module and the tc utility match?
No

> Below are my commands to create the qdiscs and classes:
>
> tc qdisc add dev eth1 root handle 1: htb default 20
> tc class add dev eth1 parent 1:  classid 1:1  htb rate 64kbit ceil 64kbit
> burst 5k 
> tc class add dev eth1 parent 1:1 classid 1:10 htb rate 64kbit ceil
> 64kbit burst 5k
> tc class add dev eth1 parent 1:1 classid 1:20 htb rate 57kbit ceil 
> 64kbit burst 5k 
> tc class add dev eth1 parent 1:1 classid 1:30 htb rate 51kbit ceil 
> 64kbit burst 5k 
> tc class add dev eth1 parent 1:1 classid 1:40 htb rate 6kbit burst 0 
Htb nor cbq will be perfectly shaping.  So try ceil 57 and see what happens.  
Go as low as needed untill you can see the difference.  You have to do this.  
If you don't, you are filling the buffers of the modem and it will be the 
modem that controls the link.
Also, make the sum of the rates from the classes equal to the rate.  If you 
have ceil 64 kbit, all classes will be able to share from each other.  So if 
one class is not using all it's bandwidth, an other class can borrow the 
unused bandwidth.

> Well, everything goes to the default class 1:20 which is OK.
> However, the traffic is *not* limited! No packets overlimit or dropped!
> The FTP upload succeeded with full uplink speed (512 kbit/s).
> Q: What am I missing here? Why isn't the traffic limited by HTB?
It's limited, but you give the traffic full bandwidth because you specified 
ceil 64kbit.  Try ceil 10kbit and you will be limited at 10kbit.

> I've read the LARTC Howto, the required manpages, the docs at Martin
> Devera's Homepage and had a look at the Wondershaper. Unfortunately I'm
> still unable to find the bug. :-( Any hints would be appreciated!
See www.docum.org for more script/info about shaping.

> PS: I've also tried using filters u32 and fwmark but traffic was
>     never limited. I guess there is something wrong with my
>     class/qdisc setup in general, right?
Yes :)

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux