27-47
Cisco ME 3800X and 3600X Switch Software Configuration Guide
OL-23400-01
Chapter 27 Configuring QoS
Configuring QoS
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
exit
Switch(config)#
interface gigabitethernet 0/1
Switch(config-if)#
service-policy vlan
Switch(config-if)#
exit
Configuring Class-Based Shaping
You use the shape average policy-map class configuration command to configure traffic shaping.
Class-based shaping sets the explicit maximum peak information rate (PIR) for the class by limiting it
to the configured bandwidth. You can configure class-based shaping at the class level and at the VLAN
level.
Beginning in privileged EXEC mode, follow these steps to use class-based shaping to configure the
maximum permitted average rate for a class of traffic:
After you create the policy map, attach it to an interface or an EFP. See the
“Attaching a Service Policy
to an Interface or EFP” section on page 27-56
. Use the no form of the appropriate command to delete an
existing policy map or class map or to delete a class-based shaping configuration.
This example shows how to configure traffic shaping for outgoing traffic on a Gigabit Ethernet port so
that outclass1, outclass2, and outclass3 get a maximum of 50, 20, and 10 Mb/s of the available port
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
Command
Purpose
Step 1
configure terminal
Enter global configuration mode.
Step 2
policy-map policy-map-name
Create a policy map by entering the policy map name, and enter
policy-map configuration mode.
Step 3
class {class-map-name | class-default}
Enter a child class-map name or class-default to match all
unclassified packets, and enter policy-map class configuration
mode.
Step 4
shape average {target bps | percent value}
Specify the average class-based shaping rate.
•
For target bps, specify the average bit rate in bits per second.
The range is from 1000 to 10000000000 (10 Gigabits).
•
Enter percent value to set the percentage of interface
bandwidth for peak information rate. The range is 0 to 100
percent. The percentage is calculated based on the peak
information rate (PIR) of the parent class. If there is no
configured PIR at any level, this is the percentage of the
interface speed. Setting the percent to 0 disables shaping.
Step 5
end
Return to privileged EXEC mode.
Step 6
show policy-map [policy-map-name [class
class-map-name]]
Verify your entries.
Step 7
copy running-config startup-config
(Optional) Save your entries in the configuration file.