EF & AF filters with HTB

Linux Advanced Routing and Traffic Control

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

 



Hello all,

Please could someone help me with this, I have been trying for days to
get this to work. I would like to have BE, AF & EF classes with HTB
qdisc.
I can't find any scripts online where this has been done.

If I enable this filter:

#tc filter add dev eth0 parent 2:0 protocol ip prio 1 \
#tcindex mask 0xf0 shift 4 pass_on

then BE & AF classification seems to be fine but EF breaks & no
packets go under that class. I the filter is commented out then EF &
BE classes are fine.

Script excerpt:

# Main DS Marker & Classifier (1:0)
echo -e "Installing root DS marker, queue discipline and filter...\n"
tc qdisc add dev $DEVICE handle 1:0 root dsmark indices 64 set_tc_index
tc filter add dev $DEVICE parent 1:0 protocol ip prio 1 tcindex mask
0xfc shift 2

# Main HTB Queue Discipline (2:0) & Class (2:1)
echo -e "Installing main HTB queue discipline and class...\n"
tc qdisc add dev $DEVICE parent 1:0 handle 2:0 htb
tc class add dev $DEVICE parent 2:0 classid 2:1 htb rate 120Kbit ceil 120Kbit

# EF Class (2:10)
echo -e "Installing EF class, PFIFO queue discipline and filter...\n"
tc class add dev $DEVICE parent 2:1 classid 2:10 htb rate 60Kbit ceil 120Kbit
tc qdisc add dev $DEVICE parent 2:10 pfifo limit 5
tc filter add dev $DEVICE parent 2:0 protocol ip prio 1 handle 46 tcindex \
classid 2:10

# BE Class (2:20)
echo -e "Installing BE class, RED queue discipline and filter...\n"
tc class add dev $DEVICE parent 2:1 classid 2:20 htb rate 40Kbit ceil 120Kbit
tc qdisc add dev $DEVICE parent 2:20 red limit 60KB min 3KB max 7.5KB \
burst 10 avpkt 1000 bandwidth 120Kbit probability 0.02 ecn
tc filter add dev $DEVICE parent 2:0 protocol ip prio 2 handle 0 tcindex \
mask 0 classid 2:20

# AF Class 1
tc class add dev eth0 parent 2:1 classid 2:30 htb rate 20Kbit ceil 120Kbit
tc qdisc add dev eth0 parent 2:30 gred setup DPs 3 default 2 grio
tc qdisc change dev eth0 parent 2:30 gred limit 60KB min 15KB max 45KB \
burst 20 avpkt 1000 bandwidth 120Kbit DP 1 probability 0.02 prio 2
tc qdisc change dev eth0 parent 2:30 gred limit 60KB min 15KB max 45KB \
burst 20 avpkt 1000 bandwidth 120Kbit DP 2 probability 0.04 prio 3
tc qdisc change dev eth0 parent 2:30 gred limit 60KB min 15KB max 45KB \
burst 20 avpkt 1000 bandwidth 120Kbit DP 3 probability 0.06 prio 4

tc filter add dev eth0 parent 2:0 protocol ip prio 1 \
handle 1 tcindex classid 2:30 pass_on

tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 10 tcindex classid 1:111
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 12 tcindex classid 1:112
tc filter add dev eth0 parent 1:0 protocol ip prio 1 \
handle 14 tcindex classid 1:113

#tc filter add dev eth0 parent 2:0 protocol ip prio 1 \
#tcindex mask 0xf0 shift 4 pass_on
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux