CBQ - illegal "match" ?

Matous Jan Fialka fialka.linux na seznam.cz
Úterý Srpen 26 23:20:39 CEST 2003


Dobry den,

udelal jsem si nasledujici script, ale dva posledni radky s prikazem
'tc' nejak nefungujou a nemuzu zaboha prijit na to proc. (?) Ostatni se zda,
ze bezi (snad).

>cat ./fiter.pokus
#!/bin/bash

echo ""
echo "DEBUG: global script variables..."

# nastaveni promennych scriptu

max_burst=10
avpkt=1000
cell=8
allot=1514

device=eth0
ip_eth0=xx.xx.xx.xx
ip_eth1=192.168.0.xx

physical_speed=100mbit
connection_speed=128kbit
connection_speed_weight=0.6Kbit

eth0_while_eth1=96kbit
eth0_while_eth1_weight=10kbit

eth1_while_eth0=32kbit
eth1_while_eth0_weight=3kbit

# vymazani stareho nastaveni

tc qdisc del dev $device root
tc -d qdisc

echo "DEBUG: old setting erased..."

# nove nastaveni

tc qdisc add dev $device root handle 1:0 cbq \
    bandwidth $physical_speed avpkt $avpkt cell $cell

tc class add dev $device parent 1:0 classid 1:1 cbq \
    bandwidth $physical_speed \
    rate $connection_speed weight $connection_speed_weight \
    prio 8 allot $allot cell $cell maxburst $max_burst avpkt $avpkt bounded

echo "DEBUG: device=$device, ip eth0=$ip_eth0, ip eth1=$ip_eth1,"
echo "DEBUG: phys. spd.=$physical_speed, conn. spd=$connection_speed,"

tc class add dev $device parent 1:1 classid 1:3 cbq \
    bandwidth $physical_speed \
    rate $eth0_while_eth1 weight $eth0_while_eth1_weight \
    prio 5 allot $allot cell $cell maxburst $max_burst avpkt $avpkt

tc class add dev $device parent 1:1 classid 1:4 cbq \
    bandwidth $physical_speed \
    rate $eth1_while_eth0 weight $eth1_while_eth0_weight \
    prio 5 allot $allot cell $cell maxburst $max_burst avpkt $avpkt

echo "DEBUG: eth0 speed while eth1 is working is $eth0_while_eth1"
echo "DEBUG: eth1 speed while eth0 is working is $eth1_while_eth0"

tc qdisc add dev $device parent 1:3 handle 30: sfq
tc qdisc add dev $device parent 1:4 handle 40: sfq

# NASLEDUJICI DVA RADKY PROSTE NEFUNGUJI!!! Vypise se:

# Illegal "match"
# Illegal "match"

tc filter add dev $device parent 1:0 protocol ip prio 1 u32 \
    match ip $ip_eth0/32 flowid 1:3

tc filter add dev $device parent 1:0 protocol ip prio 1 u32 \
    match ip $ip_eth0/32 flowid 1:4

echo "DEBUG: cbq started and working (maybe)..."
echo ""

# konec scriptu

Nevite nekdo, cim to? Lamu si s tim hlavu, ale ne a ne prijit na to, kde mam
chybu, zda se totiz, ze ty dva nefunkcni radky mam zapsany spravne (opravte
mne, jestli se pletu, je to docela mozne).

Dekuji mnohokrat za pomoc, uz nejak nemuzu dal...

-- 
Matous Jan Fialka     Variable computing Prague
-----------------------------------------------
Private E-Mail:     matous_jan.fialka na seznam.cz
Snail-Mail: Kamenicka 1, 17000 Praha 7, CR \.cz
ICQ (UIN) Contact:  305749556 (CET 22:00-01:00)
Home Page: http://burdazd.sh.cvut.cz/~socrates/
-----------------------------------------------
Linux User Number: 308523   * Peace and Linux *
-----------------------------------------------


Další informace o konferenci Linux