Showing posts with label Packet loss. Show all posts
Showing posts with label Packet loss. Show all posts

Issues facing WLAN technology

It should come as no surprise to anyone that there are several issues faced with a WLAN deployment. These issues can be very complex, so a careful understanding of RF technology is needed to successfully deploy a WLAN. There are several factors that can affect the radio waves being sent out by WLAN devices, causing corruption, loss, gain, and many other issues. I will discuss these issues now.

First I would like to touch upon loss. Loss occurs when there is a decrease in signal strength. Loss can occur both before and after the signal hits the air. It can happen for a variety of reasons, such as resistance in electrical cables and obstacles. Like all electrical signals, RF signals weaken as they get further away from the source. Obstacles, such as brick walls, will decrease the strength as well. As an example, the apartment in which I live is in a brick building. Forty years ago, when the building was converted from a single-family home into a multi-unit dwelling, there was an extension built onto the back of this brick building to provide a kitchen area as well as a fire escape. I have most of my computers in the front half of this building, but we often take my wife’s laptop into the back part of the building, as it is handy to look up recipes and perform other tasks while in the kitchen or dining room. Something I noticed right away was that as soon as I left the room containing our wireless router the signal strength went from five bars down to two bars. By the time I reached the back of the house I was no longer able to access the wireless network, as the signal strength had degraded so much in that short distance. When the signal passed through the brick wall, I experienced obstruction loss. As I moved further away from the access point I experienced path loss.

Gain is another factor affecting RF behaviors. Gain is almost the opposite of loss, but not quite. Gain is an increase in the amplitude of the RF signal. It can be caused by the use of an amplifier or a high antenna. An antenna can not amplify a signal, but it can focus it, thereby increasing the amplitude. The ability of an antenna to focus a signal is called gain. It is possible that a device may be able to receive a signal that has significant gain but it will not be able to establish two-way communication. If you are implementing a situation where gain is required, it is optimal to implement gain on both ends.

Lobe refers to the amount of coverage area of an RF signal sent from an antenna. An antenna with gain can focus the area of coverage and narrow (or focus) the lobe so that it has less coverage vertically, but more coverage horizontally. This will increase the range of the signal while decreasing the amount of up-and-down coverage area. This is ideal for long-range wireless communications from one point to another, as the signal can be focused directly on the receiving antenna.

Refraction occurs when an RF signal passes through an obstacle and bends. Refraction can cause the RF signal to be diverted from its intended destination. This is particularly a problem on long-distance point-to-point links.

Diffraction occurs when an RF signal bends as it passes around an obstacle. Diffraction can result in the distortion of an RF signal.
Scattering occurs when an RF signal bounces off a rough surface, or off of particles in the air. Both situations cause the RF signal to scatter in many directions.

Absorption occurs when an RF signal is absorbed by an object and is not allowed to pass through at all. The problem here should be obvious!

Finally, reflection can occur when an RF signal bounces off a large obstacle, causing degradation of signal strength. The receiving end receives the data through both the direct wave and the reflected wave and attempts to process both signals simultaneously. This can cause a multi-path signal, which can become a serious problem. If the multi-path signal is 180 degrees out of phase with the original signal, the two signals can cancel each other out! Mathematically speaking, the degradation of signal strength occurs at a fourth power of distance, or Strength = -1/d4.

There are also some delay issues that are expected with a WLAN. As mentioned earlier, WLANs use ACK packets to signify that the data has been correctly received. If a packet is not received, an automatic repeat request (ARQ) is used by the WLAN to request the retransmission of the packet. In a VoIP environment delays can be experienced while the data is being retransmitted. Delays can also be experienced because forward and reverse direction MAC flows that the WLAN uses to maintain link reliability and control use bandwidth as well. Since stations are always contending for access to the media we can experience further delays. Typical WLAN delays include:

1. Interframe Space (50 μs)
2. Back off (average of 80 μs)
3. Synchronization Preamble (192 μs)
4. Data (approximately 171 μs)
5. Gap between Data and ACK (10 μs)
6. Next Preamble (192 μs)
7. MAC ACR (11 μs)

As we can see, we can expect an average delay of 706 μs. In addition we can expect to see further delays on our WLAN as we add more MUs to the network, each trying to compete with each other for access to the medium.

Quality of Service

As I have mentioned before, packets are transmitted from one end and recompiled at the destination. Not all packets will necessarily take the same path to their destination, which means that they may not all arrive in the same order they were sent in. We can also experience packet loss. In a data network, if a packet is lost or discarded, it is simply re-sent. In a VoIP environment this is not an option. All packets are time-critical and must be received in a timely fashion. We can’t wait for a packet to be re-sent! Quality of Services tries to ensure that time-sensitive packets are given priority over data packets. Other considerations include the amount of packet overhead and the size of the packets. A smaller packet size is more tolerant to packet loss, but every packet has a fixed amount of overhead. For Ethernet, this is 40 bytes. Packet size must be considered when we calculate the bandwidth requirements for our network.

There are several methods that can be used to ensure quality of service in a VoIP network. First I would like to look at Call Admission Control (CAC). CAC can help prevent network congestion by limiting the number of calls that can be active through various nodes in the network. Without CAC, voice quality in the network will decline as the number of calls increases above the recommended utilization. CAC can be defined by a number of rules, including (but not limited to) time of day restrictions, user-level restrictions, VLAN restrictions, IP restrictions, and many more. Policies regarding CAC should be developed at the time of implementation to ensure that problems do not arise down the road. If an organization outgrows it’s CAC policy more bandwidth may be required to grow the voice network.

A firewall may be another factor that affects Quality of Service. Firewalls restrict traffic coming onto and leaving the network based on security rules. An improperly configured firewall may block voice traffic in one direction or another, or both. This can result in one-way speech or no-way speech. It is necessary to open the required ports on the firewall to allow voice traffic to pass through. An even more effective method of managing your firewall would be to have a firewall that specifically recognizes VoIP packets and allows them through.
Network Address Translation (NAT) is another common problem with VoIP implementations. NAT allows multiple devices on a private network to have access to a public network through a single public IP address. VoIP does not work well with NAT, as the originating IP address does not correspond with the external IP address, and the originator is deeply embedded into the packet when it is sent through the NAT server. When the packet is returned to the NAT server, the server is unable to identify where the packet should be sent, resulting in one-way speech. Some new NAT servers are able to understand and process VoIP communications, however.

Packet Delay is also another important consideration with regards to Quality of Service. As delay increases users will start to experience loss, delay, and jitter. With any VoIP implementation there is a fixed delay as the packets cross the network. Fixed delay is also referred to as latency, and is defined as the minimum time it takes from speaking at one end to being heard at the other end. There are many factors that affect packet delay, including the CODEC, network topology, serialization delay, propagation distance, and link delay. As delay increases, the usability of the voice signal decreases. A general rule of thumb with regards to delay is:

Toll Quality < 100 ms < Good Quality < 150 ms < Potentially Useful < 400 ms < Poor Quality

Additionally, Serialization Delay is an issue caused when data is going from a high-speed pipe to a low-speed pipe. The high speed pipe can quickly overwhelm the low speed pipe with information, particularly if QoS policies are not maintained. This can result in jitter and packet loss as the low speed pipe tries to handle all of the data that the high speed pipe is feeding through to it. Serialization delay issues can be solved fairly easily. First you must implement fragmentation. This divides the large frames into smaller frames, which allows for interleaving. Interleaving is the process of allowing smaller frames to be transmitted in between the fragments of the larger frames. If you fragment without interleaving you will actually increase serialization delay, however, as each packet will still have a fixed amount of overhead. Additional overhead will cause more data to be transmitted across the network, resulting in further serialization delay. Nortel recommends only implementing fragmentation on links that require it, primarily links with less than 1Mbps of bandwidth. Fragmentation is set by using the Maximum Transmission Unit (MTU) setting. There are a few formulas for calculating MTU and serialization delay:

Serialization Delay: MTU (B) x 8 / link speed (bps) = Delay (s)
Serialization Delay: MTU (b) / link speed (bps) = Delay (s)
Ideal MTU: link speed (bps) * 0.01s / 8 = Ideal MTU (b)

Packet Loss Concealment is another solution for QoS. Packet Loss Concealment is a method by which the CODEC will guess as to what the missing packet contains. It is not supported by all CODECs, but is an effective way to ignore lost packets without sacrificing much call quality. G.711 does not support PLC, as it transmits PCM data, but G.729 does.

Finally, there is a single solution to a large number of QoS issues: Increase bandwidth. When more bandwidth becomes available, almost all QoS issues disappear.

Recognizing QoE Problems on the User’s Side

Most IP networks use a best-effort delivery system and treat all IP packets equally. Traffic can experience different amounts of packet delay, loss, or jitter at any time. With data applications this isn’t an issue, and just affects the speed of transmission. With VoIP networks this does become an issue, however, as VoIP is a real-time protocol.

Speech breakup may be perceived by the user as distorted, like the signal on a digital cellular telephone when the user is getting out of range. Speech clipping seems like parts of words are getting cut off. When the user complains about pops and clicks on the line it usually means that there are dropped packets. Echo means that the user hears their own voice reflected back to them from the other end. These symptoms have all been addressed in previous posts.

VoIP Network Design Considerations

Combining voice and data on a single network offers much efficiency in terms of cost. There are a number of considerations, however, when implementing real-time solutions like VoIP. A real measure of the performance of a VoIP network is the Quality of Experience (QoE). This is a subjective measurement of a user’s perception of the quality of calls. The user’s perception can be affected by things such as the CODEC used, sound fidelity, end-to-end delay, packet loss, jitter, and echo.

The clarity of the voice signal is dependent on the performance of the CODEC and the rate of lost and discarded packets. I will discuss CODECs at great length later, so for now I will focus on packet loss.

There are two types of packet loss in a VoIP environment: True Network Packet Loss and Jitter Buffer Discard Loss. True network packet loss occurs when a packet that is being sent across the network does not reach its destination. This can be as a result of data corruption, as each packet is checked by each switch and router to ensure that it is still intact. If the packet has become corrupted the switch will drop the packet. Other causes of packet loss can be switch congestion (too many packets are being sent across the switch and some are dropped to ensure that others are delivered) or a duplex mismatch occurs. In a data network this will be automatically corrected by the system receiving the data. If a packet is dropped in a data network the receiving system will ask the sending system to forward that packet again. In a VoIP environment, however, we do not have the time to wait for anything to be retransmitted. Due to the small amount of voice data in these packets, a VoIP implementation will be able to handle the loss of some packets with minimal impact. Quite often the loss of even more than one packet is not noticed by the end user. Jitter Buffer loss is a bit more complex than just having packets go missing. Jitter occurs when packets are received out of order. To avoid this problem, most VoIP implementations use a jitter buffer, which allows the data to be re-assembled in the correct order at the receiving end. Packets are not always received in order due to the nature of the IP network. Since it is connectionless, packets follow the best route they can find to their destination end-point. Each packet is independent of the other packets and may take a different route, depending on network conditions and a number of other factors. Jitter buffer loss occurs when a voice packet is delayed beyond an acceptable limit as defined by the jitter buffer. There are a number of reasons we can see jitter occurring, such as serialization delay (when packets are stuck behind large data frames waiting to be transmitted over slow links), or when frame relay circuits are oversubscribed. Another common cause of jitter is having half-duplex links in the media path.

A third issue that affects VoIP QoE is echo. Echo occurs when there is an audible leak-through of your own voice into the receive path or the send path. This is usually caused by an impedence mismatch in the 2-wire or 4-wire connection on either end. The amount of time for a round trip of the voice affects the amount of echo. The rule of thumb is 10 ms or less and there is no noticeable echo. From 10-30 ms, the users may notice a hollow sound to the voice. Above 30 ms there is a noticeable echo. Echo is a big problem when converting from PSTN to VoIP. Echo cancellers in the PSTN suppress the echo amplitude so it can’t be heard. Because VoIP uses a built-in delay the echo may be noticeable. Techniques to control echo include a properly designed loss plan to minimize the returned signal, echo suppression which is designed to remove echo, and ECANs which calculate an estimate of what the echo will be and then subtract that from the actual returned signal.