Hi,
Look at the sample script in the dir diffserv from the latest tc
distribution::

tc qdisc add dev eth1 handle 1:0 root dsmark indices 64 set_tc_index

set the dsmark(basically a packet marking/reading scheme)

tc filter add dev eth1 parent 1:0 protocol ip prio 1 tcindex mask 0xfc
shift 2

add the tcindex filter that actually separates packets based on the
diffserv marking..

tc qdisc add dev eth1 parent 1:0 handle 2:0 prio

add the prio as a child of the dsmark..now u have the classes 2:1 and
2:2.

tc qdisc add dev eth1 parent 2:1 tbf rate 1.5Mbit burst 1.5kB limit
1.6kB

Now add a tbf to 2:1

tc filter add dev eth1 parent 2:0 protocol ip prio 1 handle 0x2e tcindex
classid 2:1 pass_on
#BE class(2:2)
tc qdisc add dev eth1 parent 2:2 red limit 60KB min 15KB max 45KB burst
20 avpkt 1000 bandwidth 10Mbit probability 0.4

similarly add a red to 2:2

tc filter add dev eth1 parent 2:0 protocol ip prio 2 handle 0 tcindex
mask 0 classid 2:2 pass_on

So the bottom line is that u can use any filter to send packets to the
diffn prio queues..this example uses tcindex..

Make sure u specify the number of bands u want..default is 8.

hth,
Arni


Pawel Krawczyk wrote:
> 
> If I understand correctly the sources, the sch_prio scheduler outputs
> packets from its queues according to their precedense, which is
> based on the priomap table.  The table maps logical priorities to prio
> bands. Please correct if I'm wrong. My question also is, how the logical
> priorities are determined? I've found only one place in IP input, where
> the logical priority is computed basing on the packet's TOS field. Is
> it the only way, or can this be done with filters? An example would
> be appreciated.
> 
> --
> Pawel Krawczyk, CETI internet, Krakow. http://ceti.pl/~kravietz/
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to [EMAIL PROTECTED]
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to