====================命令行基础=====================
设置时钟:
<AR1>clock timezone BJ add 08:00:00
<AR1>clock datetime 17:36 2016-10-22
<AR1>display clock
2016-10-22 17:36:20
Saturday
Time Zone(8) : UTC+08:00
<AR1>clock timezone BJ add 08:00:00
<AR1>display clock
2016-10-22 17:37:04
Saturday
Time Zone(BJ) : UTC+08:00
配置标题消息:
header login 配置在用户登录前显示的标题消息
header shell 配置在用户登录后显示的标题消息
[AR1]header login information "welcome to huawei certification!"
[AR1]header shell information "Please don‘t reboot the device!"
简单设置console密码:
[AR1]user-interface console 0
[AR1-ui-console0]authentication-mode password
Please configure the login password (maximum length 16):huawei
[R1]user-interface console 0
[R1-ui-console0]authentication-mode password
[R1-ui-console0]set authentication password cipher huawei
[R1-ui-console0]idle-timeout 20 0
命令级别:
用户级别 命令等级 名称
0 0 访问级别(ping tracert)
1 0 and 1 监控级(display)
2 0,1 and 2 配置级
3-5 0,1,2 and 3 管理级
<AR1>system-view
[AR1]command-privilege level 3 view user save
The command level is modified successfully
创建一个hw123用户命令级别为0:
[AR1]aaa
[AR1-aaa]local-user hw123 privilege level 0 password cipher hw123
[AR1-aaa]local-user hw123 service-type telnet
[AR1-aaa]q
[AR1]in lo0
[AR1-LoopBack0]ip add 55.1.1.1 32
[AR1-LoopBack0]q
[AR1]user-interface vty 0 4
[AR1-ui-vty0-4]authentication-mode aaa
[AR1-ui-vty0-4]q
创建一个hw345用户命令级别为2:
[AR1]aaa
[AR1-aaa]local-user hw345 privilege level 2 password cipher hw345
用户界面:
用户界面类型 编号
console 0
VTY 0-4
[AR1]user-interface vty 0 4
[AR1-ui-vty0-4]
VTY接口最大可配范围为0-14。
用户界面命令:
命令 功能
idle-timeouut 设置超时时间
screen-length 设置指定终端屏幕的临时显示行数
history-command max-size 设置历史命令缓冲区的大小
<AR1>system-view
[AR1]user-interface console 0
[AR1-ui-console0]history-command max-size 20
[AR1-ui-console0]idle-timeout 1 30
display history-command //查看命令历史
display saved-configuration //查看保存的配置信息
配置登录权限:
命令 功能
user privilege 配置指定用户界面下的用户级别
set authentication password 配置本地认证密码
<AR1>sy
[AR1]user-interface vty 0 4
[AR1-ui-vty0-4]authentication-mode password
Please configure the login password (maximum length 16):16
[AR1-ui-vty0-4]set authentication password cipher 123
[AR1-ui-vty0-4]user privilege level 0
[AR1-ui-vty0-4]q
本文出自 “花开如昔” 博客,请务必保留此出处http://sunrisenan.blog.51cto.com/10217407/1876351
原文:http://sunrisenan.blog.51cto.com/10217407/1876351