I'm currently working on implimenting some bandwidth restrictions for a colocation lan. Each colo gets their own vlan, tagged at the switch, terminated in a 4500M+. The separate vlans are then setup as subinterfaces on the 4500. On each subinterface, I went in and setup a traffic-shape statement set at twice their alloted bandwidth. For instance, for a colo contracting for 512kb/sec, I did:
interface fastethernet 0.6
sh traffic-shaping queues and statistics makes everything appear as though all is good. When I test however, I consistantly am able to sustain WAY over the limit specified for long durations. For testing I'm using a 158MB random noise file. Typically I pull about 800KB/sec and sustain that speed. Turn shaping off and I'm limited solely by my ethernet and system perf.
I have also tested rate-limit using three times their contracted bandwidth, with 1.5 times the sustained limit for the burst, and 3 times the sustained limit for the max burst, as recommended by Cisco's docs. This does indeed work, I can burst quite high before packets get dropped and my connection throtles down to the limit I've imposed.
Between the two options my prefrence is for traffic-shaping as I'm queing some packets instead of flat dropping them. To me this would be nicer to the colocator. Somewhere's I've missed something with the traffic-shaping command however, and from rereading the docs am not sure what.