QoS is short for "Quality of Service". This is a relatively broad subject that can be implemented in a number of different ways. Note that a complete QoS solution includes a technique and application for all of the following needs:
1. Interesting Ports
2. Traffic Classification
3. Priority Queuing
4. Bandwidth Management
- Latency
- Jitter
- Packet Loss
5. How does Rate Limiting work
For QoS to be successful, a solution for both your LAN and WAN (Internet Connection) will need to be deployed in a way that they work together. This article will provide a high level overview of the subject, and site examples for solutions for each problem that QoS is designed to address.
Interesting Ports
VoIP, as with any technology that uses the Internet, relies on standard ports and protocols in order to transport traffic from A to B. The following are ports that some IP PBX depends on for operation:
•UDP 5060 - VoIP signalling. This port allows a call to be created and tore-down when you are finished speaking.
•UDP 10000-20000 - RTP aka audio port. For each phone call, the system randomly chooses an available port in this range, then uses that port to carry audio (your voice) to the other phone. Any port within this range might be chosen for any call, therefore all ports need to be open to the IP PBX.
•UDP 4569 - IAX2 port. If you have an IAX2 trunk from a provider like Teliax, or you are using Linked Servers, you need to have this port open to and from the IP PBX. IAX2 technology uses the same port for call setup, tear-down, and audio. In other words, with IAX2, this is the only port that matters.
No other ports are required for functional VoIP on your IP PBX. Most IP PBX systems support other technologies like H.323, GSM, ILBC, etc., but by default none of these other technologies come into use. SIP is the most prominent standard for VoIP in use today, so most IP PBX phone systems has standardized on this technology while leaving the option available for other technologies should they become more widely accepted in the future.
Traffic Classification:
In order for any QoS solution to work, your IP Phones or network equipment must have a reliable method of identifying what traffic on your network is VOIP, and what traffic is not. Here are some examples of classification methods:
* By MAC Address on a LAN (IEEE 802.1P)
* By TOS Bit (Type of Service)
* By CoS (Class of Service)
* By DiffServ (Differentiated Services)
* By 802.1Q VLAN (Tagged VLAN)
All VOIP phones should have the ability to do TOS bit settings. Most also have the capability to mark packets with CoS and support 802.1Q. Some also support DiffServ. You will need to select a traffic classification technique that either your network equipment supports (like 802.1P) or that your IP phones support (like ToS or CoS).
Almost all modern "managed" switches have the ability to use an 802.1Q tagged VLAN configuration. This works by configuring your IP phones to belong to a particular VLAN number so that your switch will recognize them as belonging to your VOIP QoS profile. All Cisco, Polycom, and Aastra IP phones support this configuration technique for traffic classification.
Priority Queuing:
Once your traffic is classified so that your network equipment can recognize it as VOIP traffic, it must then be configured to belong to a particular priority queue on your switches and routers. This is what enables your network equipment to provide a higher priority of service to your VOIP traffic when compared to your ordinary internet traffic. Many LAN switches such as the Linksys Business Switches support the use of a priority queue based on a CoS value set on the IP Phone.
Note that for best results, you need to implement priority queuing on both your LAN, and your WAN (Internet Connection). Because your WAN is usually only a fraction of the speed of your LAN, it's the most likely place where congestion may occur, and is the most important place to configure a priority queue.
Simply placing VOIP packets into a priority queue may not be enough, depending on the demands of your network. See the next section on bandwidth management for information about an application of technology that will result in even better audio quality and VOIP performance over your WAN.
Bandwidth Management
Bandwidth Management is a router's ability to control the flow of traffic through its interfaces for the purpose of keeping the WAN circuit from becoming congested, which can lead to audio quality problems on your VOIP (or telecommuter) calls. Routers that support good bandwidth management are rare. An example of a good one is the Edgewater Networks EdgeMarc 4200 Series router, and the securecomputing SG560 router.
Bandwidth Management can be implemented using an end-to-end technique relying on a reservation protocol like RSVP. However, support for this protocol is absent from many networking devices and IP phones, so it's difficult or impossible to implement.
Rate Limiting, a subset of Bandwidth Management can be implemented using numerous different routers, and is a valuable tool for good VOIP performance on your WAN. The problem that you must be most careful to avoid is traffic congestion on your WAN link. This can be a problem for a number of reasons:
Latency
Latency is the time it takes for a packet to make a round trip. The longer the latency, the more delay there will be on your phone call. Additionally, as latency increases, the chance of hearing echo on your calls increases, because your echo cancellers are limited to a small window of time where they can cancel echo out.
Jitter
If your WAN circuit becomes congested, the speed of packet delivery over the circuit will become inconsistent. Some packets will get through quickly, and others will be delayed while the circuit is busy transmitting other packets. This variance in packet delivery (or latency) is known as jitter. This almost always happens when the packet buffers (transmit and receive buffers) have packets in them. The goal is to keep the buffers empty as much as possible so that VOIP packet delivery is never delayed.
Packet Loss
If your packet buffers become completely full because there is too much congestion on your WAN, then the router will drop some of the traffic. This is horrible for VOIP, because it will result in pieces of sound to be missing from your calls. This should be avoided at all costs. Any packet loss at all is bad (even if it amounts to 0% of the total traffic).
By using a Rate Limiting Technique, your router can reduce the flow of TCP/IP over your WAN, and leave some room available for your UDP/IP VOIP packets to flow with no restriction. A good configuration will result in empty packet buffers at all times, and no more than 80% total utilization of your WAN circuit. This will minimize jitter, and prevent packet loss because of latency.
How does Rate Limiting work?
Each TCP/IP session uses an automatic traffic throttling technique that determines how much data should be transmitted in each packet. This is known as the window size. By adjusting the timing of the ACK packets and using a technique called a "window drop" the router can actually trick the sending host to send less data and use less bandwidth for any given TCP/IP connection. This technology makes it possible to set limits that limit all TCP/IP traffic to say half of your total WAN bandwidth. This is very effective at limiting protocols like HTTP (web), POP3 (email), SMTP (email), IMAP (email), and almost any other TCP/IP based protocol. This way, half of the circuit will always be left available for your VOIP traffic. If the router is good at policing the traffic, you will get good VOIP performance that's jitter and packet loss free.
Sunday, November 1, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment