Monday, December 24, 2007

Calculating Frame-Relay map-class parameters

Have you struggle to understand what seems like black magic behind the calculation of the parameters of a frame-relay map? Well, I did for a long time. Frame-relay is one of those technologies that isn't going to disappear anytime soon. So if you are a consultant you will find yourself implementing QoS over frame-relay.
Now Cisco provides several ways of doing QoS over Frame-Relay but here I'm going to cover the map-class and its basic parameters.

Unlike many other documents I'm not going to explain all the theory behind this parameters, I'm going to give you a simple recipe which I use. There are mostly two types of map-class you are going to find deploying. Those to shape data traffic and those to shape VoIP traffic. Anything else is a mix of any of those two. (Most of the time... there is always those exception to the rule)

Since CIR is what you providers tell you based in what you bought, for this discussion I will assume a line of 768K with a CIR of 512K.

You will find that the documents out there always mention the Tc value and that all the calculations are based on the Tc value you are using, etcetera. Well, you know what? It is true, BUT you can not set this parameter. It is router auto-calculated value based on your other parameters. You have to "indirectly" modify it. So, this was the first issue that I always struggle with and never understood well.

It is simple, the default Tc = 1s and you can forget about everything else and remember this: The industry "best practices" define Tc = 125ms for data traffic and Tc = 10ms for VoIP traffic.

How they get there? Long story and I promised not to do all the calculations. You only need to remember this. They recommend to have 8 time-slots for DATA and for VoIP 100 time-slots. So, that's how you obtain:

Data: 1s / 8 = 0.125 s = 125 ms
VoIP: 1s / 100 = 0.010 = 10ms

The easiest way to calculate the values for a frame-relay map class for DATA:

CIR = 512000
Bc = CIR / 8 = 512000 / 8 = 64000
Be = (Available Bandwith - CIR) / 8 = (768000 - 512000) / 8 = 32000

Note: You will only need to calculate the Be if your CIR is less that the provisioning of the line and you what to have the "extra burst". Otherwise, don't define that parameter.

To calculate the sames parameters for a frame-relay map for VoIP:

CIR = 512000
Bc = CIR / 100 = 5120
Be = (Available Bandwidth - CIR) / 100 = (768000 - 512000) / 100 = 2560

Note: You will only need to calculate the Be if your CIR is less that the provisioning of the line and you what to have the "extra burst". Otherwise, don't define that parameter.

Now, there are some additional parameters that are defined for VoIP, I will only cover the "fragmentation" or "fragment size". This is not necessarily how it is explained, but the calculation works for me:

frame-relay fragment = Bc / 8 = 5120 / 8 = 640

Finally make sure you give VoIP RTP traffic the priority you want. In this case, lets say that I want to give it priority over the full CIR. I will then have an entry like this:

frame-relay ip rtp priority 16384 16383 512

So the final map-class will look like:

map-class frame-relay DATA_768K_CIR_512K
frame-relay cir 512000
frame-relay bc 64000
frame-relay be 32000
map-class frame-relay VoIP_768K_CIR_512K
frame-relay cir 512000
frame-relay bc 5120
frame-relay be 2560
frame-relay fragment 640
frame-relay ip rtp priority 16384 18383 512

Finally, apply it to our interface:

int Serial0/0
encapsulation frame-relay
no frame-relay inverse-arp
frame-relay traffic-shaping !Need to be activated at physical interface level
int Serial 0/0.100
ip address
frame-relay class DATA_768K_CIR_512K
frame-relay interface-dlci 100

And that is it. For more information visit:

VoIP over Frame Relay with Quality of Service (Fragmentation, Traffic Shaping, LLQ / IP RTP Priority)

Hope you find this useful.


  1. This is good article for practical approach but there is just one confusion that why you have used bc=CIR/8 for data and bc=CIR/100 while exactly it is BC=cir*tc/1000, but again if it is your best practice and if practically gives nearly accurate value then I would for for this as it is easy to remember. But for exam for which I am preparing I think BC=cir*tc/1000 is good for me. Just sharing thought with you.. Zaheer

  2. This blog is so nice to me. I will continue to come here again and again. Visit my link as well. Good luck
    obat aborsi
    cara menggugurkan kandungan