All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Filter question...
@ 2002-12-06  6:10 Victor Dario Martinez
  2002-12-06 16:28 ` Andrea Rossato
  0 siblings, 1 reply; 5+ messages in thread
From: Victor Dario Martinez @ 2002-12-06  6:10 UTC (permalink / raw)
  To: lartc

I have a Linux Mandrake SNF (Single Network Firewall) with 2.2.17-21mdk 
recompiled with full advanced routing options enabled. I implements de 
traffci control to prioriced aplication traficc (informix ports, 
internal aplications ports, incoming DNS queries, etc) over common 
trafic (HTML ,FTP, etc). But don't set commands filters then only use 
ipchains TOS marks with pfifo_fast or qdisc/PRIO. For example:

# tc qdisc add dev eth0 root handle 1: prio
# tc qdisc add dev eth0 parent 1:1 handle 10: sfq
# tc qdisc add dev eth0 parent 1:2 handle 20: tbf rate 20kbit buffer 
1600 limit 3000
# tc qdisc add dev eth0 parent 1:3 handle 30: sfq
# tc qdisc show
qdisc sfq 30: dev eth0 quantum 1514b
qdisc tbf 20: dev eth0 rate 20Kbit burst 1599b lat 667.6ms
qdisc sfq 10: dev eth0 quantum 1514b
qdisc prio 1: dev eth0 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
# tc filter add dev eth0 parent 10:0 protocol ip prio 1 u32  match ip 
dst 4.3.2.1/32 flowid 10:1
RTNETLINK answers: Invalid argument
#  

:(.  Any idea ?



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

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

* Re: [LARTC] Filter question...
  2002-12-06  6:10 Victor Dario Martinez
@ 2002-12-06 16:28 ` Andrea Rossato
  0 siblings, 0 replies; 5+ messages in thread
From: Andrea Rossato @ 2002-12-06 16:28 UTC (permalink / raw)
  To: lartc

Victor Dario Martinez wrote:
> # tc filter add dev eth0 parent 10:0 protocol ip prio 1 u32  match ip 
> dst 4.3.2.1/32 flowid 10:1
> RTNETLINK answers: Invalid argument

shouldn't it be
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32  match ip dst 
4.3.2.1/32 flowid 10:1
                                       ^^

andrea

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

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

* [LARTC] Filter question
@ 2005-01-07 13:29 Andre Correa
  2005-01-07 19:50 ` Andy Furniss
  2005-01-07 19:59 ` Andy Furniss
  0 siblings, 2 replies; 5+ messages in thread
From: Andre Correa @ 2005-01-07 13:29 UTC (permalink / raw)
  To: lartc


Hi guys, I may not have made myself clear in my last message so I'll try 
   it easy this time. Maybe someone can send me some help.

I'm trying something like this:


# root stuff
tc qdisc add dev eth0 root handle 1: htb default 2
tc class add dev eth0 parent 1: classid 1:1 htb rate 50000kbit
# default class
tc class add dev eth0 parent 1: classid 1:2 htb rate 2000kbit

# root class for my "garanteed bandwidth" service
tc class add dev eth0 parent 1: classid 1:3 htb rate 10Mbit

# class for a 1Mbit shared bandwidth
tc class add dev eth0 parent 1:3 classid 1:1024 htb rate 1Mbit
# qdisc used to _make my life easier scripting classes numbers_
tc qdisc add dev eth0 parent 1:1024 handle 1024: htb default 250
# default class for this second qdisc
tc class add dev eth0 parent 1024: classid 1024:250 htb rate 32kbit

# each customer gets the following class and filter
tc class add dev eth0 parent 1024: classid 1024:1 htb rate 256kbit
tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dst
xxx.xxx.xxx.xxx/yy flowid 1024:1

# another customer...
tc class add dev eth0 parent 1024: classid 1024:2 htb rate 256kbit
tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dst
www.www.www.www/zzz flowid 1024:2


My problem is that this filters are created but they don't send traffic 
to the expected class. All traffic is going to 1:2 (default class). Can 
somebody tell me why?

I apreciate any help, I'm in trouble with this...

tks in advance.

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

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

* Re: [LARTC] Filter question
  2005-01-07 13:29 [LARTC] Filter question Andre Correa
@ 2005-01-07 19:50 ` Andy Furniss
  2005-01-07 19:59 ` Andy Furniss
  1 sibling, 0 replies; 5+ messages in thread
From: Andy Furniss @ 2005-01-07 19:50 UTC (permalink / raw)
  To: lartc

Andre Correa wrote:
> 
> Hi guys, I may not have made myself clear in my last message so I'll try 
>   it easy this time. Maybe someone can send me some help.
> 
> I'm trying something like this:
> 
> 
> # root stuff
> tc qdisc add dev eth0 root handle 1: htb default 2
> tc class add dev eth0 parent 1: classid 1:1 htb rate 50000kbit
> # default class
> tc class add dev eth0 parent 1: classid 1:2 htb rate 2000kbit
> 
> # root class for my "garanteed bandwidth" service
> tc class add dev eth0 parent 1: classid 1:3 htb rate 10Mbit
> 
> # class for a 1Mbit shared bandwidth
> tc class add dev eth0 parent 1:3 classid 1:1024 htb rate 1Mbit
> # qdisc used to _make my life easier scripting classes numbers_
> tc qdisc add dev eth0 parent 1:1024 handle 1024: htb default 250
> # default class for this second qdisc
> tc class add dev eth0 parent 1024: classid 1024:250 htb rate 32kbit
> 
> # each customer gets the following class and filter
> tc class add dev eth0 parent 1024: classid 1024:1 htb rate 256kbit
> tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dst
> xxx.xxx.xxx.xxx/yy flowid 1024:1
> 
> # another customer...
> tc class add dev eth0 parent 1024: classid 1024:2 htb rate 256kbit
> tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dst
> www.www.www.www/zzz flowid 1024:2
> 
> 
> My problem is that this filters are created but they don't send traffic 
> to the expected class. All traffic is going to 1:2 (default class). Can 
> somebody tell me why?
> 
> I apreciate any help, I'm in trouble with this...
> 
> tks in advance.
> 
> Andre
> _______________________________________________
> 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] 5+ messages in thread

* Re: [LARTC] Filter question
  2005-01-07 13:29 [LARTC] Filter question Andre Correa
  2005-01-07 19:50 ` Andy Furniss
@ 2005-01-07 19:59 ` Andy Furniss
  1 sibling, 0 replies; 5+ messages in thread
From: Andy Furniss @ 2005-01-07 19:59 UTC (permalink / raw)
  To: lartc

Andre Correa wrote:
> 
> Hi guys, I may not have made myself clear in my last message so I'll try 
>   it easy this time. Maybe someone can send me some help.
> 
> I'm trying something like this:
> 
> 
> # root stuff
> tc qdisc add dev eth0 root handle 1: htb default 2
> tc class add dev eth0 parent 1: classid 1:1 htb rate 50000kbit
> # default class
> tc class add dev eth0 parent 1: classid 1:2 htb rate 2000kbit
> 
> # root class for my "garanteed bandwidth" service
> tc class add dev eth0 parent 1: classid 1:3 htb rate 10Mbit
> 
> # class for a 1Mbit shared bandwidth
> tc class add dev eth0 parent 1:3 classid 1:1024 htb rate 1Mbit
> # qdisc used to _make my life easier scripting classes numbers_
> tc qdisc add dev eth0 parent 1:1024 handle 1024: htb default 250
> # default class for this second qdisc
> tc class add dev eth0 parent 1024: classid 1024:250 htb rate 32kbit
> 
> # each customer gets the following class and filter
> tc class add dev eth0 parent 1024: classid 1024:1 htb rate 256kbit
> tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dst
> xxx.xxx.xxx.xxx/yy flowid 1024:1
> 
> # another customer...
> tc class add dev eth0 parent 1024: classid 1024:2 htb rate 256kbit
> tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dst
> www.www.www.www/zzz flowid 1024:2
> 
> 
> My problem is that this filters are created but they don't send traffic 
> to the expected class. All traffic is going to 1:2 (default class). Can 
> somebody tell me why?
> 
> I apreciate any help, I'm in trouble with this...
> 
> tks in advance.
> 
> Andre

You've created a double htb like in the simulation example on deviks' 
page. You need to filter from the top of the first htb to the second 
then filter from there.

Below works for me

Andy.

# root stuff
tc qdisc add dev eth0 root handle 1: htb default 2
tc class add dev eth0 parent 1: classid 1:1 htb rate 50000kbit
# default class
tc class add dev eth0 parent 1: classid 1:2 htb rate 2000kbit

# root class for my "garanteed bandwidth" service
tc class add dev eth0 parent 1: classid 1:3 htb rate 10Mbit

# class for a 1Mbit shared bandwidth
tc class add dev eth0 parent 1:3 classid 1:1024 htb rate 1Mbit
# qdisc used to _make my life easier scripting classes numbers_
tc qdisc add dev eth0 parent 1:1024 handle 1024: htb default 250
# default class for this second qdisc
tc class add dev eth0 parent 1024: classid 1024:250 htb rate 32kbit

tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dst 
192.168.0.1 flowid 1:1024
tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dst 
192.168.0.2 flowid 1:1024

# each customer gets the following class and filter
tc class add dev eth0 parent 1024: classid 1024:1 htb rate 256kbit
tc filter add dev eth0 parent 1024: protocol ip prio 1 u32 match ip dst 
192.168.0.1 flowid 1024:1

# another customer...
tc class add dev eth0 parent 1024: classid 1024:2 htb rate 256kbit
tc filter add dev eth0 parent 1024: protocol ip prio 1 u32 match ip dst 
192.168.0.2 flowid 1024:2



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

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

end of thread, other threads:[~2005-01-07 19:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-07 13:29 [LARTC] Filter question Andre Correa
2005-01-07 19:50 ` Andy Furniss
2005-01-07 19:59 ` Andy Furniss
  -- strict thread matches above, loose matches on Subject: below --
2002-12-06  6:10 Victor Dario Martinez
2002-12-06 16:28 ` Andrea Rossato

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.