0% found this document useful (0 votes)
56 views30 pages

3, Huawie VRP

The document provides an overview of Huawei's Versatile Routing Platform (VRP), a universal operating system for Huawei datacom products, detailing its features, user interfaces, and management processes. It outlines the certification system for ICT professionals and the objectives of understanding VRP basics and command line usage. Additionally, it describes the device initialization process, file system management, and various login methods for device management.

Uploaded by

yabmitiku123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views30 pages

3, Huawie VRP

The document provides an overview of Huawei's Versatile Routing Platform (VRP), a universal operating system for Huawei datacom products, detailing its features, user interfaces, and management processes. It outlines the certification system for ICT professionals and the objectives of understanding VRP basics and command line usage. Additionally, it describes the device initialization process, file system management, and various login methods for device management.

Uploaded by

yabmitiku123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Huawei VRP

Huawei Technologies Co., Ltd.


Copyright © Huawei Technologies Co., Ltd. 2020. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means
without prior written consent of Huawei Technologies Co., Ltd.

Trademarks and Permissions

and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their
respective holders.

Notice
The purchased products, services and features are stipulated by the contract made between
Huawei and the customer. All or part of the products, services and features described in this
document may not be within the purchase scope or the usage scope. Unless otherwise
specified in the contract, all statements, information, and recommendations in this
document are provided "AS IS" without warranties, guarantees or representations of any
kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been
made in the preparation of this document to ensure accuracy of the contents, but all
statements, information, and recommendations in this document do not constitute a
warranty of any kind, express or implied.

Huawei Technologies Co., Ltd.


Address: Huawei Industrial Base
Bantian, Longgang
Shenzhen 518129
People's Republic of China

Website: https://e.huawei.com/
Huawei Certification System
Huawei Certification follows the "platform + ecosystem" development strategy,
which is a new collaborative architecture of ICT infrastructure based on "Cloud-
Pipe-Terminal". Huawei has set up a complete certification system consisting of
three categories: ICT infrastructure certification, platform and service
certification, and ICT vertical certification. It is the only certification system that
covers all ICT technical fields in the industry. Huawei offers three levels of
certification: Huawei Certified ICT Associate (HCIA), Huawei Certified ICT
Professional (HCIP), and Huawei Certified ICT Expert (HCIE). Huawei
Certification covers all ICT fields and adapts to the industry trend of ICT
convergence. With its leading talent development system and certification
standards, it is committed to fostering new ICT talent in the digital era, and
building a sound ICT talent ecosystem.
Huawei Certified ICT Associate-Datacom (HCIA-Datacom) is designed for
Huawei's frontline engineers and anyone who want to understand Huawei's
datacom products and technologies. The HCIA-Datacom certification covers
routing and switching principles, basic WLAN principles, network security
basics, network management and O&M basics, SDN and programmability and
automation basics.
The Huawei certification system introduces the industry, fosters innovation,
and imparts cutting-edge datacom knowledge.
Contents

1 Huawei VRP Basics........................................................................ 1


1.1 Foreword................................................................................................................................ 1
1.2 Objectives.............................................................................................................................. 1
1.3 VRP Overview........................................................................................................................ 2
1.3.1 What Is VRP?...................................................................................................................... 2
1.3.2 Development of the VRP..................................................................................................... 3
1.3.3 File System......................................................................................................................... 3
1.3.4 Storage Media.................................................................................................................... 4
1.3.5 Device Initialization Process............................................................................................... 4
1.3.6 Device Management........................................................................................................... 4
1.3.7 VRP User Interfaces............................................................................................................ 5
1.3.8 VRP User Levels.................................................................................................................. 5
1.3.9 Login to the Web System.................................................................................................... 6
1.3.10 CLI - Local Login................................................................................................................ 7
1.3.11 CLI - Remote Login............................................................................................................ 8
1.3.12 CLI.................................................................................................................................... 9
1.4 Command Line Basics.......................................................................................................... 10
1.4.1 Basic Command Structure................................................................................................10
1.4.2 Command Views............................................................................................................... 11
1.4.3 Editing a Command.......................................................................................................... 12
1.4.4 Using Command Line Online Help.....................................................................................13
1.4.5 Interpreting Command Line Error Messages.....................................................................14
1.4.6 Using Undo Command Lines............................................................................................. 14
1.4.7 Using Command Line Shortcut Keys.................................................................................15
1.4.8 Common File System Operation Commands.....................................................................15
1.4.9 Basic Configuration Commands........................................................................................ 17
1.4.10 Case 1: File Query Commands and Directory Operations................................................20
1.4.11 Case 2: File Operations................................................................................................... 21
1.4.12 Case 3: VRP Basic Configuration Commands..................................................................22
1.5 Summary............................................................................................................................. 25
1.6 Quiz..................................................................................................................................... 24
Huawei VRP Page 1

1 Huawei VRP Basics

1.1 Foreword
The Versatile Routing Platform (VRP) is a universal operating system (OS)
platform for Huawei datacom products. It is based on IP and adopts a
component-based architecture. It provides rich features and functions, including
application-based tailorable and extensible functions, greatly improving the
running efficiency of the devices that use this OS. To efficiently manage such
devices, you must be familiar with VRP and VRP-based configuration.
This course describes the basic concepts, common commands, and command
line interface (CLI) of VRP.

1.2 Objectives
On completion of this course, you will be able to:
 Understand VRP basics.
 Learn how to use CLI.
 Master basic CLI commands.

1.3 VRP Overview


1.3.1 What Is VRP?
Huawei VRP Page 2

2 What Is VRP

VRP is a universal OS platform for Huawei datacom products. It serves as the


software core engine of Huawei's full series of routers from low-end to core ones,
Ethernet switches, service gateways, and so on.
VRP provides the following functions:
 Provides a unified user interface and a unified management interface.
 Implements the functions of the control plane and defines the interface
specifications of the forwarding plane.
 Implements communication between the device forwarding plane and VRP
control plane.

2.1.1 Development of the VRP

3 Development of the VRP

3.1.1 File System


The file system manages files and directories in storage media, allowing users to
view, create, rename, and delete directories and copy, move, rename, and delete
files.
Huawei VRP Page 3

To manage files on a device, log in to the device through either of the following
modes:
 Local login through the console port or Telnet
 Remote login through FTP, TFTP, or SFTP
Mastering the basic operations of the file system is crucial for network engineers
to efficiently manage the configuration files and VRP system files of devices.
Common file types:
 System Software: The system software is a must for device startup and
operation, providing support, management, and services for a device. The
common file name extension is .cc.
 Configuration File: A configuration file stores configuration commands,
enabling a device to start with the configurations in the file. A configuration
file is a collection of command lines. Current configurations are stored in a
configuration file so that the configurations are still effective after the device
restarts. Users can view configurations in the configuration file and upload
the configuration file to other devices to implement batch configuration. The
common file name extensions are .cfg, zip, and .dat.
 Patch File: A patch is a kind of software compatible with the system software.
It is used to fix bugs in system software. Patches can also fix system defects
and optimize some functions to meet service requirements. The common file
name extension is .pat.
 PAF File: A PAF file effectively controls product features and resources. The
common file name extension is .bin.

3.1.2 Storage Media


Storage media include SDRAM, flash memory, NVRAM, SD card, and USB.
 SDRAM is synchronous dynamic random access memory, which is equivalent
to a computer's memory. It stores the system running information and
parameters.
 The flash memory is nonvolatile and can avoid data loss in case of power-off.
It is used to store system software, configuration files, and so on. Patch files
and PAF files are uploaded by maintenance personnel and generally stored in
the flash memory or SD card.
 NVRAM is nonvolatile random access memory. It is used to store log buffer
files. Logs will be written into the flash memory after the timer expires or the
buffer is full.
 The SD card can avoid data loss data in case of power-off. The SD card has a
large storage capacity and is generally installed on a main control board. It is
used to store system files, configuration files, log files, and so on.
 The USB is considered an interface. It is used to connect to a large-capacity
storage medium for device upgrade and data transmission.

3.1.3 Device Initialization Process


After a device is powered on, it runs the BootROM software to initialize the
hardware and display hardware parameters. Then, it runs the system software
and reads the configuration file from the default storage path to perform
initialization.
Huawei VRP Page 4

4 Device Initialization Process

Boot Read-Only Memory (BootROM) is a set of programs added to the ROM chip
of a device. BootROM stores the device's most important input and output
programs, system settings, startup self-check program, and system automatic
startup program.
The startup interface provides the information about the running program of the
system, the running VRP version, and the loading path.

4.1.1 Device Management


There are two commonly used device management modes: CLI and web system.
To use a device management mode, you must first log in to a device through a
login mode supported by this device management mode.
Web System
 The web system provides a graphical user interface (GUI) for easy device
management and maintenance. This method, however, can be used to
manage and maintain only some, not all, device functions.
 The web system supports the HTTP and HTTPS login modes.
CLI
 The CLI requires users to use commands provided by a device to manage
and maintain the device. This mode implements refined device management
but requires users to be familiar with the commands.
 The CLI supports the console port, Telnet, and SSH login modes.

4.1.2 VRP User Interfaces


When a user logs in to a device through a CLI-supported mode, the system
allocates a user interface to manage and monitor the current session between
the user terminal and device.
Such a user interface can be a console user interface or virtual type terminal
(VTY) user interface.
Console User Interface
 A console user interface is used to manage and monitor users who log in to a
device through the console port.
Huawei VRP Page 5

 The serial port of a user terminal can be directly connected to the console
port of a device for local access.
VTY User Interface
 The VTY user interface is used to manage and monitor users who log in to a
device by means of VTY.
 After a Telnet or STelnet connection is established between a user terminal
and a device, a VTY channel is established to implement remote access to
the device.

4.1.3 VRP User Levels


VRP provides basic permission control functions. It defines the levels of
commands that each level of users can execute to restrict the operations of
users at different levels.

User Command
Name Available Command
Level Level

Network diagnosis commands (such


as ping and tracert), commands for
accessing external devices from the
0 0 Visit level
local device (such as Telnet client
commands), and some display
commands

Monitoring System maintenance commands,


1 0 and 1
level including display commands

Service configuration commands,


Configuration including routing commands and IP
2 0, 1, and 2
level configuration commands, to directly
provide users with network services

Commands for controlling basic


system operations and providing
support for services, including the file
0, 1, 2, Management
3-15 system, FTP, TFTP download, user
and 3 level
management, and command level
commands, as well as debugging
commands for fault diagnosis

To limit users' access permissions to a device, the device manages users by level
and establishes a mapping between user levels and command levels. After a user
logs in to a device, the user can use only commands of the corresponding levels
or lower. By default, the user command level ranges from 0 to 3, and the user
level ranges from 0 to 15. The mapping between user levels and command levels
is shown in the table.

4.1.4 Login to the Web System


Take the web system for a Huawei AR router as an example. Start a browser on a
PC, enter https://192.168.1.1 in the address bar, and press Enter. Then, the web
system login page is displayed.
Huawei VRP Page 6

5 Login to the Web System

Note: The login page, mode, and IP address may vary according to devices. For
details, see the product documentation.

5.1.1 CLI - Local Login


You can log in to a device in local or remote mode. Local login mode:
 Use this mode when you need to configure a device that is powered on for
the first time. You can use the console port of the device for a local login.
 The console port is a serial port provided by the main control board of a
device.
 To implement the login, directly connect your terminal's serial port to the
device's console port, and use PuTTY to log in to the device. You can then
configure the device after the login succeeds.
Huawei VRP Page 7

6 Local Login

Use a console cable to connect the console port of a device with the COM port of
a computer. You can then use PuTTY on the computer to log in to the device and
perform local commissioning and maintenance. A console port is an RJ45 port
that complies with the RS232 serial port standard. At present, the COM ports
provided by most desktop computers can be connected to console ports. In most
cases, a laptop does not provide a COM port. Therefore, a USB-to-RS232
conversion port is required if you use a laptop.
The console port login function is enabled by default and does not need to be
pre-configured.
Huawei VRP Page 8

7 PuTTY Configuration

PuTTY is a connection software for login through Telnet, SSH, serial interfaces,
and so on.
In local login, the terminal is connected to the console port of the Huawei device
through a serial port. Therefore, set Connection type to Serial. Set Serial line
based on the actually used port on the terminal. Set Speed to 9600.
Many terminal simulators can initiate console connections. PuTTY is one of the
options for connecting to VRP. If PuTTY is used for access to VRP, you must set
port parameters. The figure in the slide shows examples of port parameter
settings. If the parameter values were ever changed, you need to restore the
default values.
After the settings are complete, click Open. The connection with VRP is then set
up.
Huawei VRP Page 9

7.1.1 CLI - Remote Login


Remote login means that you log in to a device that can function as a remote
login server, allowing you to centrally manage and maintain network devices.
Remote login methods include Telnet and SSH.
 If you use the SSH login mode, set Connection type to SSH, enter the IP
address of the remote login server, and use the default port number 22.
 If you use the Telnet login mode, set Connection type to Telnet, enter the IP
address of the remote login server, and use the default port number 23.

8 PuTTY Configuration

By default, the SSH login function is disabled on a device. You need to log in to
the device through the console port and configure mandatory parameters for
SSH login before using the SSH login function.
Huawei VRP Page 10

8.1.1 CLI
After a login succeeds, the command line interface (CLI) is displayed.
The CLI is a common tool for engineers to interact with network devices. When
the command prompt is displayed after a user logs in to a device, it means that
the user has entered the CLI successfully.

9 CLI

9.1 Command Line Basics


9.1.1 Basic Command Structure
CLI commands follow a unified structure. After a command is entered on the CLI,
the CLI parses the command and executes it to implement the function of the
command, such as query, configuration, or management.


10 Basic Command Structure

Command word: specifies the operation to be executed in a command, such


as display (device status query) or reboot (device restart).
 Keyword: a special character string that is used to further restrict a
command. It is an extension of a command and can also be used to express
the command composition logic.
Huawei VRP Page 11

 Parameter list: is composed of parameter names and values to further


restrict the command function. It can contain one or more pairs of parameter
names and values.
Example 1:
display ip interface GE0/0/0: displays interface information.
Command word: display
Keyword: ip
Parameter name: interface
Parameter value: GE0/0/0
Example 2:
reboot: restarts a device.
Command word: reboot
Each operation command must start with a command word, and the command
word is selected from the standard command word list.
Each command must contain a maximum of one command word and can contain
multiple keywords and parameters. A parameter must be composed of a
parameter name and a parameter value.
The command word, keywords, parameter names, and parameter values in a
command are separated by spaces.

10.1.1 Command Views


A device provides various configuration and query commands. To facilitate the
use of these commands, VRP registers the commands in different views
according to their functions.

11 Command Views 1

User view: In this view, you can check the running status and statistics of a
device. The user view is the first view displayed after you log in to a device. Only
query and tool commands are provided in the user view.
System view: In this view, you can set system parameters and enter the
configuration views of other commands. In the user view, only the system view
Huawei VRP Page 12

can be accessed. Global configuration commands are provided in the system


view. If the system has a lower-level configuration view, the command for
entering the lower-level configuration view is provided in the system view.
Other views: In other views, such as the interface view and protocol view, you
can set interface parameters and protocol parameters.

Command examples:
12 Command Views 2

<Huawei>system-view #This command is used to enter the system view from the
user view. The user view is the first view that is displayed after you log in to a device.
[Huawei]interface GigabitEthernet 0/0/1 #This command is used to enter the
interface view from the system view.
[Huawei-GigabitEthernet0/0/1]ip address 192.168.1.1 24 #This command is used to set
an IP address.
[Huawei-GigabitEthernet0/0/1]quit #This command is used to return to the
previous view.
[Huawei]ospf 1 #This command is used to enter the protocol view from
the system view.
[Huawei-ospf-1]area 0 #This command is used to enter the OSPF area view
from the OSPF view.
[Huawei-ospf-1-area-0.0.0.0]return #This command is used to return to the user
view.

After you log in to the system, the user view is displayed first. This view provides
only display commands and tool commands, such as ping and telnet. It does not
provide any configuration commands.
You can run the system-view command in the user view to enter the system view.
The system view provides some simple global configuration commands.
In a complex configuration scenario, for example, multiple parameters need to
be configured for an Ethernet interface, you can run the interface
GigabitEthernet X command (X indicates the number of the interface) to enter
the GE interface view. Configurations performed in this view take effect only on
the specified GE interface.

12.1.1 Editing a Command


The CLI of a device provides basic command editing functions. Common editing
functions are as follows:
Huawei VRP Page 13

1. Command editing through function keys


 Backspace: deletes the character before the cursor and moves the cursor to
the left. When the cursor reaches the beginning of the command, an alarm is
generated.
 Left cursor key ← or Ctrl+B: moves the cursor one character to the left. When
the cursor reaches the beginning of the command, an alarm is generated.
 Right cursor key → or Ctrl+F: moves the cursor one character to the right.
When the cursor reaches the end of the command, an alarm is generated.
2. Incomplete keyword input
 A device allows the input of incomplete keywords. Specifically, if an entered
character string can match a unique keyword, you do not need to enter the
remaining characters of the keyword.

<Huawei>d cu
<Huawei>di cu
<Huawei>dis cu
<Huawei>d c
^
Error:Ambiguous command found at '^' position.
<Huawei>dis c
^
Error:Ambiguous command found at '^' position.

 For example, the display current-configuration command is identified


when you enter d cu, di cu, or dis cu. However, the command cannot be
identified if you enter d c or dis c because the character string d c or dis
c matches more than one command.
Note: "keyword" mentioned in this section means any character string except a
parameter value string in a command. The meaning is different from that of
"keyword" in the command format.
3. Command editing through the Tab key
 If an entered character string matches a unique keyword, the system
automatically supplements the keyword after you press Tab. If the keyword is
complete, it remains unchanged even if you press Tab repeatedly.

[Huawei] info- #Press Tab.


[Huawei] info-center

 If an entered character string matches more than one keyword, you can
press Tab repeatedly. The system will then circularly display the keywords
beginning with the entered character string to help you find the desired
keyword.

[Huawei] info-center log #Press Tab.


[Huawei] info-center logbuffer #Press Tab repeatedly to circularly display all matched
keywords.
[Huawei] info-center logfile
[Huawei] info-center loghost

 If an entered character string cannot identify any keyword, the entered string
remains unchanged after you press Tab.
Huawei VRP Page 14

[Huawei] info-center loglog #Enter an incorrect keyword and press Tab.


[Huawei] info-center loglog

12.1.2 Using Command Line Online Help


You can use command line online help to obtain real-time help without
memorizing a large number of complex commands.
The online help can be classified into full help and partial help. To obtain the
online help, enter a question mark (?) when using a command.
Full Help
 To obtain full help, press ? after a view displayed. The system will then
display all commands in the view and their descriptions.

<Huawei> ?
User view commands:
arp-ping ARP-ping
autosave <Group> autosave command group
backup Backup information
cd Change current directory
clear Clear
clock Specify the system clock

Partial Help
 To obtain partial help, press ? after you enter the start character or character
string of a command. The system will then display all the commands that
start with this character or character string.

<Huawei> d?
debugging <Group> debugging command group
delete Delete a file
dialer Dialer
dir List files on a filesystem
display Display information

The command help information displayed in this slide is for reference only, which
varies according to devices.

12.1.3 Interpreting Command Line Error Messages


If a command passes the syntax check, the system executes it. Otherwise, the
system reports an error message.

[Huawei] sysname
^
Error:Incomplete command found at ‘^’ position. #A supplement needs to be made at
the position pointed by the arrow.

[Huawei] router if 1.1.1.1


^
Error: Unrecognized command found at ‘^’ position. #An identification failure occurs at
the position pointed by the arrow. Check whether the command is correct.

[Huawei] a
^
Huawei VRP Page 15

Error: Ambiguous command found at '^' position. #More than one command matches the
keyword at the position pointed by the arrow. In this example, it indicates that there are
multiple keywords starting with a.

[Huawei-GigabitEthernet0/0/0]ospf cost 800000 #The parameter value at the position


pointed by the arrow is invalid.
^
Error: Wrong parameter found at '^' position.

12.1.4 Using Undo Command Lines


If a command begins with the keyword undo, it is an undo command. An undo
command is generally used to restore a default configuration, disable a function,
or delete a configuration. For example:
 Run an undo command to restore a default configuration.

<Huawei> system-view
[Huawei] sysname Server
[Server] undo sysname
[Huawei]

 Run an undo command disable a function.

<Huawei> system-view
[Huawei] ftp server enable
[Huawei] undo ftp server

 Run an undo command to delete a configuration.

[Huawei]interface g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.1.1 24
[Huawei-GigabitEthernet0/0/1]undo ip address

12.1.5 Using Command Line Shortcut Keys


A device provides command shortcut keys to speed up and simplify command
input.
Command shortcut keys are classified into user-defined shortcut keys and
system shortcut keys.
User-defined Shortcut Keys
 There are four user-defined shortcut keys: Ctrl+G, Ctrl+L, Ctrl+O, and
Ctrl+U.
 You can associate a user-defined shortcut key with any command. After you
press a shortcut key, the system will automatically run the command
associated with the shortcut key.

<Huawei> system-view
[Huawei] hotkey ctrl_l "display tcp status"

System Shortcut Keys


 CTRL_A: moves the cursor to the beginning of the current line.
 CTRL_B: moves the cursor one character to the left.
 CTRL_C: stops the running of the current command.
Huawei VRP Page 16

 CTRL_E: moves the cursor to the end of the current line.


 CTRL_X: deletes all characters on the left of the cursor.
 CTRL_Y: deletes the character at the cursor and all characters on the right of
the cursor.
 CTRL_Z: returns to the user view.
 CTRL+]: terminates the current connection or switches to another
connection.

12.1.6 Common File System Operation Commands


Step 1 Check the current directory.

<Huawei>pwd

Step 2 Display information about files in the current directory.

<Huawei>dir

Step 3 Display the content of a text file.

<Huawei>more

Step 4 Change the current working directory.

<Huawei>acd

Step 5 Create a directory.

<Huawei>makdir

Step 6 Delete a directory.

<Huawei>rmdir

Step 7 Copy a file.

<Huawei>copy

Step 8 Move a file.

<Huawei>move

Step 9 Rename a file.

<Huawei>rename

Step 10 Delete a file.

<Huawei>delete

Step 11 Restore a deleted file.


Huawei VRP Page 17

<Huawei>undelete

Step 12 Permanently delete a file in the recycle bin.

<Huawei>reset recycle-bin

VRP uses the file system to manages files and directories on a device. To manage
files and directories, you often need to run basic commands to query file or
directory information. Such commonly used basic commands include pwd, dir
[/all] [ filename | directory ], and more [ /binary ] filename [ offset ] [ all ].
 The pwd command displays the current working directory.
 The dir [/all] [ filename | directory ] command displays information about
files in the current directory.
 The more [/binary] filename [ offset ] [ all ] command displays the content
of a text file.
 In this example, the dir command is run in the user view to display
information about files in the flash memory.
Common commands for operating directories include cd directory, mkdir
directory, and rmdir directory.
 The cd directory command changes the current working directory.
 The mkdir directory command creates a directory. A directory name can
contain 1 to 64 characters.
 The rmdir directory command deletes a directory from the file system. A
directory to be deleted must be empty; otherwise, it cannot be deleted using
this command.
 The copy source-filename destination-filename command copies a file. If the
target file already exists, the system displays a message indicating that the
target file will be replaced. The target file name cannot be the same as the
system startup file name. Otherwise, the system displays an error message.
 The move source-filename destination-filename command moves a file to
another directory. The move command can be used to move files only within
the same storage medium.
 The rename old-name new-name command renames a directory or file.
 The delete [/unreserved] [ /force ] { filename | devicename } command
deletes a file. If the unreserved parameter is not specified, the deleted file is
moved to the recycle bin. A file in the recycle bin can be restored using the
undelete command. However, if the /unreserved parameter is specified,
the file is permanently deleted and cannot be restored any more. If the
/force parameter is not specified in the delete command, the system
displays a message asking you whether to delete the file. However, if the
/force parameter is specified, the system does not display the message.
filename specifies the name of the file to be deleted, and devicename
specifies the name of the storage medium.
 The reset recycle-bin [ filename | devicename ] command permanently
deletes all or a specified file in the recycle bin. filename specifies the name
of the file to be permanently deleted, and devicename specifies the name of
the storage medium.
Huawei VRP Page 18

12.1.7 Basic Configuration Commands


Step 1 Configure a system name.

[Huawei] sysname name

Step 2 Configure a system clock.

<Huawei> clock timezone time-zone-name { add | minus } offset

This command configures a local time zone.

<Huawei> clock datetime [ utc ] HH:MM:SS YYYY-MM-DD

This command configures the current or UTC date and time.

<Huawei> clock daylight-saving-time

This command configures the daylight saving time.

Step 3 Configure a command level.

[Huawei] command-privilege level level view view-name command-key

This command configures a level for commands in a specified view. Command


levels are classified into visit, monitoring, configuration, and management, which
are identified by the numbers 0, 1, 2, and 3, respectively.

Step 4 Configure the password-based login mode.

[Huawei]user-interface vty 0 4
[Huawei-ui-vty0-4]set authentication password cipher information

This user-interface vty command displays the virtual type terminal (VTY) user
interface view, and the set authentication password command configures the
password authentication mode. The system supports the console user interface
and VTY user interface. The console user interface is used for local login, and the
VTY user interface is used for remote login. By default, a device supports a
maximum of 15 concurrent VTY-based user accesses.

Step 5 Configure user interface parameters.

[Huawei] idle-timeout minutes [ seconds ]

This command sets a timeout period to disconnect from the user interface. If no
command is entered within the specified period, the system tears down the
current connection. The default timeout period is 10 minutes.

Step 6 Configure an IP address for an interface.

[Huawei]interface interface-number
[Huawei-interface-number]ip address ip address

This command configures an IP address for a physical or logical interface on a


device.
Huawei VRP Page 19

Step 7 Display currently effective configurations.

<Huawei>display current-configuration

Step 8 Save a configuration file.

<Huawei>save

Step 9 Check saved configurations.

<Huawei>display saved-configuration

Step 10 Clear saved configurations.

<Huawei>reset saved-configuration

Step 11 Check system startup configuration parameters.

<Huawei> display startup

This command displays the system software for the current and next startup,
backup system software, configuration file, license file, and patch file, as well as
voice file.

Step 12 Configure the configuration file for next startup.

<Huawei>startup saved-configuration configuration-file

During a device upgrade, you can run this command to configure the device to
load the specified configuration file for the next startup.

Step 13 Restart a device.

<Huawei>reboot

Generally, more than one device is deployed on a network, and the administrator
needs to manage all devices in a unified manner. The first task of device
commissioning is to set a system name. A system name uniquely identifies a
device. The default system name of an AR series router is Huawei, and that of an
S series switch is HUAWEI. A system name takes effect immediately after being
set.
To ensure successful coordination with other devices, you need to correctly set
the system clock. System clock = Coordinated Universal Time (UTC) ± Time
difference between the UTC and the time of the local time zone. Generally, a
device has default UTC and time difference settings.
 You can run the clock datetime command to set the system clock of the
device. The date and time format is HH:MM:SS YYYY-MM-DD. If this command is
run, the UTC is the system time minus the time difference.
 You can also change the UTC and the system time zone to change the system
clock.
 The clock datetime utc HH:MM:SS YYYY-MM-DD changes the UTC.
Huawei VRP Page 20

 The clock timezone time-zone-name { add | minus } offset command


configures the local time zone. The UTC is the local time plus or minus the
offset.
 If a region adopts the daylight saving time, the system time is adjusted
according to the user setting at the moment when the daylight saving time
starts. VRP supports the daylight saving time function.
Each type of user interface has a corresponding user interface view. A user
interface view is a command line view provided by the system for you to
configure and manage all physical and logical interfaces working in
asynchronous interaction mode, implementing unified management of different
user interfaces. Before accessing a device, you need to set user interface
parameters. The system supports console and VTY user interfaces. The console
port is a serial port provided by the main control board of a device. A VTY is a
virtual line port. A VTY connection is set up after a Telnet or SSH connection is
established between a user terminal and a device, allowing the user to access
the device in VTY mode. Generally, a maximum of 15 users can log in to a device
through VTY at the same time. You can run the user-interface maximum-vty
number command to set the maximum number of users that can concurrently
access a device in VTY mode. If the maximum number of login users is set to 0,
no user can log in to the device through Telnet or SSH. The display user-
interface command displays information about a user interface.
The maximum number of VTY interfaces may vary according to the device type
and used VRP version.
To run the IP service on an interface, you must configure an IP address for the
interface. Generally, an interface requires only one IP address. For the same
interface, a newly configured primary IP address replaces the original primary IP
address.
You can run the ip address { mask | mask-length } command to configure an IP
address for an interface. In this command, mask indicates a 32-bit subnet mask,
for example, 255.255.255.0; mask-length indicates a mask length, for example,
24. Specify either of them when configuring an IP address.
A loopback interface is a logical interface that can be used to simulate a network
or an IP host. The loopback interface is stable and reliable, and can also be used
as the management interface if multiple protocols are deployed.
When configuring an IP address for a physical interface, check the physical status
of the interface. By default, interfaces are up on Huawei routers and switches. If
an interface is manually disabled, run the undo shutdown command to enable
the interface after configuring an IP address for it.
The reset saved-configuration command deletes the configurations saved in a
configuration file or the configuration file. After this command is run, if you do
not run the startup saved-configuration command to specify the
configuration file for the next startup or the save command to save current
configurations, the device uses the default parameter settings during system
initialization when it restarts.
The display startup command displays the system software for the current and
next startup, backup system software, configuration file, license file, and patch
file, as well as voice file.
The startup saved-configuration configuration-file command configures the
configuration file for the next startup. The configuration-file parameter specifies
the name of the configuration file for the next startup.
Huawei VRP Page 21

The reboot command restarts a device. Before the device reboots, you are
prompted to save configurations.

12.1.8 Case 1: File Query Commands and Directory


Operations
Requirement description:
 Check information about files and directories in the current directory of a
router named RTA.
 Create a directory named test, and then delete the directory.

<Huawei>pwd
flash:
<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 drw- - Dec 27 2019 02:54:09 dhcp
1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
2 -rw- 2,263 Dec 27 2019 02:53:59 statemach.efs
3 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
1,090,732 KB total (784,464 KB free)
<Huawei>mkdir test
<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 drw- - Dec 27 2019 02:54:39 test
1 drw- - Dec 27 2019 02:54:09 dhcp
2 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
3 -rw- 2,263 Dec 27 2019 02:53:59 statemach.efs
4 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
1,090,732 KB total (784,460 KB free)
<Huawei>rmdir test

12.1.9 Case 2: File Operations


Requirement description:
 Rename the huawei.txt file save.zip.
 Make a copy for the save.zip file and name the copy file.txt.
 Move the file.txt file to the dhcp directory.
 Delete the file.txt file.
 Restore the deleted file file.txt.

<Huawei>rename huawei.txt save.zip


<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 drw- - Mar 04 2020 04:39:52 dhcp
1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
2 -rw- 828,482 Mar 04 2020 04:51:45 save.zip
3 -rw- 2,263 Mar 04 2020 04:39:45 statemach.efs
4 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
1,090,732 KB total (784,464 KB free)
<Huawei>copy save.zip file.txt
Huawei VRP Page 22

<Huawei>dir
Directory of flash:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 drw- - Mar 04 2020 04:39:52 dhcp
1 -rw- 121,802 May 26 2014 09:20:58 portalpage.zip
2 -rw- 828,482 Mar 04 2020 04:51:45 save.zip
3 -rw- 2,263 Mar 04 2020 04:39:45 statemach.efs
4 -rw- 828,482 May 26 2014 09:20:58 sslvpn.zip
5 -rw- 828,482 Mar 04 2020 04:56:05 file.txt
1,090,732 KB total (784,340 KB free)
<Huawei>move file.txt flash:/dhcp/
<Huawei>cd dhcp
<Huawei>dir
Directory of flash:/dhcp/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 -rw- 98 Dec 27 2019 02:54:09 dhcp-duid.txt
1 -rw- 121,802 Dec 27 2019 03:13:50 file.txt
1,090,732 KB total (784,344 KB free)
<Huawei>delete file.txt
<Huawei>dir
Directory of flash:/dhcp/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 -rw- 98 Dec 27 2019 02:54:09 dhcp-duid.txt
1,090,732 KB total (784,340 KB free)
<Huawei>undelete file.txt
<Huawei>dir
Directory of flash:/dhcp/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 -rw- 98 Dec 27 2019 02:54:09 dhcp-duid.txt
1 -rw- 121,802 Dec 27 2019 03:13:50 file.txt
1,090,732 KB total (784,340 KB free)

12.1.10 Case 3: VRP Basic Configuration Commands


As shown in the figure, an engineer needs to configure a router. The
requirements are as follows:
 Connect the router and PC. Assign the IP addresses shown in the figure to the
router and PC.
 Allow other employees of the company to use the password huawei123 to
remotely log in to the router through the PC. Allow them to view
configurations but disable them from modifying configurations.
 Save current configurations and name the configuration file huawei.zip.
Configure this file as the configuration file for the next startup.
Huawei VRP Page 23

13
Configuration Procedure:
VRP Basic Configuration

Configure an interface IP address.

<Huawei>system-view
[Huawei]sysname AR1
[AR1]interface GigabitEthernet 0/0/1
[AR1-GigabitEthernet0/0/1]ip address 192.168.1.1 24
[AR1-GigabitEthernet0/0/1]quit

Configuring a user level and a user authentication mode.

[AR1]user-interface vty 0 4
[Huawei-ui-vty0-4]authentication-mode password
Please configure the login password (maximum length 16):huawei123
[AR1-ui-vty0-4]user privilege level 1
[AR1-ui-vty0-4]quit

 The password configuration command may vary according to devices. For


details, see the product documentation.
 For some devices, after the authentication-mode password command is
entered, the password setting page will be displayed automatically. You can
then enter the password at the page that is displayed. For some devices, you
need to run the set authentication-mode password password command
to set a password.
Specify the configuration file for next startup.

<HUAWEI>save huawei.zip
Are you sure to save the configuration to huawei.zip? (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>startup saved-configuration huawei.zip

 By default, configurations are saved in the vrpcfg.cfg file. You can also create
a file for saving the configurations. VRPv5 and VRPv8 have the same
command that is used to specify the configuration file for the next startup,
but different directories for saving the file.
 To save configurations, run the save command. By default, configurations
are saved in the vrpcfg.cfg file. You can also create a file for saving the
configurations. In VRPv5, the configuration file is stored in the flash: directory
by default.
Checking Configurations

<AR1>display startup
MainBoard:
Startup system software: null
Huawei VRP Page 24

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:/huawei.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

 The display startup command displays the system software for the current
and next startup, backup system software, configuration file, license file, and
patch file, as well as voice file.
 Startup system software indicates the VRP file used for the current
startup.
 Next startup system software indicates the VRP file to be used for the
next startup.
 Startup saved-configuration file indicates the configuration file used for
the current system startup.
 Next startup saved-configuration file indicates the configuration file to
be used for the next startup.
 When a device starts, it loads the configuration file from the storage medium
and initializes the configuration file. If no configuration file exists in the
storage medium, the device uses the default parameter settings for
initialization.
 The startup saved-configuration [ configuration-file ] command sets the
configuration file for the next startup, where the configuration-file parameter
specifies the name of the configuration file.
Huawei VRP Page 25

14 More Information

VRPv5 has the running and startup configuration databases but does not have
the candidate configuration database. Therefore, a command configuration takes
effect immediately after the command is executed, without being committed.
However, in VRPv8, the configuration command takes effect only after the
command committed.

14.1 Quiz
1. (Single) In which view is the sysname Huawei command used to set the
device name to Huawei? ( )
A. User view
B. System view
C. interface view
D. protocol view
2. (Single) Which of the following statements about storage devices is false?
( )
A. Flash is a non-volatile memory. Data will not be lost after a power failure.
B. NVRAM non-volatile random access memory for configuration files
C. The SD card can store system files, configuration files, and logs.
D. SDRAM is equivalent to the memory of a computer.
3. (Multiple) Which of the following views cannot be used by the save
command? ( )
A. User view
B. System view
C. Interface view
D. Protocol view
4. (True or False) Huawei VRP does not have a file system. Therefore, you cannot
perform operations on files. You must use external tools to perform operations
on files. ( )
A. True
B. False
5. (True or False)When using the console port to manage the device, only one
person can perform this operation at the same time. When using the VTY
port, multiple persons can perform this operation at the same time. ( )
A. True
B. False
6. What is the VRP version currently used by Huawei datacom devices?
7. What is the maximum number of users that are allowed to log in to a Huawei
device through the console port concurrently?
8. How do I specify the configuration file for next startup if a device has multiple
configuration files?
Huawei VRP Page 26

14.2 Summary
VRP is a Huawei proprietary network OS that can run on various hardware
platforms. VRP has unified network, user, and management interfaces. To
efficiently manage Huawei devices, you need to be familiar with VRP commands
and configurations.
You also need to understand some common commands and shortcut keys and
learn how to use them.
After learning this course, you need to know basic VRP concepts, functions of
common commands, and CLI.

You might also like