This command defines a DiffServ class of type match-all. When used without any match condition, this command enters the class-map mode. The class-map-name is a case sensitive alphanumeric string from 1 to 31 characters uniquely identifying an existing DiffServ class.
The class type of match-all indicates all of the individual match conditions must be true for a packet to be considered a member of the class.This command may be used without specifying a class type to enter the Class-Map Config mode for an existing DiffServ class.
- The optional keywords [{ipv4 | ipv6}] specify the Layer 3 protocol for this class. If not specified, this parameter defaults to ipv4. This maintains backward compatibility for configurations defined on systems before IPv6 match items were supported. The optional keyword appiq creates a new DiffServ appiq class. Regular expressions found in the traffic patterns in layer 7 applications can be matched to the App-IQ class using a match signature command.
- The CLI mode is changed to Class-Map Config or Ipv6-Class-Map Config when this command is successfully executed depending on the [{ipv4 | ipv6}] keyword specified.
| Format | class-map {match-all|match-any} class-map-name [{appiq | ipv4 | ipv6}] |
| Mode | Global Config |
| Parameter | Definition |
|---|---|
| match-all | For the match-all argument, a given packet needs to match all the rules configured in class-map to get classified as the configured class-map. |
| match-any | For the match-any argument, a given packet can match at least one of the rules configured in the class-map to get classified as the configured class-map. |
| class-map-name | A case sensitive alphanumeric string from 1 to 31 characters uniquely identifying a DiffServ class. |
Example: This example shows configuring a new class-map with the class-map name test-class-map.
(Switching) (Config)#class-map match-all test-class-map
(Switching) (Config-classmap)#
(Switching) (Config-classmap)#exit
(Switching) (Config)#class-map ?
<class-map-name> Enter an existing DiffServ class name to enter the
class-map config mode.
match-all Specify class type as all.
match-any Specify class type as any.
rename Rename a DiffServ Class.
(Switching) (Config)#class-map match-all test-class-map-1
(Switching) (Config-classmap)# match ip dscp 36
(Switching) (Config-classmap)# match protocol ip
(Switching) (Config-classmap)# exit
(Switching) (Config)#class-map match-any test-class-map-2
(Switching) (Config-classmap)# match ip dscp 36
(Switching) (Config-classmap)# match protocol ipv6
(Switching) (Config-classmap)# exit
(Switching) (Config)#class-map match-any test-class-map-3
(Switching) (Config-classmap)# match access-group test-access-list-3
(Switching) (Config-classmap)# exit