As an example, I will reset the settings on the L2 switch Foxgate S6224-S2.
After connecting via telnet, I looked at what files were in memory:
S6224-S2#dir
nos.img 5,224,661
startup.cfg 5,394
Used 5,230,055 bytes in 2 files, Free 3,158,553 bytes.
To reset the configuration, simply delete the file:
delete startup.cfg
Another example of a reset command:
set default
Let’s restart the switch (since we deleted the configuration file, the settings will be reset to factory defaults):
reload
Default IP: 192.168.1.1, login/password: admin / admin.
After resetting and rebooting, let’s save the default configuration:
write
If you have forgotten the password, then during boot press Ctrl+B to enter BootROM mode / bootloader mode and similarly delete the configuration file:
delete startup.cfg
reboot
See also my article:
Setting up the Foxgate S6224-S2 switch