You are not logged in.

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

Registered: 2004-07-18
Posts: 12

kernel configuration and tc commands for traffic shaping


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

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,

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


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

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 ? -> Documentation and there you may find some interesting topics.: accounting, bandwidth control, ...(?)

lower-level (iptables?) :

Hope this helps some,




Board footer

Powered by FluxBB