To start working with Huawei devices, it is necessary to look at CLI (Command Line Interface). All Huawei datacom devices use the same OS called VRP (Versatile Routing Platform). As an example we can take NE40E router with V600R001C00SPC900 software installed. When you establish connection with the router, it does not matter it is telnet, ssh or console, you enter the user view with the prompt of <Quidway>. The prompt < > indicates user view and the prompt [ ] indicates other views. To start configuring the router you should move from user view to system view. You can do this by using “system-view” command.
<Quidway> system-view [Quidway]
From system view you are able to configure all functions available in VRP software. Let’s assume that you want to configure MPLS, both globally and on Ethernet interface.
[Quidway] [Quidway]mpls [Quidway-mpls]quit [Quidway]interface GigabitEthernet 1/0/5 [Quidway-GigabitEthernet1/0/5]mpls
Besides command line views the system adopts a hierarchical protection mode that has 16 command levels. The default command levels are as follows:
- Level 0 – visit
- Level 1 – monitoring
- Level 2 – configuration
- Level 3 – management
You can change default to 16 command levels by “command-privilege level rearrange” command.
[Quidway]command-privilege level rearrange
You will be asked about super password for level 15, so be careful and follow instructions displayed. Otherwise you will have problem, after this change, to log into the router.
If you don’t adjust a command level separately, after the command level is updated, all originally registered command lines adjust automatically according to the following rules:
- Level 0 and Level 1 – unchanged
- Level 2 – Level 10
- Level 3 – Level 15
You can adjust the command lines to remaining levels separately to refine the management of privilege.
You can enter “?” in any command line views to display all available commands with a short description.
[Quidway]mpls ? l2vpn Operate on MPLS L2 VPN ldp Label Distribution Protocol(LDP) lsr-id Specify LSR(Label Switched Router) identifier oam Specify OAM(Operation, Administration and Maintenance) configuration information switch-l2vc Specifying switch-l2vc configuration information <cr>
You can enter a character string with a “?” closely following it to display all commands that begin with this character string.
[Quidway]d? dhcp diffserv display dns dustproof
Common error massages of the command line:
|Cause of the error
|The command cannot be found
|The key word cannot be found
|Parameter type error
|The parameter value exceeds the limit
|Incomplete command entered
|Too many parameters
|Too many parameters entered
|Indefinite parameters entered
System-defined shortcut keys:
|The cursor moves to the beginning of the current line.
|The cursor moves to the left by the space of a character.
|Terminates the running function.
|Deletes the character where the cursor lies.
|The cursor moves to the end of the current line.
|The cursor moves to the right by the space of a character.
|Deletes one character on the left of the cursor.
|Stops the creation of the outbound connection.
|Displays the next command in the history command buffer.
|Displays the previous command in the history command buffer.
|Repeats the display of the information of the current line.
|Terminates the outbound connection.
|Pastes the contents on the clipboard.
|Deletes a character string or character on the left of the cursor.
|Deletes all the characters on the left of the cursor.
|Deletes all the characters on the right of the cursor.
|Returns to the user view.
|Terminates the inbound or redirection connections.
|The cursor moves to the left by the space of a word.
|Deletes a word on the right of the cursor.
|The cursor moves to the right to the next word end.
|The cursor moves downward to the next line.
|The cursor moves upward to the previous line.
|Sets the position of the cursor to the beginning of the clipboard.
|Sets the position of the cursor to the end of the clipboard.
You can also define shortcut keys using the following command:
[Quidway]hotkey CTRL_U "display ip interface brief"
By default three shortcut keys are defined:
- CTRL_G – display current-configuration
- CTRL_L – display ip routing-table
- CTRL_O – undo debugging all
There are also two hidden modes available for Huawei R&D:
[Quidway]_h Now you enter a hidden command view for developer's testing, some commands may affect operation by wrong use, please carefully use it with HUAWEI engineer's direction. [Quidway-hidecmd] [Quidway]_d Now you enter diagnose command view. [Quidway-diagnose]
There are many commands but using them by normal engineer is not safe 😉
I wanted to show you the basic structure of Huawei VRP CLI. Next time I will show you a basic system configuration. If you have any additional questions, anything is not clear for you, would like to know more, do not hesitate to ask.