一、清除整个交换机或路由器配置命令
在用户视图下执行reset saved-configuration,然后重启路由器即可。
在配置reset saved-configuration命令后,重启设备时请选择不保存当前配置文件。
清除和重新配置的信息只能在设备重新启动后生效,当前配置不变。
<HUAWEI>reset saved-configuration
Warning: The action will delete the saved configuration on the device.
The configuration will be erased to reconfigure.Continue? [Y/N]:y
Warning: Now the configuration on the device is being deleted.
Info: Succeeded in clearing the configuration on the device.
<HUAWEI>reboot
MPU 17:
Next startup system software: cfcard:/VRPV200R005C10SPC607B607D0306_ce12800.cc
Next startup saved-configuration file: NULL
Next startup paf file: default
Next startup patch package: NULL
Warning: The current configuration will be saved to the next startup saved-configuration file. Continue? [Y/N]:n
Warning: The system will reboot. Continue? [Y/N]:y
二、save命令保存配置
<HUAWEI>save
Warning: The current configuration will be written to the device. Continue? [Y/N]:y
Info: Please input the file name(*.cfg, *.zip, *.dat):huawei.cfg
Now saving the current configuration to the slot 17
Info: Save the configuration successfully.
三、清除交换机或路由器某个端口地配置命令
<HUAWEI>system-view
Enter system view, return user view with return command.
[~HUAWEI]clear configuration interface GE 1/0/1
Warning: All running configurations of the interface will be cleared immediately. Continue? [Y/N]:y
Info: Total 1 commands executed, 1 successful, 0 failed.