cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10368
Views
20
Helpful
8
Replies

QoS class-map match-any

lkadlik
Level 1
Level 1

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

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

View solution in original post

8 Replies 8

Jon Marshall
Hall of Fame
Hall of Fame

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

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.

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

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?

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

Thank you.

No problem, glad to have helped.

Jon

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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card