sfyhip 发表于 2018-7-18 08:35:46

CISCO交换机如何删除 Vlan

  实际应用中可能会因为网络的结构的变化,而对Vlan进行重新规划,那就涉及要Vlan的删除或重建。
  Vlan的删除在cisco 思科交换机中非常简单,只要在核心交换机上进行操作就可以了
  在核心交换机上配置:
  4506>en
  password:输入密码
  4506#vlan database 回车后显示:
  % Warning: It is recommended to configure VLAN from config mode,
  as VLAN database mode is being deprecated. Please consult user
  documentation for configuring VTP/VLAN in config mode.
  4506(vlan)#no vlan 2
  删除vlan 2,按照此命令格式将需要删除的Vlan全部删除。最后使用apply命令所有设置生效
  4506(vlan)#apply
  APPLY completed.
  退出
  4506(vlan)#exit
  APPLY completed.
  Exiting....
  4506#
  进入配置状态将所有vlan配置的ip均删除掉
  4506#conf t
  4506#conf t
  Enter configuration commands, one per line.End with CNTL/Z.
  4506(config)#int vlan 2
  4506(config-if)#no ip address 10.XX.XX.XX 255.255.255.0
  4506(config-if)#exit
  4506(config)#int vlan 3
  .
  .
  .
  依次删除所有设定的IP地址
  最后使用
  4506#sh run
  来查看配置情况
  使用sh vlan来查看Vlan的设置情况
  4506#sh vlan
  最后是保存cisco的设置
  4506#copy run start
  Destination filename ?
  Building configuration...
  Compressed configuration from 5469 bytes to 2088 bytes
  4506#
  学员提问:
  用no vlan删除VLAN,但是VLAN删不干净,怎么删比较干净?
  捷盈讲师及学员解答:
  这样当然删不干净了,因为配置VLAN时还配置过接口。
  先删接口
  switch(config)#int ra f0/1 - 5
  switch(config-if)#no switchport access vlan 20
  switch(config-if)#exit
  再删除配置接口
  switch(config)#no int vlan 20
  删除VLAN
  switch(config)#NO vlan 20
页: [1]
查看完整版本: CISCO交换机如何删除 Vlan