cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
594
Views
0
Helpful
2
Replies

QoS match-any

nbhungalia
Level 1
Level 1

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

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

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

mikeleebrla
Level 1
Level 1

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

 

 

Review Cisco Networking products for a $25 gift card