From: Brian McGahan (bmcgahan@internetworkexpert.com)
Date: Tue Jan 06 2004 - 18:06:55 GMT-3
Nathasha,
When you create a class-map it is "match-all" by default. This
means that all match statements in the class must be true for the class to
be true. For example, suppose you want to match the SQL Slammer worm. It
used udp port 1434 and had a packet length of 404 bytes:
access-list 100 permit udp any any eq 1434
!
class-map match-all SQL_SLAMMER
match access-group 100
match packet length min 404 max 404
The above says that the packet must be destined for udp port 1434,
and have a length of 404.
For the "match-any", it is a logical or. As long as any of the
match statements are true then the class is true. For example, let's say
you want to match peer-to-peer traffic:
class-map match-any PEER-TO-PEER
match protocol kazaa2
match protocol gnutella
match protocol fasttrack
In the above case a "match-all" would not be appropriate because the
traffic can't be kazaa ver 2 and gnutella at the same time.
Lastly, the default class of "class-default" is automatically
created for you, and is a FIFO queue unless otherwise specified:
ip cef
!
policy-map QOS
class PEER-TO-PEER
priority percent 99
class SQL_SLAMMER
drop
!
interface Ethernet0/0
max-reserved-bandwidth 100
service-policy output QOS
Router#show policy int e0/0
Ethernet0/0
Service-policy output: QOS
Class-map: PEER-TO-PEER (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: protocol kazaa2
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol gnutella
0 packets, 0 bytes
5 minute rate 0 bps
Match: protocol fasttrack
0 packets, 0 bytes
5 minute rate 0 bps
Queueing
Strict Priority
Output Queue: Conversation 264
Bandwidth 99 (%)
Bandwidth 9900 (kbps) Burst 247500 (Bytes)
(pkts matched/bytes matched) 0/0
(total drops/bytes drops) 0/0
Class-map: SQL_SLAMMER (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: access-group 100
Match: packet length min 404 max 404
drop
Class-map: class-default (match-any) <---default class
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
If you want to change the options of the default class you can:
policy-map QOS
class PEER-TO-PEER
priority percent 99
class SQL_SLAMMER
drop
class class-default
fair-queue
random-detect
Router#show policy int e0/0 | begin class-default
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Queueing
Flow Based Fair Queueing
Maximum Number of Hashed Queues 256
(total queued/total drops/no-buffer drops) 0/0/0
exponential weight: 9
class Transmitted Random drop Tail drop Minimum Maximum Mark
pkts/bytes pkts/bytes pkts/bytes thresh thresh
prob
0 0/0 0/0 0/0 20 40 1/10
1 0/0 0/0 0/0 22 40 1/10
2 0/0 0/0 0/0 24 40 1/10
3 0/0 0/0 0/0 26 40 1/10
4 0/0 0/0 0/0 28 40 1/10
5 0/0 0/0 0/0 30 40 1/10
6 0/0 0/0 0/0 32 40 1/10
7 0/0 0/0 0/0 34 40 1/10
rsvp 0/0 0/0 0/0 36 40 1/10
HTH,
Brian McGahan, CCIE #8593
bmcgahan@internetworkexpert.com
Internetwork Expert, Inc.
http://www.InternetworkExpert.com
Toll Free: 877-224-8987
Direct: 708-362-1418 (Outside the US and Canada)
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
> Nathasha Aleyevka
> Sent: Tuesday, January 06, 2004 2:43 PM
> To: ccielab@groupstudy.com; cisco@groupstudy.com
> Subject: Simple Q:CBWFQ !
>
> I have been working on CBWFQ
> config and have a question regarding class-map
> creation.
>
> I defined the class maps for protocols X, Y and Z,
> then create a policy and finally applied it to an
> interface
>
> class-map match-any X
> match protocol X
>
>
> class-map match-any Y
> match protocol Y
>
> class-map match-any Z
> match protocol Z
>
> Q1: When do I use match-all vs match-any?
> Q2: For the rest of the traffic do I need to define a
> class-map match "class-default" or
> class-map match Other-- does it matter?
> Thank you
> Nathasha
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
>
> _______________________________________________________________________
> Please help support GroupStudy by purchasing your study materials from:
> http://shop.groupstudy.com
>
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
This archive was generated by hypermail 2.1.4 : Mon Feb 02 2004 - 09:07:37 GMT-3