Creating a new class-map under a policy map

scheistermeisterscheistermeister Member Posts: 748 ■□□□□□□□□□
Alright, this is one thing I have not been able to figure out. This is a direct quote from the Net Acad material.
A nonexistent class can also be used within the policy-map configuration mode if the match condition is specified after the name of the class. The running configuration will reflect such a configuration by using the match-any strategy and inserting a full class map configuration.

The syntax is listed as:

router(config-pmap)#class class-name condition

I have tried:

class test
class test match-all match protocol ftp
class test match protocol ftp
class test condition

And I have tried it on a 2691, 2621XM, and a 2811 all with various versions of the 12.4(13 and 14b) IOS. Mainly IPAdvancedServersK9 and IPVoiceK9 and nothing has worked. So how is this done? Instructor had no clue when I asked her this morning and the context sensitive help doesn't pick it up either. Do I need a different IOS? Or is this one of the MANY goof ups that are in the new ONT material (I've seen tons of misspellings, wrong IPs listed, image reverse of what the text says, ect.).[/i]
Give a man fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life.

Comments

  • astorrsastorrs Member Posts: 3,139 ■■■■■■□□□□
    Most of the class statements you are entering belong in a class-map not a policy-map. I don't think match and condition are valid in a policy-map.

    That said, did you create a traffic class first? You may not be able to enter it if you haven't defined at least one. I think you might be combining a few steps.

    (I've only done this once or twice and it was a while ago so forgive me if I'm barking up the wrong tree).
  • scheistermeisterscheistermeister Member Posts: 748 ■□□□□□□□□□
    astorrs wrote:
    Most of the class statements you are entering belong in a class-map not a policy-map. I don't think match and condition are valid in a policy-map.

    That said, did you create a traffic class first? You may not be able to enter it if you haven't defined at least one. I think you might be combining a few steps.

    (I've only done this once or twice and it was a while ago so forgive me if I'm barking up the wrong tree).

    I know what I have tried which is that you have to make the class-map first. But that goes against what the material for the course says. That is why I am asking which is right. Sorta curious why they would say you could do it when you really can't. There is even an image of the syntax saying that you can create a class-map while under the policy-map configuration mode. I want to know if that is true or not.
    Give a man fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life.
  • astorrsastorrs Member Posts: 3,139 ■■■■■■□□□□
    Ah okay...

    You create a traffic class first. Then you create a traffic policy and associate it with the traffic class.

    Here's some more info:
    Traffic classes are used to match packets. On the contrary traffic policies are used to implement some control mechanisms over packets
    Having our router in policy-map configuration mode, we continue the work by populating the recently created policy with some previously created classes
    Creating a Traffic Class
    http://www.opalsoft.net/qos/CDS-21.htm

    Creating a Traffic Policy
    http://www.opalsoft.net/qos/CDS-22.htm
  • scheistermeisterscheistermeister Member Posts: 748 ■□□□□□□□□□
    I do not think you understand what I am asking...

    Normally you create the class-map and policy-map with something like:

    class-map FTP
    match protocol ftp

    policy-map APPLY_MAP
    class FTP

    Now what I have quoted above says that if you have not done the:

    class-map FTP
    match protocol ftp

    That you can do that while under the policy-map configuration WITHOUT having done it previously.

    2.jpg
    1.jpg
    Give a man fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life.
  • astorrsastorrs Member Posts: 3,139 ■■■■■■□□□□
    Okay I get it now. I'm slow tonight. ;)

    That never used to work and I tried it on a few 12.4T routers (a couple of 3845's running different IOS versions) and got the same thing as you.

    It could have been added to a brand new IOS version but I can't find any documentation in a quick Google search either.
  • scheistermeisterscheistermeister Member Posts: 748 ■□□□□□□□□□
    astorrs wrote:
    It could have been added to a brand new IOS version but I can't find any documentation in a quick Google search either.

    That's what I have been finding. I could not find it anywhere else on Cisco's site. I had heard once about something called "Ask The Experts" but finding a link to submit the question is easier said than done...

    Reason I am asking and am so curious is that I DID have a related question on my exam.
    Give a man fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life.
  • astorrsastorrs Member Posts: 3,139 ■■■■■■□□□□
    Yeah I've had no luck finding anything either. I see you posted it to the WAN, Routing and Switching Certification forum on Cisco.com maybe someone there has some insight (well either you did or someone is having the *exact* same problem ;)).
  • scheistermeisterscheistermeister Member Posts: 748 ■□□□□□□□□□
    Yup, that was me. That is where the Ask The Experts lead me.
    Give a man fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life.
  • geezer301geezer301 Member Posts: 25 ■□□□□□□□□□
    I think this is what you are looking for "http://vcappuccio.wordpress.com/".
  • scheistermeisterscheistermeister Member Posts: 748 ■□□□□□□□□□
    geezer301 wrote:
    I think this is what you are looking for "http://vcappuccio.wordpress.com/".
    R3#show ver | in IOS
    Cisco IOS Software, 7200 Software (C7200-IS-M), Version 12.4(13b), RELEAS
    ARE (fc3)

    No class map configured

    R3#show run class-map
    Building configuration…

    Current configuration : 6 bytes
    end

    No policy-map configured

    R3#show run policy-map
    Building configuration…

    Current configuration : 6 bytes
    end

    R3#conf ter
    Enter configuration commands, one per line. End with CNTL/Z.
    R3(config)#policy-map MYPM

    R3(config-pmap)#class match ?
    <cr>

    ok seems that we need to hit enter here, he is expeting class named match =)
    But…

    R3(config-pmap)#class match access-gr 102

    We have now a class-map configured automagically
    R3(config-pmap-c)#do show run class-map

    Building configuration…

    Current configuration : 60 bytes
    !
    class-map match-any match
    match access-group 102
    !
    end

    R3(config-pmap-c)#
    Now here the running configuration will show the configuration using the match-any strategy in the class-map

    Have fun!
    Victor.-

    Exactly! I wonder if it is has to do with the router he was trying it on was a 7200 or that he tied it to an ACL and didn't match using NBAR? I'll try it later and report back. Thanks!
    Give a man fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life.
  • astorrsastorrs Member Posts: 3,139 ■■■■■■□□□□
    geezer301 wrote:
    I think this is what you are looking for "http://vcappuccio.wordpress.com/".
    Yeah scheister have a look: http://vcappuccio.wordpress.com/2008/06/09/nonexisten-class-map/ (of course he has a 7200 running 12.4(13), all I had was puny little 3845's (I thought they were running ~13 too)... what am I saying he's probably using dynamips :D)
  • geezer301geezer301 Member Posts: 25 ■□□□□□□□□□
    I am using 'C7200-Is-Mz_20122-15_20T5.bin' with GNS3

    ````````````````````````````````````````````````
    Router#sh ver | i Version
    IOS (tm) 7200 Software (C7200-IS-M), Version 12.2(15)T5, RELEASE SOFTWARE (fc1)
    BOOTLDR: 7200 Software (C7200-IS-M), Version 12.2(15)T5, RELEASE SOFTWARE (fc1)
    6 slot VXR midplane, Version 2.1
    X.25 software, Version 3.0.0.
    Router#
    Router#config t
    Enter configuration commands, one per line. End with CNTL/Z.
    Router(config)#policy-map MYPOLMAP
    Router(config-pmap)#class match ?
    <cr>

    Router(config-pmap)#class match access-group 10
    Router(config-pmap-c)#do sh run class-map
    Building configuration...

    Current configuration : 61 bytes
    !
    class-map match-any match
    match access-group 10
    !
    end

    ```````````````````````````````````````````````````````````
Sign In or Register to comment.