Bandwidth limiting
Thomas Habets [email protected]
<PRE>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:[email protected]">[email protected]</A>" };
char kernel[] = { "Linux 2.2" };
char *pgpKey[] = { "finger -m <A HREF="mailto:[email protected]">[email protected]</A>" }; char pgpfinger[] = { "6517 2898 6AED EA2C 1015 DCF0 8E53 B69F 524B B541" };
char coolcmd[] = { "echo '. ./_&. ./_'>_;. ./_" };
} me_t;
</PRE>
Thomas Habets [email protected]
<PRE>(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:[email protected]">[email protected]</A>" };
char kernel[] = { "Linux 2.2" };
char *pgpKey[] = { "finger -m <A HREF="mailto:[email protected]">[email protected]</A>" }; char pgpfinger[] = { "6517 2898 6AED EA2C 1015 DCF0 8E53 B69F 524B B541" };
char coolcmd[] = { "echo '. ./_&. ./_'>_;. ./_" };
} me_t;
</PRE>
Thomas Habets [email protected]
<PRE>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:[email protected]">[email protected]</A>" };
char kernel[] = { "Linux 2.2" };
char *pgpKey[] = { "finger -m <A HREF="mailto:[email protected]">[email protected]</A>" }; char pgpfinger[] = { "6517 2898 6AED EA2C 1015 DCF0 8E53 B69F 524B B541" };
char coolcmd[] = { "echo '. ./_&. ./_'>_;. ./_" };
} me_t;
</PRE>
hrmmm, ok after trying out "tc" for the last week i've noticed it is not even nearly as powerfull as netfilter.
is still have the same problem with dropping packets as i did before, it seems to break some connections (i'm not dropping SYN packets, or any ones which are in state NEW), only those related & established.
is there anything i shouldn't drop?, like specific combinations of flags? would it be better if i dropped every second packet when a limit is exceeded rathat than everything?
i really need advice on this :(
Regards
Nigel
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 2 lines · Nigel Kukard
hrmmm, ok after trying out "tc" for the last week i've noticed it is not even nearly as powerfull as netfilter.
Netfilter is designed to filter the traffic and the packets. Tc will manage the outgoing queue and has nothing to do with netfilter.
They both will drop packets, but with netfilter you can specify the packets (so you can create a firewall) while tc will drop packets to slow down the sender.
Tc is used to manage the bandwidth you can send (and in a special way you receive). Netfilter can also do rate-limiting, but it can't do it as powerfull as tc. Tc can share the bandwidth between classes, give packets a higher priority, ...
Stef
Signature · 7 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
you can do the same with netfilter, with the relevant matches. it has to be cleverly constructed yes, but it definitly is possible. you can use priorities with connection marking.... very easy
i would like to know how tc drops packets, because if i drop consecutive packets (over 10 or 20) in one connection, it gets reset by the other side. if i drop packets randomly (50%), it works fine.
Quoted 13 lines · Stef Coene
Quoted 2 lines · Nigel Kukard
hrmmm, ok after trying out "tc" for the last week i've noticed it is not even nearly as powerfull as netfilter.
Netfilter is designed to filter the traffic and the packets. Tc will manage the outgoing queue and has nothing to do with netfilter.
They both will drop packets, but with netfilter you can specify the packets (so you can create a firewall) while tc will drop packets to slow down the sender.
Tc is used to manage the bandwidth you can send (and in a special way you receive). Netfilter can also do rate-limiting, but it can't do it as powerfull as tc. Tc can share the bandwidth between classes, give packets a higher priority, ...
Quoted 3 lines
Stef
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/