Not involved
After configuring the S1850, the customer was unable to access the web interface and wanted to restore the switch to factory settings. The only way to access the device was through the CLI.
You can restore the factory settings in the CLI as follows:
Method 1:
1. Use the reset save command to clear the configuration.
2. Restart the switch.
Method 2:
Delete the startup.cfg file of the switch.
Method 1:
<H3C>reset saved-configuration //Clear switch configuration
The saved configuration file will be erased. Are you sure? [Y/N]:y // The device prompts that the saved configuration will be deleted
Configuration file in flash: is being cleared. Please wait ...
MainBoard:
Configuration file is cleared.
<H3C>reboot // Restart the switch
Start to check configuration with next startup configuration file, please wait.........DONE!
Current configuration may be lost after the reboot, save current configuration? [Y/N]:n // The device prompts that the current configuration will be lost after restarting. Do you want to save the current configuration? Select n
This command will reboot the device. Continue? [Y/N]:y // The device prompts that the device will restart. Do you want to continue? Select Y
Now rebooting, please wait...
%Dec 14 20:48:39:352 2019 SW1 DEV/5/SYSTEM_REBOOT: System is rebooting now.
Method 2:
<H3C>dir //View the switch files through the dir command
Directory of flash:
0 drw- - Dec 14 2019 20:37:24 diagfile
1 -rw- 1554 Dec 14 2019 20:50:06 ifindex.dat
2 -rw- 21632 Dec 14 2019 20:37:24 licbackup
3 drw- - Dec 14 2019 20:37:24 license
4 -rw- 21632 Dec 14 2019 20:37:24 licnormal
5 drw- - Dec 14 2019 20:48:38 logfile
6 -rw- 0 Dec 14 2019 20:37:24 s5820v2_5830v2-cmw710-boot-a7514.bin
7 -rw- 0 Dec 14 2019 20:37:24 s5820v2_5830v2-cmw710-system-a7514.bin
8 drw- - Dec 14 2019 20:37:24 seclog
9 -rw- 6118 Dec 14 2019 20:50:06 startup.cfg // This is the startup switch configuration, delete this file
10 -rw- 110464 Dec 14 2019 20:50:06 startup.mdb
1046512 KB total (1046300 KB free)
<H3C>delete startup.cfg // Use the delete command to delete the startup.cfg startup configuration file
Delete flash:/startup.cfg? [Y/N]:y // The device prompts whether to delete, select Y
Deleting file flash:/startup.cfg... Done.
<H3C>reboot // Restart the switch
Start to check configuration with next startup configuration file, please wait.........DONE!
Current configuration may be lost after the reboot, save current configuration? [Y/N]:n // The device prompts that the current configuration will be lost after restarting. Do you want to save the current configuration? Select n
This command will reboot the device. Continue? [Y/N]:y // The device prompts that the device will restart. Do you want to continue? Select Y
Now rebooting, please wait...