You can log in to a router that is powered on for the first time only through a console
port. After you log in to the router, you can configure other login modes.
NOTE: When a router is powered on for the first time, you must log in to the router
through the console port, which is a prerequisite for other login modes as well. For
example, you can use Telnet to log in to a router only after you use the console port to
log in to the router and configure an IP address.
System commands are rated from low to high into four levels:
The visit level: includes commands for network diagnosis such as ping and tracert and
commands for visiting external equipment such as Telnet client, SSH commands.
The monitor level: includes commands for system maintenance and service trouble
diagnosis such as the display and debugging commands.
The config level: includes service configuration commands involving routing commands,
commands for all network layers and commands for providing direct network services
for users.
The manage level: includes commands that supports the running of the system and
other services involving file system commands, FTP, TFTP commands, configuration
file switching commands, the slave board controlling commands, user management
commands, command level setting commands and parameter setting commands.
Users are also divided into 4 levels to match with the command levels, which means that users
can only use commands whose levels are equal to or lower than their levels.
changed, some users may be unable to use the command any longer.
You enter the user view as soon as you log in to the router through the method described
previously. The CLI provides multiple command views. All commands are registered in one or
more command views. In general, you can run a command only after entering its view.
NOTE: The system supports two configuration validation modes: immediate validation and
two-phase validation. By default, the two-phase validation mode is used.
The user view can be switched to the system view by running the system-view command.
And the system view can be switched back to the user-view after running the quit command.
You can enter views of other services by running corresponding commands in the system
view. Commands that can be run in different views are different.
Full Help
You can obtain full help using any of the following methods:
Enter a question mark (?) in any command view to obtain all the commands and
their simple descriptions.
Enter a command followed by a space and a question mark (?). If the position of
the question mark (?) is for a keyword, all the keywords and their brief description
are listed.
Enter a command followed by a space and a question mark (?). If the position of
the question mark (?) is for a parameter, the value range and function of the
parameter are listed.
Partial Help
You can obtain partial help using any of the following methods:
Enter a string followed by a question mark (?). The system lists all the keywords
that start with the string.
Enter a command followed by a question mark (?) if there are several matches for
the keyword. The system lists all the keywords that start with the string.
Enter the initial letters of a keyword in a command line and press Tab. The system
lists the complete keyword. If there are several matches for the keyword, you can
press Tab repeatedly. The system lists various keywords for you to choose the
one you need.
When you access a router, a message is displayed. You can configure desired
content for the message.
Header information refers to a message that is displayed after you access a router or
a message that is displayed after the login authentication is successful and before you
start to configure the router. Header information provides explicit indications for your
login.
To remotely maintain a router, configure Telnet login and use Telnet to log in to the
router.
You can manage directories by changing and displaying directories, displaying files in
directories and sub-directories, and creating and deleting directories.
Managing files include displaying file content, copying files, moving files, renaming
files, compressing files, deleting files, restoring deleted files, deleting files in the
recycle bin, running batch files, and configuring notification modes.
To operate a file, run the cd directory command to switch the current directory to the
file's directory.
The directory and file command are executed in the user-view.
module.
local-user user-name ftp-directory directory
The local-user ftp-directory command sets the File Transfer Protocol (FTP)
directory for the local user.
By default, the FTP directory for the local user is null.
The display configuration candidate command displays commands that have been
configured but not submitted.
The display configuration commit changes command displays configuration
changes at specific configuration rollback points.
–
A deleted configuration
+
A new configuration
For each modified configuration, both "-" indicating the deleted configuration
and "+" indicating the created configuration are displayed.
The display configuration commit list command displays the list of configuration
rollback points.
As shown in the figure, a user logs in to the router and configures IP addresses for
interfaces on the router. After the IP addresses of interfaces are configured, the user
detects an IP address planning error and expects to reconfigure the IP addresses of
interfaces. Traditionally speaking, the user must delete the IP addresses one by one
and reconfigure them.
Configuration rollback simplifies configuration restoration. Configuration rollback
allows the user to easily roll system configurations back to what they were before the
IP addresses were configured.
Step1 Check information about configuration rollback points and the differences
between the previous and current configurations.
The save command saves the current configuration to the storage device.
The save command saves the current configuration to the configuration file for
the next startup. If no configuration file is available for the next startup, the
system prompts you to save the configuration to vrpcfg.zip. You can save the
configuration to this file or another file and specify this file as the configuration
file for the next startup.
The save configuration-file command saves the current configuration to the
specified directory of the storage device. Generally, the command does not
affect the current startup configuration file. When configuration-file is the same
as the default save path and configuration file name, this command can be
used as the save command.
When you save the configuration file for the first time without specifying
configuration-file, you are asked whether to name the configuration file
vrpcfg.zip.
The extension of the configuration file name must be .zip, .cfg or .dat. The
system configuration file must be saved in the root directory of the storage
device.
A .cfg file is a text file. You can directly view the content of a .cfg file.
After a .cfg file is specified as the configuration file, the system restores
the commands in the file one by one when startup.
A .zip file is the compression of a .cfg file, occupying less space. After
a .zip file is specified as the configuration file, the system decompresses
the file into a .cfg file, and then restores the commands in the file one by
one when startup.
A .dat file is a binary file. If the startup software version and the .dat file
version are the same, the system restores all configurations in the .dat
file in batches when the device starts. This speeds up the system
startup.
When you run the save command several times, the latest configuration
overrides the previous configuration. If the file of the same name already exists,
the contents of the original file are changed.
The current configuration is compared with the configuration file for the next startup or
a specified configuration file.
The comparison begins with the first lines of the configuration files.
When comparing differences between the configuration files, the system displays the
content of the current and saved configuration files from the first different line. By
default, 150 characters are displayed for each configuration file. If the number of
characters from the first different line to the end is less than 150, the content after the
first different line is all displayed.
When comparing the current configuration file with the configuration file for the next
startup, the system displays a message indicating that reading the configuration file
fails if the configuration file for the next startup is unavailable or its content is empty.
You can specify a configuration file to be loaded at the next startup of the system.
After the system restarts, it uses the specified configuration file to restore
configurations.
You can clear the configuration file that is loaded at the startup of the system.
The configuration file needs to be cleared in either of the following situations:
The system software does not match the configuration file after a router is
upgraded.
The configuration file is damaged or an incorrect configuration file is loaded.
reset saved-configuration
NOTE: Before clearing the configuration file of a router, the system compares
the configuration file loaded at the current startup with that to be loaded at the
next startup.
If the two configuration files are consistent, running the reset saved-
configuration command clears the settings for both files. The default
configuration file will be used for the next startup.
If the two configuration files are inconsistent, running the reset saved-
configuration command clears the settings for the configuration file for
the next startup, and the settings for the current configuration file are
not cleared.
If the current configuration file is empty, and the configuration file for
the next startup is not empty, running the reset saved-configuration
command clears the settings for the configuration file for the next
startup.
Confidential Information of Huawei. No Spreading Without
Permission
VRP Basic Configuration P-43
If the configuration file for the next startup is empty, and the current
configuration file is not empty, after the reset saved-configuration
command is run, the system prompts an error and no settings are
cleared.
If you run the command to restart a device, addresses configured for
management interfaces on the device will become invalid, and you
have to log in to the device through a serial interface to re-configure the
addresses.
WARNING: Exercise caution when running this command. If this command is
required, run it with assistance from Huawei technical support personnel.