如何删除交换机VLAN配置信息- 永安杰出青年的日志- 网易博客

如何删除交换机VLAN配置信息

2010-04-14 16:04:32 阅读14 评论0 字号:

有时候会遇到仅仅需要删除已在交换机上配置好的VLAN数据,而不破坏其他配置,如果运行 write erase 命令则会将所有配置xx,有什么方法能做到只删除交换机上的VLAN配置而不影响其他配置呢?

方法如下:
{dy}步:察看当前VLAN配置
Cat2950#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24

2 VLAN0002 active
3 VLAN0003 active
4 VLAN0004 active

!-- Although the startup configuration file is erased,
!-- these user created VLANs are not removed.

600 VLAN0600 active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
4 enet 100004 1500 - - - - - 0 0
600 enet 100600 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 1 1003
1003 tr 101003 1500 1005 - - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trnet 101005 1500 - - 1 IBM - 0 0
Switch#


第二步:察看Flash中的文件名称(交换机的配置文件和ios都保存在Flash中)
Cat2950#dir flash:
!-- On the Catalyst 4000, issue the dir cat4000_flash: command,
!-- and on the Catalyst 6000, issue the dir const_nvram: command.
Directory of flash:/

2 -rwx 2487439 Mar 11 1993 01:25:32 c2950-i6q4l2-mz.121-9.EA1d.bin
3 -rwx 840 Mar 20 1993 09:20:09 vlan.dat
!-- This vlan.dat file stores user configured VLANs.
4 -rwx 2491435 Mar 08 1993 16:14:13 c2950-mvr.bin
6 -rwx 42 Mar 01 1993 00:07:35 env_vars
7 -rwx 109 Mar 11 1993 01:23:56 info
8 drwx 640 Mar 11 1993 01:26:35 html
19 -rwx 109 Mar 11 1993 01:26:35 info.ver

7741440 bytes total (1088512 bytes free)
Switch#
Delete the VLAN information from Flash or NVRAM, and reload the switch.
Note: On the Catalyst 6000 and 4000, the delete command does not work. Instead you must issue the erase const_nvram: or erase cat4000_flash: command. Do not specify the vlan.dat file in the command syntax.


第三步:删除vlan.dat (交换机的VLAN信息保存在vlan.dat中)
Cat2950#delete flash:vlan.dat
Delete filename [vlan.dat]?
!-- Press Enter.
Delete flash:vlan.dat? [confirm]y
Switch#
Switch#reload
Proceed with reload? [confirm]y
4w5d: %SYS-5-RELOAD: Reload requested

After reload, check the VLAN information by issuing the show vlan command. The user configured VLANs are removed, and only factory default VLAN information is present on the switch.

第四步:察看当前的VLAN配置
Cat2950#show vlan

VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active

VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - IBM - 0 0
Switch#

<#--{zx1}日志--> <#--推荐日志--> <#--引用记录--> <#--相关日志--> <#--推荐日志--> <#--推荐阅读--> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构-->
郑重声明:资讯 【如何删除交换机VLAN配置信息- 永安杰出青年的日志- 网易博客】由 发布,版权归原作者及其所在单位,其原创性以及文中陈述文字和内容未经(企业库qiyeku.com)证实,请读者仅作参考,并请自行核实相关内容。若本文有侵犯到您的版权, 请你提供相关证明及申请并与我们联系(qiyeku # qq.com)或【在线投诉】,我们审核后将会尽快处理。
—— 相关资讯 ——