Cannot set the port security mode

Symptom

Cannot set the port security mode for a port.

Analysis

For a port operating in a port security mode other than noRestrictions, you cannot change the port security mode by using the port-security port-mode command.

Solution

To resolve the problem:

  1. Set the port security mode to noRestrictions.

    [Device-GigabitEthernet1/0/1] undo port-security port-mode
    
  2. Set a new port security mode for the port, for example, autoLearn.

    [Device-GigabitEthernet1/0/1] port-security port-mode autolearn
    
  3. If the problem persists, contact Hewlett Packard Enterprise Support.