一、清除整个交换机或路由器配置命令
在用户视图下执行reset saved-configuration,然后重启路由器即可。
在配置reset saved-configuration命令后,重启设备时请选择不保存当前配置文件。
清除和重新配置的信息只能在设备重新启动后生效,当前配置不变。
<Huawei>reset saved-configuration The configuration will be erased to reconfigure. Continue? [Y/N]: y <Huawei>reboot Warning: All the configuration will be saved to the configuration file for the n ext startup:, Continue?[Y/N]: n //此时要选择n,若选择y则之前的配置会保存,重启后仍然是原来的配置。
reboot命令为重启命令
二、save命令保存配置
有些设备首次保存(save)需先按提示输入y,再按两次回车提示保存成功。 save 用户视图输入save命令 The current configuration will be written to the device. Are you sure to continue?[Y/N]y 按提示输入y,回车 Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]: Jul 1 2016 10:16:47-08:00 Huawei %%01CFM/4/SAVE(l)[0]:The user chose Y when dec iding whether to save the configuration to the device. 再次回车 Now saving the current configuration to the slot 0. Save the configuration successfully. 提示保存成功
三、清除交换机或路由器某个端口地配置命令
<huawei>system-view [huawei]interface gigabitethernet 0/0/? (?:表示第几个端口) [huawei-GigabitEthernet0/0/?]clear configuration interface gigabitethernet 0/0/? 清除该端口的配置后,该端口处于关闭状态,可以用以下命令重新开启。 [huawei-GigabitEthernet0/0/?]undo shutdown