All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Cannot get htb & prio working together.
@ 2005-11-03 17:52 Michael Davidson
  2005-11-03 18:09 ` Andreas Klauer
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Michael Davidson @ 2005-11-03 17:52 UTC (permalink / raw)
  To: lartc

Hi,
    I've failed miserably in my endeavours so far and I'm at the point 
where help would be much appreciated.

I want to have 3 bandwidth limited classes on my  Internet interface. In 
each of those classes  I want  3 prioritization bands, and then  use "tc 
filters" to place the traffic into the correct class and priority. The 
problem is that the traffic doesn't get classified at all,  it just 
seems to go through the root queue untouched.

This is the minimal config I've been testing with:

tc qdisc add dev eth0 root handle 1: htb
tc class add dev eth0 parent 1: classid 1:1 htb rate 120kbit
tc class add dev eth0 parent 1:1 classid 1:20 htb rate 30kbit ceil 120kbit
tc qdisc add dev eth0 parent 1:20 handle 20: prio

#Note: With a "prio" qdisc the class ID's of nn:1 to 3 are automatically 
provided
tc qdisc add dev eth0 parent 20:1 handle 201: sfq
tc qdisc add dev eth0 parent 20:2 handle 202: sfq
tc qdisc add dev eth0 parent 20:3 handle 203: sfq

tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dport 
22 0xffff flowid 20:1
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dport 
23 0xffff flowid 20:3

A "tc filter show" displays the filters and so on and one can see the 
hits & successes when testing with, say, Telnet, but the counters on the 
respective queue/flowid don't increment. Only counters on the root queue 
show activity. :-

filter parent 1: protocol ip pref 1 u32 fh 800::801 order 2049 key ht 
800 bkt 0 flowid 20:3  (rule hit 82 success 31)
  match 00000017/0000ffff at 20 (success 31 )

qdisc sfq 201: parent 20:3 limit 128p quantum 1514b flows 128/1024
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0

I've tried changing the filter parent for the "prio" qdisc i.e 20, but a 
"tc filter show"  doesn't even display the filter and as you might 
expect only the root queue counter shows activity.

The os is Fedora Core 4 with an "out the box"  server installation. 
Linux version 2.6.11-1.1369_FC4

Thanks in advance

Mike D.

 

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LARTC] Cannot get htb & prio working together.
  2005-11-03 17:52 [LARTC] Cannot get htb & prio working together Michael Davidson
@ 2005-11-03 18:09 ` Andreas Klauer
  2005-11-03 22:11 ` Jody Shumaker
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Andreas Klauer @ 2005-11-03 18:09 UTC (permalink / raw)
  To: lartc

On Thursday 03 November 2005 18:52, Michael Davidson wrote:
> tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dport
> 22 0xffff flowid 20:1
> tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dport
> 23 0xffff flowid 20:3

Do filters actually work in between different qdiscs?

I use HTB & PRIO also, but my filter puts packets from the HTB qdisc to the 
HTB leaf class first, and then another filter puts packets from the PRIO 
qdisc in the correct PRIO band.

HTH
Andreas
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LARTC] Cannot get htb & prio working together.
  2005-11-03 17:52 [LARTC] Cannot get htb & prio working together Michael Davidson
  2005-11-03 18:09 ` Andreas Klauer
@ 2005-11-03 22:11 ` Jody Shumaker
  2005-11-04 10:13 ` Toby
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Jody Shumaker @ 2005-11-03 22:11 UTC (permalink / raw)
  To: lartc


[-- Attachment #1.1: Type: text/plain, Size: 1510 bytes --]

Filters I believe are per qdisc. You really need to have filters to specify
which HTB class and which prio class.

tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dport 22
0xffff flowid 1:20
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dport 23
0xffff flowid 1:20
tc filter add dev eth0 parent 1:20 protocol ip prio 1 u32 match ip dport 22
0xffff flowid 20:1
tc filter add dev eth0 parent 1:20 protocol ip prio 1 u32 match ip dport 23
0xffff flowid 20:3

I imagine what you actually want to do would be differently. have some set
of filters that define what goes into 1:20, then you'll need a set of
filters for 1:20 specifying where in that qdisc they should go.

- Jody



On 11/3/05, Andreas Klauer <Andreas.Klauer@metamorpher.de> wrote:
>
> On Thursday 03 November 2005 18:52, Michael Davidson wrote:
> > tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dport
> > 22 0xffff flowid 20:1
> > tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dport
> > 23 0xffff flowid 20:3
>
> Do filters actually work in between different qdiscs?
>
> I use HTB & PRIO also, but my filter puts packets from the HTB qdisc to
> the
> HTB leaf class first, and then another filter puts packets from the PRIO
> qdisc in the correct PRIO band.
>
> HTH
> Andreas
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>

[-- Attachment #1.2: Type: text/html, Size: 1986 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LARTC] Cannot get htb & prio working together.
  2005-11-03 17:52 [LARTC] Cannot get htb & prio working together Michael Davidson
  2005-11-03 18:09 ` Andreas Klauer
  2005-11-03 22:11 ` Jody Shumaker
@ 2005-11-04 10:13 ` Toby
  2005-11-05  9:53 ` Michael Davidson
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Toby @ 2005-11-04 10:13 UTC (permalink / raw)
  To: lartc

Jody Shumaker wrote:
> tc filter add ... parent 1:0  ... match ip dport 22 0xffff flowid 1:20
> tc filter add ... parent 1:0  ... match ip dport 23 0xffff flowid 1:20
>
> tc filter add ... parent 1:20 ... match ip dport 22 0xffff flowid 20:1
> tc filter add ... parent 1:20 ... match ip dport 23 0xffff flowid 20:3
                           ^^^^ you mean 20: here

The last two filters need to have 20: as parent, if you want to keep
each filter inside a single qdisc.


Toby

-- 
UNIX is a lever for the intellect.
			-John R. Mashey
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LARTC] Cannot get htb & prio working together.
  2005-11-03 17:52 [LARTC] Cannot get htb & prio working together Michael Davidson
                   ` (2 preceding siblings ...)
  2005-11-04 10:13 ` Toby
@ 2005-11-05  9:53 ` Michael Davidson
  2005-11-06  0:12 ` Jody Shumaker
  2005-11-06 20:11 ` Michael Davidson
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Davidson @ 2005-11-05  9:53 UTC (permalink / raw)
  To: lartc

Hi,

I've tried the multi tier filtering as suggested, but It didn't do the 
trick unfortunately. The filters were accepted at the command line but 
when but when I do  "tc -s -d filter show dev eth0" the only filters 
displayed are those with "root" as the parent. Below is my current script.

tc qdisc add dev eth0 root handle 1: htb
tc class add dev eth0 parent 1: classid 1:1 htb rate 120kbit
tc class add dev eth0 parent 1:1 classid 1:20 htb rate 30kbit ceil 120kbit
tc qdisc add dev eth0 parent 1:20 handle 20: prio
#
#Note: With a "prio" qdisc the class ID's of 20:1 to 3 are automatically 
provided
#
tc qdisc add dev eth0 parent 20:1 handle 201: sfq
tc qdisc add dev eth0 parent 20:2 handle 202: sfq
tc qdisc add dev eth0 parent 20:3 handle 203: sfq

tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dport 
22 0xffff flowid 1:20
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dport 
23 0xffff flowid 1:20
tc filter add dev eth0 parent 20:0 protocol ip prio 1 u32 match ip dport 
22 0xffff flowid 20:1
tc filter add dev eth0 parent 20:0 protocol ip prio 1 u32 match ip dport 
23 0xffff flowid 20:3

Regards Mike.

Toby wrote:

>Jody Shumaker wrote:
>  
>
>>tc filter add ... parent 1:0  ... match ip dport 22 0xffff flowid 1:20
>>tc filter add ... parent 1:0  ... match ip dport 23 0xffff flowid 1:20
>>
>>tc filter add ... parent 1:20 ... match ip dport 22 0xffff flowid 20:1
>>tc filter add ... parent 1:20 ... match ip dport 23 0xffff flowid 20:3
>>    
>>
>                           ^^^^ you mean 20: here
>
>The last two filters need to have 20: as parent, if you want to keep
>each filter inside a single qdisc.
>
>
>Toby
>
>  
>

-- 

 Regards Mike.

 Michael Davidson
 Barone Budge & Dominick
 Email: michael@bbd.co.za
 Office: +27 11 532 8380
 BB&D :  +27 11 532 8300
 Fax:    +27 11 532 8400
 Mobile: +27 82 650 5707
 Home:   +27 11 452 4423	

 This e-mail is confidential and subject to the disclaimer published at
 http://www.bbd.co.za


_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LARTC] Cannot get htb & prio working together.
  2005-11-03 17:52 [LARTC] Cannot get htb & prio working together Michael Davidson
                   ` (3 preceding siblings ...)
  2005-11-05  9:53 ` Michael Davidson
@ 2005-11-06  0:12 ` Jody Shumaker
  2005-11-06 20:11 ` Michael Davidson
  5 siblings, 0 replies; 7+ messages in thread
From: Jody Shumaker @ 2005-11-06  0:12 UTC (permalink / raw)
  To: lartc

Michael Davidson wrote:

> Hi,
>
> I've tried the multi tier filtering as suggested, but It didn't do the 
> trick unfortunately. The filters were accepted at the command line but 
> when but when I do  "tc -s -d filter show dev eth0" the only filters 
> displayed are those with "root" as the parent. Below is my current 
> script.
>
That's because that command defaults to showing the root unless you tell 
it what to look at.

tc -s -d filter show dev eth0 parent 20:

A simple tc filter help lists that.

- Jody
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [LARTC] Cannot get htb & prio working together.
  2005-11-03 17:52 [LARTC] Cannot get htb & prio working together Michael Davidson
                   ` (4 preceding siblings ...)
  2005-11-06  0:12 ` Jody Shumaker
@ 2005-11-06 20:11 ` Michael Davidson
  5 siblings, 0 replies; 7+ messages in thread
From: Michael Davidson @ 2005-11-06 20:11 UTC (permalink / raw)
  To: lartc

Hi
    Many thanks. Filtering at sub-qdisc and the correct use of the "tc 
filter show" command was where I was coming short,  I'm flying now.

Thanks again, Mike D.


Jody Shumaker wrote:

> Michael Davidson wrote:
>
>> Hi,
>>
>> I've tried the multi tier filtering as suggested, but It didn't do 
>> the trick unfortunately. The filters were accepted at the command 
>> line but when but when I do  "tc -s -d filter show dev eth0" the only 
>> filters displayed are those with "root" as the parent. Below is my 
>> current script.
>>
> That's because that command defaults to showing the root unless you 
> tell it what to look at.
>
> tc -s -d filter show dev eth0 parent 20:
>
> A simple tc filter help lists that.
>
> - Jody
>

-- 

 Regards Mike.

 Michael Davidson
 Barone Budge & Dominick
 Email: michael@bbd.co.za
 Office: +27 11 532 8380
 BB&D :  +27 11 532 8300
 Fax:    +27 11 532 8400
 Mobile: +27 82 650 5707
 Home:   +27 11 452 4423	

 This e-mail is confidential and subject to the disclaimer published at
 http://www.bbd.co.za


_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-11-06 20:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-03 17:52 [LARTC] Cannot get htb & prio working together Michael Davidson
2005-11-03 18:09 ` Andreas Klauer
2005-11-03 22:11 ` Jody Shumaker
2005-11-04 10:13 ` Toby
2005-11-05  9:53 ` Michael Davidson
2005-11-06  0:12 ` Jody Shumaker
2005-11-06 20:11 ` Michael Davidson

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.