12-03-2012 07:12 AM - edited 03-04-2019 06:18 PM
Hey all,
From Cisco's site, and all other documentation I can find - it clearly states that while shaping, "If not enough tokens are in the bucket to send a packet, the packet either waits until the bucket has enough tokens (in the case of a shaper) or the packet is discarded or marked down (in the case of a policer)."
It also states, "The bucket itself has a specified capacity. If the bucket fills to capacity, newly arriving tokens are discarded and are not available to future packets. Thus, at any time, the largest burst a source can send into the network is roughly proportional to the size of the bucket. A token bucket permits burstiness, but bounds it."
But, on the CLI I configured a shaper that has a Bc of 3200 bits (400 bytes) and a Be of 3200 bits (400 Bytes). So the total the bucket can ever be is 800 Bytes. But if I send a 1500 Bytes packet, say a continous ping of 1500 Bytes, the shaper will send the packets through up to the CIR.
If the theory is true that you can never send a packet greater than the size of the bucket, how are these pings going through? Also, how is the shaper figuring out it should only send X number of 1500 byte packets through to equal the CIR.
Thanks all,
CJ
Solved! Go to Solution.
12-03-2012 08:23 AM
Hello CJ,
packets cannot be fragmented so when they are sent they are sent as a whole.
Given the CIR and the TC time interval for a given packet size the router can meter the traffic to be sent against the bucket, if necessary multiple TC intervals = multiple BC blocks must pass in "silence" to cumulate enough credits between sending packet N and packet N+1 to respect the CIR.
In other words given the CIR if you use a low Bc you are using a low Tc also as
Tc= Bc/CIR
Actually there is a minimal value for Tc in the IOS implementation. (it should be in the order of 2,5 msec - 10 msec I didn't check)
Hope to help
Giuseppe
12-03-2012 08:23 AM
Hello CJ,
packets cannot be fragmented so when they are sent they are sent as a whole.
Given the CIR and the TC time interval for a given packet size the router can meter the traffic to be sent against the bucket, if necessary multiple TC intervals = multiple BC blocks must pass in "silence" to cumulate enough credits between sending packet N and packet N+1 to respect the CIR.
In other words given the CIR if you use a low Bc you are using a low Tc also as
Tc= Bc/CIR
Actually there is a minimal value for Tc in the IOS implementation. (it should be in the order of 2,5 msec - 10 msec I didn't check)
Hope to help
Giuseppe
12-04-2012 06:46 AM
OK. That makes sense with what I am seeing on the command line. I suppose it means the theory holds true as well. Technically, the router is only sending the tokens that exist in the bucket every Tc, but some mechanism allows a credit to be established against a packet until there is enough tokens to send the packet.
Thanks for the clarification.
CJ
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide