QoS Traffic Shaping Explained

Hello Pradyumna

An interface on a device is not actually capable of transmitting data at speeds slower than the maximum interface speed. So a FastEthernet interface can only send traffic at either 100Mbps or 0Mbps. There is no “in-between” speed setting. So how do you employ traffic shaping? If you want to limit the speed to 50Mbps on such an interface, you would tell the interface to transmit for only half of the time.

This means that over a certain time period, an interface will transmit for half the time, and be idle for the other half. For example, we can tell an interface that for every second, it should transmit data at 100Mbps for 0.5 seconds, and be idle (0Mbps) for 0.5 seconds. Over time, you as the user would measure this as an average throughput of 50Mbps.

Now in the lesson, the bitrate of the physical interface is 128kbps, and if that interface transmits at full speed for 62.5ms and becomes idle for the next 62.5ms, and this cycle continues, then it is transmitting for 50% of the time. The result is that over a long period of time the average throughput is measured to be 64kbps, half of the physical maximum.

You can change the time periods to accommodate other speeds. For example on a GigabitEthernet interface, you can transmit at full speed for 200ms and remain idle for 800ms, and this would result in an average shaped speed of 200Mbps over that 1000Mbps link.

This is the essence of the mechanisms used for shaping.

I hope this has been helpful!

Laz