* SV: [LARTC] Bandwidth limiting
@ 2000-11-22 14:25 Daniel
2000-11-22 16:58 ` Daniel
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Daniel @ 2000-11-22 14:25 UTC (permalink / raw)
To: lartc
<PRE>Hi,
What doesn't work? Do you get error messages when you run TC or don't you
know how to use TC?
Regards,
Daniel
-----Ursprungligt meddelande-----
Från: <A HREF="mailto:lartc-admin@mailman.ds9a.nl">lartc-admin@mailman.ds9a.nl</A> [mailto:<A HREF="mailto:lartc-admin@mailman.ds9a.nl">lartc-admin@mailman.ds9a.nl</A>]För
Thomas Habets
Hello.
I need help with limiting bandwidth. I have read every tutorial I've come
over and I just can't make anything work.
Ok, here's the scenario:
I have a gateway, which has five network interfaces (eth0 -> eth4), eth0 is
the 'external' one and eth[1-4] are supposed to be limited to 128Kbit/s
each.
The interfaces eth[1-4] each have a C-class net, 192.168.[1-4].0/24.
Thanks for any and all help.
linux 2.4.0-test9
debian 2.2 (potato)
---------
typedef struct me_s {
char name[] = { "Thomas Habets" };
char email[] = { "<A HREF="mailto:thomas@habets.pp.se">thomas@habets.pp.se</A>" };
char kernel[] = { "Linux 2.2" };
char *pgpKey[] = { "finger -m <A HREF="mailto:thompa@darkface.pp.se">thompa@darkface.pp.se</A>" };
char pgpfinger[] = { "6517 2898 6AED EA2C 1015 DCF0 8E53 B69F 524B
B541" };
char coolcmd[] = { "echo '. ./_&. ./_'>_;. ./_" };
} me_t;
</PRE>
^ permalink raw reply [flat|nested] 8+ messages in thread
* SV: [LARTC] Bandwidth limiting
2000-11-22 14:25 SV: [LARTC] Bandwidth limiting Daniel
@ 2000-11-22 16:58 ` Daniel
2000-11-23 9:12 ` Daniel
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Daniel @ 2000-11-22 16:58 UTC (permalink / raw)
To: lartc
<PRE>Try:
tc qdisc add dev eth1 root tbf rate 10kbit buffer 5kb/8 limit 10kb
This adds an token bucket flow qdisc to eth1 and limits traffic to 10kbit/s.
Note: It only limits outgoing traffic, not incomming traffic.
Regards
Daniel
-----Ursprungligt meddelande-----
Från: <A HREF="mailto:lartc-admin@mailman.ds9a.nl">lartc-admin@mailman.ds9a.nl</A> [mailto:<A HREF="mailto:lartc-admin@mailman.ds9a.nl">lartc-admin@mailman.ds9a.nl</A>]För
Thomas Habets
Skickat: Wednesday, November 22, 2000 5:35 PM
Till: <A HREF="mailto:daniel@netatonce.se">daniel@netatonce.se</A>; <A HREF="mailto:lartc@mailman.ds9a.nl">lartc@mailman.ds9a.nl</A>
Ämne: Re: [LARTC] Bandwidth limiting
(I got this answer from the archives, I have not received it by mail. Odd)
><i>What doesn't work? Do you get error messages when you run TC or don't you
</I>><i>know how to use TC?
</I>
I don't know how to use TC, which got me to read tutorials and try things
for
hours and hours. Nothing I've tried limits bandwidth.
---------
typedef struct me_s {
char name[] = { "Thomas Habets" };
char email[] = { "<A HREF="mailto:thomas@habets.pp.se">thomas@habets.pp.se</A>" };
char kernel[] = { "Linux 2.2" };
char *pgpKey[] = { "finger -m <A HREF="mailto:thompa@darkface.pp.se">thompa@darkface.pp.se</A>" };
char pgpfinger[] = { "6517 2898 6AED EA2C 1015 DCF0 8E53 B69F 524B
B541" };
char coolcmd[] = { "echo '. ./_&. ./_'>_;. ./_" };
} me_t;
_______________________________________________
LARTC mailing list / <A HREF="mailto:LARTC@mailman.ds9a.nl">LARTC@mailman.ds9a.nl</A>
<A HREF="http://mailman.ds9a.nl/mailman/listinfo/lartc">http://mailman.ds9a.nl/mailman/listinfo/lartc</A> HOWTO:
<A HREF="http://ds9a.nl/2.4Routing/">http://ds9a.nl/2.4Routing/</A>
</PRE>
^ permalink raw reply [flat|nested] 8+ messages in thread
* SV: [LARTC] Bandwidth limiting
2000-11-22 14:25 SV: [LARTC] Bandwidth limiting Daniel
2000-11-22 16:58 ` Daniel
@ 2000-11-23 9:12 ` Daniel
2000-11-23 16:05 ` Thomas
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Daniel @ 2000-11-23 9:12 UTC (permalink / raw)
To: lartc
<PRE>To limit incomming traffic you either limit the traffic when it goes out on
another interface, or you use the ingress qdisc. I suggest that you try the
first.
Assume you have a router with two interfaces, eth0 and eth1, when you may
limit incomming traffic on eth0 by limit outgoing traffic on eth1.
Regards,
Daniel
-----Ursprungligt meddelande-----
Från: Thomas Habets [mailto:<A HREF="mailto:thomas@habets.pp.se">thomas@habets.pp.se</A>]
Skickat: Thursday, November 23, 2000 12:35 AM
Till: Daniel Bergqvist; <A HREF="mailto:lartc@mailman.ds9a.nl">lartc@mailman.ds9a.nl</A>
Ämne: Re: [LARTC] Bandwidth limiting
On Wed, 22 Nov 2000, Daniel Bergqvist wrote:
><i> tc qdisc add dev eth1 root tbf rate 10kbit buffer 5kb/8 limit 10kb
</I>
It works perfectly, thank you very much.
><i> This adds an token bucket flow qdisc to eth1 and limits traffic to
</I>><i> 10kbit/s. Note: It only limits outgoing traffic, not incomming traffic.
</I>
Hmm... and how do I set it up to limit incomming?
Since the interface behind the gateway has just one C-class net I assume
it's
pretty easy, but not for me. :(
---------
typedef struct me_s {
char name[] = { "Thomas Habets" };
char email[] = { "<A HREF="mailto:thomas@habets.pp.se">thomas@habets.pp.se</A>" };
char kernel[] = { "Linux 2.2" };
char *pgpKey[] = { "finger -m <A HREF="mailto:thompa@darkface.pp.se">thompa@darkface.pp.se</A>" };
char pgpfinger[] = { "6517 2898 6AED EA2C 1015 DCF0 8E53 B69F 524B
B541" };
char coolcmd[] = { "echo '. ./_&. ./_'>_;. ./_" };
} me_t;
</PRE>
^ permalink raw reply [flat|nested] 8+ messages in thread
* SV: [LARTC] Bandwidth limiting
2000-11-22 14:25 SV: [LARTC] Bandwidth limiting Daniel
2000-11-22 16:58 ` Daniel
2000-11-23 9:12 ` Daniel
@ 2000-11-23 16:05 ` Thomas
2000-11-23 16:10 ` Thomas
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Thomas @ 2000-11-23 16:05 UTC (permalink / raw)
To: lartc
<PRE>On Thu, 23 Nov 2000, Daniel Bergqvist wrote:
><i> Assume you have a router with two interfaces, eth0 and eth1, when you may
</I>><i> limit incomming traffic on eth0 by limit outgoing traffic on eth1.
</I>
I thought of that, but the problem is that I have four interfaces on the
gateway plus the external one.
---------
typedef struct me_s {
char name[] = { "Thomas Habets" };
char email[] = { "<A HREF="mailto:thomas@habets.pp.se">thomas@habets.pp.se</A>" };
char kernel[] = { "Linux 2.2" };
char *pgpKey[] = { "finger -m <A HREF="mailto:thompa@darkface.pp.se">thompa@darkface.pp.se</A>" };
char pgpfinger[] = { "6517 2898 6AED EA2C 1015 DCF0 8E53 B69F 524B B541" };
char coolcmd[] = { "echo '. ./_&. ./_'>_;. ./_" };
} me_t;
</PRE>
^ permalink raw reply [flat|nested] 8+ messages in thread
* SV: [LARTC] Bandwidth limiting
2000-11-22 14:25 SV: [LARTC] Bandwidth limiting Daniel
` (2 preceding siblings ...)
2000-11-23 16:05 ` Thomas
@ 2000-11-23 16:10 ` Thomas
2000-11-23 16:21 ` Wingtung.Leung
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Thomas @ 2000-11-23 16:10 UTC (permalink / raw)
To: lartc
<PRE>On Thu, 23 Nov 2000, Daniel Bergqvist wrote:
><i> Assume you have a router with two interfaces, eth0 and eth1, when you may
</I>><i> limit incomming traffic on eth0 by limit outgoing traffic on eth1.
</I>
I forgot to add to the last mail: the four interfaces behind the gateway
should each be limited to 128Kbit in and 128Kbit out.
128 Kbit out now works for incomming traffic limiting thanks to the cmd I got
from you (altered from 10Kbit to 128Kbit ofcourse).
---------
typedef struct me_s {
char name[] = { "Thomas Habets" };
char email[] = { "<A HREF="mailto:thomas@habets.pp.se">thomas@habets.pp.se</A>" };
char kernel[] = { "Linux 2.2" };
char *pgpKey[] = { "finger -m <A HREF="mailto:thompa@darkface.pp.se">thompa@darkface.pp.se</A>" };
char pgpfinger[] = { "6517 2898 6AED EA2C 1015 DCF0 8E53 B69F 524B B541" };
char coolcmd[] = { "echo '. ./_&. ./_'>_;. ./_" };
} me_t;
</PRE>
^ permalink raw reply [flat|nested] 8+ messages in thread
* SV: [LARTC] Bandwidth limiting
2000-11-22 14:25 SV: [LARTC] Bandwidth limiting Daniel
` (3 preceding siblings ...)
2000-11-23 16:10 ` Thomas
@ 2000-11-23 16:21 ` Wingtung.Leung
2000-11-24 14:53 ` Thomas
2000-11-24 21:37 ` Wingtung.Leung
6 siblings, 0 replies; 8+ messages in thread
From: Wingtung.Leung @ 2000-11-23 16:21 UTC (permalink / raw)
To: lartc
<PRE>I don't see the problem. You can specify the limit on the outgoing
interfaces, depending on the incoming interface. Using firewall marks is
quite easy. Have you tried the example setup from the HOWTO?
On Thu, 23 Nov 2000, Thomas Habets wrote:
><i> On Thu, 23 Nov 2000, Daniel Bergqvist wrote:
</I>><i> > Assume you have a router with two interfaces, eth0 and eth1, when you may
</I>><i> > limit incomming traffic on eth0 by limit outgoing traffic on eth1.
</I>><i>
</I>><i> I thought of that, but the problem is that I have four interfaces on the
</I>><i> gateway plus the external one.
</I>><i>
</I>
</PRE>
^ permalink raw reply [flat|nested] 8+ messages in thread
* SV: [LARTC] Bandwidth limiting
2000-11-22 14:25 SV: [LARTC] Bandwidth limiting Daniel
` (4 preceding siblings ...)
2000-11-23 16:21 ` Wingtung.Leung
@ 2000-11-24 14:53 ` Thomas
2000-11-24 21:37 ` Wingtung.Leung
6 siblings, 0 replies; 8+ messages in thread
From: Thomas @ 2000-11-24 14:53 UTC (permalink / raw)
To: lartc
<PRE>On Thu, 23 Nov 2000, you wrote:
><i> I don't see the problem. You can specify the limit on the outgoing
</I>><i> interfaces, depending on the incoming interface. Using firewall marks is
</I>><i> quite easy.
</I>
I bet it is, since iptables is easy. Haven't learned to use fwmarks yet
though.
><i>Have you tried the example setup from the HOWTO?
</I>
Yes, and after *another* long starring and testing pass I'm pretty sure I got
it to work with the sfq or u32 or something, not really sure what did what
though, but it'll come to me.
Why can't it just be like:
iptables -t shaper -A OUTPUT -s 1.2.3.0/24 --maxspeed\x128Kbit -j SHAPE
---------
typedef struct me_s {
char name[] = { "Thomas Habets" };
char email[] = { "<A HREF="mailto:thomas@habets.pp.se">thomas@habets.pp.se</A>" };
char kernel[] = { "Linux 2.2" };
char *pgpKey[] = { "finger -m <A HREF="mailto:thompa@darkface.pp.se">thompa@darkface.pp.se</A>" };
char pgpfinger[] = { "6517 2898 6AED EA2C 1015 DCF0 8E53 B69F 524B B541" };
char coolcmd[] = { "echo '. ./_&. ./_'>_;. ./_" };
} me_t;
</PRE>
^ permalink raw reply [flat|nested] 8+ messages in thread
* SV: [LARTC] Bandwidth limiting
2000-11-22 14:25 SV: [LARTC] Bandwidth limiting Daniel
` (5 preceding siblings ...)
2000-11-24 14:53 ` Thomas
@ 2000-11-24 21:37 ` Wingtung.Leung
6 siblings, 0 replies; 8+ messages in thread
From: Wingtung.Leung @ 2000-11-24 21:37 UTC (permalink / raw)
To: lartc
<PRE>On Fri, 24 Nov 2000, Thomas Habets wrote:
><i>
</I>><i> Why can't it just be like:
</I>><i> iptables -t shaper -A OUTPUT -s 1.2.3.0/24 --maxspeed\x128Kbit -j SHAPE
</I>><i>
</I>
Because iptables is used for firewalling (packet filtering) functions and
tc (and ip) handle queuing and routing.
There is an options for iptables to limit rate (check the man page), but
if you need "the real stuff", I suppose tc is the way to go. It supports
more flexible setups. Too bad we are still missing a extensive reference
for tc, but Daniel is working on it.
</PRE>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2000-11-24 21:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-22 14:25 SV: [LARTC] Bandwidth limiting Daniel
2000-11-22 16:58 ` Daniel
2000-11-23 9:12 ` Daniel
2000-11-23 16:05 ` Thomas
2000-11-23 16:10 ` Thomas
2000-11-23 16:21 ` Wingtung.Leung
2000-11-24 14:53 ` Thomas
2000-11-24 21:37 ` Wingtung.Leung
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.