|
VoIP Bandwidth Calculation
Latency and Packet Overhead
The choice of the number of frames per packet is a trade-off between two characteristics: latency and packet overhead.
Long sample periods produce high latency, which can affect the perceived quality of the call. Long delays make interactive conversations awkward, with the two parties often talking over each other. Based on this fact alone, the shorter the sample period, the better the perceived quality of the call. However, there is a price to pay. The shorter the sample period, the smaller the frames and the more significant the packet headers become. For the smallest packets, well over half of the bandwidth used is taken up by the packet headers; clearly an undesirable case. See figure 1 below:
The IP Header
The term 'IP header' is used to refer to the combined IP, UDP and RTP information placed in the packet. The payload generated by the codec is wrapped in successive layers of information in order to deliver it to its destination. These layers are:
- IP - Internet Protocol
- UDP - User Datagram Protocol
- RTP - Real-time Transport Protocol
RTP is the first, or innermost, layer added. This is 12 octets. RTP allows the samples to be reconstructed in the correct order and provides a mechanism for measuring delay and jitter.
UDP adds 8 octets, and routes the data to the correct destination port. It is a connectionless protocol and does not provide any sequence information or guarantee of delivery.
IP adds 20 octets, and is responsible for delivering the data to the destination host. It is connectionless and does not guarantee delivery or that packets will arrive in the same order they were sent.
In total, the IP/UDP/RTP headers add a fixed 40 octets to the payload. With a sample period of 20 ms, the IP headers will generate an additional fixed 16 kbps to whatever codec is being used.
The payload for the G.711 codec and 20 ms sample period calculated above is 160 octets, the IP header adds 40 octets. This means 200 octets, or 1,600 bits sent 50 times a second - result 80,000 bits per second. This is the bandwidth needed to transport the Voice over IP only, it does not take into account the physical transmission medium.
There are other factors, which can reduce the overhead incurred by the IP headers, such as compressed RTP (cRTP). This can be implemented on point-to-point links and reduces the IP header from 40 to just 2 or 4 octets. Though this is not that common today, its use will become more widespread with it being implemented with 3G mobile networks.
The Transmission Medium
In order to travel through the IP network, the IP packet is wrapped in another layer by the physical transmission medium. Most Voice over IP transmissions will probably start their journey over Ethernet, and parts of the core transmission network are also likely to be Ethernet.
Ethernet has a minimum payload size of 46 octets. Carrying IP packets with a fixed IP header of 40 means that the codec data must be at least 6 octets - typically not a problem. The Ethernet packet starts with an 8 octet preamble followed by a header made up of 14 octets defining the source and destination MAC addresses and the length. The payload is followed by a 4 octet CRC. Finally, the packets must be separated by a minimum 12 octet gap. The result is an additional Ethernet overhead of 38 octets.
Ethernet adds a further 38 octets to our 200 octets of G.711 codec frame and IP header. Sent 50 times a second - result 95,200 bits per second, see example 1 below. This is the bandwidth needed to transmit Voice over IP over Ethernet.
Transmission of IP over other mediums will result in different overhead calculations.
|