02-05-2010 02:19 AM - edited 03-06-2019 09:35 AM
hi
can anyone tell me why I would need to use the match any, or match all statements in my class map, I have only normally used the match access list command.
thanks
Carl
Solved! Go to Solution.
02-05-2010 02:30 AM
carl_townshend wrote:
hi
can anyone tell me why I would need to use the match any, or match all statements in my class map, I have only normally used the match access list command.
thanks
Carl
Carl
If you do this-
class-map CS
match access-group 101
then in fact you are using the "match-all" anyway. Basically when you specify "class-map CS" that is shorthand for "class-map match-all CS". You don't need to specify it because it is the default but if you wanted to specify match-any then you would need to configure "class-map match-any CS".
Now if you are matching against a single access-list it doesn't really matter which you use. But lets say you have this -
class-map CS
match access-group 101
match ip dscp ef
now it makes a big difference which you specify. If you specify match-all then the packet must match the acl 101 and also have the DSCP value of 46 which is EF.
If you specify match-any then the packet only has to match one of the criteria ie. it only needs to either match the acl 101 or have a DSCP value of 46.
So the match-all/match-any gives you more flexibility when there are multiple criteria to match a packet against.
Jon
02-05-2010 02:30 AM
carl_townshend wrote:
hi
can anyone tell me why I would need to use the match any, or match all statements in my class map, I have only normally used the match access list command.
thanks
Carl
Carl
If you do this-
class-map CS
match access-group 101
then in fact you are using the "match-all" anyway. Basically when you specify "class-map CS" that is shorthand for "class-map match-all CS". You don't need to specify it because it is the default but if you wanted to specify match-any then you would need to configure "class-map match-any CS".
Now if you are matching against a single access-list it doesn't really matter which you use. But lets say you have this -
class-map CS
match access-group 101
match ip dscp ef
now it makes a big difference which you specify. If you specify match-all then the packet must match the acl 101 and also have the DSCP value of 46 which is EF.
If you specify match-any then the packet only has to match one of the criteria ie. it only needs to either match the acl 101 or have a DSCP value of 46.
So the match-all/match-any gives you more flexibility when there are multiple criteria to match a packet against.
Jon
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