Showing posts with label Transport. Show all posts
Showing posts with label Transport. Show all posts

Traffic Flow Design Considerations

Traffic engineering involves the measurement and control of traffic. Main VoIP traffic sources are IP phones and VoIP Trunks. We need to be able to perform traffic engineering on individual nodes and consider the traffic between nodes. Traffic measurement is an analysis of existing traffic flow and the patterns of a network. This will help us to determine how many users and calls a VoIP network can support. Some operational metrics from the system include the number of calls and users, the duration of calls, the number of concurrent calls, call volume profiles, location and call flow, and the number and length of faxes sent and received. In order to assemble this traffic information and make a judgment we need to look at a number of design considerations:
1. System capacity for busy hour
2. Interfaces for critical connections
3. Single points of failure at critical points in the network
4. Is there sufficient power
5. If a device fails, does network design provide redundant paths?

Once again, I will reiterate that we should ONLY use switched media Ethernet networks with VoIP. Shared media, such as hubs, will cause problems. We need to ensure that QoS is being used, such as 802.1p, VLANs, port prioritization, and the rest. If we are fortunate enough to be using Layer 3 switching, we should try to use DiffServ to manage applications with different types of QoS services. And, of course, we should look to increase bandwidth as necessary.

When considering routing across a WAN, we have some additional factors to consider. WANs can require a large amount of memory and processing capacity. When designing WAN traffic flow, we should consider performance, resiliency, stability, and route cost. As always, performance is a large part of WAN design. When considering performance, we should:
1. Be aware of CPU utilization required for router intelligence
2. Move the heavy burden of processing routers to out-of-band processors
3. Use network routers for packet forwarding and handling
4. Deploy Layer 2 QoS Switching between policy switch stacks to reduce policy switch stack and router CPU utilization for LAN-Side traffic
5. Reduce the number of router zones (or areas)
The complexity of a network will dramatically affect its resiliency. Network instability, or Route Flapping, can occur on a more complex network. In addition, we need to consider route cost or metrics that will be applied to a route. In order to guarantee a scalable and reliable enterprise WAN service providers should offer a competitive Service Level Agreement (SLA). The SLA should clearly guarantee the maximum latency and available bandwidth. Increased reliability and performance requirements of converged networks put added pressures for the establishment of strong SLAs with our service providers. If our service provider of choice will not give us an acceptable SLA we should begin the process of looking for another service provider!

Transport and Session Layer Technologies

Transport and Session are layers 4 and 5 of the OSI model. The Transport Layer (Layer 4) establishes, maintains, and terminates communication between networked machines. The Session Layer (Layer 5) initiates contact between applications and governs the exchange of data between programs. The IP Suite compresses the upper three layers (Application, Presentation, and Session) into one layer called Application. The transport layer remains the same. The Network layer is called the Internet Layer (but performs the same functions), and the bottom two layers, Data Link and Physical, are grouped into one layer called the Network Interface Layer. In the IP suite transport layer there are two methods of delivery: TCP and UDP. TCP stands for Transmission Control Protocol. This is the most common method of delivery in data networks. Each packet sent is acknowledged by the receiving end and missing packets are re-transmitted. UDP, or User Datagram Protocol, is referred to as a connectionless protocol. It does not try to retransmit missing data; instead it assumes that all the data that was sent was received. While this may not sound like the best idea it is an optimal solution for VoIP and other time-sensitive applications, as it does not waste bandwidth with acknowledgements and retransmission of packets. Using this best-effort method, UDP is able to present our VoIP applications with a steady stream of voice packets with minimal delay.

The IP suite is a connectionless Layer 3 protocol with no continuing connection between endpoints. As such, there can be multiple Layer 2 protocols used, including Ethernet, ATM, PPP, Multi-Protocol Label Switching (MPLS), Frame Relay, and Wireless protocols. I would like to take some time now to discuss some of these protocols.

Frame Relay is a cost-effective alternative to a leased line. It can work at speeds from 56kbps to 45Mbps. It provides some QoS capabilities, including prioritization (802.11p) and DiffServ. It exists at Layer 2 so there is less processing to perform at each node. It is considered to be a best-effort protocol, as once a packet enters the network it is not guaranteed any priority over other packets. The delays are higher and more variable than the PSTN. This can lead to an increased chance of serialization delay. Frame relay does offer error correction. When purchasing a Frame Relay connection you purchase a Converted Information Rate (CIR). This is your guaranteed throughput on the relay. If the CIR is too low there is a chance the packets may be dropped, resulting in poor voice quality.

Asynchronous Transfer Mode, or ATM, is available from service providers in four distinct levels of service. The first, Constant Bit Rate (CBR) specifies a fixed bit rate so that data is sent at a constant rate, similar to a leased line. A Variable Bit Rate (VBR) provides a specified throughput capacity, but the data is not sent evenly. VBR is a popular choice for voice and video conferencing data. Unspecified Bit Rate (UBR) does not guarantee throughput rates. It is generally used for applications that can tolerate delays, such as file transfer and other data applications. Available Bit Rate provides a guaranteed minimum capacity and allows for the ability to burst data throughput rates when the network capacity is available. ATM speeds range from 25Mbps to 622Mbps. It has sophisticated QoS services, including DiffServ. Using CBR or VBR you can also receive a guarantee of prioritization. ATM is, unfortunately, not always available and is both difficult to set up and very costly. The equipment required to run ATM is very costly on its own. ATM does have a larger header than many alternatives, and is also subject to serialization delays. ATM will have a lower serialization delay than Frame Relay, however.

Point-to-Point Protocol, or PPP, is used to transmit datagrams between peer routers or other devices over dedicated switched lines. This also the method used to connect dial-up Internet connections. It uses a dedicated link, and therefore can provide the greatest QoS. It is full duplex and can be dedicated or circuit switched.

Wireless LAN is a relatively new technology. WLANs function on radio broadcast frequencies. Devices share the physical layer (the radio band). They must contend for use of the media. There is no collision detection with a WLAN, so collision avoidance methods are used – devices must wait for an inter-frame spacing interval before they transmit, and they must not transmit while other devices are transmitting.

Multi-Protocol Label Switching (MPLS) is a newer transport method. It provides a data transport mechanism for both circuit-based and packet-switched environments, and supports more than one transport method. It can use IP, ATM, SONET, and Ethernet.

Finally, there are common residential connections, namely Cable and DSL. These are best-effort methods, and do not provide and QoS. They are able to provide high-bandwidth Internet access, but minimum transmission speeds are not guaranteed.

Bandwidth Requirements

I would like to talk a little bit about the bandwidth requirements for a VoIP network. Bandwidth is a measurement of how much traffic can go through your network.

For lower bandwidth connections (i.e. less than 1Mbps) it is recommended that no more than 50-55% of the total available bandwidth be used for voice traffic. For connections greater than 1 Mbps you can use up to 85% of your available bandwidth for voice traffic. This leaves some headroom on the links to handle bursts of traffic without overloading the link. A bottleneck can occur at any point on the network, including device to switch, switch to switch, switch to gateway, and many more. As such we need to ensure that there is sufficient bandwidth in every pipe on our network to handle the traffic that is being sent.

In addition to the amount of bandwidth required by the data being transmitted, there is additional bandwidth required for every packet sent based on which layer 2 method you are using. For a Frame Relay connection there is a requirement of 6 bytes of overhead. For Point-to-Point Protocol (PPP) there is a requirement for 8 bytes of overhead. Full Duplex Ethernet can be either 38 bytes of 44 bytes – the additional 6 bytes are only used if you have implemented 802.1p, or packet prioritization.

The amount of bandwidth that is required must include the amount of bandwidth required for the CODEC and the amount of bandwidth required for the transport of the packet, including the layer 2 overhead.

Each packet has the following components:
Voice Payload à This is a variable size, and depends on the configuration of your VoIP implementation
RTP Header à 12 bytes, this contains information about the source & destination
UDP Header à 8 bytes, this contains information on the ports used at the source and destination
IPv4 Header à 20 Bytes, included in all IPv4 packets. An IPv6 header is even larger, as the header must include larger addresses and other information

In addition, there are two further components, the Frame Check Sequence of 4 Bytes and the Interframe Gap of 12 Bytes

As we can see, the packet size is 40 bytes plus the size of the payload. As I mentioned earlier, the size of the payload is variable, and depends on the sample length and the CODEC bit rate. The payload size can be calculated using the following formula:

Payload = Bit Rate * Sample Length (s) / 8 bits per byte

This will give us the number of Bytes of payload that needs to be included in the package. We then add to this the amount of overhead from Layer 2 and the amount of IP overhead to give us our total packet size. As an example, let’s take a 20 ms sample size using G.729 (8kbps) over Ethernet using 802.1p:

Payload = 8kbps * 0.02s / 8
Payload = 8000 bps * 0.02s / 8
Payload = 160 bps / 8 = 20 Byte payload size

We then add our overhead to the payload:

Packet size = Payload + Layer 2 overhead + IP Overhead + FCS + IFG
Packet size = 20 Bytes + 44 Bytes + 40 Bytes + 4 Bytes + 12 Bytes
Packet size = 120 Bytes for 20 ms of voice traffic

We can then take this and determine how much bandwidth is required by converting this to bps. We need to determine how many packets per second of voice. As we have seen, 20ms is 0.02 seconds of data, which means that we are using 50 packets per second. So, we multiply our 120 Bytes/packet * 50 packets/second to give us 6000 Bytes per second. We then multiply by 8 to give us bits per second ~ 48000 bps of bandwidth for each direction of a call.

It should also be noted that if we are using the Real-Time Control Protocol we need to add an additional 146 bytes of data to our packet size.

Voice Activity Detection can reduce our bandwidth requirements, as was mentioned before. It enables a data network carrying voice traffic to detect the absence of audio. When audio is absent, it will instead send a signal that indicates that there is no noise, thereby reducing the payload size. A conservative estimate of the bandwidth savings gained using VAD is 30%. VAD is also referred to as Silence Suppression.

EDIT: A Bandwidth calculator is available here.