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

Re: [Linux Diffserv] problem of sch_dsmark



Hi,

* On Sat, Aug 09, 2003 at 11:08 AM (+0200), Steffen Moser wrote:

> I don't really know if you need to classify your packets a second time,
> that means, I don't know, if it's possible to use the TCINDEX classifier
> to decide whether to put the packets to 2:1, 2:2 or 2:3, e.g. having:
> 
>    $TC filter add dev eth0 parent 2:0 protocol ip handle 1 tcindex classid 2:1 pass_on
>    $TC filter add dev eth0 parent 2:0 protocol ip handle 2 tcindex classid 2:2 pass_on
>    $TC filter add dev eth0 parent 2:0 protocol ip handle 3 tcindex classid 2:3 pass_on 

It seems to function here. I've tested it using PRIO instead of CBQ to
make it a little bit shorter:

  $TC qdisc del dev eth0 root

  $TC qdisc add dev eth0 handle 1:0 root dsmark indices 64
    $TC class change dev eth0 classid 1:1 dsmark mask 0x3 value 0xb8
    $TC class change dev eth0 classid 1:2 dsmark mask 0x3 value 0x68
    $TC class change dev eth0 classid 1:3 dsmark mask 0x3 value 0x48

    $TC filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.1.1/32 match ip dport 0x16 0xffff flowid 1:1
    $TC filter add dev eth0 parent 1:0 protocol ip prio 2 u32 match ip dst 192.168.1.1/32 flowid 1:2
    $TC filter add dev eth0 parent 1:0 protocol ip prio 3 u32 match ip dst 192.168.1.120/32 flowid 1:3

    $TC qdisc add dev eth0 parent 1:0 handle 2:0 prio bands 3

       echo EF data ...
       $TC qdisc add dev eth0 parent 2:1 pfifo limit 5

       echo AF1 data ...
       $TC qdisc add dev eth0 parent 2:2 red limit 60KB min 15KB max 45KB burst 20 avpkt 1000 bandwidth 10Mbit probability 0.4

       echo AF2 data ...
       $TC qdisc add dev eth0 parent 2:3 red limit 60KB min 5KB max 30KB burst 20 avpkt 1000 bandwidth 10Mbit probability 0.4

    $TC filter add dev eth0 parent 2:0 protocol ip handle 1 tcindex classid 2:1 pass_on
    $TC filter add dev eth0 parent 2:0 protocol ip handle 2 tcindex classid 2:3 pass_on
    $TC filter add dev eth0 parent 2:0 protocol ip handle 3 tcindex classid 2:2 pass_on

HTH,
Steffen



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Diffserv-general mailing list
Diffserv-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/diffserv-general