Re: [LARTC] Basic principle of enqueunig/dequeuning packets &control traffic flows

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 18 Jun 2003 10:58:52 -0500 (CDT)
"Martin A. Brown" <mabrown-lartc@xxxxxxxxxxxxxx> wrote:

>  : I am writing program that must realtime control traffic flows (
>  : control/account/bandwitdth/etc ip traffic ). I am using 2.4.x Netfilter
>  : queue kernel module (ip_queue)  so program can get packets via libipq.
>  : In this case I can easy control traffic (set verdict NF_ACCEPT or
>  : NF_DROP) and statistics traffic (via counters). But how to shape
>  : traffic flow?
> 
> Well, this could be tricky depending on your expectations.  If you know
> exactly what sort of shaping you intend to use, and it doesn't need to be
> dynamically manipulated, then I have an answer for you.
OK. What  is the answer in this case?
Just set  HTB qdisc with classes on certain device and setup filter 
based on u32 or fw?

> If, on the other hand, you wish to dynamically alter the classes and
> bandwidth allocated to a stream, you have a bit more of a task ahead of
> you.
yep.

> I'm no whiz-kid with the libipq stuff, but if you can mark the packets in
> any way, (-j MARK --set-mark $MARK), then you can easily use a static
> traffic control/shaping set of qdiscs.
OK . I wrote very simple library that is  wrapper to tc command.
So My program may setup qdisc, classes and filters.
But how to get current rate (of traffic flow)  from certain qdisc  with associated with certain qdisc ?
In order to  get current rate value of certain class I must use rtnelink mechanism?
oh... it's nightmare for me - tried.

> So, in summary, I would recommend creating an HTB tree, and then using
> dynamically altered MARKs to select packets for a particular output class.
> This way, you'll not need to alter the traffic control setup once you have
> it configured the way you like it.
but I what change rate  of class everytime... :(

> Warum ausgerechnet eine Birne?  Und wessen?  :)
Einfach.

-- 
Andriy T. Yanko
wireless@xxxxxxxxxxxxxxx

*   Avoid The Gates of Hell use Linux
**  Wenn ich sterbe, legt mir eine Birne in mein Grab ...


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux