RE: class-map match

From: Ryan West <rwest_at_zyedge.com>
Date: Wed, 20 Jan 2010 18:14:25 +0000

Well, the combined example of putting a match-any and then listing match
clause on two separate lines, having it join to one.

*Class-map Match-any TST*

* Match dscp 31*

* Match dscp 41*

And if you do a show run after you configure the above example, the IOS will
display it the proper way:

*Class-map Match-any TST*

* Match dscp 31 41*

From my router and my experience:

Rack1R1(config)#class-map match-any DSCP-26-24

Rack1R1(config-cmap)#match dscp 26

Rack1R1(config-cmap)#match dscp 24

class-map match-any DSCP-26-24

 match dscp af31

 match dscp cs3

And the fact that they are really the same. They may behave the same, but
they don't read the same and can't glean the same information from them. If I
wanted to figure out if a phone was sending me 24 or 26 for signaling or that
a 2950 wasn't configured with the proper CoS to DSCP map, I wouldn't be able
to with your example. Separated I can still show the number of packets for
each and apply whatever QoS functions I want.

-ryan

From: Narbik Kocharians [mailto:narbikk_at_gmail.com]
Sent: Wednesday, January 20, 2010 1:09 PM
To: Ryan West
Cc: Carlos G Mendioroz; ALL From_NJ; Mad_Prof Mad_Prof; estela Mathew; Joe
Astorino; Ed Man; GS
Subject: Re: class-map match

Which example are you referring to?
On Wed, Jan 20, 2010 at 10:05 AM, Ryan West
<rwest_at_zyedge.com<mailto:rwest_at_zyedge.com>> wrote:
Right.
> -----Original Message-----
> From: nobody_at_groupstudy.com<mailto:nobody_at_groupstudy.com>
[mailto:nobody_at_groupstudy.com<mailto:nobody_at_groupstudy.com>] On Behalf Of
> Narbik Kocharians
> Sent: Wednesday, January 20, 2010 12:48 PM
> To: Carlos G Mendioroz
> Cc: ALL From_NJ; Mad_Prof Mad_Prof; estela Mathew; Joe Astorino; Ed
> Man; GS
> Subject: Re: class-map match
>
> Have a look at the logic and it will make perfect sense:
>
>
>
> In the following example, you are matching packets that are marked with
> IPP
> 4 AND match access-list 100, so the logic says, in order for me to have
> a
> classification, the packet has to match to what ever I have defined in
> the
> access-list AND it has to also be marked with IPP4 (since you used
> *ip*precedence, it has to be an IPv4 packet as well)
>
>
> > Agreed,
> > but they are different, and the difference will be obvious when
> > you later on decide to add another line to the class.
> >
> > So far, I would expect them to behave almost the same, one will have
> > more granular counters in show policy though ?
> >
> > -Carlos
> >
I still agree with Carlos though, that the combined OR statement vs a listed
OR has benefits of both adding more configuration later and the policy map
counters:

Rack1R1(config-pmap-c)#do show run | s class-map|policy-map
class-map match-any DSCP-26-24
 match dscp af31
 match dscp cs3
class-map match-all DSCP-26-24-oneline
 match dscp cs3 af31
policy-map classify-in
 class DSCP-26-24
 class DSCP-26-24-oneline

Rack1R1(config-pmap-c)#do show policy-map int
 Serial0/2/0

 Service-policy input: classify-in

   Class-map: DSCP-26-24 (match-any)
     0 packets, 0 bytes
     5 minute offered rate 0 bps
     Match: dscp af31 (26)
       0 packets, 0 bytes
       5 minute rate 0 bps
     Match: dscp cs3 (24)
       0 packets, 0 bytes
       5 minute rate 0 bps

   Class-map: DSCP-26-24-oneline (match-all)
     0 packets, 0 bytes
     5 minute offered rate 0 bps
     Match: dscp cs3 (24) af31 (26)

   Class-map: class-default (match-any)
     11 packets, 868 bytes
     5 minute offered rate 0 bps, drop rate 0 bps
     Match: any

It might do the same thing, but you might miss a big part of the picture.

-ryan

--
Narbik Kocharians
CCSI#30832, CCIE# 12410 (R&S, SP, Security)
www.MicronicsTraining.com<http://www.MicronicsTraining.com>
Sr. Technical Instructor
YES! We take Cisco Learning Credits!
Training And Remote Racks available
Blogs and organic groups at http://www.ccie.net
Received on Wed Jan 20 2010 - 18:14:25 ART

This archive was generated by hypermail 2.2.0 : Thu Feb 04 2010 - 20:28:41 ART