27-46
Cisco ME 3800X and 3600X Switch Software Configuration Guide
OL-23400-01
Chapter 27 Configuring QoS
Configuring QoS
This example shows how to set the precedence of output queues by setting bandwidth in kilobits per
second. The classes outclass1, outclass2, and outclass3 and class-default get a minimum of 40000,
20000, 10000, and 10000 kb/s. Any excess bandwidth is divided among the classes in the same
proportion as the CIR rate.
Switch(config)#
policy-map out-policy
Switch(config-pmap)#
class outclass1
Switch(config-pmap-c)#
bandwidth 40000
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
class outclass2
Switch(config-pmap-c)#
bandwidth 20000
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
class outclass3
Switch(config-pmap-c)#
bandwidth 10000
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
class class-default
Switch(config-pmap-c)#
bandwidth 10000
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
exit
Switch(config)#
interface gigabitethernet 0/1
Switch(config-if)#
service-policy output out-policy
Switch(config-if)#
exit
This example shows how to allocate the excess bandwidth among queues by configuring bandwidth for
a traffic class as a percentage of remaining bandwidth. The class outclass1 is given priority queue
treatment. The other classes are configured to get percentages of the excess bandwidth if any remains
after servicing the priority queue: outclass2 is configured to get 50 percent, outclass3 to get 20 percent,
and the class class-default to get the remaining 30 percent.
Switch(config)#
policy-map out-policy
Switch(config-pmap)#
class outclass1
Switch(config-pmap-c)#
priority
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
class outclass2
Switch(config-pmap-c)#
bandwidth remaining percent 50
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
class outclass3
Switch(config-pmap-c)#
bandwidth remaining percent 20
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
exit
Switch(config)#
interface gigabitethernet 0/1
Switch(config-if)#
service-policy output out-policy
Switch(config-if)#
exit
This example shows how to match VLAN and CoS in the same policy. When you attach the service
policy vlan to an interface, packets with the outer VLAN of 2 and an outer CoS of 2 are included in class
map phb.
Switch(config)#
class-map vlan
Switch(config-cmap)#
match vlan 2
Switch(config-cmap)#
exit
Switch(config)#
class-map phb
Switch(config-cmap)#
match cos 2
Switch(config-cmap)#
exit
Switch(config)#
policy-map phb
Switch(config-pmap)#
class phb
Switch(config-pmap-c)#
bandwidth 1000
Switch(config-pmap-c)#
exit
Switch(config-pmap)#
exit
Switch(config)#
policy-map vlan
Switch(config-pmap)#
class vlan
Switch(config-pmap-c)#
bandwidth 1000
Switch(config-pmap-c)#
service-policy phb