02-16-2010 11:13 AM - edited 03-04-2019 07:31 AM
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
Solved! Go to Solution.
02-16-2010 02:59 PM
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
02-16-2010 11:52 AM
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
02-16-2010 11:57 AM
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.
02-16-2010 12:15 PM
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
02-16-2010 12:27 PM
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?
02-16-2010 12:32 PM
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
02-16-2010 01:09 PM
Thank you.
02-16-2010 01:17 PM
No problem, glad to have helped.
Jon
02-16-2010 02:59 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide