All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben <bench@silentmedia.com>
To: lartc@vger.kernel.org
Subject: [LARTC] basic htb setup
Date: Thu, 28 Feb 2002 03:25:55 +0000	[thread overview]
Message-ID: <marc-lartc-101486691503767@msgid-missing> (raw)

Hey all. I'm trying to set up QoS using the HTB qdisc in a very basic
setup, but it the example shown in the howto doesn't seem to be working.
While the packets show up in the correct classes, they appear to be
completely ignoring the rates, meaning nothing gets shaped.

My setup is that I've got a a bunch of machines behind my firewall/router:


1.2.3.1      +----------------------------+    10.0.0.1
1.2.3.2 -----+eth0  firewall/router   eth1+--- 10.0.0.2
1.2.3.3      +----------------------------+    10.0.0.3


10.0.0.1 is nat'd to 1.2.3.1, 10.0.0.2 to 1.2.3.2, etc. eth0 is attached
to a 768Kbit DSL line, and eth1 to a 100Mb ethernet.

I want to limit the output of 10.0.0.1, but let it borrow from everybody
else's bandwidth when the bandwidth would go unused. HTB seems ideal for
this, and the TC stuff is pretty much identical to the basic one in the
howto:

tc qdisc add dev eth0 handle 1: root htb default 11

tc class add dev eth0 parent 1: classid 1:1 htb rate 768kbit ceil 768kbit burst 15k
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 160kbit ceil 768kbit burst 15k
tc class add dev eth0 parent 1:1 classid 1:11 htb rate 608kbit ceil 768kbit burst 15k

tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev eth0 parent 1:11 handle 10: sfq perturb 10

tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src 1.2.3.1 flowid 1:10


When I start sucking a lot of data from 10.0.0.1 and 10.0.0.2 from outside
the firewall, the packets end up in the correct classes (judging by tc -s
-d show dev eth0). But they also are processed at equal rates, not at the
160:608 ratio I've specified.

What am I doing wrong?

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

             reply	other threads:[~2002-02-28  3:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-28  3:25 Ben [this message]
2002-02-28  9:00 ` [LARTC] basic htb setup Martin Devera
2002-02-28  9:04 ` Stef Coene
2002-02-28 17:50 ` Ben
2002-02-28 17:52 ` Ben
2002-03-01  7:54 ` Stef Coene
2002-03-01  8:27 ` Martin Devera

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-101486691503767@msgid-missing \
    --to=bench@silentmedia.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.