cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
269
Views
0
Helpful
2
Replies
Highlighted
Beginner

QoS match-any

What would be the default behavior if there is no matching criteria under class-map match-any? Would that turn into "match-all' behavior??

 

Example:

class-map match-any test

!

policy-map remarkdefault
class test
set ip dscp default
!

interface GigabitEthernet1/0/1

service-policy input remarkdefault

 

Would all inbound packets be remarked to dscp 0?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
VIP Expert

Hello,

 

without any 'match' statements in the class-map, all traffic goes to the default class:

 

Router#sh policy-map interface
GigabitEthernet0/0

Service-policy input: remarkdefault

Class-map: test (match-any)
0 packets, 0 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: none
0 packets, 0 bytes
5 minute rate 0 bps
QoS Set
dscp default
Packets marked 0

Class-map: class-default (match-any)
4 packets, 456 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: any

View solution in original post

2 REPLIES 2
Highlighted
VIP Expert

Hello,

 

without any 'match' statements in the class-map, all traffic goes to the default class:

 

Router#sh policy-map interface
GigabitEthernet0/0

Service-policy input: remarkdefault

Class-map: test (match-any)
0 packets, 0 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: none
0 packets, 0 bytes
5 minute rate 0 bps
QoS Set
dscp default
Packets marked 0

Class-map: class-default (match-any)
4 packets, 456 bytes
5 minute offered rate 0000 bps, drop rate 0000 bps
Match: any

View solution in original post

Highlighted
Beginner

I think you are misunderstanding the logic behind match-any and match-all statements.

 

Match-Any means that the traffic is classified if ANY of the statements below it are true. Meaning if you had 5 statements, only one statement being true would make that traffic be in the 'class'.

 

Match-All means that the traffic is classified if ALL of the statements below it are true. Meaning if you had 5 statements, all five statements would need to be true in order make that traffic be in the 'class'.

 

In your case, since there aren't any "match" statements, no traffic will be in the 'class'

 

https://community.cisco.com/t5/switching/class-map-match-all-or-match-any-exact-difference/td-p/783620

 

 

Content for Community-Ad