Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: "Radosław Majkut" <rahdeck@interia.pl>
To: lartc@vger.kernel.org
Subject: [LARTC] HTB - unexpected bahaviour
Date: Tue, 21 May 2002 10:01:53 +0000	[thread overview]
Message-ID: <marc-lartc-102197553327738@msgid-missing> (raw)

Hi,
I use HTB to shape incoming traffic from internet to my internal
network. I want to split traffic into 2 flows: to my box (behind the linux box) and
to all other users. The Linux box comes with kernel 2.4.18 and HTB v. 2. My setup looks like
this:


tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: htb default 10


#       Local traffic

tc class add dev eth0 parent 1: classid 1:3 htb rate 30mbit ceil 60mbit burst 1000k


#       Internet (whole)

tc class add dev eth0 parent 1: classid 1:2 htb rate 2000kbit ceil 2000kbit burst 15k

#       Internet (everyone except my IP)

tc class add dev eth0 parent 1:2 classid 1:10 htb rate 300kbit ceil 1500kbit burst 5k
tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10 quantum 1500

#       Internet (my IP)

tc class add dev eth0 parent 1:2 classid 1:11 htb rate 400kbit ceil 1500kbit burst 5k
tc qdisc add dev eth0 parent 1:11 handle 20: sfq perturb 10 quantum 1500



So it should be sthg like this:

                 1:
                |  |
               |    |
              |      |
             1:2     1:3
            |   |
           |     |
          |       |
        1:10     1:11

          
I omitted the filters because they work just fine, directing traffic
to appropriate classes. The trouble is that the traffic distribution
is strange: the rate and ceil parameters don't behave the way I think
they should. The throughput of class 1:11 is smaller than the rate
parameter, it only works when I decrease ceil parameter of class 1:10
to something like 300kbit - then class 1:11 get its rate or more.
Plus, the ceil parameter in class 1:2 doesn't seen to work - when I
set rate to 800kbit it can't go any faster, just as if rate was the
limit

This is my tc -s class show dev eth0  output:

class htb 1:11 parent 1:2 leaf 20: prio 0 rate 400Kbit ceil 1500Kbit burst 5Kb cburst 3519b
 Sent 6723692 bytes 4557 pkts (dropped 0, overlimits 53)
 rate 30219bps 20pps
 lended: 4364 borrowed: 193 giants: 0 injects: 0
 tokens: 3080 ctokens: 8568

class htb 1:10 parent 1:2 leaf 10: prio 0 rate 300Kbit ceil 1500Kbit burst 5Kb cburst 3519b
 Sent 20456108 bytes 17579 pkts (dropped 0, overlimits 4496)
 rate 82087bps 74pps
 lended: 7502 borrowed: 10077 giants: 0 injects: 0
 tokens: 97280 ctokens: 12630

class htb 1:2 root prio 0 rate 2000Kbit ceil 2000Kbit burst 15Kb cburst 4159b
 Sent 27376137 bytes 22934 pkts (dropped 0, overlimits 0)
 rate 112478bps 97pps
 lended: 10466 borrowed: 0 giants: 0 injects: 0
 tokens: 44314 ctokens: 8473

But when I set ceil of class 1:10 to 300kbit, it looks totally
different - class 1:11 gets it fair share or even more:

class htb 1:11 parent 1:2 leaf 20: prio 0 rate 400Kbit ceil 1500Kbit burst 5Kb cburst 3519b
 Sent 5324008 bytes 3604 pkts (dropped 0, overlimits 0)
 rate 68027bps 46pps
 lended: 2444 borrowed: 1160 giants: 0 injects: 0
 tokens: -3042 ctokens: 8568

class htb 1:10 parent 1:2 leaf 10: prio 0 rate 300Kbit ceil 300Kbit burst 5Kb cburst 1983b
 Sent 3227721 bytes 3850 pkts (dropped 0, overlimits 8700)
 rate 37434bps 44pps backlog 53p
 lended: 3797 borrowed: 0 giants: 0 injects: 0
 tokens: 35336 ctokens: -31566

class htb 1:2 root prio 0 rate 2000Kbit ceil 2000Kbit burst 15Kb cburst 4159b
 Sent 8525779 bytes 7593 pkts (dropped 0, overlimits 0)
 rate 104106bps 91pps
 lended: 1160 borrowed: 0 giants: 0 injects: 0
 tokens: 42830 ctokens: 6989

What's is the problem? Have I overlooked something?
Thanks in advance

--
greetz
Radek Majkut
rahdeck@interia.pl



----------------------------------------------------------------------
INTERIA.PL: Portal pelen informacji >>> http://link.interia.pl/f15b7


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

             reply	other threads:[~2002-05-21 10:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-21 10:01 Radosław Majkut [this message]
2002-05-21 15:02 ` [LARTC] HTB - unexpected bahaviour 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-102197553327738@msgid-missing \
    --to=rahdeck@interia.pl \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox