30-47
Cisco ME 3400 EthernetAccess Switch SoftwareConfiguration Guide
78-17058-01
Chapter30 Configuring QoS Configuring QoS
This example shows how to configure traffic shaping for outgoing traffic on a Fast Ethernet port so that
outclass1, outclass2, and outclass3 get a maximum of 50, 20, and 10 Mbps of the available port
bandwidth. The class class-default gets the remaining bandwidth.
Switch(config)# policy-map out-policy
Switch(config-pmap)# class classout1
Switch(config-pmap-c)# shape average 50000000
Switch(config-pmap-c)# exit
Switch(config-pmap)# class classout2
Switch(config-pmap-c)# shape average 20000000
Switch(config-pmap-c)# exit
Switch(config-pmap)# class classout3
Switch(config-pmap-c)# shape average 10000000
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit
Switch(config)# interface fastethernet0/1
Switch(config-if)# service-policy output out-policy
Switch(config-if)# exit
Configuring Output Policy Maps with Port Shaping
Port shaping is applied to all traffic leaving an interface. It uses a policy map with only class default
when the maximum bandwidth for the port is specified by using the shape average command. A child
policy can be attached to the class-default in a hierarchical policy map format to specify class-based
actions for the queues on the shaped port.
The total of the minimum bandwidth guarantees (CIR) for each que ue of the child policy cannot exceed
the total port shape rate.
Beginning in privileged EXEC mode, follow these steps to use port shaping to configure the maximum
permitted average rate for a class of traffic:
Command Purpose
Step1 configure terminal Enter global configuration mode.
Step2 policy-map policy-map-name Create a hierarchical policy map by entering the hierarchical
policy map name, and enter policy-map configuration mode for
the parent policy.
Step3 class class-default Enter a policy-map class configuration mode for the default class.
Step4 shape average target bps Specify the average class-based shaping rate.
For target bps, specify the average bit rate in bits per second. The
range is from 64000 to 1000000000.
Step5 service-policy policy-map-name Specify the child policy-map to be used in the hierarchical policy
map if required.
Step6 exit Return to policy-map configuration mode.
Step7 exit Return to global configuration mode.
Step8 interface interface-id Enter interface configuration mode for the interface to which you
want to attach the policy.
Step9 service-policy output policy-map-name Attach the parent policy map (created in Step 2) to the egress
interface.
Step10 end Return to privileged EXEC mode.