QoS how traffic shaping is achieved

A physical interface is capable of transmitting data only at its rated speed. For example, a GigabitEthernet port can either transmit data at 1 Gbps or transmit no data. It cannot transmit at, say, 500 Mbps.

QoS traffic shaping, which is a QoS mechanism, is able to enforce a lower bitrate than that of the physical interface, by causing the interface to transmit at its full speed for only a certain period of time. This is done in such a way so that the average data rate over time does not exceed the enforced limit.

For example, a GigabitEthernet interface is configured with traffic shaping to maintain a limit of 200 Mbps. In order to achieve this, the interface will transmit for only 20% of the time. Specifically, over a one second interval, the interface will transmit for a total of 200 ms at 1 Gbps. On average, over one second, this results in a transmission speed of no more than 200 Mbps, which is the enforced limit. The following graph illustrates this:

qos-traffic-shaping.PNG

The distribution of transmission over time can be modified, as long as the proportion of transmission to non-transmission remains the same. For example, every 50 milliseconds, the interface can transmit for 10 ms, still achieving transmission for 20% of the time, which still results in a limit of 200Mbps. The following graph shows such a traffic distribution over time:

qos-traffic-shaping-2.PNG

The result is still a "shaped" transmission rate of 200 Mbps.

https://networklessons.com/cisco/ccna-200-301//qos-traffic-shaping-explained/ https://networklessons.com/cisco/ccna-200-301//introduction-qos-quality-service/#Shaping