Optimize online gaming at expense of web access
I've read the advanced routing FAQ (I suppose that's a given, or I wouldn't have found my way to this mailing list!), and I'm assimilating the information therein... but I'm still unsure of how to best optimize my system. Basically, I have a LAN at home that goes through a RH 7.1 system which serves as a NAT gateway (I use iptables) to the internet through an IDSL connection. Since it's IDSL, it's not all that fast. Problems arise when my wife is playing an online game (Ultima Online) on one computer, while I am browsing large web pages or downloading files via the Web or while outsiders access my web page (I run apache on the RH system). So, I'd like to give http a lower priority than other system activity.
My basic question is, what's the best way of doing this?
One example in the HOWTO seems close, but I'm not confident that I understand it well enough to adapt it: section 15.4, "Prioritizing interactive traffic". It recommends using the standard pfifo_fast scheduler; if I understand correctly the idea is to set the TOS bits to have telnet and ftp control connections go into band 1, while ftp data goes into band 2. This raised a bunch of other questions for me:
Looking at the table in 9.2, it seems that the TOS bits will only send packets into bands 1 and 2. What goes into band 0? Are there other differences between the four TOS settings? The names certainly suggest so. Are they relevant to the task at hand? What if none of the bits are set -- what happens then? And, in the table, what is TC_PRIO? Where is it used? I get the feeling that that's a *very* basic question, but I haven't figured it out.
Anyway, using this approach, I assume that I can toss packets into band 2 instead of 1 by using:
# iptables -A PREROUTING -t mangle -p tcp --sport telnet \ -j TOS --set-tos Minimize-Throughput # iptables -A PREROUTING -t mangle -p tcp --sport ftp \ -j TOS --set-tos Minimize-Throughput # iptables -A PREROUTING -t mangle -p tcp --sport ftp-data \ -j TOS --set-tos Maximize-Throughput
Hopefully the packets sent back and forth by Ultima Online will be in band 0 or 1, and this will solve my problem. Is that right?
Thanks!
Bruce
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
Quoted 4 lines
Basically, I have a LAN at home that goes through a RH 7.1
system which serves as a NAT gateway (I use iptables) to the internet through an IDSL connection. Since it's IDSL, it's not all that fast. Problems arise when my wife is playing an online game (Ultima Online)
I have the same set up for my adsl connection. I think the problem you describe is the bane of all us home network users. I haven got a perfect set up but I recomend looking at this attachment, which is from another post to this list a while back.
http://www.ds9a.nl/2.4Routing/HOWTO//cvs/2.4routing/output/2.4routing-15.htm
l#ss15.8
This works quite well, but since you know exactly what the problem is (UO requires a set amount of bandwidth to keep a good ping) I suggest using a packet sniffer to find out what ports UO uses and make a seperate bandwith class just for that port. Forget about the TOS bits from what ive seen they dont work reliably.
I also think that this setup puts HTTP traffic into the fast class which is good for when your browsing webpages while somone downloads a big file, but it does mean that if you look at a particualy large page, (big lists generated by ASP or somthing) it can hog the bandwidth for a couple of seconds
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/