Slashdot Mirror


FreeBSD Based Gaming Router

Zaphoid writes "Lan Game Reviews has posted an article on how to use an old computer and FreeBSD distro m0n0wall to create a gaming router. Gaming routers allow users to use their full bandwidth for downloads and other high bandwidth apps, and low latency applications at the same time. By keeping packet queues on the router side, rather than the modem side. Users are able to achive great pings in online games, while fully using their download bandwidth. This is a great alternitive to expensive gaming routers on the market today."

17 of 240 comments (clear)

  1. Double standard by xintegerx · · Score: 3, Interesting

    "This is a great alternitive to expensive gaming routers on the market today."

    Yes, this is exactly what the gaming world has been waiting for. The funny thing is that when somebody tries to create a product that is designed for USERS, they complain. However, when you design something so obscure out of your own whim that might never be used by anybody else, that is considered cool. Discuss. :)

    1. Re:Double standard by Anonymous Coward · · Score: 1, Interesting

      Evidently they do or there wouldnt be much of a market for higher preformance gaming routers with 200mhz processors and 32MB of ram ...

      Different routers for different needs. What does this have to do with needing a white box PC to make a router?

      Embedded hardware has come a long way - more power with less consumption. Why not take a commodity operating system like Linux and turn it into a routing platform if you have the horsepower to do it? Its easier than making special embedded hardware to run on something less powerful.

      You're deluding yourself, pushing the amount of packets you can over a decent broadband connection preforming address translation, and any kind of moderatly sophisticated firewalling or queueing is pretty intensive, the load can be minimized by using ASICs (and in the future linksys being now a subsidary of CISCO we may see this) but were talking a commodity embeded processor, and not very fast ones at that (the gaming routers are of course better but still no match for a full blown microprocessor)

      No, you're deluding yourself. I've done NAT on a 386 on my DSL line. What are you smoking? NAT is a very simple process. Do you actually know anything about this stuff or do you just repeat some garbage you heard somewhere else? Firewalling is deadly simple. It doesn't take horsepower to not respond to packets. Queuing is really simple too. We aren't talking about doing anything special or complicated here.

      its not an *emebeded* microprocessor though, with lower clock speeds, less cache, granted they are optimized for lower power consumption and heat there is no such thing as a free lunch.

      Jesus christ man, we're talking about rewriting packets! Why do you need buttloads of cache? You're not going to be requesting the same data over and over again.

      Please, take a computer architechure class before spouting off this nonsense.

      You can install a harddrive ? or do you like burning out flash drives/cards quickly ? I speciffically mentioned caching ... lots of writes. And TFA is about FreeBSD, linux in my experiance has subpar firewalling and queuing features see: http://www.openbsd.org/faq/pf/index.html

      Non seqitur. If you want harddrives, you're not building a router.

      I've used both and I have preferred iptables.

      We have 5 very heavy computer users sharing a standard cable link, not once has anyone complained about slowness, even with 3 of them playing MMORPGs and two of those same idiots also using various P2P apps.

      Good for you. I'm doing the same thing with my WRT54G that doesn't suck down unneeded power and is friendlier to the environment. I also don't have to worry about the harddrive crashing since it doesn't have one.

    2. Re:Double standard by varebel · · Score: 2, Interesting

      FWIW, Cisco 2500 series routers run on a 20 Mhz 68030 CPU and I've seen them bog down on a saturated T-1 after adding a few dozen filter rules.

      What does that have to do with 386 vs PII for a BSD-based router/firewall? Well, I don't know since I'm not really sure how a 68030 stacks up to a 386 clock-for-clock. Just some food for thought.

  2. Easier... by fimbulvetr · · Score: 2, Interesting

    You can do this with a wrt54g and the sveasoft firmware, too. I prefer that way, so you don't have to worry about another machine that sucks a lot of power lying about. IIRC, you can get the sveasoft firmware at alternate locations, just google for it. I broke down and bought it ($20/year), and got my money's worth.
    You might even be able to do it with the free wrt54g firmware, openwrt, but I've never tried it.
    This little box is extemely reliable, has very low power consumption, it's cheap and it's small. Plus, it does wireless (WPA, etc).

  3. Gaming routers look pretty small, quiet and cheap by putko · · Score: 5, Interesting

    Such routers seem to be under $100.

    http://froogle.google.com/froogle?q=gaming+router& btnG=Search+Froogle

    I don't see how a loud, hot old PC is necessarily better. And if you want an embedded system, those are normally quite pricey.

    I'm not convinced that using an old PC is the best way to go here. Hacking a WRT* might seem more reasonable -- but a lot trickier.

    I really don't like having lots of big boxes around, humming. But then I don't like games either.

    --
    http://www.thebricktestament.com/the_law/when_to_s tone_your_children/dt21_18a.html
  4. Good , but at a cost by Anonymous Coward · · Score: 1, Interesting

    I have played implmenting packet priortization in the same method they use on here (except on linux using dsl_qos_queue - www.sonicpsike.net).

    It works great but there is one major disadvantage. In order to have the queue on your side work, you must lower your upstream so that there is no buffering/queueing happening on your ISP's side.

    This is a problem becase it is that exact ISP buffering that allows you achieve higher upstream transfer rates. In my case (768 Kbs up), I lowered my maximum upstream from close to 80k to closer to 70k in order to reduce the ISP's sides queueing.

    I still have the system in place beacause it effectively allows my to be using alot of upstream bandwdith and still have fast download (and SSH console echos!). I sure would like to get that extra 10k back though ...

  5. Re:Linksys? by DigiShaman · · Score: 2, Interesting

    Both the v1.0 and v1.1 WRT54G routers have 16MB of RAM and a MIPS processor running at 125Mhz. The v2.0 of the same router has the 200Mhz CPU.

    If you have a WRT54GS, it comes backed with 32MB of RAM and a 200Mhz CPU also. That's some beefy hardware for just routing alone! Even better, these routers run on a version of Linux. The source code is available from Linksys for free.

    Screw having another bulky PC laying around. You can have my Linksys when you pry it from my dead cold hands!

    --
    Life is not for the lazy.
  6. didn't know that I had a gaming router by bullterror · · Score: 3, Interesting

    I've been using monowall for probably almost a year now, for a couple different routers. Here's why I like it. Put 3 net cards in a computer. 1 for the diesel modem, 1 for the LAN, and one for the wireless access point. Block all traffic from wireless to LAN, and then allow only VPN traffic in. You have free unencrypted wi-fi for friends and neighbors, and encryption for yourself far superior to WEP.

  7. Nice, but... by hecian · · Score: 4, Interesting
    Correct me if I'm wrong, but :

    Traffic shaping only affects UPSTREAM data.

    There's unfortunatly no 100% effective way a simple user could get rid of the queues at the ISP side during heavy downloads. ICMP Source Quench were supposed to be an answer to this, but the potential exploits lead many admins to simply filter them out. IMHO, 'gaming firewalls' could ease a bit latency on assymetric lines (ADSL mostly), but true QoS can only be achieved if _both_ ends do shape their traffic (the above applies to IPv4).

    As far as I've seen by experimenting myself, the benefit of such an assymetric setup is to prevent excessive pings (several seconds). Playing a FPS during heavy use is still a no go as it implies irregular ping, and an average of 100-150 ms. However, it's quite a nice setup if you plan to play some MMORPG or want to get connected through SSH.

    Regards.

    1. Re:Nice, but... by adrianmonk · · Score: 2, Interesting
      Correct me if I'm wrong, but : Traffic shaping only affects UPSTREAM data.

      Well, not necessarily. The crux of the idea is this: TCP adjusts the rate it sends based on whether (and when) it receives ACKs back for things it sent. And, two things can affect whether it receives ACKs: packet loss in the direction it's sending, or packet loss in the direction the ACKs are going.

      To make this more concrete, let's imagine a scenario. You are at home, you have ADSL, and you're downloading an ISO of your favorite Linux distribution from a web server. The web server is using a TCP connection, and the TCP connection needs to reduce its rate if it's sending too many pieces of that Linux ISO too quickly. But, it doesn't know what packets you got -- it only knows what ACKs you sent back. So, if it is missing some ACKs, it assumes that this is because it is sending too much stuff and saturating the link. So it sends less. But what if its assumption is wrong? What if it is the upstream link that is saturated and not the downstream? Then there is no problem at all receiving the packets from the web server, but the web server falsely believes the downstream link is saturated because it is missing some of its ACKs. Therefore, it slows down the rate it transmits stuff more than it really needs to.

      One could imagine a protocol that accounts for this: the two endpoints could not only send ACKs but could also keep track of packets that were retransmitted unnecessarily. From that, you could infer a certain amount of information about where packets are being dropped: if one end retransmits packets unnecessarily, it implies that quite possibly ACKs are getting lost rather than data packets. And it would be OK, in certain circumstances, for the sender to increase the rate it sends a little bit to compensate for this. But it seems like there could be some hidden problems with such a system, and to my knowledge TCP doesn't try to be really smart like this anyway.

      So, this is where traffic shaping comes in. If you are trying to download stuff and the upstream end of your link is saturated, you will have to drop ACKs, and as a result your download will slow down. So, the solution is this: (a) put a bandwidth limitation so that you never saturate the upstream link and instead queue things on the machine you control (not the cable modem, DSL modem, etc.), and (b) prioritize ACKs. When you do these two things, since you have never saturated the link, you can always almost instantly transmit ACKs, which means your downloads go faster than if ACKs have to wait or are lost.

      It's not a perfect system because you can't control the entire path, and some other piece might be saturated. But with the limited upstream bandwidth available on DSL and such, it could be really helpful in lots of cases.

  8. Re:wtf? by Covener · · Score: 2, Interesting

    f you RTFA this "game router" is really only adding traffic shaping/prioritization, which is something a middle of the road router can do anyway in FIRMWARE which will be lots faster than that software.

    Your typical cable routers "firmware" is either pf/netfilter or something very similiar, and isn't imparted any speedup.

    If your box did something like l7-filter in hardware, then you'd have an argument...

  9. Re: AMD DX4's still running... by neurocutie · · Score: 2, Interesting

    Actually I'm still running several AMD DX4's, with various versions of FreeBSD. A DX4 133 is about the same speed as a Pentium 100 and allowed many to upgrade their CPU speed without changing their motherboard, so actually there was a decent market for them, for a while anyways. AMD made 486's that could be clocked to 40Mhz bus speeds, and so the DX4 was actually capable of 160Mhz, which generally beat out Pentium 100's for many things (except floating point). Such machines have plenty of horsepower to run simple websites.

  10. Real math about the expense of gaming routers by stuartkahler · · Score: 2, Interesting

    So lets say you happen to have an old PC laying around unused and two NICs to stick in it. Let's then say you downclock the FSB and CPU to conserve power so that the machine only uses about 100W average. And let's say that the reason you need this type of router is to have good throughput on gaming and websurfing and still maximize your throughput on P2P apps that are flooding your connextion.

    So you're running a PC at 100W 24/7. At 8 cents per kwh, that comes to $5.76/month. Of course, your power probably costs 12-15 cents per kwh, and your old PC probably takes 150-200W power, so you're probably using more like $8+/month. Also add in extra air conditioning costs in the summer to offset heat from the extra PC you have running.

    I built a PC based router back when basic standalone units cost $250. Once they hit the $50 mark (two years ago, I probably paid more like $30 AR), I decided I was long overdue to buy one. I recouped my entire cost in less than 6 months. Unless there's something a $50 (now) Linksys WRT54g can't be modified to do, you shouldn't be bothering with a PC based solution.

    The only way the PC router solution makes any sense is if you also happen to be using it as a print and file server, or a PC jukebox or running ftp/http services.

  11. Sveasoft - AARGH by Animats · · Score: 2, Interesting
    We have three Linksys boxes running the Sveasoft firmware (for which we paid). The things clobber TCP packets whenever there are more than about three in flight at one time. We've actually put a packet sniffer on both sides to check this. I think their firewall is rewriting packets, and badly, even when it's supposedly turned off.

    Want to drive yourself nuts? Put a pair of Sveasoft-hacked Linksys WiFi units between a PC and a server, and try to do something intensive like a CVS checkout. The thing works OK when it's not the bottleneck, which is the case when you're talking over some low-bandwidth link to the outside world. But when the WiFi link is the bottleneck, something breaks in queuing.

    Yeah, we tried Sveasoft support. They're in denial about the problem, and we don't have time to debug it for them.

  12. Re:Gaming routers look pretty small, quiet and che by ionpro · · Score: 2, Interesting

    You can do lots of things to cool those PCs down though. Sleep (Suspend to RAM) or Hiberation (Suspend to Disk) are always good options if you aren't using the computer when it's not around. Personally, I use my computer 24/7 to do something, but you can still negate a lot of heat:

    - If you are using an Athlon 64, use the Cool'n'Quiet tech to dynamically clock your system down to as little as 800Mhz -- it sips power at that speed. To be fair, Pentium 4 Prescott owners also have a similar feature, but it can only clock the system down to 2800Mhz (or whatever the 14x multiplier would net you, if you are overclocking or underclocking your bus).
    - Take advantage of the automatic turning off of disks and displays available on any modern ACPI PC.
    - You can always underclock parts of your system, even dynamically. For instance, any modern nVidia GPU can be dynamically clocked down when running in 2D mode and then throttle back up when 3D apps need the power. I'm sure there are similar features for ATI GPUs.
    - For the more adventurous, you can buy water cooling kits, and place the radiator outside, or in a window blowing exhaust air out. Make sure your pump can move the water over the delta in height, though!

    My system has six disks in it (1x80GB system, 1x200GB "misc", and 4x300GB in a RAID-5), as well as 2 19" LCDs, so the hard disk and monitor features really help me out. I unforunately don't have a processor capable of dynamic clocking yet (I'm still on an Athlon XP), but I do dynamically adjust the bus down 25Mhz or so when I'm not using the computer heavily. For my laptop though, you can't beat suspend-to-disk: it takes about 14 seconds to boot in to Windows, exactly the same way as I left it. I've also offloaded all my critical services to an old, passively cooled PII/266 so that the desktop can be shut off as often as possible (e.g. when Remote Desktop and FTP aren't required).

  13. Re:I hope he's better at programming then at hardw by Anonymous Coward · · Score: 1, Interesting

    Just because you asked... the reason the DX4 is a DX4 and not DX3 (since it, as you pointed out, only triples the bus speed) was because of the enhanced amount of cache which according to intel allowed it the same level of performance as quadrupling the bus speed while not actually doing so - hence DX4. :)

  14. Re:Maybe it's just for fun. And it's cheaper. by Anonymous Coward · · Score: 1, Interesting

    Exactly. Some people just get their kicks out of using old hardware and doing something worthwhile with it. I recently saved an old box (AMD K6 200, 64 MB RAM) from an inglorious death at the landfill - luckily the previous owner, a good friend of mine remembered my fondness of computer-related junk and i happily went and picked it up.

    Now it has NetBSD installed (a superb OS btw), currently only NATing an ADSL connection and running apache and sshd - but possibilities are endless. I'm planning to add trafficshaping / firewall (pf), PHP module to apache, a plethora of P2P clients (amule, bittorrent, soulseek, etc), samba ... whatever else I might find amusing. It also has an old ISA radio card; I'm hoping to get it working so anyone could listen to FM radio over LAN (via ESD). Can't do that with your average soapbox-router.