| technology | networking - Erik Mikac

# How to Calculate Bandwidth for Cisco IP Calls

As a network engineer, it is vital to understand how VoIP calls can affect your company's bandwidth. This becomes more and more important as work-from-home becomes increasingly common. Calculating the bandwidth for your Cisco IP Calls is a matter of some simple calculations. Using this equation will assist you and your company in determining networking needs.

This article is divided into two sections. First is an explanation of some of the terms needed to understand the calculations. In the second section, we'll go over how to actually calculate bandwidth. We'll also talk about how different protocols affect bandwidth and where to get more information on the calculations.

**What is a Codec?**

Codec is short for Coder/Decoder, which may give you a hint to its purpose, but let's elaborate. Whenever a person speaks over a VoIP call, their voice must be translated into something a computer understands. A codec is a piece of software that does the actual digital transformation of a voice or any other sound. Let's talk briefly about how it does this.

A Codec's raison d’être is converting voice into a digital signal. However, because a voice is a sound wave, the computer can only take a sample of the wave using a mathematical process called interpolation. In other words, it slices the wave up by taking several samples and then estimates the rest of the wave. It then takes that estimation and transforms it into binary data, which is then decoded back into your voice. Now that we understand how a codec works, let's take a look at the four we plan to use in calculations.

## The** Four VoIP Codecs for Cisco**

The four Voip Codecs for Cisco are G.711, G.729, G.7622, and ILBC. For each Codec there is a **Codec Sampling Size. **A codec sampling size is the amount of bytes used to sample a signal. Let's discuss each starting with G.711.

**What is G.711?**

G.711 Codec is a Codec that focuses on clarity and performance. That being said, it takes up a high bit rate of 64,000 KB of bandwidth and its codec sampling size is 80 bytes. It's used primarily for VoIP, but can be used for fax.

**What is G.729?**

G.729 is the perfect codec solution when your bandwidth is limited. For instance, small businesses would be comfortable with this codec. A large business servicing many customers at once, however, would quickly find limitations with G.729. This codec has an 8,000 KB of bandwidth and is limited to VoIP only.

**What is G.722?**

G.722 is similar to G.711. It has a codec Sample size of 80 bytes and its bit rate is 64kbs. The main difference is that G.722 allows for a wider speech bandwidth of 50-7000 Hertz, while G.711's speech bandwidth ranges from 200 to 3000 Hz. G.722 is useful when the audio needs to be especially precise.

**What is iLBC?**

ILBC stands for Internet Low Bitrate Codec. Its bit rate is around 15 Kbps and its codec sampling size is 38 bytes. One of the best things about iLBC is its ability to gracefully degrade speech quality when too many frames are lost.

Now that we have a good understanding of the four different protocols, let's circle back and talk about how we can calculate bandwidth size for each.

**Calculating Bandwidth Size**

Calculating the bandwidth size can be done in a few easy steps. First, list out all of the variables you will need. The variables required are the following:

- Codec and bitrate
- Codec Sample Size
- Codec Sample Interval
- Mean Opinion Score
- Voice Payload Size

Notice the fourth variable is mean opinion score. Mean opinion score is a rating from one to five on how high quality a sample of audio is while using the particular codec.

Let's take a look at an example in table format. The following table and more information can be found on this video, How To Calculate Bandwidth for Cisco IP Calls.

Codec and bitrate | Codec Sample Size | Codec Sample Interval | Mean Opinion Score | Voice Payload Size | Bandwidth Ethernet |

G.711 (64 Kbps) | 80 | 10 | 4.1 | 160 | 87.2 |

G.729 (8 Kbps) | 10 | 10 | 3.92 | 20 | 31.2 |

G.722 (64 Kbps) | 80 | 10 | 4.13 | 160 | 87.2 |

ILBC (15.2 Kbps) | 38 | 10 | 4.14 | 38 | 38.4 |

Remember the goal is to uncover that final number: bandwidth ethernet. The basic equation for this is Total Bandwidth = Packet Size x Packets Per Second.** **However, it's not totally straightforward in regard to determining the packet size and the packets per second based on the data in our table. Let's figure out how we arrive at the final number for the G.711 Codec, which is 87.2 Kilobytes per second.

**Calculating Sample Size**

First determine the sample size for a given VoIP call. The equation used to determine that number will look like this:

**Bytes-per-sample = (****Sample-size**** x codec-bandwidth) / 8**

The bytes-per-sample can be found by looking at the voice payload size and the codec bandwidth can be found on the first column. So now our equation looks like this:

**160 bytes = (****sample-size**** x 64,000) / 8**

Notice we are dividing the right hand side by 8. That's because this is all in bits, but we need our final result to be in bytes. Next, multiple each side by eight to cancel out the eight. Now we should be here:

**1280 = (****sample-size**** x 64,000)**

Lastly divide each side by 64,000 to get a sample size of 0.02—or 20 ms. In other words, the voice sample we are getting to figure out the bandwidth of 20 ms. For example, the amount of time it takes you to utter the first "H" in "Hello"—that's what we're calculating.

Adding Overhead to Sample Size

Remember that VoIP does not happen in a vacuum. Numerous other processes will incur additional overhead. Think back to our voice payload size of 160 bytes. Ethernet itself will add an additional 18 Bytes to this payload size. Next, we know IP, UDP, and RTP protocols will incur and add 40 bytes. That means our actual sample size is 160 + 40 + 218—an overall sample size of 218 Bytes.

## Calculating Total Bandwidth

Now we can arrive at the number we have been waiting for. Remember earlier we stated that the total bandwidth is equal to the packet size x the packets per second. We determined our sample size is 20 ms. To determine how many packets are sent over the wire in that amount of time, please refer to the following equation:

**1000 ms / sample size = 1000 milliseconds / 20 milliseconds = 50 packets per second.**

We discovered that the packet size (A.K.A the sample size) is 218 bytes. We now can arrive at the solution:

**Total Bandwidth = 218 bytes x 50 packets**

**Total Bandwidth = 10,900 bytes per second**

Convert that number into kilobytes by dividing by eight, and **we arrive at 87.2 Kilobytes per second**

## Final Thoughts

That was a lot of jargon and math, but learning this process will make you an invaluable member of a networking team and its ability to work with Cisco VoIP technologies. We highly recommend watching the video** ****How To Calculate Bandwidth for Cisco IP Calls** on our YouTube channel for further clarification.

Download