You are not logged in.

#1 2004-11-25 17:43:39

ncrfgs
Member
Registered: 2004-07-18
Posts: 12

kernel configuration and tc commands for traffic shaping

Hi,

I wished to shape the traffic that cross my ppp0 interface
so I asked around and google'd a bit and I headed in the
LARTC HOWTO.

As stated early in the text, as the title implies,
that is an "Advanced" HOWTO and while by no means rocket
science, some prior knowledge is assumed.

Unfortunately I found myself lost very soon and I'm
writing here in hope of some help.


What I'd like to do, if it were possible with some
iptables switch, would be something like the following.

iptables --insert INPUT --in-interface ppp0 
         --protocol tcp --destination-port 80 
         --source $SOMEIPADDRESS 
         --jump SHAPING --limit-to 10KBs

Of course the last line is pure fiction smile but I thought
it would have explained what I wished to do pretty well.

Shaping the traffic according to some --source switch
isn't a priority at the moment but it would be nice to,
anyhow.


After some reading I found out that what I wished to do
is very likely called "traffic shaping". So I searched
the text for "shaping" and I found a note saying that, if
all I wanted to do is simple traffic shaping, I could have
skipped everything and headed to the Other possibilities
chapter, and readed about CBQ.init.

Unforntunately, as stated below, by all means CBQ.init is
useful if the 'how and why' don't interest me, but they
do, actually.


I tried both the CBQ.init and the HTB.init scripts but
they were huge, I wasn't able to understand them and I
didn't managed to find any information about how to
configure the kernel.

Of course, I could check out everything in the QoS section
in menuconfig during the kernel configuration but I'd like
to understand which support I would actually use.

At least, after having tried to read them, I realized
that, if I understood well, what I wish to do should be
possible only using tc, not iptables.


Could you please help me to find out which commands to
type and how to configure the kernel in order to
accomplish my task?

I'd need something in the middle between the "rocket
science" of LARTC and the "how and why don't interest you"
of CBQ.init.



Thanks in advance.

Best regards.


Value your freedom, or you will lose it, teaches history.
``Don't bother us with politics,'' respond those who don't
want to learn.

-- Richard M. Stallman
    http://www.gnu.org/philosophy/linux-gnu-freedom.html

Offline

#2 2004-11-25 19:35:44

Michel
Member
From: Belgium
Registered: 2004-07-31
Posts: 286

Re: kernel configuration and tc commands for traffic shaping

Shorewall has some documentation on this (if you are willing to use shorewall: shorewall is a higher-level-script-based-interface to iptables). There is also a program that helps you with limiting trafic to a specified amount (can this help ? http://lartc.org/wondershaper/)...

http://shorewall.net/ -> Documentation and there you may find some interesting topics.: accounting, bandwidth control, ...(?)


lower-level (iptables?) :
* http://www.tldp.org/HOWTO/Traffic-Control-HOWTO/
* http://lartc.org/

Hope this helps some,

Michel

[/url]

Offline

Board footer

Powered by FluxBB