Hi,
>Hi all,
>
>First, let me say I've been most impressed with how quickly and
>professionally people on this list ask and answer questions.
>
>Next, let me say that with which I need help is properly configuring strict
>PQ, and gathering certain stats. Specifically:
>
>- I need to create a priority queue with four queues (let's say they are of
>high, medium, normal, and low priority)
>
>- I need to use tc filters such that:
>
> - EF (0xB8) goes to the high priority queue
>
> - AF21 (0x50) goes to the medium priority queue
>
> - AF11 (0x28) goes to the normal priority queue, and
>
> - BE traffic goes to the low priority queue
>
>- For stat collection, I need to see:
>
> - how many bytes and packets are in each of the four queues
>
>- My configuration thus far is:
>
>tc qdisc add dev eml_test root handle 1: prio bands 4 priomap 0 1 2 3
>
>tc filter add dev eml_test parent 1:0 prio 1 protocol ip u32 match ip tos
>0xb8 0xff flowid 1:1
>
>tc filter add dev eml_test parent 1:0 prio 2 protocol ip u32 match ip tos
>0x80 0xff flowid 1:2
>
>tc filter add dev eml_test parent 1:0 prio 3 protocol ip u32 match ip tos
>0x50 0xff flowid 1:3
>
>tc filter add dev eml_test parent 1:0 prio 4 protocol ip u32 match ip tos
>0x00 0xff flowid 1:4
>__________
Here is an article you may find useful:
http://citeseer.ist.psu.edu/539891.html
Here is the description of the configuration parameters of the
PRIO qdisc:
http://www.lartc.org/howto/lartc.qdisc.classful.html#AEN903
(just in case you did not know what the "priomap" option is
used for)
>My questions are:
>
>- What if anything is missing/requiring change in my config given the stated
>requirements?
Your config does not prevent an higher priority class from starving
a lower priority class. You can prevent it in two different ways (at least):
1) You can assign a TBF qdisc (Token Bucket) to the PRIO classes
TBF: http://www.lartc.org/howto/lartc.qdisc.classless.html#AEN691
2) You can replace the PRIO qdisc with something like HTB/CBQ
CBQ: http://www.lartc.org/howto/lartc.qdisc.classful.html#AEN939
HTB: http://luxik.cdi.cz/~devik/qos/htb/
>- What if any command should I use to view how many bytes and packets are in
>each of the four queues?
The PRIO qdisc does not return statistics for its classes.
However, a simple workaround consists of explicitly adding
a qdisc to the four classes.
By default the PRIO qdisc assigns a pFIFO (packet FIFO) qdisc to
its classes.
Here is how you can replace the 4 default pFIFO qdisc with 4
explicit pFIFO qdisc:
tc qdisc add dev eml_test parent 1:1 pfifo limit 1000
tc qdisc add dev eml_test parent 1:2 pfifo limit 1000
tc qdisc add dev eml_test parent 1:3 pfifo limit 1000
tc qdisc add dev eml_test parent 1:4 pfifo limit 1000
Now you can get the stats with:
tc -s -d qdisc list dev eml_test
Regards
/Christian
[ http://benve.info ]
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
|