华为-命令行基础(一)
====================命令行基础=====================设置时钟:
<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 配置在用户登录后显示的标题消息
header login information "welcome to huawei certification!"
header shell information "Please don't reboot the device!"
简单设置console密码:
user-interface console 0
authentication-mode password
Please configure the login password (maximum length 16):huawei
user-interface console 0
authentication-mode password
set authentication password cipher huawei
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
command-privilege level 3 view user save
The command level is modified successfully
创建一个hw123用户命令级别为0:
aaa
local-user hw123 privilege level 0 password cipher hw123
local-user hw123 service-type telnet
q
in lo0
ip add 55.1.1.1 32
q
user-interface vty 0 4
authentication-mode aaa
q
创建一个hw345用户命令级别为2:
aaa
local-user hw345 privilege level 2 password cipher hw345
用户界面:
用户界面类型 编号
console 0
VTY 0-4
user-interface vty 0 4
VTY接口最大可配范围为0-14。
用户界面命令:
命令 功能
idle-timeouut 设置超时时间
screen-length 设置指定终端屏幕的临时显示行数
history-command max-size 设置历史命令缓冲区的大小
<AR1>system-view
user-interface console 0
history-command max-size 20
idle-timeout 1 30
display history-command //查看命令历史
display saved-configuration //查看保存的配置信息
配置登录权限:
命令 功能
user privilege 配置指定用户界面下的用户级别
set authentication password 配置本地认证密码
<AR1>sy
user-interface vty 0 4
authentication-mode password
Please configure the login password (maximum length 16):16
set authentication password cipher 123
user privilege level 0
q
页:
[1]