Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to create a qos htb class and within this class there is a gred queue.

how do I add a working filter for each red queue in the gred queue?

what i tried was:

DEV=lo
SOMEGREDETTINGS="limit 60KB min 15KB max 45KB burst 20 avpkt 1000 bandwidth 1Mbit probability 0.02"

tc qdisc del dev $DEV root > /dev/null

tc qdisc add dev $DEV root handle 1:0 htb
tc class add dev $DEV parent 1:0 classid 1:1 htb rate 1Mbit ceil 1Mbit
tc class add dev $DEV parent 1:1  classid 1:10  htb rate 150Kbit ceil 1Mbit 
tc qdisc add dev $DEV parent 1:10 handle 110: gred setup DPs 3 default 2 grio

tc qdisc change dev $DEV parent 1:10 handle 110:1 gred $SOMEGREDETTINGS DP 0 prio 1
tc qdisc change dev $DEV parent 1:10 handle 110:2 gred $SOMEGREDETTINGS DP 1 prio 2
tc qdisc change dev $DEV parent 1:10 handle 110:3 gred $SOMEGREDETTINGS DP 2 prio 3


tc filter add dev $DEV parent 1:0  protocol ip prio 1 u32 match ip dport 5000 0xffff classid 1:1

tc filter add dev $DEV parent 1:1  protocol ip prio 1 u32 match ip dport 5000 0xffff classid 1:10

tc filter add dev $DEV parent 1:10  protocol ip prio 1 u32 match ip dport 5000 0xffff flowid 110:3

i expect the port 5000 traffic to reach the DP 2 or 110:3 but actually it arrives in DP 0 or 110:1

how do I setup the filters in the right way to reach DP 2?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.