第五章 华为VRP
文章目录
- 一、华为VRP系统概述
- 1、什么是VRP?
- 2、功能
- 3、VRP的发展
- 4、文件系统
- (1)、文件系统定义
- (2)、常见文件类型
- 5、存储设备
- 6、设备管理
- (1)、Web网管方式
- (2)、命令行方式
- 7、VRP用户界面
- (1)、Console用户界面
- (2)、VTY用户界面
- 8、VRP用户级别
- 二、命令行基础
- 1、进入系统视图
- 2、修改设备名称
- 3、查看当前设备配置命令
- 4、删除配置命令
- 5、进入接口命令
- 6、打开接口命令
- 7、配置IP命令
- 8、查看当前接口下的配置命令
- 9、查看所有接口IP配置命令
- 10、保存
- 11、删除保存配置命令
- 12、设置Telnet远程登陆命令
- 三、实验
- 1、两台路由器直连
- (1)、拓扑图
- (2)、AR1配置过程
- (3)、AR2配置过程
- 2、使用Telnet登录
- (1)、拓扑图
- (2)、AR1配置过程
- (3)、AR2配置过程
一、华为VRP系统概述
1、什么是VRP?
VRP是华为公司数据通信产品的通用操作系统平台,作为华为公司从低端到核心的全系列路由器、以太网交换机、业务网关等产品的软件核心引擎。
2、功能
- 实现统一的用户界面和管理界面
- 实现控制平面功能,并定义转发平面接口规范
- 实现各产品转发平面与VRP控制平面之间的交互
- 屏蔽各产品链路层对于网络层的差异
3、VRP的发展
4、文件系统
(1)、文件系统定义
文件系统是指对存储器中文件、目录的管理,功能包括查看、创建、重命名和删除目录,拷贝、移动、重命名和删除文件等。
(2)、常见文件类型
- 系统软件是设备启动、运行的必备软件,为整个设备提供支撑、管理、业务等功能。常见文件后缀名为:(.cc)。
- 补丁是一种与设备系统软件兼容的软件,用于解决设备系统软件少量且急需解决的问题。常见文件后缀名为:(.pat)。
- 配置文件是用户将配置命令保存的文件,作用是允许设备以指定的配置启动生效。常见文件后缀名为:(.cfg, .zip , .dat)。
- PAF文件是根据用户对产品需要提供了一个简单有效的方式来裁剪产品的资源占用和功能特性。常见文件后缀名为:(.bin)。
5、存储设备
- NVRAM:非易失随机读写存储器,用于存储日志缓存文件,定时器超时或缓存满后再写入Flash。
- SD Card:在断电后,不会丢失数据。存储容量较大,一般出现在主控板上,可以存放系统文件,配置文件,日志等。
- USB:是接口,用于外接大容量存储设备,主要用于设备升级,传输数据。
- Flash:属于非易失存储器,断电后,不会丢失数据。主要存放系统软件,配置文件等;补丁文件和PAF文件由维护人员上传,一般存储于flash或SD 。
- SDRAM:同步动态随机存储器是系统运行内存,相当于电脑的内存。
6、设备管理
用户对设备的常见管理方式主要有命令行方式和Web网管方式两种。
用户需要通过相应的方式登录到设备后才能对设备进行管理。
(1)、Web网管方式
Web网管方式通过图形化的操作界面,实现对设备直观方便地管理与维护,但是此方式仅可实现对设备部分功能的管理与维护。
Web网管方式可以通过HTTP和HTTPS方式登录设备。
(2)、命令行方式
命令行方式需要用户使用设备提供的命令行对设备进行管理与维护,此方式可实现对设备的精细化管理,但是要求用户熟悉命令行。
命令行方式可以通过Console口、Telnet或SSH方式登录设备。
7、VRP用户界面
用户通过命令行方式登录设备时,系统会分配一个用户界面用来管理、监控设备和用户间的当前会话。
设备系统支持的用户界面有Console用户界面和虚拟类型终端VTY(Virtual Type Terminal)用户界面。
(1)、Console用户界面
Console用户界面用来管理和监控通过Console口登录的用户。
用户终端的串行口可以与设备Console口直接连接,实现对设备的本地访问。
(2)、VTY用户界面
VTY用户界面用来管理和监控通过VTY方式登录的用户。
用户通过终端与设备建立Telnet或STelnet连接后,即建立了一条VTY通道,通过VTY通道实现对设备的远程访问。
8、VRP用户级别
VRP提供基本的权限控制,可以实现不同级别的用户能够执行不同级别的命令,用以限制不同用户对设备的操作。
用户等级 | 命令等级 | 名称 | 说明 |
---|---|---|---|
0 | 0 | 参观级 | 可使用网络诊断工具命令(ping、tracert)、从本设备出发访问外部设备的命令(Telnet客户端命令)、部分display命令等。 |
1 | 0 and 1 | 监控级 | 用于系统维护,可使用display等命令。 |
2 | 0,1 and 2 | 配置级 | 可使用业务配置命令,包括路由、各个网络层次的命令,向用户提供直接网络服务。 |
3-15 | 0,1,2 and 3 | 管理级 | 可使用用于系统基本运行的命令,对业务提供支撑作用,包括文件系统、FTP、TFTP下载、命令级别设置命令以及用于业务故障诊断的debugging命令等。 |
二、命令行基础
1、进入系统视图
<huawei>system-view
Enter system view, return user view with Ctrl+Z.
2、修改设备名称
<huawei>system-view
Enter system view, return user view with Ctrl+Z.
[huawei]sysname R1
3、查看当前设备配置命令
[R1]display current-configuration
4、删除配置命令
[R1]undo sysname
[Huawei]
5、进入接口命令
[R1]interface GigabitEthernet 0/0/0
6、打开接口命令
[R1-GigabitEthernet0/0/0]shutdown
7、配置IP命令
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
8、查看当前接口下的配置命令
[R1-GigabitEthernet0/0/0]display this
9、查看所有接口IP配置命令
<R1>display ip interface brief
10、保存
<R1>saveThe current configuration will be written to the device. Are you sure to continue? (y/n)[n]:yIt will take several minutes to save configuration file, please wait........Configuration file had been saved successfullyNote: The configuration file will take effect after being activated
11、删除保存配置命令
<R1>reset saved-configuration
This will delete the configuration in the flash memory.The device configuratio
ns will be erased to reconfigure.Are you sure? (y/n)[n]:yClear the configuration in the device successfully.
12、设置Telnet远程登陆命令
[AR2]user-interface vty 0 4
[AR2-ui-vty0-4]authentication-mode password
Please configure the login password (maximum length 16):HCIE
[AR2-ui-vty0-4]user privilege level 3
[AR2-ui-vty0-4]idle-timeout 1 30
[AR2-ui-vty0-4]set authentication password cipher huawei
三、实验
1、两台路由器直连
(1)、拓扑图
(2)、AR1配置过程
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR1
[AR1]interface GigabitEthernet 0/0/0
[AR1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
Oct 14 2025 22:54:50-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IPon the interface GigabitEthernet0/0/0 has entered the UP state.
[AR1-GigabitEthernet0/0/0]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 1Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.1/24 up up
GigabitEthernet0/0/1 unassigned down down
NULL0 unassigned up up(s)
[AR1-GigabitEthernet0/0/0]quit
[AR1]ping 192.168.1.2PING 192.168.1.2: 56 data bytes, press CTRL_C to breakReply from 192.168.1.2: bytes=56 Sequence=1 ttl=255 time=20 msReply from 192.168.1.2: bytes=56 Sequence=2 ttl=255 time=20 msReply from 192.168.1.2: bytes=56 Sequence=3 ttl=255 time=30 msReply from 192.168.1.2: bytes=56 Sequence=4 ttl=255 time=30 msReply from 192.168.1.2: bytes=56 Sequence=5 ttl=255 time=10 ms--- 192.168.1.2 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 10/22/30 ms
(3)、AR2配置过程
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR2
[AR2]interface GigabitEthernet 0/0/0
[AR2-GigabitEthernet0/0/0]ip address 192.168.1.2 24
Oct 14 2025 22:55:35-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IPon the interface GigabitEthernet0/0/0 has entered the UP state.
[AR2-GigabitEthernet0/0/0]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 1Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.2/24 up up
GigabitEthernet0/0/1 unassigned down down
NULL0 unassigned up up(s)
[AR2-GigabitEthernet0/0/0]quit
[AR2]ping 192.168.1.1PING 192.168.1.1: 56 data bytes, press CTRL_C to breakReply from 192.168.1.1: bytes=56 Sequence=1 ttl=255 time=110 msReply from 192.168.1.1: bytes=56 Sequence=2 ttl=255 time=20 msReply from 192.168.1.1: bytes=56 Sequence=3 ttl=255 time=10 msReply from 192.168.1.1: bytes=56 Sequence=4 ttl=255 time=20 msReply from 192.168.1.1: bytes=56 Sequence=5 ttl=255 time=30 ms--- 192.168.1.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 10/38/110 ms
2、使用Telnet登录
(1)、拓扑图
(2)、AR1配置过程
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR1
[AR1]interface GigabitEthernet 0/0/0
[AR1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
Oct 14 2025 23:03:36-08:00 AR1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IPon the interface GigabitEthernet0/0/0 has entered the UP state.
[AR1-GigabitEthernet0/0/0]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 1Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.1/24 up up
GigabitEthernet0/0/1 unassigned down down
NULL0 unassigned up up(s)
[AR1-GigabitEthernet0/0/0]quit
[AR1]ping 192.168.1.2PING 192.168.1.2: 56 data bytes, press CTRL_C to breakReply from 192.168.1.2: bytes=56 Sequence=1 ttl=255 time=50 msReply from 192.168.1.2: bytes=56 Sequence=2 ttl=255 time=40 msReply from 192.168.1.2: bytes=56 Sequence=3 ttl=255 time=50 msReply from 192.168.1.2: bytes=56 Sequence=4 ttl=255 time=50 msReply from 192.168.1.2: bytes=56 Sequence=5 ttl=255 time=40 ms--- 192.168.1.2 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 40/46/50 ms
[AR1]quit
<AR1>telnet 192.168.1.2Press CTRL_] to quit telnet modeTrying 192.168.1.2 ...Connected to 192.168.1.2 ...Login authenticationPassword:
<AR2>system-view
Enter system view, return user view with Ctrl+Z.
[AR2]
(3)、AR2配置过程
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname AR2
[AR2]interface GigabitEthernet 0/0/0
[AR2-GigabitEthernet0/0/0]ip address 192.168.1.2 24
Oct 14 2025 23:04:21-08:00 AR2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IPon the interface GigabitEthernet0/0/0 has entered the UP state.
[AR2-GigabitEthernet0/0/0]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 1Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 192.168.1.2/24 up up
GigabitEthernet0/0/1 unassigned down down
NULL0 unassigned up up(s)
[AR2-GigabitEthernet0/0/0]quit
[AR2]ping 192.168.1.1PING 192.168.1.1: 56 data bytes, press CTRL_C to breakReply from 192.168.1.1: bytes=56 Sequence=1 ttl=255 time=60 msReply from 192.168.1.1: bytes=56 Sequence=2 ttl=255 time=40 msReply from 192.168.1.1: bytes=56 Sequence=3 ttl=255 time=30 msReply from 192.168.1.1: bytes=56 Sequence=4 ttl=255 time=50 msReply from 192.168.1.1: bytes=56 Sequence=5 ttl=255 time=50 ms--- 192.168.1.1 ping statistics ---5 packet(s) transmitted5 packet(s) received0.00% packet lossround-trip min/avg/max = 30/46/60 ms
[AR2]user-interface vty 0 4
[AR2-ui-vty0-4]authentication-mode password
Please configure the login password (maximum length 16):HCIE
[AR2-ui-vty0-4]user privilege level 3
[AR2-ui-vty0-4]idle-timeout 1 30
[AR2-ui-vty0-4]quit