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:
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:
Policy-Maps
Same goes when renaming a Policy-Map that is already associated on a interface:
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:
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!