Re: Re: EF & AF filters with HTB

Linux Advanced Routing and Traffic Control

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

 



Hello again,

Many thanks for your help. I have done as you suggested, I can't get
the other way to work.
I guess keep it simple, right?
We might need to remark at a later stage, I want to test this. Have
you looked at
http://www.opalsoft.net/qos/DS-29.htm yet?

Please could you confirm something? Is the below right in terms of
flowids for the AF1 class? With another example they use flowid 1:111,
flowid 1:112, flowid 1:113.

# HTB
echo -e "Installing HTB queue discipline...\n"
tc qdisc add dev $DEVICE handle 1:0 root htb
tc class add dev $DEVICE parent 1:0 classid 1:1 htb rate 128Kbit ceil 128Kbit

# EF
echo -e "Installing EF class...\n"
tc class add dev $DEVICE parent 1:1 classid 1:10 htb rate 60Kbit ceil 128Kbit
tc qdisc add dev $DEVICE parent 1:10 pfifo limit 5
tc filter add dev $DEVICE parent 1:0 protocol ip prio 1 u32 match ip
tos 0xb8 0xff flowid 1:10

# AF 1
echo -e "Installing AF11, AF12, AF13 classes...\n"
tc class add dev $DEVICE parent 1:1 classid 1:11 htb rate 12Kbit ceil 128Kbit
tc qdisc add dev $DEVICE parent 1:11 gred setup DPs 3 default 2 grio
tc qdisc change dev $DEVICE parent 1:11 gred limit 60KB min 15KB max 45KB \
burst 20 avpkt 1000 bandwidth 128Kbit DP 1 probability 0.02 prio 2
tc qdisc change dev $DEVICE parent 1:11 gred limit 60KB min 15KB max 45KB \
burst 20 avpkt 1000 bandwidth 128Kbit DP 2 probability 0.04 prio 3
tc qdisc change dev $DEVICE parent 1:11 gred limit 60KB min 15KB max 45KB \
burst 20 avpkt 1000 bandwidth 128Kbit DP 3 probability 0.06 prio 4
tc filter add dev $DEVICE parent 1:0 protocol ip prio 2 u32 match ip
tos 0x28 0xff flowid 1:11
tc filter add dev $DEVICE parent 1:0 protocol ip prio 2 u32 match ip
tos 0x30 0xff flowid 1:11
tc filter add dev $DEVICE parent 1:0 protocol ip prio 2 u32 match ip
tos 0x38 0xff flowid 1:11



On 10/04/06, pfer <forgamedev@xxxxxxxxx> wrote:
> Hi Robert!
>
> If I get you right, you wish to use HTB at a node
> for doing some QoS for packets based the DSCP they
> already have, and NOT marking them to have that AF,
> etc.
>
> (
> have you checked
> http://www.opalsoft.net/qos/DS-310.htm?
> he has some nice scripts
> )
>
> Why not simply use an u32 match on the TOS field for
> filtering under your main htb? Why do you need DSMARK?
> (haven't tried, but should work fine)
>
> For ex. having htb main shaper at 1:0 gives
>
> tc filter add dev eth0 parent 1:0 protocol ip prio 2
> u32 match ip tos 0xb8 0xff flowid 1:10
> (the EF htb branch is at 1:10)
>
> tc filter add dev eth0 parent 1:0 protocol ip prio 3
> u32 match ip tos 0x28 0xff flowid 1:20
> (the AF11 htb branch is at 1:20)
>
> At for bulk, create the htb main with: "default 30",
> and add an 1:30 class with needed rate + burst and
> red/sfq/etc.
> U won't need any filter for this, anything
> unclassified
> (anything other than EF or AF11) will get there.
>
> If I get you wrong, and you wish to re-mark those
> packets, I have some scripts for that, too.
>
> Contact me at forgamedev@xxxxxxxxx, and I will send
> them to you.
>
> PS:
> since I also have some scripts to test, and they
> resemble yours, can you tell me whether they are
> correct?
>
> First I wish to re-mark packets based on u32 ip src
> match, with:
>
> tc qdisc add dev eth0 handle 1:0 root dsmark indices 4
>
> tc class change dev eth0 classid 1:1 dsmark mask 0x3
> value 0xb8
>
> ..some filters under 1:0 to send packets to 1:1 to
> remark them...
>
> and then comes a htb at 2:0 having 1:0 (the dsmark
> qdisc) as parent with few branches.
>
> Can I expect that htb qdisc at 2:0 will already have
> the effects of dsmark at 1:0 (remarked packets)?
>
> Thanks,
>
> Ferenc
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> LARTC mailing list
> LARTC@xxxxxxxxxxxxxxx
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>
_______________________________________________
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