All of lore.kernel.org
 help / color / mirror / Atom feed
From: "lartc@manchotnetworks.net" <lartc@manchotnetworks.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] TC-ng questions/problems
Date: Thu, 05 Aug 2004 08:12:51 +0000	[thread overview]
Message-ID: <1091693571.7080.3.camel@drs0> (raw)
In-Reply-To: <A3D1526C98B7C1409A687E0943EAC41001EA61@obelix.askesis.nl>

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@Askesis.nl
> 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@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

  reply	other threads:[~2004-08-05  8:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-05  7:53 [LARTC] TC-ng questions/problems Joost Kraaijeveld
2004-08-05  8:12 ` lartc [this message]
2004-08-05  8:26 ` Joost Kraaijeveld
2004-08-05  9:59 ` lartc
2004-08-05 10:36 ` Joost Kraaijeveld
2004-08-05 20:06 ` Stef Coene
2004-08-06  8:54 ` lartc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1091693571.7080.3.camel@drs0 \
    --to=lartc@manchotnetworks.net \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.