CISCO交换机如何删除Vlan

在一个网络系统中VLAN规划好后一般是不需要对Vlan进行变更。实际应用中可能会因为网络的结构的变化,而对Vlan进行重新规划,那就涉及要Vlan的删除或重建。Vlan的删除在cisco思科交换机中非常简单,只要在核心交换机上进行操作就可以了。

在核心交换机上配置:

4506》en

password:输入密码

4506#vlandatabase回车后显示:

%Warning:ItisrecommendedtoconfigureVLANfromconfigmode,asVLANdatabasemodeisbeingdeprecated.PleaseconsultuserdocumentationforconfiguringVTP/VLANinconfigmode.

4506(vlan)#novlan2

删除vlan2,按照此命令格式将需要删除的Vlan全部删除。最后使用apply命令所有设置生效

4506(vlan)#apply

APPLYcompleted.

退出

4506(vlan)#exit

APPLYcompleted.

Exiting.

4506#

进入配置状态将所有vlan配置的ip均删除掉

4506#conft

4506#conft

Enterconfigurationcommands,oneperline.EndwithCNTL/Z.

4506(config)#intvlan2

4506(config-if)#noipaddress10.XX.XX.XX255.255.255.0

4506(config-if)#exit

4506(config)#intvlan3

依次删除所有设定的IP地址

最后使用

4506#shrun

来查看配置情况

使用shvlan来查看Vlan的设置情况

4506#shvlan

最后是保存cisco的设置

4506#copyrunstart

Destinationfilename[startup-config]?

Buildingconfiguration.

Compressedconfigurationfrom5469bytesto2088bytes[OK]

4506#

提问:用novlan删除VLAN,但是VLAN删不干净,怎么删比较干净?

解答:这样当然删不干净了,因为配置VLAN时还配置过接口。

先删接口

switch(config)#intraf0/1-5

switch(config-if)#noswitchportaccessvlan20

switch(config-if)#exit

再删除配置接口

switch(config)#nointvlan20

删除VLAN

switch(config)#NOvlan20


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章