華爲基本命令大集合

華爲基本命令大集合

R1> system-viem 進入系統視圖

【R1】# display history-command 查詢歷時命令

Display this 查詢這個視圖的運行配置

User-interface vty 0 4 用戶界面視圖

Interface serial 0 接口視圖

Aaa 安全相關視圖

返回至上一個視圖 quit 直接返回到用戶視圖 return

Sysname R1 重命名設備名爲R1

Display version 顯示系統版本

Display users 顯示已連接的終端用戶

Display diagnostic-information 顯示設備所有狀態信息

Display interface brief #查看接口狀態和配置簡要的信息

Display current-configuration | include vlan #查看字符串中所有包含vlan的配置信息

Display routing-table protocol static #查看路由表的優先級信息

Header shell information ‘hello!’ 設置系統提示消息爲 hello

配置console界面:

R1] user-interface console 0

Authentication-mode password 111111 ## 設置console密碼爲11111 默認優先級15

配置VTY用戶:

System-view

User-interface maxmum-vty 8 #創建8個vty用戶

User-interface vty 0 7 進入vty用戶界面

Idle-timeout 30 #設置超時時間 user privilege level 15 #設置vty用戶優先級

Ip address 192.168.1.1 255.255.255.0 # 配置IP爲192.168.1.1/24

Undo Ip address 192.168.1.1 255.255.255.0 #刪除IP

Shutdown 關閉接口 undo shutdown 開啓端口

Save #保存當前配置

Display saved-configuration #查看已保存的路由器配置

Display current-configuration #查看當前的路由器配置

配置默認(末梢)路由:

System-viem

Ip route-static 0.0.0.0 0.0.0.0 下一跳IP

配置靜態路由並將優先級調爲100

Ip route-static 目標網絡ip 目標網絡子網 下一跳 preference 100

RIP的基本配置舉例:

RIP

Version 2 #設置版本號

No auto-summary #按照無類路由協議工作(undo summary)

Network 192.168.1.0 network 10.0.0.0 network 172.16.0.0 #宣告網絡 只能是主類網絡

接口視圖:Rip summary-address 彙總ip 彙總子網 #RIP手動聚合

Import-route direct cost 10 # 引入外部路由

Rip metricin 5 #接口增加度量值

Ping命令:

Ping –a(帶着地址ping ) -c (ping 幾個包) -s (ping包 大小) -t(循環ping)

Tracert命令:clip_image002

 

華爲設備的aaa機制:

Aaa:authentication認證 用戶是否可以獲得網絡訪問權

authorization 授權 授權用戶可以使用那些服務

accounting 計費(監察) 記錄用戶使用網絡資源的情況

配置華爲的telnet服務,使用aaa本地用戶認證;

User-interface vty 0 4 #進入vty用戶

User privilege level 15 #設置用戶級別15

Authentication-mode aaa #設置認證方式爲aaa

Quit

Aaa #進入aaa安全視圖

Local-user admin password cipher admin123 #設置本地用戶admin的密文密碼爲admin123

Local-user admin privilege level 15 #設置admin用戶的優先級爲15

Local-user admin service-type telnet # 設置admin用戶的登錄方式爲telnet

配置SSH (secure shell,安全的telnet) 。使用aaa本地用戶認證:

System-view

Sysname R1 #ssh對設備名有要求 ,必須一致

Rsa local-key-pair creae #設置初始

密碼生成本地密鑰對,接下來會讓你輸入512-2048的加密程度,一般選最高,安全!

Interface 1/0/0 #進入接口視圖

Ip address 192.168.1.1 24 #配置ip

Quit

Aaa

Local-user admin password cipher admin123 #設置本地用戶admin的密文密碼爲admin123

Local-user admin privilege level 15 #設置admin用戶的優先級爲15

Local-user admin service-type ssh # 設置admin用戶的登錄方式爲ssh

User-interface vty 0 4 #進入vty用戶

Authentication-mode aaa #設置認證方式爲aaa

Protocol inbound ssh #設置認證方式只支持aaa

配置 華爲設備作爲ssh客戶端連接:

System-viem

Ssh clent first-time enable # 開啓ssh客戶端首次認證功能

Stelnet 192.168.1.1 # ssh連接

輸入用戶名 密碼。 進行登錄。是否交換祕鑰 Y

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章