TC-ng questions/problems

Linux Advanced Routing and Traffic Control

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

 



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/


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