Hi Joost, I think that maybe you have run across an issue that I too had trouble with. A snip from a message from Martin BROWN explains: > You have not actually found a bug, but rather a historical strangeness > about the Linux traffic control system. For reasons of which I'm > ignorant, the syntax for the "tc" command uses bps for bytes/second. So, > 64000 bytes/second is actually 512 kilobits/second ("512 kbps" in common > usage), but is 512 kbit to the "tc" tool. Here's a brief chart: > > tc syntax tcng syntax > +----------------+----------------+ > bytes/second | bps | Bps | > bits/second | bit | bps | > kilobytes/second | kbps | kBps | > kilobits/second | kbit | kbps | > +----------------+----------------+ > > Note that the tcng syntax is exactly the same sort of syntax we use in > general when discussing speed of WAN links. "It's a 512 kbps line" means > it's 512 kilobits per second, but this would be 64000 bytes per second if > we were writing a "tc" command line. Hope this helps! Cheers Chalres On Thu, 2004-08-05 at 09:53, Joost Kraaijeveld wrote: > Hi all, > > We have 2 class C networks that are connected by a Linux router with the internet. We want to apply traffic control (bandwidth control). For that we wrote the tcc script below. We have 2 problems: > > 1. To establish a 2 megagit download we must actually set the value to 2500kbps. Is there a possible reason for that? > 2. If we enable the WAN device we get very hight ping times (they change from 21.1 ms to > 2000 ms) and erratic upload values that partly suffer from the problem above (we want to allow for an upload of 512kb and have to specify a upload of 712 to get that) but most of the time we have a far worse actual upload. Anyone any ideas? > > We use Debian 2.6.3-1-386 (Sarge) with tcng 9m. > > Any help is greatly appreciated. > > Groeten, > > Joost Kraaijeveld > Askesis B.V. > Molukkenstraat 14 > 6524NB Nijmegen > tel: 024-3888063 / 06-51855277 > fax: 024-3608416 > e-mail: J.Kraaijeveld@xxxxxxxxxx > web: www.askesis.nl > > /////////////////////////////////////////////////////////////////////////// > #include "fields.tc" > #include "ports.tc" > > #define WAN eth0 > #define LAN83 eth1 > #define LAN84 eth2 > > /* The WAN section is about upload to the internet */ > > dev WAN > { > egress > { > class ( <$uploadRouter> ) if ip_src == 192.168.83.1 || ip_src == 192.168.84.1; > class ( <$uploadGKS> ) if ip_src == 192.168.83.22 ; > class ( <$upload83> ) if ip_src:24 == 192.168.83.0 ; > class ( <$upload84> ) if ip_src:24 == 192.168.84.0 ; > class ( <$others> ) if 1 ; > > htb () > { > class ( rate 18Mbps, ceil 18Mbps ) > { > $uploadRouter = class ( rate 18Mbps, ceil 18Mbps ); > $uploadGKS = class ( rate 10Mbps, ceil 10Mbps ) ; > $upload83 = class ( rate 5Mbps, ceil 5Mbps ) ; > $upload84 = class ( rate 712kbps, ceil 712kbps ) ; > $others = class ( rate 18Mbps , ceil 18Mbps ) ; > } > } > } > } > > /* This section is about downloading to the 83 network */ > > dev LAN83 > { > egress > { > class ( <$downloadRouter> ) if ip_dst == 192.168.83.1; > class ( <$downloadGKS> ) if ip_dst == 192.168.83.22; > class ( <$download> ) if ip_dst:24 == 192.168.83.0; > class ( <$others> ) if 1 ; > > htb () > { > class ( rate 18Mbps, ceil 18Mbps ) > { > $downloadRouter = class ( rate 18Mbps, ceil 18Mbps ) ; > $downloadGKS = class ( rate 10Mbps, ceil 10Mbps ) ; > $download = class ( rate 5Mbps, ceil 5Mbps ) ; > $others = class ( rate 18Mbps, ceil 18Mbps ) ; > } > } > } > } > > /* This section is about downloading to the 84 network */ > > dev LAN84 > { > egress > { > class ( <$download> ) if ip_dst:24 == 192.168.84.0; > class ( <$others> ) if 1 ; > htb () > { > class ( rate 18Mbps, ceil 18Mbps ) > { > $download = class ( rate 2500kbps,ceil 2500kbps ) ; > $others = class ( rate 18Mbps, ceil 18Mbps ) ; > } > } > } > } > _______________________________________________ > LARTC mailing list / LARTC@xxxxxxxxxxxxxxx > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ _______________________________________________ LARTC mailing list / LARTC@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/