环境:
华为S5735S-S24T4S-A
Software Version V200R019C10SPC500
问题描述:
华为交换机如何批量清除接口配置信息
解决方案:
1.单接口下清除
系统试图下
<Huawei>sy
[Huawei]clear configuration interface GigabitEthernet 0/0/1(清除0/0/1口配置)
Warning: All configurations of the interface will be cleared, and its state will
be shutdown. Continue? [Y/N] :y
[Huawei]int GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]dis this
shutdown
因清除接口下的配置后为shuadown (关闭)状态
[Huawei-GigabitEthernet0/0/1]undo shutdown 开启接口
#
return
接口下
[HW1730s-GigabitEthernet0/0/49]clear configuration this
Warning: All configurations of the interface GigabitEthernet0/0/49 will be cleared, and its state will be shutdown. Continue? [Y/N] :y.
Info: Total 2 command(s) executed, 2 successful, 0 failed.
[HW1730s-GigabitEthernet0/0/49]
May 21 2022 01:27:30 HW1730s DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.56813.5.25.191.3.1 configurations have been changed. The current change number is 19, the change loop count is 0, and the maximum number of records is 4095.
[HW1730s-GigabitEthernet0/0/49]dis th
#
interface GigabitEthernet0/0/49
shutdown
#
2.多接口统一清除
先建端口组,将端口批量加入端口组
[HUAWE]port-group 1
[HUAWEI-port-group-1]group-member GigabitEthernet0/0/3 to G0/0/6
在端口组下undo现有配置即可
[HUAWEI-port-group-1]undo p l
[HUAWEI-port-group-1]undo p d