组网图形
图1 通过Console口登录交换机组网图
通过Console口登录交换机简介
配置注意事项
组网需求
配置思路
采用如下思路配置通过Console口登录交换机:
操作步骤
将Console通信电缆的DB9(孔)插头插入PC机的串口(COM)中,再将RJ-45插头端插入设备的Console口中,如图2所示
图2 通过Console口连接设备
配置终端仿真软件并登录交换机
在PC上打开终端仿真软件(以SecureCRT为例),新建连接,设置连接的接口以及通信参数与交换机Console口缺省配置相同。Console口缺省配置如表1所示。
表1 交换机Console口缺省配置
参数
缺省值
传输速率
9600bit/s
流控方式
不进行流控
校验方式
V200R009及之前版本,缺省不进行校验。V200R010及之后版本,缺省为AAA,默认的用户名为admin,密码为admin@huawei.com。
停止位
1
数据位
8
如图3所示,单击“”,新建连接。
图4 设置连接的接口以及通信参数
连接的接口请根据实际情况进行选择。例如,在Windows系统中,可以通过在“设备管理器”中查看端口信息,选择连接的接口。
设置终端仿真软件的通信参数与交换机的缺省值保持一致,分别为:传输速率为9600bit/s、8位数据位、1位停止位、无校验和无流控。
点击“Connect”,V200R009及之前版本终端界面会出现如下显示信息,提示用户配置登录密码。首次登录时没有缺省密码,需要用户先配置登录密码。(以下显示信息仅为示意)
An initial password is required for the first login via the console.
Continue to set it? [Y/N]: y //配置登录密码。
Set a password and keep it safe. Otherwise you will not be able to login via the console.
Please configure the login password (8-16)
Enter Password:
Confirm Password:
Login authentication
Username:admin
Password: //输入缺省密码admin@huawei.com。
Warning: The default password poses security risks.
The password needs to be changed. Change now? [Y/N]: y //修改登录密码。
Please enter old password: //输入缺省密码admin@huawei.com。
Please enter new password: //输入新密码。
Please confirm new password: //再次输入新密码。
The password has been changed successfully
密码为字符串形式,区分大小写,长度范围是8~16。输入的密码至少包含两种类型字符,包括大写字母、小写字母、数字及特殊字符。特殊字符不包括“?”和空格。
采用交互方式输入的密码不会在终端屏幕上显示出来。
用户界面密码配置成功后,如果用户没有修改验证方式及验证密码,当用户再次登录设备时,用户验证密码即为初次登录时所配置的验证密码。
[HUAWEI] sysname Switch //配置交换机名称为Switch。
[Switch] user-interface console 0
[Switch-ui-console0] authentication-mode aaa //设置Console用户认证方式为AAA认证。
[Switch-ui-console0] quit
[Switch] aaa
[Switch-aaa] local-user admin1234 password irreversible-cipher Helloworld@6789 //创建名为admin1234的本地用户,设置其登录密码为Helloworld@6789。V200R003之前的版本,不支持irreversible-cipher,仅支持cipher关键字。
[Switch-aaa] local-user admin1234 privilege level 15 //配置用户级别为15级。
[Switch-aaa] local-user admin1234 service-type terminal //配置接入类型为terminal,即:Console用户。
[Switch-aaa] quit
[Switch] vlan 10
[Switch-vlan10] interface vlanif 10 //配置VLANIF10作为管理接口。
[Switch-Vlanif10] ip address 10.1.1.1 24
[Switch-Vlanif10] quit
[Switch] interface gigabitethernet 0/0/10 //GE0/0/10为使用Web网管登录Switch的PC与Switch相连的物理接口编号,请按照实际现网情况进行选择。
[Switch-GigabitEthernet0/0/10] port link-type access //配置接口类型为access。
[Switch-GigabitEthernet0/0/10] port default vlan 10 //配置接口GE0/0/10加入VLAN 10。
[Switch-GigabitEthernet0/0/10] quit
[Switch] telnet server enable //使能Telnet功能。
[Switch] user-interface vty 0 4 //进入VTY 0~VTY 4用户界面视图。
[Switch-ui-vty0-4] user privilege level 15 //配置VTY 0~VTY 4的用户级别为15级。
[Switch-ui-vty0-4] authentication-mode aaa //配置VTY 0~VTY 4的用户认证方式为AAA认证。
[Switch-ui-vty0-4] quit
[Switch] aaa
[Switch-aaa] local-user admin123 password irreversible-cipher Huawei@6789 //创建名为admin123的本地用户,设置其登录密码为Huawei@6789。V200R003之前的版本,不支持irreversible-cipher,仅支持cipher关键字。
[Switch-aaa] local-user admin123 privilege level 15 //配置用户级别为15级。
[Switch-aaa] local-user admin123 service-type telnet //配置接入类型为telnet,即:Telnet用户。
[Switch-aaa] quit
检查配置结果
配置完成后,用户使用Console用户界面重新登录交换机时,需要输入上述步骤配置的用户名和认证密码才能通过身份验证,成功登录交换机。用户也可以通过Telnet登录交换机。
手机扫一扫
移动阅读更方便
你可能感兴趣的文章