cisco2960交换机 清除配置的命令
1、计算机COM端口(不带USB到COM适配器)通过控制台电缆连接到交换机控制台端口,并打开超级终端调试窗口。
2、当开关通电时,按住开关前面的“模式”按钮,注意超级终端界面上显示的字符,也可以松开“模式”按钮)。拔下交换机电源,用手按住交换机“Mode” 按钮,插上电源,等待交换机进入控制台模式。其提示符为“switch:”
3、进入命令开关:Flash init 然后,按Enter初始化Flash文件系统(在此模式下,不支持命令缩写,必须完整写入命令)switch: flash_init //初始化flash文件系统
4、输入命令switch: dir flash: 回车,查看交换机配置文件。(注意flash后面是有冒号的)switch: dir flash: //命令显示flash中所保存的配置文件的名称。
5、switch: rename flash:config.text flash:config.bak //命令把原来的配置文件改名为config.bak。(NVRAM是从flash虚拟的,flash:config.text =startup-config)
输入命令switch: rename flash:config.text flash:config.bak回车,重命名交换机原始配置文件为config.bak,并使用命令switch:
dir flash:查看文件名是否修改成功。Config.text被更改。
6、成功后,输入命令switch: boot,重启交换机。重新启动交换机,这时交换机找不到其配置文件(所以配置文件中的特权密码也就无效),系统就会提示是否进入“配置对话(configuration dialog)” ,选择“N” 。
witch#erase startup-config
Switch#delete flash:vlan.dat
Switch#reload
清除后的,show running
Switch#show running-config
Building configuration...
Current configuration : 1497 bytes
!
version 15.0
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
switch 1 provision ws-c2960s-24ts-l
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
!
!
!
!
!
!
!
!
vlan internal allocation policy ascending
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0
no ip address
!
interface GigabitEthernet1/0/1
!
interface GigabitEthernet1/0/2
!
interface GigabitEthernet1/0/3
!
interface GigabitEthernet1/0/4
!
interface GigabitEthernet1/0/5
!
interface GigabitEthernet1/0/6
!
interface GigabitEthernet1/0/7
!
interface GigabitEthernet1/0/8
!
interface GigabitEthernet1/0/9
!
interface GigabitEthernet1/0/10
!
interface GigabitEthernet1/0/11
!
interface GigabitEthernet1/0/12
!
interface GigabitEthernet1/0/13
!
interface GigabitEthernet1/0/14
!
interface GigabitEthernet1/0/15
!
interface GigabitEthernet1/0/16
!
interface GigabitEthernet1/0/17
!
interface GigabitEthernet1/0/18
!
interface GigabitEthernet1/0/19
!
interface GigabitEthernet1/0/20
!
interface GigabitEthernet1/0/21
!
interface GigabitEthernet1/0/22
!
interface GigabitEthernet1/0/23
!
interface GigabitEthernet1/0/24
!
interface GigabitEthernet1/0/25
!
interface GigabitEthernet1/0/26
!
interface GigabitEthernet1/0/27
!
interface GigabitEthernet1/0/28
!
interface Vlan1
no ip address
!
ip http server
ip http secure-server
!
!
!
vstack
!
line con 0
line vty 5 15
!
End
Switch#show vlan brief
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Gi1/0/1, Gi1/0/2, Gi1/0/3
Gi1/0/4, Gi1/0/5, Gi1/0/6
Gi1/0/7, Gi1/0/8, Gi1/0/9
Gi1/0/10, Gi1/0/11, Gi1/0/12
Gi1/0/13, Gi1/0/14, Gi1/0/15
Gi1/0/16, Gi1/0/17, Gi1/0/18
Gi1/0/19, Gi1/0/20, Gi1/0/21
Gi1/0/22, Gi1/0/23, Gi1/0/24
Gi1/0/25, Gi1/0/26, Gi1/0/27
Gi1/0/28
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup