Imagine I have a router with Fa0/0. That interface has a 100Mb/s
bidirectional communication maximum. I can take that down to 10Mb/s at
the physical/electrical level by setting the speed to 10Mb/s.
#interface fa0/0
#speed 10
Maybe
I'm a service provider and I want to place a hard restriction at 7Mb/s
in and out. There is no "speed 7" command because there has never been
7Mb/s Ethernet. What to do?
Option 1 CAR (committed access rate)
#interface FastEthernet0/0
#no ip address
#rate-limit input 7000000 3500 3500 conform-action transmit exceed-action drop
#rate-limit output 7000000 3500 3500 conform-action transmit exceed-action drop
#end
Option 2 (Policing via MQC)
#policy-map POLICEALL
#class class-default
# police rate 7000000
#interface FastEthernet0/0
#service-policy input POLICEALL
#service-policy output POLICEALL
Option 3 (Generic Traffic Shaping--less draconian, but outbound only)
#interface FastEthernet0/0
#traffic-shape rate 7000000 175000 175000 1000
Option 4 (mqc based traffic shaping--less draconian, but outbound only)
#policy-map SHAPEALL
#class class-default
# shape average 7000000
#service-policy output SHAPEALL
#interface fa0/0
#service-policy output SHAPEALL
#speed 10
#no ip address
#rate-limit input 7000000 3500 3500 conform-action transmit exceed-action drop
#rate-limit output 7000000 3500 3500 conform-action transmit exceed-action drop
#end
#class class-default
# police rate 7000000
#service-policy input POLICEALL
#service-policy output POLICEALL
#traffic-shape rate 7000000 175000 175000 1000
#class class-default
# shape average 7000000
#service-policy output SHAPEALL
#service-policy output SHAPEALL