-
單接口切換:接口視圖下執行命令undo portswitch,配置接口切換到三層模式。缺省情況下,以太網接口處於二層模式。
# 將接口10GE1/0/1切換為三層模式。<HUAWEI> system-view [~HUAWEI] interface 10ge 1/0/1 [~HUAWEI-10GE1/0/1] undo portswitch [*HUAWEI-10GE1/0/1] commit
-
批量切換:系統視圖下,執行命令undo portswitch batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10>,批量切換接口二三層模式。
# 批量切換接口10GE1/0/1~10GE1/0/3到三層模式。<HUAWEI> system-view [~HUAWEI] undo portswitch batch 10ge 1/0/1 to 1/0/3 [*HUAWEI] commit

使用該命令進行接口的二三層模式切換時,接口下只能存在屬性配置信息(例如shutdown、description配置),模式切換功能才可以生效。如果已經有業務配置存在時(例如port link-type trunk配置),需要先將該接口下的業務配置全部清除再執行該命令。
在接口使用命令undo portswitch,將以太網接口從二層模式切換到三層模式后,支持配置IP地址或者三層子接口等。