Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

class-map question match-any vs match-all

Are the following class-maps equivalent since there is only one match statement in them?  or does the any/all apply to "af41 and/or cs4"

class-map type qos match-any VIDEO

     match dscp af41 cs4

          

class-map type qos match-all VIDEO

     match dscp af41 cs4

Brian Holmes
Verizon Enterprise for Chrysler       

Brian Holmes Verizon Enterprise for Chrysler
Everyone's tags (3)
3 REPLIES

class-map question match-any vs match-all

No, in the match any if can only match either of the 2 and it wil be put in that traffic class, on the any statement i needs to match both values. That is what I understand from the explanation below.

Creating a Traffic Class

To create a traffic class, use the class-map command. The syntax of the class-map command is as follows:

class-map [match-any | match-all] class-name
no class-map [match-any | match-all] class-name

The match-all and match-any Keywords

The match-all and match-any keywords need to be specified only if more than one match criterion is configured in the traffic class.

The match-all keyword is used when all of the match criteria in the traffic class must be met in order for a packet to be placed in the specified traffic class.

The match-any keyword is used when only one of the match criterion in the traffic class must be met in order for a packet to be placed in the specified traffic class.

If neither the match-all nor match-any keyword is specified, the traffic class will behave in a manner consistent with match-all keyword.

About The match not Command

The match not command, rather than identifying the  specific match parameter to use as a match criterion, is used to specify  a match criterion that prevents a packet from being classified as a  member of the class. For instance, if the match not qos-group 6 command  is issued while you configure the traffic class, QoS group 6 becomes  the only QoS group value that is not considered a successful match  criterion. All other QoS group values would be successful match  criteria.

Voice CCIE #37771
New Member

class-map question match-any vs match-all

But since there is only one match statement in this case, wouldn't match-any be equivelent to match-all?

on the other had, if the class map looked like this I understand how match-any would be differant than match-all

class-map type qos match-all VIDEO

     match dscp af41

     match dscp cs4

i.e.

In this case I would expect no packets to ever match since a packet could never have dscp af41 AND dscp cs4

But with the original class-map

class-map type qos match-all VIDEO

     match dscp af41 cs4

Can I assume an OR is applied between "af41 cs4" since it is a single match statement?

Brian Holmes
Verizon Enterprise for Chrysler

Brian Holmes Verizon Enterprise for Chrysler
Cisco Employee

class-map question match-any vs match-all

The match-any or match-all will change from OR to AND for multiple lines.

Match all its acts as a "AND" operation. Where match any does a "OR" operation . if there is only one it does not matter at all, however if there are more than one then you match all of them.

let says you have

class-map type qos match-all VIDEO

     match dscp af41

     match dscp cs4

So when packets arrives, it will matches AF41 and CS4.

class-map type qos match-any VIDEO

     match dscp af41

     match dscp cs4

"Match-any" is OR logic between each line in the class-map.  If any of those entries hold true, so if it has af41 or cs4 the class map will have match


Br,
Nadeem 

Please rate all useful post.

Br, Nadeem Please rate all useful post.
648
Views
0
Helpful
3
Replies