Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
* [LARTC] u32 filter
@ 2002-12-06 18:53 Kaustubh Phanse
  2003-05-06 11:10 ` Vitor Carlos Flausino
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Kaustubh Phanse @ 2002-12-06 18:53 UTC (permalink / raw)
  To: lartc

Hello!

What is the significance of "handle" in a u32 filter??

For example, if I have a HTB class 1:1 and three child classes 1:11, 1:12,
and 1:13. Within 1:11, I define dsmark, say 2:0, and let it mark packets
with certain DSCP. Now, using the u32 filter I need to classify packets of a
certain flow (e.g., based on src ip address and dest port), then can someone
give me an example of exactly how the u32 filter would look.

The following configuration does not seem to work (i.e., packets are not
getting marked!)...so I guess the problem is with my u32 filter

tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 1: \
	u32 divisor 1

tc filter add dev eth0 parent 1:1 prio 1 u32 \
	match ip src 192.168.1.12
	match ip protocol 17 0xff
	match ip dport 4984 0xffff
	flowid 2:0

Any help in this matter is greatly appreciated.
Thank you
regards
Kaustubh

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

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

* [LARTC] u32 filter
  2002-12-06 18:53 [LARTC] u32 filter Kaustubh Phanse
@ 2003-05-06 11:10 ` Vitor Carlos Flausino
  2003-05-06 12:07 ` Michael Yuan
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Vitor Carlos Flausino @ 2003-05-06 11:10 UTC (permalink / raw)
  To: lartc

Hi all.

I have the following queue:


tc qdisc add dev eth0 root handle 1:0 htb default 15


tc class add dev eth0 parent 1:0 classid 1:1 htb rate 100mbit ceil 100mbit

tc class add dev eth0 parent 1:1 classid 1:7 htb rate 64kbit ceil 64kbit
tc class add dev eth0 parent 1:1 classid 1:15 htb rate 102336kbit ceil 
100mbit

tc qdisc add dev eth0 parent 1:7 handle 10:0 sfq perturb 10
tc qdisc add dev eth0 parent 1:15 handle 20:0 sfq perturb 10

Now, my question is, the filter should be:

tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip 
57.227.234.22 flowid 1:7

or,

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

?

What about the default?

Thankx,
-vcf

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

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

* Re: [LARTC] u32 filter
  2002-12-06 18:53 [LARTC] u32 filter Kaustubh Phanse
  2003-05-06 11:10 ` Vitor Carlos Flausino
@ 2003-05-06 12:07 ` Michael Yuan
  2003-05-06 17:27 ` Stef Coene
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Michael Yuan @ 2003-05-06 12:07 UTC (permalink / raw)
  To: lartc

Looking at the LARTC document on page 65, the sample htb configuration,
it should be the first one.

cheers
yuan

On Tue, 2003-05-06 at 19:10, Vitor Carlos Flausino wrote:
> Hi all.
> 
> I have the following queue:
> 
> 
> tc qdisc add dev eth0 root handle 1:0 htb default 15
> 
> 
> tc class add dev eth0 parent 1:0 classid 1:1 htb rate 100mbit ceil 100mbit
> 
> tc class add dev eth0 parent 1:1 classid 1:7 htb rate 64kbit ceil 64kbit
> tc class add dev eth0 parent 1:1 classid 1:15 htb rate 102336kbit ceil 
> 100mbit
> 
> tc qdisc add dev eth0 parent 1:7 handle 10:0 sfq perturb 10
> tc qdisc add dev eth0 parent 1:15 handle 20:0 sfq perturb 10
> 
> Now, my question is, the filter should be:
> 
> tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip 
> 57.227.234.22 flowid 1:7
> 
> or,
> 
> tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip 
> 57.227.234.22 flowid 10:0
> 
> ?
> 
> What about the default?
> 
> Thankx,
> -vcf
> 
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] u32 filter
  2002-12-06 18:53 [LARTC] u32 filter Kaustubh Phanse
  2003-05-06 11:10 ` Vitor Carlos Flausino
  2003-05-06 12:07 ` Michael Yuan
@ 2003-05-06 17:27 ` Stef Coene
  2003-05-23  9:57 ` Esteban
  2003-05-23 13:14 ` Harkisoon Sharan (CCI-Gainesville)
  4 siblings, 0 replies; 6+ messages in thread
From: Stef Coene @ 2003-05-06 17:27 UTC (permalink / raw)
  To: lartc

On Tuesday 06 May 2003 13:10, Vitor Carlos Flausino wrote:
> Hi all.
>
> I have the following queue:
>
>
> tc qdisc add dev eth0 root handle 1:0 htb default 15
>
>
> tc class add dev eth0 parent 1:0 classid 1:1 htb rate 100mbit ceil 100mbit
>
> tc class add dev eth0 parent 1:1 classid 1:7 htb rate 64kbit ceil 64kbit
> tc class add dev eth0 parent 1:1 classid 1:15 htb rate 102336kbit ceil
> 100mbit
>
> tc qdisc add dev eth0 parent 1:7 handle 10:0 sfq perturb 10
> tc qdisc add dev eth0 parent 1:15 handle 20:0 sfq perturb 10
>
> Now, my question is, the filter should be:
>
> tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip
> 57.227.234.22 flowid 1:7
>
> or,
>
> tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip
> 57.227.234.22 flowid 10:0
>
> ?
>
> What about the default?
The default is the minor number, so the second number in 1:15.  So 15 like you 
did.
For the filter, 10:0 is connected to 1:7.  So all traffic placed in 1:7 flows 
through 10:0.  So the filter should point to 1:7.  So the first filter rule 
is the one you need.

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

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

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

* [LARTC] u32 filter
  2002-12-06 18:53 [LARTC] u32 filter Kaustubh Phanse
                   ` (2 preceding siblings ...)
  2003-05-06 17:27 ` Stef Coene
@ 2003-05-23  9:57 ` Esteban
  2003-05-23 13:14 ` Harkisoon Sharan (CCI-Gainesville)
  4 siblings, 0 replies; 6+ messages in thread
From: Esteban @ 2003-05-23  9:57 UTC (permalink / raw)
  To: lartc

is there any command to see how my u32 filters have been applyed?
in case not, i should use iptables & fwmarks right?
thanks and greets


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

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

* RE: [LARTC] u32 filter
  2002-12-06 18:53 [LARTC] u32 filter Kaustubh Phanse
                   ` (3 preceding siblings ...)
  2003-05-23  9:57 ` Esteban
@ 2003-05-23 13:14 ` Harkisoon Sharan (CCI-Gainesville)
  4 siblings, 0 replies; 6+ messages in thread
From: Harkisoon Sharan (CCI-Gainesville) @ 2003-05-23 13:14 UTC (permalink / raw)
  To: lartc

tc -s filter ls dev eth0  or whatever device you are using

you can also check out the qdiscs and classes.  The classes actually tell you how much bandwidth has passed, which is pretty handy.

tc -s qdisc ls dev...
tc -s class ls dev...

-----Original Message-----
From: Esteban [mailto:listas@dejawu.com.ar]
Sent: Friday, May 23, 2003 5:58 AM
To: Lartc
Subject: [LARTC] u32 filter


is there any command to see how my u32 filters have been applyed?
in case not, i should use iptables & fwmarks right?
thanks and greets


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

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

end of thread, other threads:[~2003-05-23 13:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-06 18:53 [LARTC] u32 filter Kaustubh Phanse
2003-05-06 11:10 ` Vitor Carlos Flausino
2003-05-06 12:07 ` Michael Yuan
2003-05-06 17:27 ` Stef Coene
2003-05-23  9:57 ` Esteban
2003-05-23 13:14 ` Harkisoon Sharan (CCI-Gainesville)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox