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

AF with Policing



Hello,

	Is it possible to introduce policing in the afcbq script provided
along with TC? I tried to introduce it by having the following command
modified... i.e., I tried to reclassify packets destined to the 2:1 (AF
class 1) class. 

./tc filter add dev eth1 parent 2:0 protocol ip prio 1 handle 1 tcindex
classid 2:1 police rate 1500Kbit burst 50K reclassify

If I have this command the packets seem to get dropped at the 2:0 qdisc
itself.

Can you give me some suggestions??
Thanks,
-anu.

The entire script is here for your reference:

# --- General setup  ---
./tc qdisc add dev eth1 handle 1:0 root dsmark indices 64 set_tc_index
./tc filter add dev eth1 parent 1:0 protocol ip prio 1 tcindex mask 0xfc
shift 2 pass_on
./tc qdisc add dev eth1 parent 1:0 handle 2:0 cbq bandwidth 10Mbit cell 8
avpkt 1000 mpu 64 
./tc filter add dev eth1 parent 2:0 protocol ip prio 1 tcindex mask 0xf0
shift 4 pass_on 

# --- AF Class 1 specific setup---
./tc class add dev eth1 parent 2:0 classid 2:1 cbq bandwidth 10Mbit rate
1500Kbit avpkt 1000 prio 5 bounded allot 1514 weight 1 maxburst 21
./tc filter add dev eth1 parent 2:0 protocol ip prio 1 handle 1 tcindex
classid 2:1 police rate 1500Kbit burst 50K reclassify
./tc qdisc add dev eth1 parent 2:1 gred setup DPs 3 default 2


# --- AF Class 1 DP 1---
./tc filter add dev eth1 parent 1:0 protocol ip prio 1 handle 10 tcindex
classid 1:111
./tc qdisc add dev eth1 parent 2:1 gred limit 60KB min 15KB max 45KB burst
20 avpkt 1000 bandwidth 10Mbit DP 1 probability 0.02 
 
# --- AF Class 1 DP 2---
./tc filter add dev eth1 parent 1:0 protocol ip prio 1 handle 12 tcindex
classid 1:112
./tc qdisc add dev eth1 parent 2:1 gred limit 60KB min 15KB max 45KB burst
20 avpkt 1000 bandwidth 10Mbit DP 2 probability 0.04 
 
# --- AF Class 1 DP 3---
./tc filter add dev eth1 parent 1:0 protocol ip prio 1 handle 14 tcindex
classid 1:113
./tc qdisc add dev eth1 parent 2:1 gred limit 60KB min 15KB max 45KB burst
20 avpkt 1000 bandwidth 10Mbit DP 3 probability 0.06 
 
#------BE Queue setup------
./tc class add dev eth1 parent 2:0 classid 2:5 cbq bandwidth 10Mbit rate
1500Kbit avpkt 1000 prio 6 bounded allot 1514 weight 1 maxburst 21
./tc filter add dev eth1 parent 2:0 protocol ip prio 1 handle 0 tcindex
classid 2:5
./tc qdisc add dev eth1 parent 2:5 red limit 60KB min 15KB max 45KB burst
20 avpkt 1000 bandwidth 10Mbit probability 0.4