華爲-命令行基礎(一)
====================命令行基礎=====================
設置時鐘:
<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
設置時鐘:
<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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.