The class-default keyword is used for configuring default classes. It is a reserved name and cannot be used
with user-defined classes. It is always added to the policy map (type qos) even if the class is not configured.
For example, the following configuration shows that the class has not been configured, but the running
configuration shows ‘class class-default’.
RP/0/RP0/CPU0:router(config)# policy-map pm1
RP/0/RP0/CPU0:router(config-pmap)# end-policy-map
RP/0/RP0/CPU0:router(config)# end
!
RP/0/RP0/CPU0:router# show running-config
!
policy-map pm1
class class-default
!
end-policy-map
!
Task ID
OperationsTask ID
read, writeqos
Examples
The following example shows how to create a policy map called policy1, which is defined to shape class1
traffic at 30 percent and default class traffic at 20 percent.
RP/0/RP0/CPU0:router(config)# class-map class1
RP/0/RP0/CPU0:router(config-cmap)# match precedence ipv4 3
!
RP/0/RP0/CPU0:router(config)# policy-map policy1
RP/0/RP0/CPU0:router(config-pmap)# class class1
RP/0/RP0/CPU0:routerconfig-pmap-c)# shape average percent 30
RP/0/RP0/CPU0:router(config-pmap-c)# exit
RP/0/RP0/CPU0:router(config-pmap)# class class-default
RP/0/RP0/CPU0:router(config-pmap-c)# shape average percent 20
The default class is used for packets that do not satisfy configured match criteria for class1. Class1 must be
defined before it can be used in policy1, but the default class can be directly used in a policy map, as the
system defines it implicitly.
Related Commands
DescriptionCommand
Defines a traffic class and the associated rules that match packets to
the class.
class-map, on page 12
Creates or modifies a policy map that can be attached to one or more
interfaces to specify a service policy.
policy-map, on page 67
Cisco IOS XR Modular Quality of Service Command Reference for the Cisco CRS Router, Release 4.0
OL-23235-03 11
Quality of Service Commands on the Cisco IOS XR Software
class (policy-map)