Re: [LARTC] wondershaper + htb prio + qdisc prio
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 [EMAIL PROTECTED] To: Tornado [EMAIL PROTECTED]; [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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 tcstart.sh Description: Binary data
Re: [LARTC] wondershaper + htb prio + qdisc prio
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 0x 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 / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] wondershaper + htb prio + qdisc prio
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 The 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 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. -- Theepan ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] wondershaper + htb prio + qdisc prio
On Mon, 30 Dec 2002 22:22:28 +0100, Tornado [EMAIL PROTECTED] 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 / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] wondershaper + htb prio + qdisc prio
Hi,BRBRI 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)BRBRMaby u should check if counterstrike does that too.BRBRRegards,BRAndreBRBRBRgt; hello,BRgt; BRgt; a friend of mine have this configuration:BRgt; BRgt; 10 x PC -- router/linux/rh8 -- ADSL Modem -- ISPBRgt; BRgt; let's say that the bandwidth is: 5M and 800KBRgt; BRgt; he does dc++ and counter-strike, so let's say the UP is full, and theBRgt; ping from the counter server is 300ms, the server cut the connection,BRgt; and no more game, the player is unhappy. The normal ping is 50ms.BRgt; BRgt; so he thinks to put some prio on the ping-echo packets to make the pingBRgt; be extra small, he try the wondershapper from the lartc, don't work,BRgt; make a simplified script just for icmp with is:BRgt; BRgt; $tc qdisc del $IF_EXT rootBRgt; $tc qdisc add $IF_EXT handle 1: root htb default 2BRgt; $tc class add $IF_EXT parent 1: classid 1:9 htb rate 500kbit burst 6kBRgt; $tc class add $IF_EXT parent 1:9 classid 1:1 htb rate 500kbit ceilBRgt; 500kbit burst 6k prio 1BRgt; $tc class add $IF_EXT parent 1:9 classid 1:2 htb rate 64kbit ceilBRgt; 500kbit burst 6k prio 2BRgt; BRgt; $tc filter add $IF_EXT protocol ip prio 2 parent 1: u32 \BRgt; match ip protocol 1 0xff flowid 1:1BRgt; BRgt; first tryed it with ceil 800kbit, after with a smaller value, the realBRgt; bandwidth was somewhere around 700kbit, at that moment.BRgt; BRgt; didn't workBRgt; BRgt; so he tryed with just a prio qdisc and put the icmp packets in the 0BRgt; band, the script:BRgt; BRgt; $iptables -t mangle -A POSTROUTING -p icmp -j TOS --set-tos 0x10BRgt; $tc qdisc del $IF_EXT rootBRgt; $tc qdisc add $IF_EXT root handle 10: prioBRgt; BRgt; $tc qdisc add $IF_EXT parent 10:1 handle 20: est 1sec 8sec bfifoBRgt; $tc qdisc add $IF_EXT parent 10:2 handle 30: est 1sec 8sec bfifoBRgt; $tc qdisc add $IF_EXT parent 10:3 handle 40: est 1sec 8sec bfifoBRgt; BRgt; $tc filter add $IF_EXT parent 10: protocol ip prio 1 u32 match ip tosBRgt; 0x10 0xff flowid 10:1BRgt; $tc filter add $IF_EXT parent 10: protocol ip prio 1 u32 match ip tosBRgt; 0x06 0xff flowid 10:2BRgt; $tc filter add $IF_EXT parent 10: protocol ip prio 1 u32 match ip tosBRgt; 0x0c 0xff flowid 10:3BRgt; BRgt; BRgt; still with no result the ping from the counter server is always 300ms,BRgt; what's wrongBRgt; BRgt; CBRgt; -- BRgt; Ciprian NiculescuBRgt; BRgt; ___BRgt; LARTC mailing list / [EMAIL PROTECTED]BRgt; http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/BR ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] wondershaper + htb prio + qdisc prio
Hi,(Sorry for the repost last post was screwed up by my emailclient)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)Maby u should check if counterstrike does that too.Regards,Andre 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 / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/