POV-Ray : Newsgroups : povray.unix : [OT] Linux help -- tc-htb Server Time
29 Oct 2024 22:44:53 EDT (-0400)
  [OT] Linux help -- tc-htb (Message 1 to 2 of 2)  
From: Peter Popov
Subject: [OT] Linux help -- tc-htb
Date: 15 May 2003 06:57:29
Message: <btr6cv4irphuq7vj9cvavudt0qavik930c@4ax.com>
Can anyone with more experience in traffic shaping on Linux help me? I
have a few problems with tc-htb and I can't solve them and the docs
are really sparse (the lartc-howto doesn't help much :( )

If I have this simple example like this:

tc qdisc add dev eth0 parent root handle 1: htb
tc class add dev eth0 parent 1: classid 1:100 htb rate 192kbit
tc qdisc add dev eth0 parent 1:100 handle 100: htb default 1
tc class add dev eth0 parent 100: classid 100:1 htb rate 64kbit
tc class add dev eth0 parent 100: classid 100:2 htb rate 128kbit

Does the 100: qdisc inherit the 192kbit rate limit of 1:100?`

Then, if I try to add a filter like this:

tc filter add dev eth0 protocol ip parent 1:100 u32 \ 
	match ip src 1.2.3.4 flowid 100:1

Nothing happens. Why? If I attach it to root (or 1:0, or 1:) it shows,
but I want to attach it to 1:100. How can I do that?

Last, if I add this (again, just an example):

tc qdisc add dev eth0 parent 100:2 handle 200: prio bands 3

Why does 'tc class ls dev eth0' list the three bands like this:

class prio 200:1 parent 200: [UNKNOWN]
class prio 200:2 parent 200: [UNKNOWN]
class prio 200:3 parent 200: [UNKNOWN]

If I add a qdisc to a band, for example like this:

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

It shows like this:

class prio 200:1 parent 200: leaf 300: [UNKNOWN]

What does the [UNKNOWN] relate to?

I'd appreciate any help anyone could offer. This thing is starting to
get at me.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

From: Micha Riser
Subject: Re: [OT] Linux help -- tc-htb
Date: 15 May 2003 19:03:11
Message: <3ec41cae@news.povray.org>
Peter Popov wrote:

(Dunno if we should really discusse ot things in this group...)

> Can anyone with more experience in traffic shaping on Linux help me? I
> have a few problems with tc-htb and I can't solve them and the docs
> are really sparse (the lartc-howto doesn't help much :( )

I don't have the time to look at your things right now but I can post what i
use:

./tc qdisc del dev eth0 root

./tc qdisc add dev eth0 root handle 1:0 htb default 12
./tc class add dev eth0 parent 1:0 classid 1:1 htb rate 240kbit ceil 240kbit
./tc class add dev eth0 parent 1:1 classid 1:10 htb rate 40kbit ceil 240kbit
prio 0
./tc class add dev eth0 parent 1:1 classid 1:12 htb rate 130kbit ceil
240kbit prio 2
./tc class add dev eth0 parent 1:1 classid 1:13 htb rate 70kbit ceil 220kbit
prio 3

./tc filter add dev eth0 parent 1:0 prio 0 protocol ip handle 10 fw flowid
1:10
./tc filter add dev eth0 parent 1:0 prio 0 protocol ip handle 13 fw flowid
1:13

and I use the iptables mangle to mark certain packets so that they come in
the appropriate class.. small packets/ACKs in 1:10, normal traffic in 1:12
and bulk traffic in 1:13.

I'm really happy with the way it is working.

Hope this helps you a bit further.

- Micha

-- 
POV-Ray Objects Collection: http://objects.povworld.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.