* Re: [LARTC] PRIO not working?
2002-04-13 21:24 [LARTC] PRIO not working? Jacob Elder
@ 2002-04-14 10:26 ` bert hubert
2002-04-14 16:29 ` Jacob Elder
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: bert hubert @ 2002-04-14 10:26 UTC (permalink / raw)
To: lartc
On Sat, Apr 13, 2002 at 05:24:10PM -0400, Jacob Elder wrote:
> I'm trying to prioritize interactive traffic over other traffic on my 56k
> dialup link. I wrote some chains to set the ToS in PREROUTING and OUTGOING,
> and I'm using a PRIO queue with three SFQ children:
PRIO works just fine - you probably have it configured wrong.
> iptables -A OUTPUT -t mangle -p tcp --dport ftp-data -j TOS --set-tos Maximize-throughput
OUTPUT is only for locally generated packets, by the way. To mangle
forwarded packets, use PREROUTING.
> According to tcpdump, the ToS bits are indeed being set like I asked, but
> "watch tc -s qdisc show dev ppp0" shows that everything is going into the
> "througput" queue regardless. The only traffic that increments the counter
> for the "interactive" queue is post-handshake SSH traffic, and from what
> I've read, SSH sets the ToS explicitly. What am I doing wrong?
I would advise rechecking the output of tcpdump before and after applying
the iptables mangle rules.
Regards,
bert hubert
--
http://www.PowerDNS.com Versatile DNS Software & Services
http://www.tk the dot in .tk
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [LARTC] PRIO not working?
2002-04-13 21:24 [LARTC] PRIO not working? Jacob Elder
2002-04-14 10:26 ` bert hubert
@ 2002-04-14 16:29 ` Jacob Elder
2004-09-20 8:33 ` Phill
2004-10-08 13:28 ` Andy Furniss
3 siblings, 0 replies; 5+ messages in thread
From: Jacob Elder @ 2002-04-14 16:29 UTC (permalink / raw)
To: lartc
On Sun, Apr 14, 2002 at 12:26:05PM +0200, bert hubert wrote:
> On Sat, Apr 13, 2002 at 05:24:10PM -0400, Jacob Elder wrote:
> > I'm trying to prioritize interactive traffic over other traffic on my 56k
> > dialup link. I wrote some chains to set the ToS in PREROUTING and OUTGOING,
> > and I'm using a PRIO queue with three SFQ children:
>
> PRIO works just fine - you probably have it configured wrong.
I'm sure it does for you guys, that's why I'm asking for help :)
>
> > iptables -A OUTPUT -t mangle -p tcp --dport ftp-data -j TOS --set-tos Maximize-throughput
>
> OUTPUT is only for locally generated packets, by the way. To mangle
> forwarded packets, use PREROUTING.
I know, I'm only worried about my one workstation at the moment.
>
> > According to tcpdump, the ToS bits are indeed being set like I asked, but
> > "watch tc -s qdisc show dev ppp0" shows that everything is going into the
> > "througput" queue regardless. The only traffic that increments the counter
> > for the "interactive" queue is post-handshake SSH traffic, and from what
> > I've read, SSH sets the ToS explicitly. What am I doing wrong?
>
> I would advise rechecking the output of tcpdump before and after applying
> the iptables mangle rules.
AIM traffic before:
140.186.55.23.33788 > 64.12.163.214.9898: tcp 68 (DF)
And after:
140.186.55.23.33788 > 64.12.163.214.9898: tcp 68 (DF) [tos 0x10]
I forgot to mention that I'm running iproute 20010824-6 and kernel 2.4.17,
Debian Woody. Did the tc command lines I posted before look alright?
--
Jacob Elder
http://www.lucidpark.net/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [LARTC] PRIO not working?
2002-04-13 21:24 [LARTC] PRIO not working? Jacob Elder
2002-04-14 10:26 ` bert hubert
2002-04-14 16:29 ` Jacob Elder
@ 2004-09-20 8:33 ` Phill
2004-10-08 13:28 ` Andy Furniss
3 siblings, 0 replies; 5+ messages in thread
From: Phill @ 2004-09-20 8:33 UTC (permalink / raw)
To: lartc
Hello,
I am using a simple script, which is based on prio. The point is,
that it is not possible to use htb on wifi networks, so I thought that prio
will work fine, but it does almost nothing.
All I wanted was to make the important packets like icmp, games, VoIP,... to
go first, and to slow the things like FTP data transfer, etc.
When I use $TC -s qdisc show dev ${IFACE}, I see, that the packets go to
correct qdiscs.
But when I start FTP data transfer, then the ping time is same with and
without this shaping.
I should also mention, that I am testing it on WiFi with hostap drivers,
where the ping times are about 2-3ms when idle and 100-150ms durring high
traffic.
Is the first/fastest prio class really 1:1, and the last/slowest is 1:4?
Or did I miss something else?
A part of the code follows:
$TC qdisc add dev ${IFACE} root handle 1:0 prio bands 4 priomap 2 2 2 2 2 2
0 0 1 2 2 2 2 2 2 2 2>/dev/null
$TC qdisc add dev ${IFACE} parent 1:1 handle 10 sfq quantum 1514b
perturb 10
$TC qdisc add dev ${IFACE} parent 1:2 handle 20 sfq quantum 1514b
perturb 10
$TC qdisc add dev ${IFACE} parent 1:3 handle 30 sfq quantum 1514b
perturb 10
$TC qdisc add dev ${IFACE} parent 1:4 handle 40 sfq quantum 1514b
perturb 10
$TC filter add dev ${IFACE} parent 1:0 protocol ip handle 1 fw flowid
1:1
$TC filter add dev ${IFACE} parent 1:0 protocol ip handle 2 fw flowid
1:2
$TC filter add dev ${IFACE} parent 1:0 protocol ip handle 3 fw flowid
1:3
$TC filter add dev ${IFACE} parent 1:0 protocol ip handle 4 fw flowid
1:4
$IPT -t mangle -A POSTROUTING -o ${IFACE} -j MARK --set-mark 1
.......
$IPT -t mangle -A POSTROUTING -o ${IFACE} -p tcp --dport 20 -j MARK
--set-mark 2
$IPT -t mangle -A POSTROUTING -o ${IFACE} -p tcp --sport 20 -j MARK
--set-mark 2
.......
Thank you very much for any help,
Filip Jenicek
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [LARTC] PRIO not working?
2002-04-13 21:24 [LARTC] PRIO not working? Jacob Elder
` (2 preceding siblings ...)
2004-09-20 8:33 ` Phill
@ 2004-10-08 13:28 ` Andy Furniss
3 siblings, 0 replies; 5+ messages in thread
From: Andy Furniss @ 2004-10-08 13:28 UTC (permalink / raw)
To: lartc
Phill wrote:
> Hello,
> I am using a simple script, which is based on prio. The point is,
> that it is not possible to use htb on wifi networks, so I thought that prio
> will work fine, but it does almost nothing.
>
> All I wanted was to make the important packets like icmp, games, VoIP,... to
> go first, and to slow the things like FTP data transfer, etc.
>
> When I use $TC -s qdisc show dev ${IFACE}, I see, that the packets go to
> correct qdiscs.
> But when I start FTP data transfer, then the ping time is same with and
> without this shaping.
>
> I should also mention, that I am testing it on WiFi with hostap drivers,
> where the ping times are about 2-3ms when idle and 100-150ms durring high
> traffic.
>
> Is the first/fastest prio class really 1:1, and the last/slowest is 1:4?
>
> Or did I miss something else?
>
> A part of the code follows:
>
> $TC qdisc add dev ${IFACE} root handle 1:0 prio bands 4 priomap 2 2 2 2 2 2
> 0 0 1 2 2 2 2 2 2 2 2>/dev/null
>
> $TC qdisc add dev ${IFACE} parent 1:1 handle 10 sfq quantum 1514b
> perturb 10
> $TC qdisc add dev ${IFACE} parent 1:2 handle 20 sfq quantum 1514b
> perturb 10
> $TC qdisc add dev ${IFACE} parent 1:3 handle 30 sfq quantum 1514b
> perturb 10
> $TC qdisc add dev ${IFACE} parent 1:4 handle 40 sfq quantum 1514b
> perturb 10
>
> $TC filter add dev ${IFACE} parent 1:0 protocol ip handle 1 fw flowid
> 1:1
> $TC filter add dev ${IFACE} parent 1:0 protocol ip handle 2 fw flowid
> 1:2
> $TC filter add dev ${IFACE} parent 1:0 protocol ip handle 3 fw flowid
> 1:3
> $TC filter add dev ${IFACE} parent 1:0 protocol ip handle 4 fw flowid
> 1:4
>
>
> $IPT -t mangle -A POSTROUTING -o ${IFACE} -j MARK --set-mark 1
> .......
> $IPT -t mangle -A POSTROUTING -o ${IFACE} -p tcp --dport 20 -j MARK
> --set-mark 2
> $IPT -t mangle -A POSTROUTING -o ${IFACE} -p tcp --sport 20 -j MARK
> --set-mark 2
> .......
You need to limit the rate to less than link speed by making the prio a
child of an htb class.
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread