RE: Class-map match protocol http

From: Chris Gray (chris.gray@ozonenetworks.net)
Date: Sat May 24 2008 - 20:42:50 ART


Thanks guys

So putting the issue of "mime" versus "url" aside for a moment.

rtr1(config)# class-map match-any Drop-Images
rtr1(config-cmap)# match protocol http url "*.jpg"
rtr1(config-cmap)# match protocol http url "*.gif"
rtr1(config-cmap)# match protocol http url "*.bmp"
rtr1(config-cmap)# match protocol http url "*.png"
rtr1(config-cmap)# match protocol http url "*.jpeg"

is the same as
rtr1(config)# class-map match-any Drop-Images
rtr1(config-cmap)# match protocol http url "*.jpg | *.gif |*.bmp | *.png|
*.jpeg"

?

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Joseph Brunner
Sent: 24 May 2008 23:34
To: 'Mike M'
Cc: ccielab@groupstudy.com
Subject: RE: Class-map match protocol http

I have seen it done both ways... I would lab it up...

Just remember, you are matching in the direction of the http get...

Not the direction of the http response from the server when you do this
stuff with NBAR for http.

Consider this example...

!
class-map match-any IMAGES
  match protocol http url "*.jpg"
  match protocol http url "*.gif"
  match protocol http url "*.jpeg"
!
class-map match-all POLICE
  match protocol http host "www.affirmedsystems.com"
  match protocol http url "directory/*"
!
class-map match-all DIE
  match class-map IMAGES
  match protocol http host "www.affirmedsystems.com"
  match protocol http url "directory/*"
  !
!
policy-map TASK
  class DIE
   drop
  class POLICE
   police 64000
  class class-default
!

-Joe

-----Original Message-----
From: Mike M [mailto:mike_malan@yahoo.co.uk]
Sent: Saturday, May 24, 2008 5:44 PM
To: Joseph Brunner
Cc: ccielab@groupstudy.com
Subject: RE: Class-map match protocol http

Hi, Joe and others

A little bit confused with the following. You may be
able to help.

If I need to match gif, jpeg and jpg files wouldnt you
match mime not url? I thought these image files are
mime files?

eg,
Match: protocol http mime "*.jpeg|*.jpg|*.gif"

NOT

Match: protocol http url "*.jpeg|*.jpg|*.gif"

Thanks
Mike M

-- Joseph Brunner <joe@affirmedsystems.com> wrote:

> I'm not the joe, but try this link...
>
> http://www.wr-mem.com/?p=95
>
> this horse had really be beaten down a few times...
> try, victor capucchio's
> block as well...
>
>
http://vcappuccio.wordpress.com/2007/10/21/how-to-use-the-drop-statment-in-m
> qc/
>
> -Joe
>
> -----Original Message-----
> From: nobody@groupstudy.com
> [mailto:nobody@groupstudy.com] On Behalf Of
> kriz@ozonenetworks.net
> Sent: Saturday, May 24, 2008 4:26 PM
> To: ccielab@groupstudy.com
> Subject: Class-map match protocol http
>
> HI,
>
> Can someone please clarify something for me?
>
> I think I have seen this mentioned before but cannot
> find it in the archive
> -
> sorry if I am duplicating a question here.
>
> MQC question.
>
> When creating a class-map to match a url for
> arguments sake
> http://www.simplyip.co.uk/home
>
> If I match like this:
>
> class-map match all WWW
> match protocol http url
> "http://www.simplyip.co.uk/home"
>
> is it the same as
>
> class-map match all WWW
> match protocol http host www.simplyip.co.uk
> match protocol http /home
>
> secondly, if trying to match multiple mime types for
> example .gif .tif and
> .jpeg
>
> is this
>
> class-map match any MIME
> match protocol http mime "*.gif | *.tif | *.jpeg"
>
> the same as
> class-map match any MIME
> match protocol http mime *.gif
> match protocol http mime *.tif
> match protocol http mime *.jpeg
>
>
> I really appreciate your help - Thanks
>
>
>



This archive was generated by hypermail 2.1.4 : Mon Jun 02 2008 - 06:59:18 ART