

嘿!兄弟们
路由器、交换机、防火墙的设备面板上,都有个专门用来配置和管理的接口,就是Console口(也叫CON口)。用专用线缆把设备和电脑连起来,就能对设备进行配置和管理了。
估计有小白对Console线不太了解,我简单说两句:它一端是网线水晶头,另一端是com口(也就是串口),这特点一眼就能认出来。
经常有同学问我,忘了Console口密码,怎么处理才最高效?今天咱们就来讲讲。
方法一:通过STelnet/Telnet登录设备修改Console口密码
不过Telnet协议存在安全隐患,建议大家用STelnet V2登录设备。要是能通过STelnet/Telnet登录设备,而且权限达到3级或更高,就能登录后修改Console口密码,之后保存配置就行。
用STelnet/Telnet账号登录设备,确认当前账号有3级或更高权限
用displayusers命令查看设备上所有登录的用户。带“*”标记的是当前用户的用户界面,对应的编号是VTY1。
用display user-interface命令能显示所有用户的权限,确认VTY1对应的等级是15,有权限修改Console口密码。
修改Console口密码(这里以修改为密码认证为例)
<HUAWEI> system-view
[HUAWEI] user-interface console 0
[HUAWEI-ui-console0] authentication-mode password
[HUAWEI-ui-console0] set authentication password
Please configure the login password (8-16)
Enter Password: // 输入密码
Confirm Password: // 再次输入密码确认
[HUAWEI-ui-console0] user privilege level 3
为了防止重启后配置丢失,记得保存配置
<HUAWEI> save
Warning: The current configuration will be written to the device. Continue? [Y/N]:y
Now saving the current configuration to the slot 1
Info: Save the configuration successfully.
方法二:通过BIOS菜单设置新的Console口密码
设备的BIOS有清空Console口登录密码的功能,大家可以在设备启动后修改Console口登录密码,然后保存配置。
(1)进入BIOS菜单需要重启设备(可以先下电再上电重启),这会导致业务中断,所以要根据实际情况做好设备备份,尽量选业务量少的时候操作。设备启动过程中别下电。
(2)要是是CE12800系列交换机,而且是双主控,得先把备用主控板拔下来,操作完之后再插上,执行save命令,保证主用和备用主控板的配置一致。
(3)按以下步骤启动设备后,只有本次通过Console口登录不用输密码,原来的密码还存在配置文件里。登录后一定要及时设置新密码,不然下次登录还得用原来的密码。
通过Console口连接设备,然后重启设备
当界面出现以下信息时,3秒内按下快捷键“Ctrl+B”,输入BIOS密码,进入BIOS主菜单。
Press CTRL+B to enter BIOS menu or CTRL+E to boot DFX: 1
Password: // 输入 BIOS 密码。
按照设备提示,在BIOS主菜单选择“Modify console password”,出现以下界面后,选y,设备会继续启动
Caution: A new console password must be set after the restart.
Continue now? Yes (y) or No (n):y
设备完成系统启动后,本次通过Console口登录不用认证,登录后要及时修改Console口密码(以密码认证为例)
<HUAWEI> system-view
[HUAWEI] user-interface console 0
[HUAWEI-ui-console0] authentication-mode password
[HUAWEI-ui-console0] set authentication password
Please configure the login password (8-16)
Enter Password: // 输入密码
Confirm Password: // 再次输入密码确认
[HUAWEI-ui-console0] user privilege level 3
为避免重启后配置丢失,记得保存配置
<HUAWEI> save
Warning: The current configuration will be written to the device. Continue? [Y/N]:y
Now saving the current configuration to the slot 1
Info: Save the configuration successfully.
方法三:通过BootLoader菜单修改Console口密码
设备的BootLoader有清空Console口登录密码的功能,大家可以在设备启动后修改Console口登录密码,然后保存配置。
(1)进入BootLoader菜单需要重启设备(可以先下电再上电重启),这会导致业务中断,要根据实际情况做好设备备份,尽量选业务量少的时候操作。设备启动过程中别下电。
(2)要是是12800E&16800系列交换机,而且是双主控,得先把备用主控板拔下来,操作完之后再插上,执行save命令,保证主用和备用主控板的配置一致。
(3)按以下步骤启动设备后,只有本次通过Console口登录不用输密码,原来的密码还存在配置文件里。登录后一定要及时设置新密码,不然下次登录还得用原来的密码。
通过Console口连接设备,然后重启设备
当界面出现以下信息时,3秒内按下快捷键“Ctrl+B”,输入BootLoader密码,进入BootLoader主菜单。
Press CTRL+B to enter BOOT menu or CTRL+E to boot DFX: 1
Password: // 输入 BootLoader 密码。
按照设备提示,在BootLoader主菜单选第6项,再选“Modify console password”,出现以下界面后,选y,设备会继续启动
Caution: A new console password must be set after the restart.
Continue now? Yes (y) or No (n):y
设备完成系统启动后,本次通过Console口登录不用认证,登录后要及时修改Console口密码(以密码认证为例)
<HUAWEI> system-view
[HUAWEI] user-interface console 0
[HUAWEI-ui-console0] authentication-mode password
[HUAWEI-ui-console0] set authentication password
Please configure the login password (8-16)
Enter Password: // 输入密码
Confirm Password: // 再次输入密码确认
[HUAWEI-ui-console0] user privilege level 3
为避免重启后配置丢失,记得保存配置
<HUAWEI> save
Warning: The current configuration will be written to the device. Continue? [Y/N]:y
Now saving the current configuration to the slot 1
Info: Save the configuration successfully.