All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [LARTC] 1 MBS per server Linux router
@ 2003-06-25  6:42 Trevor Warren
  2003-06-25  7:12 ` Trevor Warren
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Trevor Warren @ 2003-06-25  6:42 UTC (permalink / raw)
  To: lartc

Hello,

 If you just wanna reduce the b/w pipe per server wrr could be a
simplistic implementation that would work.

 For real functionality see htb which works like a charm. For something
more complex see cbq.

Trevor


On Wed, 2003-06-25 at 21:47, Jean-Francois Levesque wrote:
> Hello everyone!
> 
> I would like to do a linux router to limit the connection for some 
> servers to 1 mbs per server.
> 
> [SERVERS]  --->  [Linux "1MBS per server" router] ---> ((((Internet))))
> 
> I did some searches about routing and bandwidth on the net and the 
> solution seems to be 'tc'.  Well, 'tc' is not very easy to understand so 
> I tried 'tcng'.  I installed it and it seems to work fine (able to 
> generate the 'tc' rules and tcsim is working).
> 
> Now, my question is what type of configuration do I need?  I read some 
> doc about tcng and I saw the "fifo", "tbf", "SLB"...  I need a rate so 
> it's not "fifo".  How do I configure the others?
> 
> Thanks for your help!
> 
> Jean-Francois
> 
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
-- 
( >-        LINUX, It's all about CHOICE      -< )
/~\    __        twarren@redhat.com       __   /~\
|  \) /  Pre Sales Consultant - Red Hat     \ (/ |
|_|_  \    9820349221(M) | 22881326(O)      / _|_|
       \___________________________________/

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LARTC] 1 MBS per server Linux router
  2003-06-25  6:42 [LARTC] 1 MBS per server Linux router Trevor Warren
@ 2003-06-25  7:12 ` Trevor Warren
  2003-06-25 16:17 ` Jean-Francois Levesque
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Trevor Warren @ 2003-06-25  7:12 UTC (permalink / raw)
  To: lartc

Hello Jean,

 For all that i know your tcng config would be perfectly fine. I will
mail you my 4000 node config. Please try the same out and lemme know it
if works for you.

Trevor


On Thu, 2003-06-26 at 00:23, Jean-Francois Levesque wrote:
> Hi!
> 
> I have done that script to test my router :
> 
> 
> #include "fields.tc"
> #include "ports.tc"
>                                                                                                                                                             
> #define INTERFACE  eth0
> #define LIMITEDRATE 1kBps
>                                                                                                                                                             
> dev INTERFACE {
>     egress {
>                                                                                                                                                             
>         /* In class selection path, the filters come first!  DSmark */
>                                                                                                                                                             
>         class ( <$AB10CL> )    if ip_dst = 10.1.1.10 || ip_src = 
> 10.1.1.10;
>         class ( <$AB11CL> )    if ip_dst = 10.1.1.11 || ip_src = 
> 10.1.1.11;
>         class ( <$AB12CL> )    if ip_dst = 10.1.1.12 || ip_src = 
> 10.1.1.12;
>         class ( <$other> )  if 1 ;
>                                                                                                                                                             
>         /* section in which we configure the qdiscs and classes */
>                                                                                                                                                             
>         htb () {
>             class ( rate 10kBps, ceil 10kBps ) {
>                 $AB10CL   = class ( rate LIMITEDRATE, ceil LIMITEDRATE ) 
> { sfq; } ;
>                 $AB11CL   = class ( rate LIMITEDRATE, ceil LIMITEDRATE ) 
> { sfq; } ;
>                 $AB12CL   = class ( rate LIMITEDRATE, ceil LIMITEDRATE ) 
> { sfq; } ;
>                 $other    = class ( rate 1kBps, ceil 1kBps ) { sfq; } ;
>             }
>         }
>     }
> }
> 
> 
> I have plugged my machine behind the router but I see no difference when 
> I download  :-(
> 
> What is wrong with that script?
> 
> If this is not working, I'll try wrr.
> 
> Thanks!
> 
> Jean-Francois
> 
> 
> Trevor Warren wrote:
> 
> >Hello,
> >
> > If you just wanna reduce the b/w pipe per server wrr could be a
> >simplistic implementation that would work.
> >
> > For real functionality see htb which works like a charm. For something
> >more complex see cbq.
> >
> >Trevor
> >  
> >
> 
> 
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
-- 
( >-        LINUX, It's all about CHOICE      -< )
/~\    __        twarren@redhat.com       __   /~\
|  \) /  Pre Sales Consultant - Red Hat     \ (/ |
|_|_  \    9820349221(M) | 22881326(O)      / _|_|
       \___________________________________/

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [LARTC] 1 MBS per server Linux router
  2003-06-25  6:42 [LARTC] 1 MBS per server Linux router Trevor Warren
  2003-06-25  7:12 ` Trevor Warren
@ 2003-06-25 16:17 ` Jean-Francois Levesque
  2003-06-25 18:53 ` Jean-Francois Levesque
  2003-06-25 19:31 ` Jean-Francois Levesque
  3 siblings, 0 replies; 5+ messages in thread
From: Jean-Francois Levesque @ 2003-06-25 16:17 UTC (permalink / raw)
  To: lartc

Hello everyone!

I would like to do a linux router to limit the connection for some 
servers to 1 mbs per server.

[SERVERS]  --->  [Linux "1MBS per server" router] ---> ((((Internet))))

I did some searches about routing and bandwidth on the net and the 
solution seems to be 'tc'.  Well, 'tc' is not very easy to understand so 
I tried 'tcng'.  I installed it and it seems to work fine (able to 
generate the 'tc' rules and tcsim is working).

Now, my question is what type of configuration do I need?  I read some 
doc about tcng and I saw the "fifo", "tbf", "SLB"...  I need a rate so 
it's not "fifo".  How do I configure the others?

Thanks for your help!

Jean-Francois

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LARTC] 1 MBS per server Linux router
  2003-06-25  6:42 [LARTC] 1 MBS per server Linux router Trevor Warren
  2003-06-25  7:12 ` Trevor Warren
  2003-06-25 16:17 ` Jean-Francois Levesque
@ 2003-06-25 18:53 ` Jean-Francois Levesque
  2003-06-25 19:31 ` Jean-Francois Levesque
  3 siblings, 0 replies; 5+ messages in thread
From: Jean-Francois Levesque @ 2003-06-25 18:53 UTC (permalink / raw)
  To: lartc

Hi!

I have done that script to test my router :


#include "fields.tc"
#include "ports.tc"
                                                                                                                                                            
#define INTERFACE  eth0
#define LIMITEDRATE 1kBps
                                                                                                                                                            
dev INTERFACE {
    egress {
                                                                                                                                                            
        /* In class selection path, the filters come first!  DSmark */
                                                                                                                                                            
        class ( <$AB10CL> )    if ip_dst = 10.1.1.10 || ip_src = 
10.1.1.10;
        class ( <$AB11CL> )    if ip_dst = 10.1.1.11 || ip_src = 
10.1.1.11;
        class ( <$AB12CL> )    if ip_dst = 10.1.1.12 || ip_src = 
10.1.1.12;
        class ( <$other> )  if 1 ;
                                                                                                                                                            
        /* section in which we configure the qdiscs and classes */
                                                                                                                                                            
        htb () {
            class ( rate 10kBps, ceil 10kBps ) {
                $AB10CL   = class ( rate LIMITEDRATE, ceil LIMITEDRATE ) 
{ sfq; } ;
                $AB11CL   = class ( rate LIMITEDRATE, ceil LIMITEDRATE ) 
{ sfq; } ;
                $AB12CL   = class ( rate LIMITEDRATE, ceil LIMITEDRATE ) 
{ sfq; } ;
                $other    = class ( rate 1kBps, ceil 1kBps ) { sfq; } ;
            }
        }
    }
}


I have plugged my machine behind the router but I see no difference when 
I download  :-(

What is wrong with that script?

If this is not working, I'll try wrr.

Thanks!

Jean-Francois


Trevor Warren wrote:

>Hello,
>
> If you just wanna reduce the b/w pipe per server wrr could be a
>simplistic implementation that would work.
>
> For real functionality see htb which works like a charm. For something
>more complex see cbq.
>
>Trevor
>  
>


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LARTC] 1 MBS per server Linux router
  2003-06-25  6:42 [LARTC] 1 MBS per server Linux router Trevor Warren
                   ` (2 preceding siblings ...)
  2003-06-25 18:53 ` Jean-Francois Levesque
@ 2003-06-25 19:31 ` Jean-Francois Levesque
  3 siblings, 0 replies; 5+ messages in thread
From: Jean-Francois Levesque @ 2003-06-25 19:31 UTC (permalink / raw)
  To: lartc

Trevor Warren wrote:

>Hello Jean,
>
> For all that i know your tcng config would be perfectly fine. I will
>mail you my 4000 node config. Please try the same out and lemme know it
>if works for you.
>
>Trevor
>
>  
>

It's not working :-(  Maybe because of my iptables rules :

 [root@ROUTER-1MBS root]# iptables --list -nv
Chain INPUT (policy ACCEPT 51 packets, 3356 bytes)
 pkts bytes target     prot opt in     out     source               
destination
    0     0 ACCEPT     all  --  lo     *       0.0.0.0/0            
0.0.0.0/0
31278   46M ACCEPT     all  --  eth0   *       0.0.0.0/0            
0.0.0.0/0          state RELATED,ESTABLISHED
20169 1467K ACCEPT     all  --  eth1   *       0.0.0.0/0            
0.0.0.0/0          state RELATED,ESTABLISHED
    0     0 ACCEPT     tcp  --  eth0   *       0.0.0.0/0            
0.0.0.0/0          tcp dpt:22
    2   120 ACCEPT     tcp  --  eth1   *       0.0.0.0/0            
0.0.0.0/0          tcp dpt:22
    0     0 DROP       tcp  --  eth1   *       0.0.0.0/0            
0.0.0.0/0
    0     0 DROP       udp  --  eth1   *       0.0.0.0/0            
0.0.0.0/0
    9   540 DROP       tcp  --  eth0   *       0.0.0.0/0            
0.0.0.0/0
  726 93117 DROP       udp  --  eth0   *       0.0.0.0/0            
0.0.0.0/0
 
Chain FORWARD (policy ACCEPT 15056 packets, 5691K bytes)
 pkts bytes target     prot opt in     out     source               
destination
17956 1693K ACCEPT     all  --  eth1   *       0.0.0.0/0            
0.0.0.0/0
 
Chain OUTPUT (policy ACCEPT 31785 packets, 2347K bytes)
 pkts bytes target     prot opt in     out     source               
destination
    0     0 ACCEPT     all  --  *      lo      0.0.0.0/0            
0.0.0.0/0
[root@ROUTER-1MBS root]#


eth0      Link encap:Ethernet  HWaddr 00:50:BA:87:42:8D
          inet addr:192.168.0.230  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:53801 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35241 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:52861850 (50.4 Mb)  TX bytes:3140165 (2.9 Mb)
          Interrupt:9 Base address:0xb000
 
eth1      Link encap:Ethernet  HWaddr 00:E0:18:FF:6F:F4
          inet addr:10.1.1.1  Bcast:10.1.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:38410 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30721 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:3724993 (3.5 Mb)  TX bytes:7650950 (7.2 Mb)
          Interrupt:10 Base address:0xd000


eth0 is the company local network and eth1 is my local network where I 
have 10.1.1.12 (my PC) and 10.1.1.1 (the router).

I didn't patch the kernel, it's normal?  I have RH9 with kernel "Linux 
ROUTER-1MBS 2.4.20-8 #1 Thu Mar 13 17:54:28 EST 2003 i686 i686 i386 
GNU/Linux".  Should I change something in kernel?

I have tried htb.init but it's not working :-(

Jean-Francois



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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-06-25 19:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-25  6:42 [LARTC] 1 MBS per server Linux router Trevor Warren
2003-06-25  7:12 ` Trevor Warren
2003-06-25 16:17 ` Jean-Francois Levesque
2003-06-25 18:53 ` Jean-Francois Levesque
2003-06-25 19:31 ` Jean-Francois Levesque

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.