Match spr1 interface example – Cisco 15327 User Manual

Page 228

Advertising
background image

14-20

Ethernet Card Software Feature and Configuration Guide, R7.2

Chapter 14 Configuring Quality of Service

class-map match-any and class-map match-all Commands Example

class-map match-any and class-map match-all Commands Example

This section illustrates the difference between the class-map match-any command and the class-map
match-all
command. The match-any and match-all options determine how packets are evaluated when
multiple match criteria exist. Packets must either meet all of the match criteria (match-all) or one of the
match criteria (match-any) in order to be considered a member of the traffic class.

Example 14-9

shows a traffic class configured with the class-map match-all command.

Example 14-9 Class Map Match All Command Examples

Router(config)# class-map match-all cisco1

Router(config-cmap)# match cos 1

Router(config-cmap)# match bridge-group 10

If a packet arrives with a traffic class called cisco1 configured on the interface, the packet is evaluated
to determine if it matches the cos 1 and bridge group 10. If both of these match criteria are met, the
packet matches traffic class cisco1.

In traffic class called cisco2, the match criteria are evaluated consecutively until a successful match
criterion is located. The packet is first evaluated to the determine whether cos 1 can be used as a match
criterion. If cos 1 can be used as a match criterion, the packet is matched to traffic class cisco2. If cos 1
is not a successful match criterion, then bridge-group 10 is evaluated as a match criterion. Each matching
criterion is evaluated to see if the packet matches that criterion. When a successful match occurs, the
packet is classified as a member of traffic class cisco2. If the packet matches none of the specified
criteria, the packet is classified as a member of the traffic class.

Note that the class-map match-all command requires that all of the match criteria must be met in order
for the packet to be considered a member of the specified traffic class (a logical AND operator). In the
example, cos 1 AND bridge group 10 have to be successful match criteria. However, only one match
criterion must be met for the packet in the class-map match-any command to be classified as a member
of the traffic class (a logical OR operator). In the example, cos 1 OR bridge group 10 OR ip dscp 5 have
to be successful match criteria.

Example 14-10

shows a traffic class configured with the class-map match-any command.

Example 14-10 Class Map Match Any Command Examples

Router(config)# class-map match-any cisco2

Router(config-cmap)# match cos 1

Router(config-cmap)# match bridge-group 10

Router(config-cmap)# match ip dscp 5

match spr1 Interface Example

In

Example 14-11

, the SPR interface is specified as a parameter to the match input-interface CLI when

defining a class-map.

Example 14-11 Class Map SPR Interface Command Examples

Router(config)# class-map spr1-cos1

Router(config-cmap)# match input-interface spr1

Router(config-cmap)# match cos 1

Router(config-cmap)# end

Router# sh class-map spr1-cos1

Class Map match-all spr1-cos1 (id 3)

Advertising