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

Re: Class that drops everything



Unfortunately I can't still yield a way to drop all the incoming packets
I attach the TC-script file and the statistics.
I hope you can take a look and suggest me something to do.

Thanks
Marco

------------------------------------
--------TC script file---------------
------------------------------------
#!/bin/sh

DEV="dev eth1"
RATE_TOT="rate 10Mbit"
RATE_QoS="rate 8Mbit"
RATE_Probe="rate 2Mbit"

WEIGHT_TOT="weight 1Mbit"
WEIGHT_QoS="weight 800Kbit"
WEIGHT_Probe="weight 200Kbit"

BW_TOT="bandwidth 10Mbit"
BW_QoS="bandwidth 10Mbit"
BW_Probe="bandwidth 10Mbit"

ALLOT="1514"
CELL="8"
AVPKT="1000"
MPU="mpu 64"
BLA="allot 1514 cell 8 avpkt 1000"

MATCH_QoS="match ip dst 129.247.173.249/32 match ip dport 6010 0xffff"
MATCH_Probe="match ip dst 129.247.173.249/32 match ip dport 6011 0xffff"

#-------------------------------------------
# clear everything
tc qdisc del $DEV root

#Attach the Qdisc to the eth0
tc qdisc add $DEV root handle 1: cbq $BW_TOT $BLA
 
#Add the ROOT CLASS the queueing discipline.
#The root has 10 Mbit completely
tc class add $DEV parent 1:0 classid 1:1  cbq $BW_TOT $RATE_TOT       \
        $BLA $WEIGHT_TOT prio 8 maxburst 20  bounded isolated
 
# QoS traffic
tc class add $DEV parent 1:1 classid 1:2  cbq  $BW_QoS $RATE_QoS      \
        $BLA $WEIGHT_QoS  prio 3 maxburst 20 bounded isolated

# PROBING traffic
tc class add $DEV parent 1:1 classid 1:3  cbq  $BW_Probe $RATE_Probe  \
        $BLA $WEIGHT_Probe prio 7 maxburst 20  bounded isolated

# u32 Classifier.
tc filter add $DEV parent 1:0 protocol ip prio 1 u32 $MATCH_QoS flowid
1:2

POLICE="police rate 1kbit burst 1k mtu 1 action drop/drop"
tc filter add $DEV parent 1:0 protocol ip prio 2 u32 $MATCH_Probe
$POLICE flowid 1:3
 
 

---------------------------------
----------STATISTICS---------
---------------------------------
brandeburg:/usr/MARCO/CONF_NET # tc -s cl ls dev eth1
class cbq 1: root rate 10Mbit (bounded,isolated) prio no-transmit
 Sent 126 bytes 3 pkts (dropped 0, overlimits 0)
  borrowed 0 overactions 0 avgidle 624 undertime 0
class cbq 1:1 parent 1: rate 10Mbit (bounded,isolated) prio no-transmit
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
  borrowed 0 overactions 0 avgidle 624 undertime 0
class cbq 1:2 parent 1:1 rate 8Mbit (bounded,isolated) prio 3
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
  borrowed 0 overactions 0 avgidle 4434 undertime 0
class cbq 1:3 parent 1:1 rate 2Mbit (bounded,isolated) prio 7
 Sent 12738 bytes 193 pkts (dropped 0, overlimits 0)
  borrowed 0 overactions 0 avgidle 70957 undertime 0

I sent packets (1 each second) only to 129.247.173.249 port 6011 and there is not dropped packet!!!
 
 

-----------------------------------
-----FILTER Configuration-------
-----------------------------------
filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 801: ht divisor 1
filter parent 1: protocol ip pref 1 u32 fh 801::800 order 2048 key ht
801 bkt 0 flowid 1:3
  match 81f7adf9/ffffffff at 16
  match 0000177b/0000ffff at 20
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht
800 bkt 0 flowid 1:2
  match 81f7adf9/ffffffff at 16
  match 0000177a/0000ffff at 20
filter parent 1: protocol ip pref 2 u32
filter parent 1: protocol ip pref 2 u32 fh 801: ht divisor 1
filter parent 1: protocol ip pref 2 u32 fh 801::800 order 2048 key ht
801 bkt 0 flowid 1:3
  match 81f7adf9/ffffffff at 16
  match 0000177b/0000ffff at 20
filter parent 1: protocol ip pref 2 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 2 u32 fh 800::800 order 2048 key ht
800 bkt 0 flowid 1:2
  match 81f7adf9/ffffffff at 16
  match 0000177a/0000ffff at 20