h1

Renaming Class-maps and Policy-maps

October 19, 2009

I saw someone removing a Policy-Map and the associated Class-Maps, just to rename the class-map to the correct naming standard. And although the intention was great conforming to network standards, there is an easier way.

Within the class-map and the Policy-Map there is a rename option. What is really cool, Mr IOS will update the mappings that are in use or referenced by that name auto-magically.

Class-Maps

Take the following Class-Map and Policy-Map I ‘errornously’ created:

cmpm-1

Enter the Class-Map configuring mode and rename (this class-map) as follow:
#class-map TSET-CLASSMAP
#rename TEST-CLASSMAP

Have a look at the Policy-Map again, you will see the Class-Map reference was updated for you:
cmpm-2

Policy-Maps

Same goes when renaming a Policy-Map that is already associated on a interface:
cmpm-3

Entering the Policy-Map configuration mode, issue the rename command to correct the finger troubles as follow:
#policy-map TESS-POLICYMAP
#rename TEST-POLICYMAP

Looking at the interface again, you will see Mr. IOS was kind enough to change the referenced name:
cmpm-4

Advertisements

One comment

  1. Hi in Which IOS version this apply? I tried on SRE3 12.2 and there is no command rename inside the policy-map or class-map!



Please leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s