Wednesday, January 19, 2011

How to calculate bandwidth for a g711 call without tunneling

I’ll show you how to calculate the bandwidth allocated for a voip call. The results and the method of calculation are shown in the table from this link.I will show more detailed how to calculate the bandwidth in relation with the codec chosed for transmission. There are 2 formulas that we will use:

1) Codec bytes per sample= (codec sample interval * codec bandwidth) / 8
Codec bandwidth value can be taken from the router:
Cisco default value for codec bytes per sample for g711 codec is 160. This and the other possible values can also be taken from the router:
So, for the g711ulaw codec we calculate the codec sample interval:
160 = (codec sample interval * 64000) / 8
Codec sample interval = 0.02 seconds = 20 ms

2) Total bandwidth = Packet size * Packet per sample
We calculate packets per sample: 1000/20 = 50 (because 1 second = 1000ms)
As it said in the link above: "These protocol header assumptions are used for the calculations:
• 40 bytes for IP (20 bytes) / User Datagram Protocol (UDP) (8 bytes) / Real-Time Transport Protocol (RTP) (12 bytes) headers.
• Compressed Real-Time Protocol (cRTP) reduces the IP/UDP/RTP headers to 2or 4bytes (cRTP is not available over Ethernet).
• 6 bytes for Multilink Point-to-Point Protocol (MP) or Frame Relay Forum (FRF).12 Layer 2 (L2) header.
• 18 bytes for Ethernet L2 headers, including 4 bytes of Frame Check Sequence (FCS) or Cyclic Redundancy Check (CRC)."

So, for 160 bytes codec sample size we add 40 bytes for IP and because we transmit voice packets over Ethernet we add another 18 bytes:
160 + 40 + 18 = 218 bytes per sample
If we would use tunneling , we would also add these values to the sum above:
IPSEC – 50-57 bytes
GRE – 24 bytes
Using the second formula (Total bandwidth = Packet size * Packet per sample) we have:
Total bandwidth = 218 * 50 = 10900 bytes per second.
Because 1 byte= 8 bits we have:
10900 * 8 = 87200 bps = 87,2 kbps bandwidth that a call with g711ulaw codec over Ethernet without tunneling will take.

1 comment:

virtual call center solutions said...

This is really satisfied by the nice services in this blog that to really providing the wonderful info is visible in this blog