学习精彩网络技术老师:华为、华三、锐捷、WLAN、IPv6等全套视频课程
在本示例中,通过配置Console用户界面的物理属性、终端属性、用户优先级、验证方式和验证密码,实现通过Console口使用Password方式登录路由器。
组网需求
在初始化空配置路由器或本地维护路由器时,用户需要通过Console用户界面登录并进行配置。设备管理员可以根据使用需求或出于对设备安全性的考虑,配置Console用户界面的相关属性。
配置Console用户界面的用户优先级为15,对从Console登录的用户进行Password验证,用户登录时需要输入密码“Huawei-123” 。
登录后,如果用户超过30分钟未对路由器进行操作,将断开与路由器的连接。
配置思路
采用如下的思路配置登录路由器:
进入用户界面视图,配置Console用户界面的物理属性。
配置Console用户界面的终端属性。
配置Console用户界面的用户优先级。
配置Console用户界面的验证方式和验证密码。
数据准备
为完成此配置举例,需准备如下的数据:
Console用户界面的传输速率为9600bit/s。
Console用户界面的流控方式为None。
Console用户界面的校验位为even。
Console用户界面的停止位为2。
Console用户界面的数据位为6。
Console用户界面断开连接的时间为30。
Console用户界面的终端屏幕每屏显示的行数为30。
Console用户界面的终端屏幕每屏显示的列数为60。
Console用户界面的历史命令缓冲区大小为20。
Console用户界面的用户优先级为15。
Console用户界面的用户验证方式为password和验证密码为Huawei–123。
操作步骤
- 配置Console用户界面的物理属性
<HUAWEI> system-view
[HUAWEI] user-interface console 0
[HUAWEI-ui-console0] speed 9600
[HUAWEI-ui-console0] flow-control none
[HUAWEI-ui-console0] parity even
[HUAWEI-ui-console0] stopbits 2
[HUAWEI-ui-console0] databits 6
- 配置Console用户界面的终端属性
[HUAWEI-ui-console0] shell
[HUAWEI-ui-console0] idle-timeout 30
[HUAWEI-ui-console0] screen-length 30
[HUAWEI-ui-console0] history-command max-size 20
- 配置Console用户界面的用户优先级
[HUAWEI-ui-console0] user privilege level 15
- 配置Console用户界面的用户验证方式为密码验证
[HUAWEI-ui-console0] authentication-mode password
[HUAWEI-ui-console0] set authentication password cipher Huawei-123
[HUAWEI-ui-console0] quit
Console用户界面配置完成后,用户可以通过Console口使用Password方式登录路由器,实现对路由器的本地维护。用户登录路由器的具体过程请参见配置用户登录。
配置文件
#
sysname HUAWEI
#
user-interface con 0
authentication-mode password
user privilege level 15
set authentication password cipher $1a$.]U;PI9EtF$%$qzNQb7:,PNeT*K+i_#UYW%@qVRrNa0`\.t*^%@$
history-command max-size 20
idle-timeout 30 0
screen-length 30
databits 6
parity even
stopbits 2
speed 9600
#
return