Modifying classes in a policy

You can modify the classes and class-action statements in a policy configuration without removing them from the policy:
  • To modify the match/ignore statements in a class, enter the class-configuration context with the command, and make the necessary changes by removing or replacing existing statements. To display a class configuration, enter the following command as shown in Resequencing a class configuration:
    
    show class [ipv4 | ipv6] classname
    
    When you exit class configuration context, the changes are automatically saved and applied to existing policy configurations on the switch that use the class if the policies have not been applied to an interface. If a policy has already been applied to an interface, the editing changes are not accepted and an error message is displayed.
  • To modify the class-action statements in a policy, enter the policy-configuration context with the policy feature-name policy-name command. To display a policy configuration, enter the following command as shown in Resequencing a policy configuration:
    
    show policy feature-name policy-name
    
    Then do one of the following:
    • You can enter a new class-action statement. If you do not enter a sequence number, the new class-action statement is inserted at the end of the policy configuration.

    • To remove a class-action statement from a policy configuration, enter the no sequence-number command or the complete form of the no class ... action command.

    • To resequence the order in which class-action statements are listed, enter the resequencecommand.

    • To replace an existing class-action statement, enter the no sequence-number command to delete the entry, and re-enter the following complete command:
      
      class [ipv4 | ipv6] classname action action-name or default-class action action-name
      

When exiting the policy-configuration context, the changes are automatically saved and applied to the policy configuration if the policy has not been applied to an interface. If the policy has already been applied to an interface, the editing changes are not accepted and an error message is displayed.