Enable Factory Default Behavior

Specifies whether the switch uses the factory default settings at startup. The default value is disabled. This flag is automatically reset to the default value after the CPU restarts. If you change this parameter, you must restart the switch.

About this task

The factory default boot configuration flag supports the following behaviors:

Table 1. Factory default boot configuration flag parameters

Parameter

Action

no parameter used

Removes the configuration files, primary and secondary config file names, all user account passwords, digital certificates, IKE/OSPF/IS-IS keys, and SNMP communities. All ports are disabled and assigned to VLAN 1. License files are not removed.

config-only

Boots the switch with a blank configuration.

This parameter preserves configuration files, primary and secondary configuration file names, user accounts and passwords, digital certificates, IKE/OSPF/IS-IS keys, license files, and SNMP communities. All ports are disabled and assigned to VLAN 1.

Use this parameter as a temporary troubleshooting option to test or investigate if something is wrong with the configuration without permanently removing the configuration files, user accounts, and other preserved items.

reset-all-files

Equivalent to a switch that ships from the factory. The switch has no configuration files, default user accounts, default security mode, Auto-sense-enabled ports, removes license files, and performs a ZTP+ configuration after reboot. The 30-day factory license is also reset.

Note:

You can also use the unconfigure switch command to achieve the same behavior.

zero-touch

Boots the switch with a default configuration that enables Auto-sense. This parameter resets secure files but keeps the security mode and performs a ZTP+ configuration after reboot. License files are not removed.

zero-touch-config-only

Boots the switch with a blank configuration that enables Auto-sense and performs a ZTP+ configuration.

This parameter preserves configuration files, primary and secondary configuration file names, user accounts and passwords, digital certificates, IKE/OSPF/IS-IS keys, license files, and SNMP communities. All ports are disabled and assigned to VLAN 1.

Use this parameter as a temporary troubleshooting option to test or investigate if something is wrong with the configuration without permanently removing the configuration files, user accounts, and other preserved items.

Procedure

  1. Enter Global Configuration mode:

    enable

    configure terminal

  2. Enable factory default behavior:

    boot config flags factorydefaults [config-only | reset-all-files | zero-touch | zero-touch-config-only]

  3. Save the changed configuration.
  4. Restart the switch.

Examples

The following examples display the factory default flag behaviors.

Switch:1>enable
Switch:1#configure terminal
Switch:1(config)#boot config flags factorydefaults config-only
Warning: If you try to reset with a new image, it will not be loaded.
         To undo this operation use "no boot config flags factorydefaults".
Switch:1>enable
Switch:1#configure terminal
Switch:1(config)#boot config flags factorydefaults reset-all-files
Warning: Factorydefaults flag will delete all config (*.cfg) files on /intflash/,
         as well as local password files, authentication keys, and certificates.
         Also, if you try to reset with a new image, it will not be loaded.
         Enhanced Secure and HiSecure modes will also be reset.
         Ports will be configured with auto-sense enabled.
         License files will also be removed on non-Universal-Hardware.
         To undo this operation use "no boot config flags factorydefaults".
Switch:1>enable
Switch:1#configure terminal
Switch:1(config)#boot config flags factorydefaults zero-touch
Warning: Factorydefaults flag will delete runtime, primary and backup config files,
         as well as local password files, authentication keys, and certificates.
         Also, if you try to reset with a new image, it will not be loaded.
         Ports will be configured with auto-sense enabled.
         To undo this operation use "no boot config flags factorydefaults".
Switch:1>enable
Switch:1#configure terminal
Switch:1(config)#boot config flags factorydefaults zero-touch-config-only
Warning: If you try to reset with a new image, it will not be loaded.
           Ports will be configured with auto-sense enabled.
           To undo this operation use "no boot config flags factorydefaults".