A bit of a "light" technical topic, but I've talked about this a few times to some non-tech folks who've set up their home or SOHO (Small Office/Home Office) network and were looking to improve performance of their internet connection. The frequent complaint: internet slowdowns particularly when multiple applications and/or multiple users are running demanding applications. In a nutshell, the problem is that we're often demanding more from
our internet connection than it can provide. When this happens, the
data begins to backup like sand in an hourglass.
The answer to this is QoS (Quality of Service), a generic term for packet shaping or scheduling to help prioritize network traffic. This problem has grown substantially as our reliance on bandwidth consuming devices have become more pervasive. Downloading files and surfing, VOIP, streaming content, X-BOX/gaming, etc... it all adds up, and QoS helps solve the issue.
If you use Vonage or similar VOIP technology and want to hear
what this sounds like, call a friend, and then hit a bandwidth test site like Speakeasy's
that attempts to max (or flood) your connection. The stuttering and breakup should be painfully obvious. Note: if you're using a VOIP phone that doesn't use your internet connection's bandwidth (many cable VOIP providers use adapters that are independent from the cable modem) you don't need to worry about QoS for VOIP.
When the bandwidth demand exceeds capacity, QoS will prioritize the data and services so we can ensure high priority data always has bandwidth, but also allows low priority data to use as much bandwidth as possible without interfering with more important packets.
Windows supports QoS at the software and hardware levels and you may have noticed the QoS Packet Scheduler service similar to the image shown here. For SOHO networks, this should generally be disabled (though, contrary to popular belief, it's really not hurting performance to leave this enabled). Most of the time, the QoS service is used in larger organizations where QoS policies are distributed via Group Policy that is set up and managed in Active Directory. The idea is to have a central location for managing network bandwidth internally. In this case, though, we really don't need this level of management. We're only interested in managing the internet bandwidth, since the "choke-point" is the internet connection alone.
If you're using a Windows XP (or Vista) machine running ICS you can use Windows QoS, but to be honest, you're better off with a dedicated SOHO router. Setting up Windows QoS is not simple, and dedicated routers are cheap, easy to setup, and maintain. They often offer more features, such as wireless access points, etc. (And, I know, most run Linux.) In my case, I run a Linksys WRT54G with the DD-WRT Firmware
. (If you're using the popular WRT54G, I'd highly recommend using the DD-WRT Firmware -- it's really nice.)
Even with the stock firmware, QoS features are available (but more limited). When you log into your router, the QoS page is often on the Applications or Administration tab. To start, you need to enter your max upload and download speeds (you can use Speakeasy
or other network speed test to determine your max upload and download speeds). You want to make sure that whatever max throughput you have, you only enter about 90% of your max since speeds vary throughout the day.
The DD-WRT firmware (and many others) offer different ways to prioritize traffic.
I'd advise against using the ethernet port priority. This allows you to specify QoS priority based on which port a device is plugged into -- this isn't generally a good practice. (Should the cables ever be switched around, you're in trouble.)
MAC priority allows you to specify a priority to a device on your network as a whole -- for example, a VOIP appliance. It's here that I've specified the address of my VOIP device, setting all traffic to premium to ensure my VOIP calls are never interrupted. Of course, you can also specify the MAC address of a computer on the network to set all traffic from that machine as either high or low. (I set my wife's machine to low priority ;))
The Netmask priority allows you to set traffic priority in a specified IP range. This is really useful if you have half a dozen VPCs or other devices running in a certain IP range and want to prioritize the entire lot. It's helpful to use a netmask calculator
when figuring out IP ranges.
Finally, and most importantly, is the Services priority section. Most of these applications use an L7 filter which uses regular expressions on packet headers to match a signature of an application. The advantage of this approach is that it doesn't matter which port the application uses (hence the 0~0 symbol) ... for apps that may vary the port (such as those using UPnP), this is immensely useful. This sheer coolness comes at a price: as most developers know, regular expression pattern matching is an expensive operation. While this isn't done on every packet, it's still expensive, so you want to be selective on which applications are specified to keep the processing overhead to a minimum.
If you'd rather specify a specific port, do so by setting up the application manually and entering a specific TCP/UDP port or port range. This will save some processing overhead compared to the L7 filter.
Anything not specified gets put in the "standard" priority class. Each class generally guarantees a certain minimum percentage of bandwidth, so it's impossible that any single application will be denied any bandwidth.
To get going, start small and build up. Keep the QoS implementation simple. Now, let's talk about the 2 main drawbacks:
1. You need to periodically check and be aware of what your connection is capable of. That means turning off QoS, and running bandwidth tests, and resetting your up/down thresholds accordingly. Most of the time, this is in your favor as providers are often increasing your bandwidth.
2. Technically speaking, inbound QoS is a bit of a hack. While the router can control the outbound flow of data, it cannot control the inbound flow of data. (If you think about it, you're asking the router to slow down the data after it's already received it ... hardly useful.) The router deals with this by dropping/delaying packets. In some situations, this may have an adverse affect, but generally it gets the source to slow down and "settle."
That's it ... now go QoS. Good luck!