From: Stef Coene <stef.coene@docum.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] help needed using filters
Date: Sat, 16 Nov 2002 19:57:56 +0000 [thread overview]
Message-ID: <marc-lartc-103747671616967@msgid-missing> (raw)
In-Reply-To: <marc-lartc-103747183314053@msgid-missing>
On Saturday 16 November 2002 19:34, Abraham van der Merwe wrote:
> Hi!
>
> I'm trying to shape a traffic to/from a few different subnets using TBF.
> The way I understand it all I have to do is create a few queueing
> disciplines and attach a filter to each queueing discipline.
>
> So for instance if I want to shape traffic going to 192.168.1.0/24 via eth0
> to 64kbit then it should look like this:
>
> ------------< snip <------< snip <------< snip <------------
> tc qdisc add dev eth0 root handle 1:0 tbf rate 64kbit burst 4kb latency
> 100ms peakrate 128kbit mtu 1500
>
> tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst
> 192.168.1.0/24
> ------------< snip <------< snip <------< snip <------------
>
> I can't add the filter above and I suspect it is due to
>
> a) i can't add filters to tbf queueing disciplines? if so, why not?
Because the tbf qdisc is classless. And filter are used to put packets in a
child class. CBQ/HTB are examples of classfull qdiscs.
You add a tbf qdisc as the root qdisc. The root qdisc contains ALL packets
that are sended. So you don't need filters.
> b) i'm confused be the parent x:y and flowid a:b terminology in the filter.
> When do I use what?
Parent is the class where you add the filter. If you have class 10:1 and you
want to add a filter to class 10:1, you have to use parent 10:1.
When the filter matches a packet, it's placed in the class you specify with
flowid. If you have class 10:1 with class 10:10 attached to it and you want
to redirect packets to it, you have to specify "parent 10:1 flowid 10:10" in
the filter command.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.oftc.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2002-11-16 19:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-16 18:34 [LARTC] help needed using filters Abraham van der Merwe
2002-11-16 19:57 ` Stef Coene [this message]
2002-11-16 20:16 ` Abraham van der Merwe
2002-11-16 20:45 ` Stef Coene
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-lartc-103747671616967@msgid-missing \
--to=stef.coene@docum.org \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.