All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Martin A. Brown" <mabrown-lartc@securepipe.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] a simple setup with tbf and prio?
Date: Tue, 15 Apr 2003 00:31:59 +0000	[thread overview]
Message-ID: <marc-lartc-105036684015783@msgid-missing> (raw)
In-Reply-To: <marc-lartc-105035807108856@msgid-missing>

Frank,

 : I'm trying to make a fairly average setup, I want to limit eth1 to
 : 100kbit, and then prioritize things like ACK's and interactive traffic.

Nothing wrong with this.

 : All the scripts I see do this with CBQ, however given the description
 : of it in the HOWTO, I think I'd be much happier having the limiting
 : done by a TBF. So what I'd like is to have the root qdisc be TBF, and
 : put a PRIO qdisc under this. However, from what I understand, I can't
 : put anything as a child under a TBF, not even a single other qdisc
 : because it's classless. Why is this?

That's exactly it, it's classless!  As described on the page detailing TBF
[1], the TBF is what you would want to use if you simply need to slow down
the rate at which packets are dequeued on an interface.

You have more sophisticated needs, because you wish to:

  - shape total traffic to a specified rate AND
  - give priority to some traffic

If you wanted to do either, you would be able to use TBF (to shape to a
particular rate) or PRIO (to prioritize certain traffic).

You are in luck, because HTB (hierarchical token bucket) is a classful
token bucket filter.  So, have a look at HTB [2], which is a part of
kernel 2.4.20+.

Now, you'll attach an HTB qdisc directly to the root of your interface
(remember the usual rule about shaping only what you transmit).  To this
interface, you'll now add a top-level class, which will set rate and ceil
to 100kbit.

Now, you can add your (classful) PRIO qdisc [4] to the top-level HTB
class, and set some filters.  Because three classes will be implicitly
created, you can add qdiscs other than FIFO to these leaf classes, as
suggested in the LARTC HOWTO.

 : The concept of having a bandwidth limiting qdisc as the root and
 : putting prio queues under that makes sense right?

It makes sense to me.

If you are just learning traffic control for the first time, you will find
the tc filter commands frustrating, so consider tcng.  I have written a
brief HOWTO article on using tcng with HTB [5].  Traffic control next
generation provides a much less opaque syntax (for humans) to describe
traffic control structures.

-Martin

 [1]  http://lartc.org/howto/lartc.qdisc.classless.html#AEN678
 [2]  http://luxik.cdi.cz/~devik/qos/htb/
 [3]  http://www.docum.org/
 [4]  http://lartc.org/howto/lartc.qdisc.classful.html#AEN886
 [5]  http://linux-ip.net/articles/Traffic-Control-tcng-HTB-HOWTO.html

-- 
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  reply	other threads:[~2003-04-15  0:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-14 22:06 [LARTC] a simple setup with tbf and prio? Frank v Waveren
2003-04-15  0:31 ` Martin A. Brown [this message]
2003-04-15  1:04 ` Frank v Waveren
2003-04-15  1:48 ` Martin A. Brown
2003-04-15  1:51 ` Frank v Waveren
2003-04-15  2:56 ` Martin A. Brown
2003-04-15  3:39 ` Frank v Waveren
2003-04-15  4:27 ` Martin A. Brown
2003-04-15  5:59 ` Frank v Waveren

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-105036684015783@msgid-missing \
    --to=mabrown-lartc@securepipe.com \
    --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.