Home Routers w/ Decent QoS Performance?
danwarne asks: "With VoIP becoming rapidly more popular, quality of service (QoS) settings in home routers are also emerging as a key piece of functionality for the average user. QoS settings, which allows important or time-sensitive network traffic to be prioritized over less important packets, used to only be offered for corporate-level routers. Now, many hardware manufacturers have started including such capabilities in their mainstream routers, some doing it simply by a firmware upgrade without any change to the power of the underlying hardware. The emerging problem is that most home routers don't do a very good job at all with QoS, especially under heavy load (from P2P apps, for example), and home routers don't seem to have what it takes to prioritize sending Voice over IP packets first, leading to glitchy VoIP calls. VoIP operators around the world are facing this problem as they try to turn VoIP into a 'consumer-friendly' plug-and-play service. Does anyone know if someone has done extensive testing on home routers and modem/routers that investigates their ability to deliver QoS? Also, what hardware elements would be required in a router to do QoS reliably?"
WRT-54G(S) running sveasoft's firmware. Yes, some people question the legality of the distribution method, but at $60 for the router + $20 for the firmware subscription, it's an instant solution. I'm running it on a 1.5Mbps/96Kbps to manage bittorrent, emule, packet8, counter-strike, and websurfing, and it runs great. More important -- it passes the wife test (aka, she doesn't notice that I'm downloading while she's talking).
-- Is "Sig" copyrighted by www.sig.com?
Well, I am no expert but I can tell you my experience so far has been less than stellar. Products by Linksys, D-Link, and Motorola have QoS options that work reliably. That is only is you have no expectation of performance as far as gaming, P2P, or even web surfing is concerned while you are using your VOIP. The problem is that the number of connections that they allow (for security reasons) is far too low to allow any real use and the settings are hardcoded. As soon as you hit that limit (whatever it is), performance goes right in the crapper.
I built a RedHat box running dual NICs and firestarter that works amazingly well. Still working out QoS on Linux though. As long as I don't hit 70% utilization up or down, I have had no problems.
nos laetus epulor qui would domito nos
Then install the Sveasoft firmware. The shipping version is free, access to the beta version & support for it is US$20. Some folks dissaprove of this strategy but the FSF has green-lighted it and it does pay for the project.
QoS, VPN (endpoints), SSH, filtering, upped antennae power, it's all there. They've extended the Linksys web interface to handle most of the expanded functioniality and below that there's a real working Open Source Linux with a happy command line.
Sure it's not an old clunker running something else. It's also small, quiet, stable, wireless if you want to take advantage of that. I dunno about you but being able to replace a 24/7 big noisy hot box in my living space with a smaller quieter cooler one is worth the small premium.
I don't read ACs: If a post isn't worth so much as a nom de plume to its author then I wont bother either.
A friend of mine wrote his master thesis about optimizing the usage of asyncrone internet connections (often ADSL connections). He used our dorm as a living experiement, we have 307 people living here, and share one 8196 kbit down / 768 kbit up ADSL connection. All our ports are open and everyone has a puplic ip address (well almost, because we only have a /24).
The results are very very good. The link is actually useable now. SSH connections are quick. people can and does use p2p without trouble. VoIP works most time of the day, but during "rush" hour it is not possible, most likely because we are just too many users for such a small connection. Games might also work at some time during the day, but i dont game so i wouldnt know. I do hear that some people complain that they can not game. The rest is good, SSH, HTML, news, irc/IM and other chats works as well. Try it, and you dont even have to limit your bandwidth.
http://www.adsl-optimizer.dk/ contains his master thesis.Are you trying to control QoS between two endpoints over the public Internet? If so, tagging the voice traffic leaving your router isn't going to do much good since once you hit the rest of the Internet the other routers on the trip to your destination will immediately disregard any QoS settings that your router has set. Otherwise we'd have boneheads sitting at home configuring their routers to send all their gaming or P2P download traffic with voice level priority. You currently can't control QoS over the public Internet.
The big issue with QoS is that your ISP also has to support it, or you don't get the benefit of it.
Consider the case of downloading a big file, and trying to do VOIP. The incoming VOIP packets and the incoming download packets hit your ISPs router.
Now, unless the bandwidth between you and your ISP's router is larger than the bandwidth between your ISP's router and the rest of the world, there will be an outstanding queue of packets to be sent from the router to your computer. If the router does not honor the QoS bits of the incoming packets, and send the VOIP packets first, then your VOIP will be choppy, even though your router is sending all outbound VOIP packets out first.
Moreover, even if your ISP supports QoS, if the machine generating those packets does not set the QoS bits correctly, there will be no way for your ISP's router to assign meaningful priorities - so even though you've tweaked your system to set the QoS on outbound packets correctly, if you are talking to Aunt Tillie, and her computer is not setting the QoS bits, then the incoming traffic will not be sorted correctly.
www.eFax.com are spammers
If you don't have oodles of bandwiddth and want to be able to talk and play network games at the same time, maybe you should stick with a telephone solution not using the public Internet, such as an RBOC land line or digital service from the cable company. Not as cheap as Vonage, I will admit, but if you have to buy more bandwidth from the ISP to do everything you did before, why change?
...
OpenBSD would be great to learn on as it will definately push you into the documentation and get you used to some of the conventions used (slices v. partitions, startup scripts, etc.). I'd suggest you use an older or spare computer if you've got extra or can pick one up cheap. You could also just set aside space on those 80 gigs you've got. READ UP ON PARTITIONING, USE OF LARGE DRIVES, ETC. BEFORE YOU START ANYTHING!
Once you get some OpenBSD under your belt, put a box in service at your network connection (right behind you cable/DSL connection?) and learn to setup pf (packet filter - built in). Experiment with AltQ and get yourself a good firewall/NAT in place (junk the Linksys). Not too much trouble and the docs at OpenBSD - pf [openbsd.org] are quite good. Here you could experiment with adding a web server or MTA (if you don't have tons of boxen to keep your "real" services in some kind of dedicated DMZ). My home OpenBSD box forwards BitTorrent, Freenet, VNC and SSH to a variety of machines in my house. I also prioitize packets in the following order: 1st to tcp_ack_out, [then] Vonage telephone, ssh_interactive, everything else, freenet, and finally ssh_bulk. Keeps my phone line crisp and prevents freenet from destroying my ssh sessions' latency. You can do this with other products but I've had a good time (and have learned quite a bit) constructing my
Then build youself a FreeBSD box. This should be cake. 5.x should install without a problem for you and you've got access to all the ports you could ever imagine. Your experience with OpenBSD will help you understand some of the differences you'll encounter. Makes a great desktop. OpenBSD will work fine as a desktop machine but I've never done it. Same for NetBSD I suppose. Give it a whirl. I'm sure you'll learn a ton and be quite happy with whatever you decide.
Don't short yourself on learning OpenBSD. It is awesome, security aware and has some wonderful features (need encrypted swap case the feds might knock down your door at any minute? check.). It may just serve all your needs and knowing it is surely going to be useful to either yourself or others in the future. Use it for utility and the ability to sleep at night with your data behind it. (still better go with RSA keys on sshd though). Check out http://undeadly.org/ [undeadly.org]
Don't short yourself either on checking out FreeBSD. I moved from Linux to "the beast" some 5 years ago and haven't looked back since. The 4.10 machine I use everyday has been up 168 days as of today. I had at shutdown the machine previous to that due to a scheduled power outage. It sits fully exposed on an unprotected IP and runs user apps, a web server and mail. Not a single problem in years. FreeBSD has certainly served me (and some clients of mine) well.
If you're a system developer or like playing with things at the driver level or experimenting with new code, new systems or want to put your toaster on the network, don't deny yourself a NetBSD 2.x install. Wonderful features at the leading edge. Very capable and I hope to get some more experience with it myself one day. (a NetBSD page)
Learn OpenBSD. You won't regret it. [FreeBSD and NetBSD will run pf as well]
Here's the juice: (yes - read the docs and modify for your own setup. The various sections need to be in a certain order too (options, normalization, queueing, translation, filtering)
The big issue with QoS is that your ISP also has to support it, or you don't get the benefit of it.
You don't get the full benefit, but you can still use QoS to shape incoming data streams, at the expense of giving up a portion of your inbound bandwidth.
The way this works is that although your ISP will send whatever packet is at the head of the queue, your router can still reorder the incoming packets before delivering them to your computers. That looks, at first glance, like a silly idea, since the router has the data and there is no bottleneck across your 100Mbit LAN, why shouldn't it just deliver what it gets?
By delaying, or even discarding, inbound packets, your router can use TCP's throttling mechanisms to slow the rate at which the origin server sends data. When the origin server doesn't receive acknoledgement that a packet was recieved, it not only retransmits that packet (after a delay), but it also adjusts the window size. This is a critically-important property of TCP. Without it, every connection that crosses a low-bandwidth link would suffer lots of dropped packets and would have lots delays during which even the slow link is idle. That doesn't happen, because TCP automatically "tunes" every connection to a rate at which the traffic flows smoothly.
When your router drops inbound packets of a download that exceeds the amount of bandwidth the router wants that connection to consume, TCP adjusts the data rate downward until not many packets are dropped.
So, if your router "knows" the total incoming bandwidth, and if it can track all of the incoming data streams, it can dynamically choose a target bandwidth rate for each of those streams, and then enforce that rate by discarding packets whenever the stream exceeds its target rate. Linux QoS capabilities also include "random early detection", which randomly chooses to occasionally discard a packet from a stream that is close to its target bandwidth, to keep it from going over even briefly.
The downside of this QoS is that in order to make it work effectively you have to make sure that the ISP rarely queues packets and hardly ever discards them. To do that, you have to configure your router to divvy up an incoming stream that is slightly smaller than you really have, because this sort of "remote control" of the origin servers' data rates is imperfect and you will get occasional "blips" of over-target incoming data.
Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
The WRT54G also has serious thermal problems when the CPU operates at heavy load.
A friend of mine bought one, it would crash every 10-15 minutes if you were running WEP with light-moderate WLAN use.
30 minutes or so if WEP were off.
2-3 hours even at moderate-heavy loads if you were only using the wired ports.
Best bet might be some sort of Mini-ITX box.
retrorocket.o not found, launch anyway?
Look at your other hardware. If your router can put packets out at 100Mbps, and your cable modem can put out packets at 1.5Mbps, implementing QoS on your router won't get you anywhere--you're router's packet queues are empty. Your cable modem needs to implement QoS too. Cable modems have huge packet queues and can introduce whole seconds of latency--they're usually optimized for throughput only.
You've got, as I see it, three potential solutions:
There's more to designing a network archetecture than just buying the hardware. You have to really understand what each element of your network is actually doing.
"With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea...."
RFC 1925
Now I understand why QoS works so poorly on my router.
How does pf differentiate between ssh_bulk and ssh_interactive?
Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/
The sshd program sets the tos bit in outbound traffic. That lets upstream hops determine which port 22 packets are bulk and which are interactive.
you can still use QoS to shape incoming data streams
This sentence is so wrong it's not even funny. To paraphrase Linus, "it's so wrong, that even if it were right, it would still be wrong."
First off, you *can't* shape incoming data - you can *police* it, but you can't shape it (because you've already received it.) Shaping refers to altering the traffic flow by delaying packets. You can't delay something you've already received.
Second of all, QoS does not shape or police data at all - it has to do with assigning priority, which the router uses for advanced queuing. Note that you can *use* QoS to shape your data, but not the other way around.
Also, 'reordering' packets has *nothing* to do with shaping or QoS. Reordering has to do with individual TCP streams. What you're talking about is called *queuing* (more specifially prioritized queuing).
Do yourself a favour and go get a *real* book on this stuff, you'll look like a lot less of a moron.
The 806 is a dual Ethernet router that will do a good job with QoS. It handles Low Latency Queuing for VoIP (essentially priority queuing - whenever it sees a VoIP packet - or any other type you define as high priority - it places it at the head of the output queue. It also supports Committed Access Rate (CAR) for restricting traffic rates for traffic patterns that you define (e.g. by IP address, protocol, mac address, combinations of these). Class-based traffic shaping which smooths the output rate to specified bit rates. CAR polices, shaping controls the actual rate of transmission. It also supports a number of other congestion management features along with a good deal of Cisco's higher end features.
The 831 is similar to the 806, but includes a built-in hardware accelerator for encryption that enables 3DES at rates of 2 Mbps or more.
The 1710 includes all of the above, including the encryption module, and many more features for QoS and general router functionality.
All of the above support a stateful firewall, IDS signature matching, syslog, etc., etc.
If you like/need a web GUI, then the 831 or 1710 are the way to go. Be sure and download Cisco's SDM for greatly improved web-based configuration and management.
Data sheets for the above can be found in the following locations:
806
831
1710
SDM
Wow, very cool :)
That's very similar to what I hope to set up with my OpenBSD bridge. Now to profess my ignorance: You're queueing everything on the external interface (flowing to the Internet) but nothing on the internal*? Is that the recommened practice for a small home/office?
* I can see the mistake I made here. With a bridge I should only try and filter on one (the external) interface.
"The number of Unix installations has grown to ten, with more expected." (Unix Programmer's Manual, 2nd ed.; june 1972)
BEFSR81 and WRT54G both have QoS configs and both work fine. The big problem with VoIP on a home LAN is you'll have an awful latency problem when using fast connections with the likes of bittorrent.
Then you can't go wrong with either the Linksys RT31P2 (Wired) or the WRT54GP2 (Wireless B/G).
Both are combinaton routers / ATAs in one device, so QOS is quick and seamless.
Only down side that I can see is that they only have three physical ethernet ports each (not counting the WAN port), so if your wired network is more than three nodes, you'll need a switch or some other additional solution.
The firmware even lets you control QOS further, by connection (LAN port 1, 2, 3, etc), by "application" (FTP, HTTP, Telnet, etc), or by specific port numbers.
Of course both these devices are proprietary and won't work (as ATAs at least) with VoIP providers other than Vonage. But if you want, I suppose you could jerry rig something with annother ATA as an end point, just using these for the QOS control.
Touch everywhere, even when inappropriate.