is there an equivalent to the rate-limit command of a router interface for a 3550 switch (l2 port).
Let say I don't want a device to eat more then 2 mbps of traffic...
There is no rate-limit command on 3550 , but you can rate limit traffic on a per port basis using policers. If you want the inbound traffic to be limited to 2 Mbps , you can do something as simple as following.
Define an acl classifying the traffic coming on this port.
access-lists 100 permit ip host x.y.z.w any
then define a class-map
class-map match-all ratelimit
match access-group 100
Define a policy map.
police 2000000 64000 exceed-action drop
and then apply this policy under the interface.
service-policy input rate
3550 also supports egress policies , but you can not use acl based classification. Classification based only on dscp values can be used for egress policers.
For more information , please take a look here.
Hope this helps.