華為基礎命令合集
tracert 跳躍點
《》用戶模式? ? ? ? ? ? ? ? ? ? ? ?顯示當前所有配置 dis current-configuration
language-mode chinese
save 保存? ? ? ? ? ? ? ? ? ? ? ? ? ? 接口配置? dis thi
[ ]? 系統(tǒng)模式 system-view? ? ? ? ? ? ? ? 接口摘要信息 dis ip int b
sysname 命名? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 路由表? ? ? dis ip routing-table
quit 退出當前模式? ? ? ? ? ? ? ? ? ? ? ? ? ? ?dis ip pool name 名字地址池 used? ? ? ?
? 提示信息? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?dis ospf peer brief 鄰居表OSPF
int e/0/0/0 進入接口模式? ? ? ? ? ? ? ? ? ? ? ? ?dis VLAN 查看? ? ? ? ? ? ??
IP ADD IP地址? 掩碼? ? ? ? ? ? ? ? ? ? ? ? ? ? ? dis ip route-static 查看靜態(tài)路由
undo info-center enable 關閉信息提醒? ? ? ? ? ? ? dis fib? 查看轉(zhuǎn)發(fā)表
ip route-static 目標 掩碼 嚇一跳 preference優(yōu)先級
undo XXX 撤銷某個指令
language-mode chinese 改中文提示 《》
CTRL+Z 回退到用戶模式
描述信息
description 描述信息不要過長
ip add? 地址? 掩碼? sub 同一個接口配置第二個地址不能同網(wǎng)段
ftp server enable 開啟FTP
aaa 進aaa
local-user 名字 password cipher 密碼 privilege level 3權限等級 ftp-directory flash:?
local-user? service-type ftp制定服務類型為文件傳輸
ftp 地址IP
get 文件名稱? 復制文件到本地
dis version 路由器系統(tǒng)版本
dir 查看硬盤 以及大小
copy 文件名 aa新名字叫aa
delete 文件名? 刪除
rename - -? ? ?命名
copy 復制
mkdir - -? 創(chuàng)建文件夾
cd abc 進入abc
pwd 所在位置
cd ... 退出
move aa.ZIP abc 剪切到abc
unzip xx。zip 解壓
dir /all 顯示所有文件
[]表示在回收站
reset recycle-bin 清空回收站
undelete 還原回收站里面文件
vrpcfg.ZIP配置文件
[Huawei]header? login information? "HI"登錄前提示消息
[Huawei]header? ?shell? information? "ok"登錄后提示消息
display clock 查看時間
clock timezone? BJ add 8:00時區(qū)
clock datetime? 11:11:00 2017-12-09設置時間 11點11分? 17年12月9號
配置Console口登錄認證方式
[R1]user-interface console 0
[R1-ui-console0]authentication-mode password?
Please configure the login password (maximum length 6):huawei
重設密碼
[R1-ui-console0]set authentication password cipher 91xueit
設置登錄超時的時間
[R1-ui-console0]idle-timeout 20
[R1-ui-console0]display this
配置路由器允許telnet遠程管理
[R1]user-interface vty 0 ?
[R1]user-interface vty 0 4
[R1-ui-vty0-4]authentication-mode password?
Please configure the login password (maximum length 16):51cto
[R1-ui-vty0-4]idle-timeout 10
查看連接過來的用戶
[R1]display users
查看全部用戶接口
[R1]display user-interface?
命令分級
0 級? 網(wǎng)絡診斷命令 ping? tracert telnet 等
1 級? 系統(tǒng)維護命令 display current-configuration
2 級? 配置命令 sysname R1? ?
3 級? 設計系統(tǒng)基本運行的命令 文件系統(tǒng) FTP 配置文件切換 用戶管理命令
連接到路由器的用戶分級
0-15級
0級別用戶 執(zhí)行0級別命令
1級別用戶 執(zhí)行0、1級別命令
2級別用戶 執(zhí)行0、1、2級別命令
3-15級別用戶 執(zhí)行0、1、2、3級別的命令
通過console口 用戶級別是3級
通過telnet接口 用戶級別是0級
設置telnet用戶級別為2
[R1-ui-vty0-4]user privilege level 2
恢復telnet默認用戶級別
[R11-ui-vty0-4]undo user privilege level?
使用用戶名和密碼驗證用戶 AAA身份驗證
AAA是驗證、授權和記賬(Authentication、Authorization、Accounting)三個英文單詞
han 用戶級別1
admin 用戶級別3
創(chuàng)建用戶的命令用戶級別是3的用戶
[R11]aaa
[R11-aaa]local-user admin password cipher 91xueit.com
[R11-aaa]local-user admin privilege level 3
[R11-aaa]local-user admin service-type telnet
創(chuàng)建一個用戶級別是1的用戶
[R11-aaa]local-user han password cipher 51cto.com privilege level 1
[R11-aaa]local-user han service-type telnet
創(chuàng)建一個用戶允許console連接
[R11-aaa]local-user admin1 password cipher 91xueit@com privilege level 3
[R11-aaa]local-user han service-type terminal
更改telnet接口身份驗證模式為aaa
[R11]user-interface vty 0 4?
[R11-ui-vty0-4]authentication-mode aaa
更改console接口身份驗證模式為aaa
[R1]user-interface console 0
[R11-ui-vty0-4]authentication-mode aaa
顯示創(chuàng)建的用戶
[R11-aaa]display local-user
顯示aaa的配置
[R11-aaa]display this
?
查看連接過來的用戶
設置
文件管理
列出當前目錄中的文件和文件夾
<RA>dir
創(chuàng)建文件夾
<RA>mkdir flash:/backup/?
拷貝文件到backup目錄
<RA>copy vrpcfg.zip flash:/backup/vrpcfgbackup.zip
將vrp1.zip移動到backup目錄
<RA>move vrp1.zip flash:/backup/vrp1.zip
切換到backup目錄
<RA>cd backup/?
查看所在的目錄
<RA>pwd
flash:/backup
使用move在同一個目錄下 相當于重命名
<RA>move vrp1.zip vrp2.zip
重命名的命令
<RA>rename vrp2.zip vrp3.zip
刪除文件,實質(zhì)上放到回收站
<RA>delete vrp2.zip?
還可以加參數(shù)看到刪除的文件,帶中括號的就是刪除的文件
<RA>dir /all
Directory of flash:/backup/
? Idx? Attr? ? ?Size(Byte)? Date? ? ? ? Time(LMT)? FileName?
? ? 0? -rw-? ? ? ? ? ? 787? Jan 09 2018 23:01:21? ?vrpcfgbackup.zip
? ? 1? -rw-? ? ? ? ? ? 783? Jan 09 2018 23:14:32? ?[vrp2.zip]
恢復刪除的文件
<RA>undelete vrp2.zip?
徹底刪除且不帶提示 不能恢復了
<RA>delete /unreserved /force vrp2.zip
清空回收站
<RA>reset recycle-bin
把flash中的文件備份到計算機TFTP服務
UDP 69端口 不可靠傳輸
把flash中的文件上傳到TFTP
<RA>tftp 192.168.80.1 put flash:/vrpcfg.zip vrpcfg.zip
把TFTP服務器上的文件下載到flash的backup目錄
<RA>tftp 192.168.80.1 get vrpcfg2.zip flash:/backup/vrpcfg2.zip
把flash中的文件拷貝到FTP
TCP的21端口
支持身份驗證 可靠傳輸 TCP
<RA>ftp 192.168.80.1
User(192.168.80.1:(none)):hanlg
從FTP下載
[RA-ftp]get worklog.txt flash:/backup/worklog2.txt
上傳到FTP
[RA-ftp]put vrpcfg.zip vrpcfg.zip
設置系統(tǒng)啟動文件
<RA>startup system-software divicesoft.cc
指定保存配置的文件
<RA>startup saved-configuration vrpcfg1.zip
查看下次啟動使用的系統(tǒng)文件和配置文件以及當前使用的系統(tǒng)文件和配置文件
<RA>display startup