Hi,

i've been trying to make a small script using CBQ queuing discipline and u32 
filter. In this script i'm trying to match udp traffic and sending it to the 
class 1:2 and match the tcp traffic and send it to the class 1:3. But when 
running the script no more traffic is forwarded, can you help me please. I'm 
using a redhat 6.0 kernel 2.2.5-15. The script is the folowing:
--------------------------------------------------------------------
--------------------------------------------------------------------
#! /bin/sh

tc=/.../tc


$tc qdisc add dev eth0 root handle 1: cbq bandwidth 10Mbit cell 8 avpkt 1000 
\
mpu 64

$tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10Mbit \
rate 3Mbit allot 1514 cell 8 weight 100Kbit prio 8 maxburst 20 avpkt 1000

# Creation d'une sous-classe
$tc class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 3Mbit \
rate 1Mbit allot 1514 cell 8 weight 100Kbit prio 7 maxburst 20 \
avpkt 1000 bounded

$tc class add dev eth0 parent 1:1 classid 1:3 cbq bandwidth 3Mbit \
rate 2Mbit allot 1514 cell 8 weight 700Kbit prio 3 maxburst 20 \
avpkt 1000 bounded


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

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


$tc filter add dev eth0 parent 1:0 prio 3 u32 ht 1:6: match ip protocol 6 
0xff \
flowid 1:3

# le trafic udp et icmp sont envoyes a la classe 1:2
$tc filter add dev eth0 parent 1:0 prio 7 u32 ht 2:6: \
match ip protocol 17 0xff \
flowid 1:2
-------------------------------------------------------------------
-------------------------------------------------------------------

the statistics that i've got are:

#tc -d -s qdisc
qdisc cbq 1: dev eth0 rate 10Mbit cell 8b mpu 64b (bounded,isolated) prio 
no-transmit/8 weight 10Mbit allot 1514b
level 2 ewma 5 avpkt 1000b maxidle 23us
Sent 4892806 bytes 20344 pkts (dropped 2597, overlimits 2701951)
backlog 68p
  borrowed 0 overactions 0 avgidle 0 undertime 0


#tc class show dev eth0
class cbq 1: root rate 10Mbit (bounded,isolated) prio no-transmit
class cbq 1:1 parent 1: rate 3Mbit prio no-transmit
class cbq 1:2 parent 1:1 rate 1Mbit (bounded) prio 7
class cbq 1:3 parent 1:1 rate 2Mbit (bounded) prio 3

#tc filter ls dev eth0
filter parent 1: protocol ip pref 3 u32
filter parent 1: protocol ip pref 3 u32 fh 2: ht divisor 256
filter parent 1: protocol ip pref 3 u32 fh 801: ht divisor 1
filter parent 1: protocol ip pref 3 u32 fh 1: ht divisor 256
filter parent 1: protocol ip pref 3 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 3 u32 fh 800::800 order 2048 key ht 800 
bkt 0 flowid 1:2
  match 00110000/00ff0000 at 8
filter parent 1: protocol ip pref 7 u32
filter parent 1: protocol ip pref 7 u32 fh 2: ht divisor 256
filter parent 1: protocol ip pref 7 u32 fh 801: ht divisor 1
filter parent 1: protocol ip pref 7 u32 fh 1: ht divisor 256
filter parent 1: protocol ip pref 7 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 7 u32 fh 800::800 order 2048 key ht 800 
bkt 0 flowid 1:2
  match 00110000/00ff0000 at 8


Can anyone help me on this? many thanks ;)

Eddy.

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to