Traffic Shaping on Cisco using rate-limit

Here are the rate limit commands in action :

 rate-limit {direction} {shaped} {normal burst} {extended burst} conform-action {option} {option}

direction = input or output
shaped = Speed you want to traffic shape in bits
normal burst = (shaped / 8) * 1.5 
extended burst = (normal burst * 2) 

 

Example: Cap a connection at 20mbps both in and out

rate-limit input 20971520 3932160 7864320 conform-action transmit exceed-action drop
rate-limit output 20971520 3932160 7864320 conform-action transmit exceed-action drop

Note: 20mb is 20971520 bits