hello, a friend of mine have this configuration: 10 x PC -- router/linux/rh8 -- ADSL Modem -- ISP let''s say that the bandwidth is: 5M and 800K he does dc++ and counter-strike, so let''s say the UP is full, and the ping from the counter server is 300ms, the server cut the connection, and no more game, the player is unhappy. The normal ping is 50ms. so he thinks to put some prio on the ping-echo packets to make the ping be extra small, he try the wondershapper from the lartc, don''t work, make a simplified script just for icmp with is: $tc qdisc del $IF_EXT root $tc qdisc add $IF_EXT handle 1: root htb default 2 $tc class add $IF_EXT parent 1: classid 1:9 htb rate 500kbit burst 6k $tc class add $IF_EXT parent 1:9 classid 1:1 htb rate 500kbit ceil 500kbit burst 6k prio 1 $tc class add $IF_EXT parent 1:9 classid 1:2 htb rate 64kbit ceil 500kbit burst 6k prio 2 $tc filter add $IF_EXT protocol ip prio 2 parent 1: u32 \ match ip protocol 1 0xff flowid 1:1 first tryed it with ceil 800kbit, after with a smaller value, the "real" bandwidth was somewhere around 700kbit, at that moment. didn''t work so he tryed with just a prio qdisc and put the icmp packets in the 0 band, the script: $iptables -t mangle -A POSTROUTING -p icmp -j TOS --set-tos 0x10 $tc qdisc del $IF_EXT root $tc qdisc add $IF_EXT root handle 10: prio $tc qdisc add $IF_EXT parent 10:1 handle 20: est 1sec 8sec bfifo $tc qdisc add $IF_EXT parent 10:2 handle 30: est 1sec 8sec bfifo $tc qdisc add $IF_EXT parent 10:3 handle 40: est 1sec 8sec bfifo $tc filter add $IF_EXT parent 10: protocol ip prio 1 u32 match ip tos 0x10 0xff flowid 10:1 $tc filter add $IF_EXT parent 10: protocol ip prio 1 u32 match ip tos 0x06 0xff flowid 10:2 $tc filter add $IF_EXT parent 10: protocol ip prio 1 u32 match ip tos 0x0c 0xff flowid 10:3 still with no result the ping from the counter server is always 300ms, what''s wrong???? C -- Ciprian Niculescu _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hi,<BR><BR>I think that imcp is not the solution. I''ve tested with mohaa and that game uses an own sort of ping on a udp port (so via tcp and not imcp)<BR><BR>Maby u should check if counterstrike does that too.<BR><BR>Regards,<BR>Andre<BR><BR><BR>> hello,<BR>> <BR>> a friend of mine have this configuration:<BR>> <BR>> 10 x PC -- router/linux/rh8 -- ADSL Modem -- ISP<BR>> <BR>> let''s say that the bandwidth is: 5M and 800K<BR>> <BR>> he does dc++ and counter-strike, so let''s say the UP is full, and the<BR>> ping from the counter server is 300ms, the server cut the connection,<BR>> and no more game, the player is unhappy. The normal ping is 50ms.<BR>> <BR>> so he thinks to put some prio on the ping-echo packets to make the ping<BR>> be extra small, he try the wondershapper from the lartc, don''t work,<BR>> make a simplified script just for icmp with is:<BR>> <BR>> $tc qdisc del $IF_EXT root<BR>> $tc qdisc add $IF_EXT handle 1: root htb default 2<BR>> $tc class add $IF_EXT parent 1: classid 1:9 htb rate 500kbit burst 6k<BR>> $tc class add $IF_EXT parent 1:9 classid 1:1 htb rate 500kbit ceil<BR>> 500kbit burst 6k prio 1<BR>> $tc class add $IF_EXT parent 1:9 classid 1:2 htb rate 64kbit ceil<BR>> 500kbit burst 6k prio 2<BR>> <BR>> $tc filter add $IF_EXT protocol ip prio 2 parent 1: u32 \<BR>> match ip protocol 1 0xff flowid 1:1<BR>> <BR>> first tryed it with ceil 800kbit, after with a smaller value, the "real"<BR>> bandwidth was somewhere around 700kbit, at that moment.<BR>> <BR>> didn''t work<BR>> <BR>> so he tryed with just a prio qdisc and put the icmp packets in the 0<BR>> band, the script:<BR>> <BR>> $iptables -t mangle -A POSTROUTING -p icmp -j TOS --set-tos 0x10<BR>> $tc qdisc del $IF_EXT root<BR>> $tc qdisc add $IF_EXT root handle 10: prio<BR>> <BR>> $tc qdisc add $IF_EXT parent 10:1 handle 20: est 1sec 8sec bfifo<BR>> $tc qdisc add $IF_EXT parent 10:2 handle 30: est 1sec 8sec bfifo<BR>> $tc qdisc add $IF_EXT parent 10:3 handle 40: est 1sec 8sec bfifo<BR>> <BR>> $tc filter add $IF_EXT parent 10: protocol ip prio 1 u32 match ip tos<BR>> 0x10 0xff flowid 10:1<BR>> $tc filter add $IF_EXT parent 10: protocol ip prio 1 u32 match ip tos<BR>> 0x06 0xff flowid 10:2<BR>> $tc filter add $IF_EXT parent 10: protocol ip prio 1 u32 match ip tos<BR>> 0x0c 0xff flowid 10:3<BR>> <BR>> <BR>> still with no result the ping from the counter server is always 300ms,<BR>> what''s wrong????<BR>> <BR>> C<BR>> -- <BR>> Ciprian Niculescu<BR>> <BR>> _______________________________________________<BR>> LARTC mailing list / LARTC@mailman.ds9a.nl<BR>> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/<BR> _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hi,<BR><BR>(Sorry for the repost last post was screwed up by my emailclient)<BR><BR>I think that imcp is not the solution. I''ve tested with mohaa and that game uses an own sort of ping on a udp port (so via tcp and not imcp)<BR><BR>Maby u should check if counterstrike does that too.<BR><BR>Regards,<BR><BR>Andre<BR><BR>> hello,<BR>> <BR>> a friend of mine have this configuration:<BR>> <BR>> 10 x PC -- router/linux/rh8 -- ADSL Modem -- ISP<BR>> <BR>> let''s say that the bandwidth is: 5M and 800K<BR>> <BR>> he does dc++ and counter-strike, so let''s say the UP is full, and the<BR>> ping from the counter server is 300ms, the server cut the connection,<BR>> and no more game, the player is unhappy. The normal ping is 50ms.<BR>> <BR>> so he thinks to put some prio on the ping-echo packets to make the ping<BR>> be extra small, he try the wondershapper from the lartc, don''t work,<BR>> make a simplified script just for icmp with is:<BR>> <BR>> $tc qdisc del $IF_EXT root<BR>> $tc qdisc add $IF_EXT handle 1: root htb default 2<BR>> $tc class add $IF_EXT parent 1: classid 1:9 htb rate 500kbit burst 6k<BR>> $tc class add $IF_EXT parent 1:9 classid 1:1 htb rate 500kbit ceil<BR>> 500kbit burst 6k prio 1<BR>> $tc class add $IF_EXT parent 1:9 classid 1:2 htb rate 64kbit ceil<BR>> 500kbit burst 6k prio 2<BR>> <BR>> $tc filter add $IF_EXT protocol ip prio 2 parent 1: u32 \<BR>> match ip protocol 1 0xff flowid 1:1<BR>> <BR>> first tryed it with ceil 800kbit, after with a smaller value, the "real"<BR>> bandwidth was somewhere around 700kbit, at that moment.<BR>> <BR>> didn''t work<BR>> <BR>> so he tryed with just a prio qdisc and put the icmp packets in the 0<BR>> band, the script:<BR>> <BR>> $iptables -t mangle -A POSTROUTING -p icmp -j TOS --set-tos 0x10<BR>> $tc qdisc del $IF_EXT root<BR>> $tc qdisc add $IF_EXT root handle 10: prio<BR>> <BR>> $tc qdisc add $IF_EXT parent 10:1 handle 20: est 1sec 8sec bfifo<BR>> $tc qdisc add $IF_EXT parent 10:2 handle 30: est 1sec 8sec bfifo<BR>> $tc qdisc add $IF_EXT parent 10:3 handle 40: est 1sec 8sec bfifo<BR>> <BR>> $tc filter add $IF_EXT parent 10: protocol ip prio 1 u32 match ip tos<BR>> 0x10 0xff flowid 10:1<BR>> $tc filter add $IF_EXT parent 10: protocol ip prio 1 u32 match ip tos<BR>> 0x06 0xff flowid 10:2<BR>> $tc filter add $IF_EXT parent 10: protocol ip prio 1 u32 match ip tos<BR>> 0x0c 0xff flowid 10:3<BR>> <BR>> <BR>> still with no result the ping from the counter server is always 300ms,<BR>> what''s wrong????<BR>> <BR>> C<BR>> -- <BR>> Ciprian Niculescu<BR>> <BR>> _______________________________________________<BR>> LARTC mailing list / LARTC@mailman.ds9a.nl<BR>> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/<BR> _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hey there,> hello, > > a friend of mine have this configuration: > > 10 x PC -- router/linux/rh8 -- ADSL Modem -- ISP > > let''s say that the bandwidth is: 5M and 800K > > he does dc++ and counter-strike, so let''s say the UP is full, and the > ping from the counter server is 300ms, the server cut the connection, and > no more game, the player is unhappy. The normal ping is 50ms. > > so he thinks to put some prio on the ping-echo packets to make the ping > be extra small, he try the wondershapper from the lartc, don''t work, make > a simplified script just for icmp with is: > > $tc qdisc del $IF_EXT root > $tc qdisc add $IF_EXT handle 1: root htb default 2 > $tc class add $IF_EXT parent 1: classid 1:9 htb rate 500kbit burst 6k > $tc class add $IF_EXT parent 1:9 classid 1:1 htb rate 500kbit ceil > 500kbit burst 6k prio 1 > $tc class add $IF_EXT parent 1:9 classid 1:2 htb rate 64kbit ceil 500kbit > burst 6k prio 2 > > $tc filter add $IF_EXT protocol ip prio 2 parent 1: u32 \ > match ip protocol 1 0xff flowid 1:1 > > first tryed it with ceil 800kbit, after with a smaller value, the "real" > bandwidth was somewhere around 700kbit, at that moment. > > didn''t work >[ -- SNIP --]> still with no result the ping from the counter server is always 300ms, > what''s wrong????Maybe I''m misunderstanding you, maybe not - but what exactly do you mean by "the ping from the server is always 300ms"? Is it the ICMP ping (generated by the ''ping'' tool), or do you mean when you play Counter-Strike, and you look at the players tab, that shows you''re lagged with 300ms? Have you tried to ping the counter-strike server direct from the shell using the ''ping'' tool? If this results in very low ping replies, your tc setup is correctly set up. The only thing you''re missing now, is to prioritize counter-strike specific traffic. Usually the portnumbers used by Couter-Strike servers are 27015 and some numbers up, so this is what you have to prioritize. An example (class id is from your first script, using htb) - this will put the packets leaving your $IF_EXT to port 27015, 27016 and 27017 to any hosts in the class 1:1: for cs_p in 27015 27016 27017; do tc filter add dev $IF_EXT parent 1:0 protocol ip prio 10 u32 \ match ip dport $cs_p 0xffff flowid 1:1 done You may need to modify the above example to fit your script. -- Theepan PS: I''m sorry if you receive this mail twice. I forgot to CC it the list the first time. _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Mon, 30 Dec 2002 11:49:58 +0100, "Tornado" <tornado@linuxfromscratch.org> said:> Hey there, > > Maybe I''m misunderstanding you, maybe not - but what exactly do you mean > by > "the ping from the server is always 300ms"? > > Is it the ICMP ping (generated by the ''ping'' tool), or do you mean when > you > play Counter-Strike, and you look at the players tab, that shows you''re > lagged with 300ms?by ping i meen the real ping program with icmp, i see that i could not specify counterstrike to don''t create confusion. and the ideea is not to priorize the counter game, but only the ping used by the counter game so another question is, the counter strike game use udp/270015 only for ping probing or also for game packets> > Have you tried to ping the counter-strike server direct from the shell > using > the ''ping'' tool? If this results in very low ping replies, your tc setup > is > correctly set up.this is what i try, beacouse i dont realy play the game, i generate trafic to saturate the link, and ping from shell from an externat host C> > The only thing you''re missing now, is to prioritize counter-strike > specific > traffic. Usually the portnumbers used by Couter-Strike servers are 27015 > and > some numbers up, so this is what you have to prioritize. > > An example (class id is from your first script, using htb) - this will > put > the packets leaving your $IF_EXT to port 27015, 27016 and 27017 to any > hosts > in the class 1:1: > > for cs_p in 27015 27016 27017; do > tc filter add dev $IF_EXT parent 1:0 protocol ip prio 10 u32 \ > match ip dport $cs_p 0xffff flowid 1:1 > done > > You may need to modify the above example to fit your script. > > > -- > Theepan > > >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> > > > Is it the ICMP ping (generated by the ''ping'' tool), or do you mean when > > you > > play Counter-Strike, and you look at the players tab, that shows you''re > > lagged with 300ms? > > by ping i meen the real ping program with icmp, i see that i could not > specify counterstrike to don''t create confusion. > > and the ideea is not to priorize the counter game, but only the ping used > by the counter game > > so another question is, the counter strike game use udp/270015 only for > ping probing or also for game packetsThe counter-strike server does not ''ping'' you in a "normal" fashion. It''s an in-game feature, which doesn''t use extra protocols to retrieve ping, hence counter-trike server uses port 27015 to both game packets and "ping-in-game"-packets. And besides, it wouldn''t make any difference to only prioritize the "ping-in-game"-packets, even if you could - the game would still lag as without traffic control.> this is what i try, beacouse i dont realy play the game, i generate > trafic to saturate the link, and ping from shell from an externat hostIn which case, you should check if your downstream is not chocking. Even if you shape outgoing packets, you can still get get bad pings, if your downstream is running at max. -- Theepan _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Mon, 30 Dec 2002 22:22:28 +0100, "Tornado" <tornado@linuxfromscratch.org> said:> > > > > this is what i try, beacouse i dont realy play the game, i generate > > trafic to saturate the link, and ping from shell from an externat host > > In which case, you should check if your downstream is not chocking. Even > if > you shape outgoing packets, you can still get get bad pings, if your > downstream is running at max.no a 1Mbit trafic on a 5M no chocking :)))) C _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
But you are not listening to what I and others have been saying. Forget about the ICMP pings! They don''t mean nothing! Use the script I attached (change a few settings, like your own speeds, interface and executables, speeds are in kbit!). Then use the following iptables rules: (eth0=my internet-interface, eth2=my LAN interface, change if needed !) # ICMP packets have an even higher priority (so you can test it with ping, but this doesn''t help CounterStrike at all!) # Don''t do massive pings/traceroutes because that would choke other traffic (including CS)! iptables -I PREROUTING -t mangle -i eth2 -j MARK --set-mark 1 -p ICMP iptables -I OUTPUT -t mangle -o eth0 -j MARK --set-mark 1 -p ICMP # And here''s Counter Strike: # if you want you could add: -m multiport --destination-port 27000:27050 iptables -I PREROUTING -t mangle -i eth2 -j MARK --set-mark 1 -p DP --source-port 27005 # ACK Packets get higher priority than ''normal'' packets iptables -I PREROUTING -t mangle -i eth2 -j MARK --set-mark 2 -p TCP -m length --length 0:100 iptables -I OUTPUT -t mangle -o eth0 -j MARK --set-mark 2 -p TCP -m length --length 0:100 And add some more yourself, remember: - All rules are tested for each packet: MARK does _not_ stop like ACCEPT and RETURN do. - Therefore the order in which you place these rules is important. - Rules are inserted (-I) in the table, so eventually (use iptables -L -n) the rules will be ''upside down'' in the table. - Thus higher priorities rules (lower MARK numbers) should go first in your script, otherwise they might be overruled by later rules. Jannes Faber ----- Original Message ----- From: "Ciprian Niculescu" <lartc@cnicules.4email.net> To: "Tornado" <tornado@linuxfromscratch.org>; <lartc@mailman.ds9a.nl> Sent: Tuesday, December 31, 2002 12:23 AM Subject: Re: [LARTC] wondershaper + htb prio + qdisc prio> On Mon, 30 Dec 2002 22:22:28 +0100, "Tornado" > <tornado@linuxfromscratch.org> said: > > > > > > > this is what i try, beacouse i dont realy play the game, i generate > > > trafic to saturate the link, and ping from shell from an externat host > > > > In which case, you should check if your downstream is not chocking. Even > > if > > you shape outgoing packets, you can still get get bad pings, if your > > downstream is running at max. > > no a 1Mbit trafic on a 5M no chocking :)))) > > C >
On Tue, 31 Dec 2002 11:49:15 +0100, "sufcrusher" <sufcrusher@zonnet.nl> said:> But you are not listening to what I and others have been saying. Forget > about the ICMP pings! They don''t mean nothing!i do, but, forget CS, my problem is that the prio don''t work here the script to start the discusion $tc qdisc del $IF_EXT root $tc qdisc add $IF_EXT handle 1: root htb default 2 $tc class add $IF_EXT parent 1: classid 1:9 htb rate 500kbit burst 6k $tc class add $IF_EXT parent 1:9 classid 1:1 htb rate 500kbit ceil 500kbit burst 6k prio 1 $tc class add $IF_EXT parent 1:9 classid 1:2 htb rate 64kbit ceil 500kbit burst 6k prio 2 $tc filter add dev $IF_EXT protocol ip prio 2 parent 1: u32 \ match ip protocol 1 0xff flowid 1:1 fizical ADSL 5mbit/700kbit, the desired: even the upload is full, i want to have a wonderfull ping response the problem is that the above script don''t work, why???? and for your script below, nice marks, but the tc where is it??? C P.S. Happy New Year!!!!> > Use the script I attached (change a few settings, like your own speeds, > interface and executables, speeds are in kbit!). Then use the following > iptables rules: > > (eth0=my internet-interface, eth2=my LAN interface, change if needed !) > > # ICMP packets have an even higher priority (so you can test it with > ping, > but this doesn''t help CounterStrike at all!) > # Don''t do massive pings/traceroutes because that would choke other > traffic > (including CS)! > iptables -I PREROUTING -t mangle -i eth2 -j MARK --set-mark 1 -p ICMP > iptables -I OUTPUT -t mangle -o eth0 -j MARK --set-mark 1 -p ICMP > # And here''s Counter Strike: > # if you want you could add: -m multiport --destination-port 27000:27050 > iptables -I PREROUTING -t mangle -i eth2 -j MARK --set-mark 1 -p > DP --source-port 27005 > > # ACK Packets get higher priority than ''normal'' packets > iptables -I PREROUTING -t mangle -i eth2 -j MARK --set-mark 2 -p TCP -m > length --length 0:100 > iptables -I OUTPUT -t mangle -o eth0 -j MARK --set-mark 2 -p TCP -m > length --length 0:100 > > And add some more yourself, remember: > - All rules are tested for each packet: MARK does _not_ stop like ACCEPT > and > RETURN do. > - Therefore the order in which you place these rules is important. > - Rules are inserted (-I) in the table, so eventually (use iptables -L > -n) > the rules will be ''upside down'' in the table. > - Thus higher priorities rules (lower MARK numbers) should go first in > your > script, otherwise they might be overruled by later rules. > > Jannes Faber > > ----- Original Message ----- > From: "Ciprian Niculescu" <lartc@cnicules.4email.net> > To: "Tornado" <tornado@linuxfromscratch.org>; <lartc@mailman.ds9a.nl> > Sent: Tuesday, December 31, 2002 12:23 AM > Subject: Re: [LARTC] wondershaper + htb prio + qdisc prio > > > > On Mon, 30 Dec 2002 22:22:28 +0100, "Tornado" > > <tornado@linuxfromscratch.org> said: > > > > > > > > > this is what i try, beacouse i dont realy play the game, i generate > > > > trafic to saturate the link, and ping from shell from an externat host > > > > > > In which case, you should check if your downstream is not chocking. Even > > > if > > > you shape outgoing packets, you can still get get bad pings, if your > > > downstream is running at max. > > > > no a 1Mbit trafic on a 5M no chocking :)))) > > > > C > >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/