No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

NE20E-S2 V800R010C10SPC500 Feature Description - Basic Configurations 01

This is NE20E-S2 V800R010C10SPC500 Feature Description - Basic Configurations
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Command Line Interface Fundamentals

Command Line Interface Fundamentals

The CLI is a key configuration tool. After you log in to a router, a prompt is displayed, indicating that you have accessed the CLI and can enter a command.

The CLI parses commands and packets carrying configuration information. You can use the CLI to configure and manage routers. The CLI also provides an online help function.

Basic Principles of CLI Command Parsing

To parse a command, the CLI undergoes the following phases:

  1. Command receiving phase

    The CLI receives and displays all characters you have entered. When you press Enter, the CLI begins to process the command.

  2. Command matching phase

    The system compares the received command with commands in the current command mode to search for a matching command.

    • If a matching command exists, the system enters the command checking phase.

    • If a matching command does not exist, the system informs you that the command is invalid and waits for a new command.

  3. Command checking phase

    The CLI checks every element of the entered command against the matching command, including the string length and value range validity.

    • If all command elements are valid, the system authenticates the command.

    • If any command element is invalid, the system informs you that the command is invalid and waits for a new command.

  4. Command authentication phase

    The system authenticates the user name and command locally or sends them to the AAA server for authentication.

    • If you have rights to run the command, the system begins to parse the command.

    • If you do not have rights to run the command, the system displays a message and waits for a new command.

  5. Command parsing phase

    After parsing a command into a packet that carries specific information, the CLI sends the packet to the command processing module and waits for the results. The CLI then parses the packet carrying the results and displays them on the terminal.

Basic Principles of Online Help

Online help is one of the basic components of the CLI. This function helps you know which commands can be configured and provides the predictive text input function. For example, when entering a command, the value range of a parameter in the command is provided. Online help can be classified as full, partial, or Tab help.

  • Full help

    • In any command view, when you enter a question mark (?) at the command prompt, all the first element of the commands available in the command view and their brief descriptions are listed.

    • When you enter a command followed by a space and a question mark (?), all the keywords and their brief descriptions are listed if the position of the question mark (?) is for a keyword.

    • When you enter a command followed by a space and a question mark (?), the value range and function of the parameter are listed if the position of the question mark (?) is for a parameter.

    To provide full help in command mode, the CLI undergoes the following phases:

    1. Command receiving phase

      The CLI receives and displays all characters you have entered. When you enter a question mark (?), the CLI starts online help. If full help is required, the system starts full help.

    2. Command matching phase

      The system compares the received command with commands in the current command mode to search for a matching command.

      • If a matching command exists, the system matches commands with your rights and displays all commands you can use.

      • If a matching command does not exist, the system informs you that the command is invalid and waits for a new command.

    3. Command help phase

      The system searches the configurable commands for possible elements in the question mark (?) position.

      • If the entered command is complete, cr is displayed.

      • If the entered command is incomplete, possible command elements and their description are displayed.

  • Partial help

    • When you enter a string followed by a question mark (?), the system lists all keywords that start with the string.

    • When you enter a command followed by a question mark (?):
      • If the position of the question mark (?) is for a keyword, all keywords in the command starting with the string are listed.

      • If the position of the question mark (?) is for a parameter and the parameter is valid, information about all the parameters starting with the string is listed, including the value range.

      • If the position of the question mark (?) is for a parameter but the parameter is invalid, the CLI informs you that the input is incorrect.

    To provide partial help in specific command mode, the CLI undergoes the following phases:

    1. Command receiving phase

      The CLI receives and displays all characters you have entered. When you enter a question mark (?), the CLI starts online help. If partial help is required, the system starts partial help.

    2. Command matching phase

      The system compares the received command with commands in the current command mode to search for a matching command.

      • If a matching command exists, the system matches commands with your rights and displays all commands you can use.

      • If a matching command does not exist, the system informs you that the command is invalid and waits for a new command.

    3. Command help phase

      The system searches configurable commands for possible command elements in the position of a question mark (?) and displays possible command elements.

  • Tab help

    Tab help is an application of partial help, which provides help only for keywords. The system does not display the description of a keyword.

    You can enter the first letters of a keyword in a command and press Tab.

    NOTE:

    Tab help information is displayed in lexicographical order.

    • If what you have entered identifies a unique keyword, the complete keyword is displayed.

    • If what you have entered does not identify a unique keyword, you can press Tab repeatedly to view the matching keywords and select the desired one.

    • If what you have entered does not match any command element, the system does not modify the input and just displays what you have entered.

    • If what you have entered is not a keyword in the command, the system does not modify the input and just displays what you have entered.

    The CLI also provides dynamic help for querying the database and script. If parameters in a command support dynamic help and you enter the first letters of a parameter in the command and press Tab, the following situations occur:

    • If what you have entered identifies a unique parameter, the complete parameter is displayed.

    • If what you have entered does not identify a unique parameter, you can press Tab repeatedly to view the matching parameters and select the desired one.

Shortcut Key Function

Shortcut keys are classified as system or user-defined shortcut keys.

  • User-defined shortcut key: You can associate a shortcut key with any command. When the shortcut key is used, the system automatically executes the corresponding command.

  • System shortcut key: System shortcut keys are fixed in the system. They represent fixed functions and cannot be defined by users.

NOTE:

Different terminal software defines shortcut keys differently. Therefore, the shortcut keys on your terminal may be different from those listed here.

Security Management Policy

Before you run a command, the system authenticates your rights. When the CLI starts, it obtains an authentication policy from the local AAA server and authenticates all commands based on this policy.

Translation
Download
Updated: 2019-01-02

Document ID: EDOC1100055465

Views: 3278

Downloads: 2

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next