Traffic Shaping

aamallik  Diamond  (1)
6 years 7 months ago  View: 1896  Reply: 10

Traffic shaping (TS) is an active way to adjust the traffic output rate.   A typical application is to control the output traffic based on downstream network nodes. TS is implemented by using the buffer and token bucket. Caching the packets to be discarded can reduce the dropped packets. Token buckets can be used to meet the requirements of packet traffic. This is the Generic Traffic Shaping, GTS for short. When being transmitted extremely fast, packets are first cached in buffer. Then, these cached packets are transmitted evenly under the control of the token bucket. The procedure is as follows.

  The packets not involved in TS are forwarded directly.

l   For the packets involved in TS, when the GTS queue does not exist, the system compares the length of packets with the number of tokens in the token bucket. If there are sufficient tokens to send packets, packets are sent; if there are insufficient tokens, the GTS queue is generated where packets are cached.   Tokens are placed in the token bucket at the user-defined rate. Packets in the GTS queue are taken out and sent periodically. As packets are sent, the number of tokens reduces based on the number of packets. During the process of sending packets, the number of packets is compared with the number of tokens in the token bucket. Until the number of tokens is not enough or packets are all sent out, this process is complete.

l   For the packets involved in TS, packets enter the GTS queue to wait for being sent periodically if a GTS queue exists.

 If the GTS queue is full when packets reach it, these packets are dropped.


Armetta  Diamond 
6 years 7 months ago
documentation very useful for my job
mashaker  Platinum 
6 years 7 months ago

The main difference between TS and TP is as follows: 

TP drops the packets that exceed the specification or remarks them with precedence while TS buffers the packets that exceed the specification. When there are enough tokens in the token bucket, these buffered packets are sent out uniformly. 

Another difference is that TS may increase the delay while TP almost introduces no extra delay.

mashaker  Platinum 
6 years 7 months ago

 Interface Limit Rate

Limit Rate (LR) is used to limit the total rate of sending packets on a physical interface or a Tunnel interface.LR also uses the token bucket for traffic control. If LR is configured on an interface of a router, all packets to be sent through this interface are handled first by the token bucket of LR. As shown in  Figure 2-5, if the token bucket has sufficient tokens, packets can be sent. Otherwise, packets are placed in QoS queues for congestion management.  In this manner, the packet traffic of this interface can be controlled.


TISLAM  Platinum 
6 years 7 months ago
I like the share of mashaker here abt Interface l8ne rate..
TISLAM  Platinum 
6 years 7 months ago
Can we also use for inbound traffic..?
sumon_ahsan  Diamond 
6 years 7 months ago
very nice post.
mashaker  Platinum 
6 years 7 months ago
good share.
mashaker  Platinum 
6 years 7 months ago
When we need to shape traffic...do u have any idea abt port shaping...
mashaker  Platinum 
6 years 7 months ago
Does anyone let me know abt the activity of token bucket???
1/2Page