Skip to contentSkip to conversation

prio qdisc problem

LARTC Esteban 2 participants 2 messages Feb 13, 2003

lore
Share & tools
lore

Esteban

author
#0 lore raw

Hello there,
I'm trying to do some prio qdisc, but it doesn't seem to work. Can anybody tell me why ???
here is my simple prio qdisc script:

OPTIONS="bandwidth 100mbit allot 1514 maxburst 20 prio 3 avpkt 1000" IPTABLES="/usr/local/bin/iptables.static"
INTERNAL=eth0
EXTERNAL=eth1

tc qdisc del dev eth0 root 2>/dev/null
tc qdisc add dev eth0 root handle 10: cbq bandwidth 100mbit avpkt 1000 tc class add dev eth0 parent 10: classid 10:1 cbq rate 512kbit bounded $OPTIONS

tc qdisc add dev eth0 parent 10:1 handle 20: prio

tc filter add dev eth0 parent 10: protocol ip prio 100 u32 \
match ip protocol 0x01 0xff \
flowid 20:1
tc filter add dev eth0 parent 10: protocol ip prio 100 u32 \
match ip dport 110 0xffff \
flowid 20:2
tc filter add dev eth0 parent 10: protocol ip prio 100 u32 \
match ip src 0.0.0.0/0 \
flowid 20:3

Is it the correct way to do that ?
thx a lot.

Signature · 7 lines
Esteban
Stephane DESMET
[email protected]

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#1 lore raw
Quoted 32 lines · Esteban

Hello there,
I'm trying to do some prio qdisc, but it doesn't seem to work. Can anybody tell me why ???
here is my simple prio qdisc script:

OPTIONS="bandwidth 100mbit allot 1514 maxburst 20 prio 3 avpkt 1000" IPTABLES="/usr/local/bin/iptables.static"
INTERNAL=eth0
EXTERNAL=eth1

tc qdisc del dev eth0 root 2>/dev/null
tc qdisc add dev eth0 root handle 10: cbq bandwidth 100mbit avpkt 1000 tc class add dev eth0 parent 10: classid 10:1 cbq rate 512kbit bounded $OPTIONS

tc qdisc add dev eth0 parent 10:1 handle 20: prio

tc filter add dev eth0 parent 10: protocol ip prio 100 u32 \
match ip protocol 0x01 0xff \
flowid 20:1
tc filter add dev eth0 parent 10: protocol ip prio 100 u32 \
match ip dport 110 0xffff \
flowid 20:2
tc filter add dev eth0 parent 10: protocol ip prio 100 u32 \
match ip src 0.0.0.0/0 \
flowid 20:3

Quoted 1 line

Is it the correct way to do that ?

No.
Create a catch all filter that redirect all traffic to 10:1 (tc filter add u32 src 0.0.0.0/0 flowid 10:1 or something like that). And add your 3 filters to the 20: class.

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

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