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. And see here for current known issues.

New Member

QoS class-map match-any

When you create a class map using the match any functionality, does it read the class map from the top down and then stop on the first match it sees or does it look at all the match statements?

For ex

class-map match-any XXX

  match protocol rtp
  match ip dscp ef
  match protocol citrix
!
!
policy-map XXY
  class XXX
   priority percent 75
   set dscp default
  class class-default
   fair-queue
   set dscp default

If it finds a match for rtp will it stop looking or if there is traffic for rtp and citrix and the router sees it will it match/tag on both to apply QoS to that traffic?

Thank you

Lynne

1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Super Silver

Re: QoS class-map match-any

Hello Lynn/Jon

to be noted that the same packet cannot be classified (= be a match) for RTP and for citrix at the same time, just for correctness

match -all = logical AND of all conditions   all conditions must be true for a match

match -any = logical OR of all conditions  if at least one condition is true there is a match

Hope to help

Giuseppe

8 REPLIES
Hall of Fame Super Blue

Re: QoS class-map match-any

lkadlik wrote:

When you create a class map using the match any functionality, does it read the class map from the top down and then stop on the first match it sees or does it look at all the match statements?

For ex

class-map match-any XXX

  match protocol rtp
  match ip dscp ef
  match protocol citrix
!
!

If it finds a match for rtp will it stop looking or if there is traffic for rtp and citrix and the router sees it will it match/tag on both to apply QoS to that traffic?

Thank you

Lynne

Lynne

With match-any it reads them in order and stops once/if it finds a match.

With match-all it has to match against all the match statements so it needs to read them all as long as it keeps matching ie. it it doesn't match in one of the match statements there is no need to keep trying to match in the following match statements.

In the above example if there is match for rtp it will stop trying to match against anything else and will not check your other match conditions. So obviously with match-any the order of the match conditions is all important.

Jon

New Member

Re: QoS class-map match-any

Thank you Jon.  That is very helpful.

Two more questions,  if i want to make sure that all of the items in my class-map are matched on when the appropriate traffic is generated.  Will it work if i create a separate class map for each item I want QoS on and apply each class-map to the policy-map applied?

Also, my understanding of the match-all functionality is that all the items you set to match in a class-map need to be present ( ie traffic) for the policy to be applied.  Is this correct?

Thank you.

Hall of Fame Super Blue

Re: QoS class-map match-any

lkadlik wrote:

Thank you Jon.  That is very helpful.

Two more questions,  if i want to make sure that all of the items in my class-map are matched on when the appropriate traffic is generated.  Will it work if i create a separate class map for each item I want QoS on and apply each class-map to the policy-map applied?

Also, my understanding of the match-all functionality is that all the items you set to match in a class-map need to be present ( ie traffic) for the policy to be applied.  Is this correct?

Thank you.

Lynne

If you want all of your items in your class-map to be matched then you should use the match-all as you say. Only traffic that then matches all the items within your class-map will pass the test.

Jon

New Member

Re: QoS class-map match-any

If I did a match-all list and only 2 out of the three items were present (say rtp and citrix) would qos still be applied to the rtp and citrix traffic if nothing is getting tagged for in regards to dscp ef?

Hall of Fame Super Blue

Re: QoS class-map match-any

lkadlik wrote:

If I did a match-all list and only 2 out of the three items were present (say rtp and citrix) would qos still be applied to the rtp and citrix traffic if nothing is getting tagged for in regards to dscp ef?


Lynne

No it wouldn't. Match-all means just what it says ie. all items must be matched for the relevant policy map entry to be applied.

Jon

New Member

Re: QoS class-map match-any

Thank you.

Hall of Fame Super Blue

Re: QoS class-map match-any

No problem, glad to have helped.

Jon

Hall of Fame Super Silver

Re: QoS class-map match-any

Hello Lynn/Jon

to be noted that the same packet cannot be classified (= be a match) for RTP and for citrix at the same time, just for correctness

match -all = logical AND of all conditions   all conditions must be true for a match

match -any = logical OR of all conditions  if at least one condition is true there is a match

Hope to help

Giuseppe

7208
Views
20
Helpful
8
Replies