Skip to contentSkip to conversation

Understanding filters

LARTC Mario Bittencourt 1 participant 2 messages Nov 2, 2004 – Nov 4, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

I've read the lartc doc but got stuck :)

I've created a prio qdisc (the 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 devl eth0 parent 1:3 handlle 30: sfq

Then I tried to create filters to make priority traffic go to the first band

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

The command above does not work. If I change

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

It goes ok.

So, is this a typo or something is wrong ?

How about the flowid ? Is it the handle of the qdisc I should "forward" the packet to ?
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw

Thanks. The example on the filter section has nothing to do with the example of PRIO used earlier.

Quoted 14 lines · Orlie Brewer

Hello,

The parent of a filter should be the handle of the qdisc containing the classes to which you are trying to route the packets, in this case, the prio qdisc 1: The flowid should be the handle of the class to which you want the packets forwarded, in this case 1:1. When you forward packets to a class, they will be queued in the qdisc attached to the class, in this case, the sfq qdisc 10:

So the filter command should read

Quoted 2 lines

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

Quoted 40 lines

Hope this helps.

Orlie

Quoted 32 lines · Mario Bittencourt

Hi,

I've read the lartc doc but got stuck :)

I've created a prio qdisc (the 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 devl eth0 parent 1:3 handlle 30: sfq

Then I tried to create filters to make priority traffic go to the first band

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

The command above does not work. If I change

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

It goes ok.

So, is this a typo or something is wrong ?

How about the flowid ? Is it the handle of the qdisc I should "forward" the packet to ?
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/