1.拔掉电源,按住交换机上mode按钮,插上电源,等到出现switch:
2.初始化flash 并修改config.text 文件,并重启
switch:flash_init
seitch:show flash: #部分交换机命令是 dir flash:
switch:rename flash:config.text flash:config.old #部分交换机是rename flash:/config.text flash:config.old
switch:boot
3.重启进入交换机将不需要任何密码
4.把配置文件名字改回来
switch#rename flash:/config.old flash:/config.text
5.手工加载配置文件
switch#copy flash:/config.text system:running-config
6.配置文件加载完成后,进行密码修改 ,保存并退出即可
3850交换机
具体步骤:
步骤1:将终端或PC连接到交换机。
将终端或带有终端仿真软件的PC连接到交换机控制台端口。如果你正在恢复交换机堆栈的密码,连接到活动交换机的控制台端口或将PC连接到以太网管理端口。如果要恢复交换机堆栈的密码,请连接到堆栈成员的以太网管理端口。
步骤2:将仿真软件上的线路速度设置为9600波特。
步骤3:关闭独立交换机或整个交换机堆栈的电源。
步骤4:将电源线重新连接到或有源开关。在15秒内,在系统LED指示灯亮起的同时按下Mode(模式)按钮仍然闪烁着绿色。继续按Mode(模式)按钮,直到所有系统LED亮起并保持稳定;然后释放模式按钮。
1.初始化flash文件系统。
Switch: flash_init
步骤2:使用以下命令忽略启动配置:
Switch: SWITCH_IGNORE_STARTUP_CFG=1
第3步用软件包启动交换机。来自flash的conf文件。
Switch: boot flash:packages.conf
步骤4:回答“否”,终止初始配置对话框。
Would you like to enter the initial configuration dialog? [yes/no]: No
第5步在开关提示下,进入特权执行模式。
Switch> enable
Switch#
步骤6:将启动配置复制到运行配置。
copy startup-config running-config
Destination filename [running-config]?
Press Return in response to the confirmation prompts. The configuration file is now reloaded, and you can change the
password.
第7步进入全局配置模式并更改启用密码。
Switch# configure terminal
Switch(config)#
步骤8:将正在运行的配置写入启动配置文件。
Switch# copy running-config startup-config
步骤9:确认已启用手动引导模式。
Switch# show boot
10.重新加载开关。
Switch# reload
步骤11:将引导加载程序参数(之前在步骤2和3中更改)返回到其原始值。
Switch: switch: SWITCH_IGNORE_STARTUP_CFG=0
步骤12:用软件包启动交换机。来自flash的conf文件。
Switch: boot flash:packages.conf
步骤13开关启动后,禁用开关上的手动启动。
Switch(config)# no boot manual