[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Fwd: QoS]



I'm preparing a script using iptables2, (using cbq)

how can i see if packets are well marked?

after having marked some packets, i want to mark remaining packets with a default mark. the way i do it is: mark all the packet with the default mark before applying rules to remark specific packet.
Is it a good way to do it?

****
# root
$TC qdisc add dev $EXTERNAL_IF root handle 10: cbq bandwidth 10Mbit avpkt 1000 mpu 64 $TC qdisc add dev $INTERNAL_IF root handle 10: cbq bandwidth 10Mbit avpkt 1000 mpu 64

# class 1: prio max (ssh http icmp irc...)
$TC class add dev $EXTERNAL_IF parent 10:0 classid 10:1 cbq bandwidth 10Mbit rate 50Kbit allot 1514 prio 1 maxburst 20 avpkt 200 isolated $TC class add dev $INTERNAL_IF parent 10:0 classid 10:1 cbq bandwidth 10Mbit rate 50Kbit allot 1514 prio 1 maxburst 20 avpkt 200 isolated

# class 2: prio min (ftp pop3 emule edonkey...)
$TC class add dev $EXTERNAL_IF parent 10:0 classid 10:2 cbq bandwidth 10Mbit rate 450Kbit allot 1514 prio 3 maxburst 20 avpkt 1500 bounded $TC class add dev $INTERNAL_IF parent 10:0 classid 10:2 cbq bandwidth 10Mbit rate 450Kbit allot 1514 prio 3 maxburst 20 avpkt 1500 bounded

# classe 3: intermediate (other...)
$TC class add dev $EXTERNAL_IF parent 10:0 classid 10:3 cbq bandwidth 10Mbit rate 450Kbit allot 1514 prio 2 maxburst 10 avpkt 1000 bounded $TC class add dev $INTERNAL_IF parent 10:0 classid 10:3 cbq bandwidth 10Mbit rate 450Kbit allot 1514 prio 2 maxburst 10 avpkt 1000 bounded
****

why lots of packets are going in class root?

[root@host user]# tc -s -d class ls dev ppp0
class cbq 10: root rate 10Mbit cell 8b mpu 64b (bounded,isolated) prio no-transmit/8 weight 10Mbit allot 1492b
level 1 ewma 5 avpkt 1000b maxidle 23us
Sent 18411694 bytes 39368 pkts (dropped 0, overlimits 0)
 borrowed 0 overactions 0 avgidle 445 undertime 0
class cbq 10:1 parent 10: rate 50Kbit cell 8b (isolated) prio 1/1 weight 50Kbit allot 1514b
level 0 ewma 5 avpkt 200b maxidle 27581us
Sent 1680 bytes 20 pkts (dropped 0, overlimits 0)
 borrowed 0 overactions 0 avgidle 723060 undertime 0
class cbq 10:2 parent 10: rate 450Kbit cell 8b (bounded) prio 3/3 weight 450Kbit allot 2250b
level 0 ewma 5 avpkt 1500b maxidle 22082us
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 borrowed 0 overactions 0 avgidle 578897 undertime 0
class cbq 10:3 parent 10: rate 450Kbit cell 8b (bounded) prio 2/2 weight 450Kbit allot 1514b
level 0 ewma 5 avpkt 1000b maxidle 6201us
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 borrowed 0 overactions 0 avgidle 162588 undertime 0

thx for your help




Reply to: