From: Chris Lewis (chrlewiscsco@gmail.com)
Date: Sat Feb 11 2006 - 11:13:44 GMT-3
Sameer,
Why do yo uthink the documentation is wrong? It looks correct to me.
The question of file extensions versus mime types comes up every few months.
The issue to be aware of is to be exactly clear on the wording of the
question.
If you are asked to match on file types, you are being asked for mime (match
using http mime), however if the question specifies a file extension,
meaning some characters folloing a period, like.gif you are being asked to
match on a file name (match using http url).
A nice way to see how Cisco differentiates this in an example is to use the
documentation seach facility and type in class-map gif http jpeg
The first document returned
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121newft/121l
imit/121e/121e6/dnbar.htm
shows this example.
*Step 3 * Classify all audio, video, and image web traffic:
Router(config)# *class-map match-any audio_video*
Router(config-cmap)# *match protocol http mime "audio/*"*
Router(config-cmap)# *match protocol http mime "video/*"*
Router(config)# *class-map match-any web_images*
Router(config-cmap)# *match protocol http url "*.gif"*
Router(config-cmap)# *match protocol http url "*.jpg*|**.jpeg"*
Router(config)# *class-map match-any av_im_web*
Router(config-cmap)# *match class-map audio_video*
Router(config-cmap)# *match class-map web_images*
So in the first part mime is used to match on any audio or video file with
the appropriate embedded mime type.
The second stage matches on any file with the externsion .gif, .jpg or
.jpeg.
So the simple rule to remember is if there is a period to match on, you are
to match on a file name and therefore use http url, if you are being asked
to match on a class of file, like audio or video and no period is defined in
the question matching criteria, use mime.
Chris
On 2/11/06, sameer.azam@gmail.com <sameer.azam@gmail.com> wrote:
>
> Hi,
> What is the correct way to indentify the http traffic containing
> .jpg, .gif and so on.
> I mean to say how would you creat the CLASS-MAP.
>
> If you check in the cisco site at
>
http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cr/hqos_r/
qos_m1h.htm#wp1112789
>
>
> they have given the example as follows;
> The following example classifies, within the class map called "class3,"
> packets based on the Joint Photographics Expert Group (JPEG) MIME type:
>
> class-map class3
>
> match protocol http mime "*jpeg"
>
>
> Which according to me is wrong.
> So if any one else there who knows how to match this traffic then pls
> share with us.
> Regards
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
This archive was generated by hypermail 2.1.4 : Wed Mar 01 2006 - 11:28:17 GMT-3