华为虚拟局域网(VLAN)技术之VLAN的添加与删除

环境:VLAN的添加

在SW1上配置VLAN

system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]vlan 2 
[SW1-vlan2]description Local-VLAN2 //添加VLAN描述
[SW1-vlan2]quit
Dec 16 2019 20:47:58-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 6, the c
hange loop count is 0, and the maximum number of records is 4095.it 
[SW1]vlan 3
[SW1-vlan3]
Dec 16 2019 20:48:08-08:00 SW1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 7, the c
hange loop count is 0, and the maximum number of records is 4095.   
[SW1-vlan3]quit 

在SW2上配置VLAN

system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW2
[SW2]vlan batch 2 3 //创建多个不必连续的VLAN,每个VLAN之间插入空格,而添加多个连续则用to
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW2]
Dec 16 2019 20:48:58-08:00 SW2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 5, the c
hange loop count is 0, and the maximum number of records is 4095.
[SW2]vlan 3 
[SW2-vlan3]description Local-VLAN3 //添加VLAN描述
[SW2-vlan3]quit

检查SW1上的VLAN配置

检查SW2上的VLAN配置

环境:VLAN的删除

想要删除已经创建的VLAN,只需要在创建VLAN的命令前添加undo

上一篇
下一篇