image.png

VRP是什么

image.png
image.png

设备管理方式

image.png
image.png
image.png
image.png

VRP基础命令

命令行视图

需要配置什么,就得进入什么视图中。 可以理解为模式
image.png
视图详情
image.png

命令行帮助 ?

image.png

查看接口状态(二层或三层)

display [ip] interface brief 查看接口信息

  1. [Huawei]display interface brief 查看2层口
  2. PHY: Physical
  3. *down: administratively down
  4. (l): loopback
  5. (s): spoofing
  6. (b): BFD down
  7. (e): ETHOAM down
  8. (dl): DLDP down
  9. (d): Dampening Suppressed
  10. InUti/OutUti: input utility/output utility
  11. Interface PHY Protocol InUti OutUti inErrors outErrors
  12. GigabitEthernet0/0/1 down down 0% 0% 0 0
  13. GigabitEthernet0/0/2 down down 0% 0% 0 0
  14. GigabitEthernet0/0/3 down down 0% 0% 0 0
  15. GigabitEthernet0/0/4 down down 0% 0% 0 0
  16. GigabitEthernet0/0/5 down down 0% 0% 0 0
  17. GigabitEthernet0/0/6 down down 0% 0% 0 0
  18. GigabitEthernet0/0/7 down down 0% 0% 0 0
  19. GigabitEthernet0/0/8 down down 0% 0% 0 0
  20. GigabitEthernet0/0/9 down down 0% 0% 0 0
  21. [Huawei]display ip interface brief 查看3层接口
  22. *down: administratively down
  23. ^down: standby
  24. (l): loopback
  25. (s): spoofing
  26. The number of interface that is UP in Physical is 1
  27. The number of interface that is DOWN in Physical is 2
  28. The number of interface that is UP in Protocol is 1
  29. The number of interface that is DOWN in Protocol is 2
  30. Interface IP Address/Mask Physical Protocol
  31. MEth0/0/1 unassigned down down
  32. NULL0 unassigned up up(s)
  33. Vlanif1 unassigned down down

显示系统版本

  1. [Huawei]display version
  2. Huawei Versatile Routing Platform Software
  3. VRP (R) software, Version 5.110 (S5700 V200R001C00)
  4. Copyright (c) 2000-2011 HUAWEI TECH CO., LTD
  5. Quidway S5700-28C-HI Routing Switch uptime is 0 week, 0 day, 1 hour, 27 minutes

显示已经连接的终端用户

  1. <Huawei>display users
  2. User-Intf Delay Type Network Address AuthenStatus AuthorcmdFlag
  3. + 0 CON 0 00:00:00 no
  4. Username : Unspecified
  5. <Huawei>

配置登入用户

image.png

VRP远程管理

image.png

TELNET服务

  1. 打开telnet服务
  2. telnet server enable
  3. 查看服务状态
  4. display telnet server status

image.png

配置远程登录

password

image.png
image.png

aaa

因为都是远程管理 所以都需要先选择 vty接口
选择之后进入 aaa模式即可开始配置
image.png

  1. [Huawei-aaa]display this
  2. #
  3. aaa
  4. authentication-scheme default
  5. authorization-scheme default
  6. accounting-scheme default
  7. domain default
  8. domain default_admin
  9. local-user admin password simple admin
  10. local-user admin service-type http
  11. local-user wakin password cipher $K&%QCXM$NYNZPO3JBXBHA!!
  12. local-user wakin privilege level 15
  13. local-user wakin service-type telnet terminal ssh
  14. #
  15. return
  16. [Huawei-aaa]

VRP文件系统

image.png

常见的存储设备

image.png
SDRAM 内存 (临时性存储) 断电后配置文件丢弃 (内存较大)
Flash 闪存 (永久性存储)
NVRAM 内存 断电后配置文件还在 (内存小)
SD card SD卡 (永久性存储)
USB (移动存储)

如何查看内存

  1. <Huawei>dir
  2. Directory of flash:/
  3. Idx Attr Size(Byte) Date Time(LMT) FileName
  4. 0 drw- - Jun 03 2021 04:15:21 dhcp
  5. 1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
  6. 2 -rw- 2,263 Jun 03 2021 04:23:43 statemach.efs
  7. 3 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
  8. 1,090,732 KB total (784,464 KB free)
  9. <Huawei>dis
  10. <Huawei>display ver
  11. Huawei Versatile Routing Platform Software
  12. VRP (R) software, Version 5.130 (AR1200 V200R003C00)
  13. Copyright (C) 2011-2012 HUAWEI TECH CO., LTD
  14. Huawei AR1220 Router uptime is 0 week, 0 day, 0 hour, 4 minutes
  15. BKP 0 version information:
  16. 1. PCB Version : AR01BAK1A VER.NC
  17. 2. If Supporting PoE : No
  18. 3. Board Type : AR1220
  19. 4. MPU Slot Quantity : 1
  20. 5. LPU Slot Quantity : 2
  21. MPU 0(Master) : uptime is 0 week, 0 day, 0 hour, 4 minutes
  22. MPU version information :
  23. 1. PCB Version : AR01SRU1A VER.A
  24. 2. MAB Version : 0
  25. 3. Board Type : AR1220
  26. 4. BootROM Version : 0
  27. <Huawei>

配置文件

VRP - 图19

delete文件后文件会存储在回收站”recycle-bin”中

  1. <Huawei>dir
  2. Directory of flash:/
  3. Idx Attr Size(Byte) Date Time(LMT) FileName
  4. 0 drw- - Jun 07 2021 04:41:52 dhcp
  5. 1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
  6. 2 drw- - Jun 07 2021 04:47:15 1
  7. 3 -rw- 2,263 Jun 07 2021 04:41:36 statemach.efs
  8. 4 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
  9. 5 -rw- 352 Jun 07 2021 04:48:26 private-data.txt
  10. 6 -rw- 541 Jun 07 2021 05:00:36 vrpcfg.zip
  11. 1,090,732 KB total (784,448 KB free)
  12. <Huawei>del
  13. <Huawei>delete v
  14. <Huawei>delete vrpcfg.zip
  15. Delete flash:/vrpcfg.zip? (y/n)[n]:y
  16. Info: Deleting file flash:/vrpcfg.zip...succeed.
  17. <Huawei>dir
  18. Directory of flash:/
  19. Idx Attr Size(Byte) Date Time(LMT) FileName
  20. 0 drw- - Jun 07 2021 04:41:52 dhcp
  21. 1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
  22. 2 drw- - Jun 07 2021 04:47:15 1
  23. 3 -rw- 2,263 Jun 07 2021 04:41:36 statemach.efs
  24. 4 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
  25. 5 -rw- 352 Jun 07 2021 04:48:26 private-data.txt
  26. 1,090,732 KB total (784,444 KB free)
  27. <Huawei>und
  28. <Huawei>undelete v
  29. <Huawei>undelete vrpcfg.zip
  30. Undelete flash:/vrpcfg.zip? (y/n)[n]:y
  31. %Undeleted file flash:/vrpcfg.zip.
  32. <Huawei>

配置文件管理
VRP - 图20
image.png
这里是比较save-config 与 current-config的差别,实际上save-config后会在/目录下生成一个名为vrpcfg.zip的文件

  1. <Huawei>dir
  2. Directory of flash:/
  3. Idx Attr Size(Byte) Date Time(LMT) FileName
  4. 0 drw- - Jun 07 2021 04:41:52 dhcp
  5. 1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
  6. 2 drw- - Jun 07 2021 04:47:15 1
  7. 3 -rw- 2,263 Jun 07 2021 04:41:36 statemach.efs
  8. 4 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
  9. 5 -rw- 352 Jun 07 2021 04:48:26 private-data.txt
  10. 1,090,732 KB total (784,448 KB free)
  11. <Huawei>save
  12. The current configuration will be written to the device.
  13. Are you sure to continue? (y/n)[n]:y
  14. It will take several minutes to save configuration file, please wait..........
  15. ...
  16. Configuration file had been saved successfully
  17. Note: The configuration file will take effect after being activated
  18. <Huawei>dir
  19. Directory of flash:/
  20. Idx Attr Size(Byte) Date Time(LMT) FileName
  21. 0 drw- - Jun 07 2021 04:41:52 dhcp
  22. 1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
  23. 2 drw- - Jun 07 2021 04:47:15 1
  24. 3 -rw- 2,263 Jun 07 2021 04:41:36 statemach.efs
  25. 4 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
  26. 5 -rw- 352 Jun 07 2021 04:48:26 private-data.txt
  27. 6 -rw- 541 Jun 07 2021 05:02:30 vrpcfg.zip
  28. 1,090,732 KB total (784,440 KB free)

VRP - 图22
这里实际上在比较上面提到的,save-config 与 current-config,即一个存在内存中一个存在SD卡中的配置文件的差别。

  1. [R1]sys
  2. [R1]sysname R2
  3. [R2]q
  4. <R2>comp
  5. <R2>compare co
  6. <R2>compare configuration
  7. The current configuration is not the same as the next startup configuration fil
  8. e.
  9. ====== Current configuration line 2 ======
  10. sysname R2
  11. #
  12. snmp-agent local-engineid 800007DB03000000000000
  13. snmp-agent
  14. #
  15. clock timezone China-Standard-Time minus 08:00:00
  16. ====== Configuration file line 2 ======
  17. snmp-agent local-engineid 800007DB03000000000000
  18. snmp-agent
  19. #
  20. clock timezone China-Standard-Time minus 08:00:00
  21. #
  22. <R2>
  23. <R2>

image.png
虚拟机中是不存在配置的系统文件

  1. <R2>display startup
  2. MainBoard:
  3. Startup system software: null
  4. Next startup system software: null
  5. Backup system software for next startup: null
  6. Startup saved-configuration file: flash:/vrpcfg.zip
  7. Next startup saved-configuration file: flash:/vrpcfg.zip
  8. Startup license file: null
  9. Next startup license file: null
  10. Startup patch package: null
  11. Next startup patch package: null
  12. Startup voice-files: null
  13. Next startup voice-files: null
  14. <R2>

真机中的配置文件
image.png