From mboxrd@z Thu Jan 1 00:00:00 1970 From: bartekR Date: Wed, 29 Aug 2007 08:58:13 +0000 Subject: Re: [LARTC] HTB does not respect the prio parameter Message-Id: <46D53525.8080005@poczta.fm> List-Id: References: <46D52904.4040809@businessecurity.com> In-Reply-To: <46D52904.4040809@businessecurity.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Martin Bj=F6rnsson pisze: > Hi all, >=20 > I'm experimenting with HTB and the prio parameter and it does not give me= results I > expect. I've created 4 HTB classes: >=20 > 1:10 TCP ACKs (prio 0) > 1:20 TCP traffic on dst port 10001 (prio 1) > 1:30 TCP traffic on dst port 10000 (prio 2) > 1:40 Default (prio 3) >=20 > ceil and rate parameters are the same for all 4 classes (rate is 1000kbit= and ceil is > 55000kbit). >=20 > Then I start 2 TCP flows on src/dst ports 10000 and 10001. The packets se= em to be > correctly classified by the filter (I get hits on classes 10, 20 and 30). >=20 > The problem is that I get the same throughput on both TCP flows. Shouldn'= t I get about > 1000kbit through class 30 and much more through class 20 since it has hig= her priority? >=20 >=20 > Here's my setup script: >=20 > #!/bin/sh > /bin/tc qdisc add dev eth0 root handle 1: htb default 40 && \ > /bin/tc class add dev eth0 parent 1:0 classid 1:1 htb rate 55000kbit ceil= 55000kbit > quantum 60000 && \ > /bin/tc class add dev eth0 parent 1:1 classid 1:10 htb rate 1000kbit ceil= 55000kbit prio 0 > quantum 60000 && \ > /bin/tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1000kbit ceil= 55000kbit prio 1 > quantum 60000 && \ > /bin/tc class add dev eth0 parent 1:1 classid 1:30 htb rate 1000kbit ceil= 55000kbit prio 2 > quantum 60000 && \ > /bin/tc class add dev eth0 parent 1:1 classid 1:40 htb rate 1000kbit ceil= 55000kbit prio 3 > quantum 60000 && \ > /bin/tc filter add dev eth0 parent 1:0 prio 99 handle 2: protocol ip u32 = divisor 256 && \ > /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \ > ht 2:0: \ > match u8 0x06 0xff at 9 \ > match u8 0x10 0xff at nexthdr+13 \ > flowid 1:10 && \ > /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \ > ht 2:0: \ > match u8 0x06 0xff at 9 \ > match u16 0x2711 0xffff at nexthdr+2 \ > flowid 1:20 && \ > /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \ > ht 2:0: \ > match u8 0x06 0xff at 9 \ > match u16 0x2710 0xffff at nexthdr+2 \ > flowid 1:30 && \ > /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 99 u32 ht 800:: o= ffset at 0 mask > 0x0f00 shift 6 plus 0 match u8 0x40 0xf0 at 0 link 2: && \ > /bin/tc qdisc add dev eth0 parent 1:10 handle 20: red limit 1000KB min 10= KB max 300KB > avpkt 1000 burst 100 probability 0.02 && \ > /bin/tc qdisc add dev eth0 parent 1:20 handle 30: red limit 1000KB min 10= KB max 300KB > avpkt 1000 burst 100 probability 0.02 && \ > /bin/tc qdisc add dev eth0 parent 1:30 handle 40: red limit 1000KB min 10= KB max 300KB > avpkt 1000 burst 100 probability 0.02 && \ > /bin/tc qdisc add dev eth0 parent 1:40 handle 50: red limit 1000KB min 10= KB max 300KB > avpkt 1000 burst 100 probability 0.02 && \ >=20 > Regards, > Martin > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc >=20 >=20 As far as I know lower prio numbers (as 0) means higher priority and=20 higher prio numbers (as 7) means lower priority. http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm Bartek ---------------------------------------------------------------------- Mobilne wiadomo=B6ci w Twojej kom=F3rce >>> http://link.interia.pl/f1b71 _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc