Hack5.Prioritize Packets to Improve Quality


Hack 5. Prioritize Packets to Improve Quality

Voice traffic competes for available bandwidth on your broadband connection. If there is not enough bandwidth, packets get dropped.

VoIP media streams require a constant, uninterrupted data flow. This data flow is composed of UDP packets that each carry between 10 and 30 milliseconds of sound information. Ideally, each packet in a media stream is evenly spaced and of the same size. In a perfect world, a packet never arrives out of sequence or gets dropped. Voice over IP media packets are framed in a highly precise, performance-sensitive way, described in more detail in Switching to VoIP (O'Reilly). Dropped packets and packet jitter (packets arriving out of order) cause problemsbig problemsfor an ongoing call. These problems can cause the voices on the call to sound robotic, to cut in and out, or to go silent altogether.

Most of the packet-drop problems you'll encounter while VoIPing will be the fault of your bandwidth-limited ISP connectionthe link from the ISP's network to your broadband router. If you're downloading songs to your iPod, surfing the O'Reilly Network, and patching your World of Warcraft client all at once, you won't have enough bandwidth left over to support a VoIP call, but there's a way to curb all those applications' thirst for bandwidth so that you can still VoIP successfully. Read on.

To maximize call quality, the network connection carrying VoIP media packets must be as reliable and consistent as possible. The data link to the ISP should treat all voice media traffic with high priority. That is, a VoIP packet gets handled first, as it is more important than another packetsay, for your BitTorrent upload. If the data link is swamped and is out of capacity to carry any more data, less important packets are discarded before more important ones. The net resultfor high-priority services like voiceis better Quality of Service, or QoS. Several standards exist to ensure that QoS can occur in a broadband VoIP setup, chief among them: Type of Service (ToS) and 802.1p.

If your broadband router is relatively new, it might support these standardsso enabling packet prioritization is just a matter of flipping some configuration switches.

1.7.1. Prioritize Packets on a Linksys Broadband Router

ToS is a feature of Ethernet switches that permits packets tagged as high priority to be handled first, maximizing their QoS. 802.1p is a similar concept, but tends to hang around on routers, not switches. The Linksys BEFSR81 broadband router is a device that supports 802.1p. It sells for less than $100 USD online, and you can probably find one secondhand on eBay for even less.

In fact, setting up priorities on this router is a snap, thanks to Linksys's usual snazzy web-based interface. Once you get the router unboxed and hooked up, use the web interface to locate the QoS screen. (You'll see it after you click on the Advanced Configuration button and the QoS tab.)

The QoS screen contains two sections: one that allows you to establish queuing priorities for packets depending on their TCP/UDP port numbers, and one that allows you to alter the queuing priority depending upon which Ethernet switch port the traffic originated from. That is, since this router has a built-in switch, you can prioritize some of its eight Ethernet ports using the lower half of the QoS screen.

1.7.1.1. Prioritize RTP traffic.

Most VoIP media streams are carried by Real-time Transport Protocol (RTP) packets. To raise the priority of RTP traffic, enter the port numbers 5004 and 5005, each on its own line, in the section labeled "Application-based QoS," and click on the High Priority radio button for each. After restarting the router, all RTP traffic sent from the router will be handled before any other traffic. This technique is especially good if your LAN has multiple VoIP devices that send media streams through the router.

1.7.1.2. Prioritize all the traffic from your VoIP ATA.

If you have only a single VoIP device to support, like a TSP-provided ATA, it might be best if you tell the router to prioritize traffic by Ethernet port instead of by application, as in the preceding paragraph. Specifically, you want your router to prioritize traffic that comes from the Ethernet port where your ATA is connected. To do so, use the High Priority and Low Priority radio buttons for the numbered Ethernet ports. Set them up however you want and reset the router.

1.7.1.3. Prioritize all the traffic from an attached Ethernet switch.

By setting the priority of a particular Ethernet port, you are telling the router to prioritize anything from the device connected on this port, even if this device is another switch. So, an easy way to give priority to all your dedicated VoIP devices, like IP phones and ATAs, is to connect them all to the same switch and then connect that switch to a high-priority Ethernet port on the router.

1.7.2. Prioritize Traffic on a Standalone Switch

Many workgroup Ethernet switches offer QoS features that used to be found only on advanced "managed" switches. These days, inexpensive switches like the NETGEAR GS605 provide support for ToS and 802.1p. By placing such a switch between your broadband router and your VoIP device, with voice traffic prioritized, you can ensure that outbound voice streams get sent to your broadband router before anything else.

1.7.3. What Happens When VoIP Passes Your Router

Unfortunately, no matter how well prioritized and orderly your VoIP media traffic is when it's forwarded by your broadband router, it still might get slowed down, ripped up, and otherwise tattered as it makes its way across the Internet. The same is true of media packets that come from the Internet to your routerthe packets carrying the voice of the person speaking to you. Since you're receivingnot transmittingthose packets, you can't really prioritize them. That's the responsibility of the routers that carried the packet to your routerand many routers on the Net these days are ignorant of QoS.

In short, you can control traffic sent from your network, but not traffic sent from other networks to yours. At first blush, this sounds like a threat to broadband VoIP, but over the last few years, many have discovered that the outbound traffic is all you really need to prioritize to have success with a broadband TSP. This is because most broadband ISPs limit the amount of outbound bandwidth available to each customer to discourage customers from hosting high-traffic services on their residential broadband connections.

So, there's less available bandwidth to you for sending than for receiving. The VoIP media stream most likely to suffer as a result is the outbound stream, the one carrying your voice to the person on the other end of the call. As such, it's appropriate to prioritize outbound traffic to overcome the limits many ISPs force on outbound bandwidth.




VoIP Hacks
VoIP Hacks: Tips & Tools for Internet Telephony
ISBN: 0596101333
EAN: 2147483647
Year: 2005
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net