VRP是什么
设备管理方式
VRP基础命令
命令行视图
命令行帮助 ?
查看接口状态(二层或三层)
display [ip] interface brief 查看接口信息
[Huawei]display interface brief 查看2层口
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
GigabitEthernet0/0/1 down down 0% 0% 0 0
GigabitEthernet0/0/2 down down 0% 0% 0 0
GigabitEthernet0/0/3 down down 0% 0% 0 0
GigabitEthernet0/0/4 down down 0% 0% 0 0
GigabitEthernet0/0/5 down down 0% 0% 0 0
GigabitEthernet0/0/6 down down 0% 0% 0 0
GigabitEthernet0/0/7 down down 0% 0% 0 0
GigabitEthernet0/0/8 down down 0% 0% 0 0
GigabitEthernet0/0/9 down down 0% 0% 0 0
[Huawei]display ip interface brief 查看3层接口
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 1
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 1
The number of interface that is DOWN in Protocol is 2
Interface IP Address/Mask Physical Protocol
MEth0/0/1 unassigned down down
NULL0 unassigned up up(s)
Vlanif1 unassigned down down
显示系统版本
[Huawei]display version
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.110 (S5700 V200R001C00)
Copyright (c) 2000-2011 HUAWEI TECH CO., LTD
Quidway S5700-28C-HI Routing Switch uptime is 0 week, 0 day, 1 hour, 27 minutes
显示已经连接的终端用户
<Huawei>display users
User-Intf Delay Type Network Address AuthenStatus AuthorcmdFlag
+ 0 CON 0 00:00:00 no
Username : Unspecified
<Huawei>
配置登入用户
VRP远程管理
TELNET服务
打开telnet服务
telnet server enable
查看服务状态
display telnet server status
配置远程登录
password
aaa
因为都是远程管理 所以都需要先选择 vty接口
选择之后进入 aaa模式即可开始配置
[Huawei-aaa]display this
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password simple admin
local-user admin service-type http
local-user wakin password cipher $K&%QCXM$NYNZPO3JBXBHA!!
local-user wakin privilege level 15
local-user wakin service-type telnet terminal ssh
#
return
[Huawei-aaa]
VRP文件系统
常见的存储设备
SDRAM 内存 (临时性存储) 断电后配置文件丢弃 (内存较大)
Flash 闪存 (永久性存储)
NVRAM 内存 断电后配置文件还在 (内存小)
SD card SD卡 (永久性存储)
USB (移动存储)
如何查看内存
<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 drw- - Jun 03 2021 04:15:21 dhcp
1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
2 -rw- 2,263 Jun 03 2021 04:23:43 statemach.efs
3 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
1,090,732 KB total (784,464 KB free)
<Huawei>dis
<Huawei>display ver
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.130 (AR1200 V200R003C00)
Copyright (C) 2011-2012 HUAWEI TECH CO., LTD
Huawei AR1220 Router uptime is 0 week, 0 day, 0 hour, 4 minutes
BKP 0 version information:
1. PCB Version : AR01BAK1A VER.NC
2. If Supporting PoE : No
3. Board Type : AR1220
4. MPU Slot Quantity : 1
5. LPU Slot Quantity : 2
MPU 0(Master) : uptime is 0 week, 0 day, 0 hour, 4 minutes
MPU version information :
1. PCB Version : AR01SRU1A VER.A
2. MAB Version : 0
3. Board Type : AR1220
4. BootROM Version : 0
<Huawei>
配置文件
delete文件后文件会存储在回收站”recycle-bin”中
<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 drw- - Jun 07 2021 04:41:52 dhcp
1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
2 drw- - Jun 07 2021 04:47:15 1
3 -rw- 2,263 Jun 07 2021 04:41:36 statemach.efs
4 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
5 -rw- 352 Jun 07 2021 04:48:26 private-data.txt
6 -rw- 541 Jun 07 2021 05:00:36 vrpcfg.zip
1,090,732 KB total (784,448 KB free)
<Huawei>del
<Huawei>delete v
<Huawei>delete vrpcfg.zip
Delete flash:/vrpcfg.zip? (y/n)[n]:y
Info: Deleting file flash:/vrpcfg.zip...succeed.
<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 drw- - Jun 07 2021 04:41:52 dhcp
1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
2 drw- - Jun 07 2021 04:47:15 1
3 -rw- 2,263 Jun 07 2021 04:41:36 statemach.efs
4 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
5 -rw- 352 Jun 07 2021 04:48:26 private-data.txt
1,090,732 KB total (784,444 KB free)
<Huawei>und
<Huawei>undelete v
<Huawei>undelete vrpcfg.zip
Undelete flash:/vrpcfg.zip? (y/n)[n]:y
%Undeleted file flash:/vrpcfg.zip.
<Huawei>
配置文件管理
这里是比较save-config 与 current-config的差别,实际上save-config后会在/目录下生成一个名为vrpcfg.zip的文件
<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 drw- - Jun 07 2021 04:41:52 dhcp
1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
2 drw- - Jun 07 2021 04:47:15 1
3 -rw- 2,263 Jun 07 2021 04:41:36 statemach.efs
4 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
5 -rw- 352 Jun 07 2021 04:48:26 private-data.txt
1,090,732 KB total (784,448 KB free)
<Huawei>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait..........
...
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 drw- - Jun 07 2021 04:41:52 dhcp
1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
2 drw- - Jun 07 2021 04:47:15 1
3 -rw- 2,263 Jun 07 2021 04:41:36 statemach.efs
4 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
5 -rw- 352 Jun 07 2021 04:48:26 private-data.txt
6 -rw- 541 Jun 07 2021 05:02:30 vrpcfg.zip
1,090,732 KB total (784,440 KB free)
这里实际上在比较上面提到的,save-config 与 current-config,即一个存在内存中一个存在SD卡中的配置文件的差别。
[R1]sys
[R1]sysname R2
[R2]q
<R2>comp
<R2>compare co
<R2>compare configuration
The current configuration is not the same as the next startup configuration fil
e.
====== Current configuration line 2 ======
sysname R2
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
====== Configuration file line 2 ======
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone China-Standard-Time minus 08:00:00
#
<R2>
<R2>
虚拟机中是不存在配置的系统文件
<R2>display startup
MainBoard:
Startup system software: null
Next startup system software: null
Backup system software for next startup: null
Startup saved-configuration file: flash:/vrpcfg.zip
Next startup saved-configuration file: flash:/vrpcfg.zip
Startup license file: null
Next startup license file: null
Startup patch package: null
Next startup patch package: null
Startup voice-files: null
Next startup voice-files: null
<R2>
真机中的配置文件