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

Command Reference

CloudEngine 8800, 7800, 6800, and 5800 V200R002C50

This document describes all the configuration commands of the device, including the command function, syntax, parameters, views, default level, usage guidelines, examples, and related commands.
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).
CLI Overview Commands

CLI Overview Commands

abort trial

Function

The abort trial command disables the trial running of a configuration.

NOTE:

CE6850HI, CE6850U-HI, CE6851HI, CE6855HI, CE6856HI, CE6860EI, CE6870EI, CE6880EI, CE7850EI, CE7855EI, CE8850EI, and CE8860EI do not support this command.

Format

abort trial [ session session-id ]

Parameters

Parameter Description Value
session session-id Specifies the ID of a session for which the trial running of the configuration is to be disabled. -

Views

All views (excluding the user view)

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After the two-phase configuration validation mode is configured and a command is run, run the commit trial command to enable the trial running of the configuration. You can specify the time parameter in the commit trial command to set the timeout period for the trial running. After the trial running of the configuration times out, the system automatically rolls the configuration back to the configuration state before the trial running. To disable the trial running of the configuration before the trial running times out, run the abort trial command to roll the system configuration back to the configuration state before the trial running.

Prerequisites

The commit trial command has been run for a configuration.

Configuration Impact

After the trial running of the configuration is disabled, the system configuration rolls back to the configuration state before the trial running.

Precautions

The abort trial command must be run in the two-phase configuration validation mode.

Example

# Disable the trial running of a configuration.

<HUAWEI> system-view
[~HUAWEI] sysname rollback
[*HUAWEI] commit trial 120
[~rollback] abort trial
Warning: The trial configuration will be rolled back. Continue? [Y/N]:y
Info: The trial configuration rollback succeeded.
[~HUAWEI]

alias

Function

The alias command creates an alias for a command.

The undo alias command deletes an alias.

By default, no alias is created.

Format

alias alias-string [ parameter parameter & <1-32> ] command command

undo alias alias-string

Parameters

Parameter Description Value
alias-string Specifies an alias string. The value is a string of 1 to 63 case-insensitive characters, supporting letters, digits, and hyphens (-). It must start with a letter and cannot contain spaces between characters.
parameter parameter Specifies a parameter for an alias. The value is a string of 2 to 63 case-insensitive characters, supporting letters, digits, and hyphens (-). It must start with the $ sign.
command Specifies a command for which an alias is to be created. The value is a string of 1 to 511 characters. If a space exists in the command, the character string of command must be enclosed in double quotation marks (").

Views

Command alias view

Level

3: Management level

Usage Guidelines

Usage Scenario

The alias command can be used in the following scenarios:
  • Configure an easy-to-rember string of characters as the alias for a command. Then, you can just enter the alias string when you need to run the command. For example, define the alias for display as show. You can enter the alias show to substitute display.

  • Change the order of parameters. For example, after you configure the alias showif parameter $ifnum $iftype command "display interface $iftype $ifnum" command, you can enter showif 1 Eth-Trunk to substitute display interface Eth-Trunk 1.

Precautions

  • A command can still be used after an alias is configured for it.
  • The character string of command must reference all the parameters defined in parameter in sequence, and each parameter can be referenced only once.

  • When the character string of command starts referencing the parameters defined in parameter, only parameters beginning with the $ sign rather than any command keyword can be included. For example, command configuration like alias showif parameter $ifnum $iftype command "display interface $iftype iftype $ifnum verbose" is incorrect.

  • If the alias definitions include loop nesting or the nesting level is more than 16 layers, the alias is invalid and cannot substitute a command.

  • The alias configured by the alias command can take effect only when the command alias function is enabled using the terminal command alias command. By default, the command alias function is enabled.

Example

# Create an alias for a command.

<HUAWEI> system-view
[~HUAWEI] command alias
[*HUAWEI-cmdalias] alias show command display

clear configuration candidate

Function

The clear configuration candidate command clears an uncommitted configuration.

Format

clear configuration candidate

Parameters

None

Views

All views except the user view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

This command clears a configuration that has not been committed in the two-stage mode.

Prerequisites

A configuration has been edited in two-stage mode.

Precautions

The uncommitted configuration is deleted. The system view is displayed.

Example

# Clear the configuration that has not been committed.

<HUAWEI> system-view
[~HUAWEI] clear configuration candidate

command alias

Function

The command alias command creates and enters the command alias view.

The undo command alias command deletes all alias configured on the device.

Format

command alias

undo command alias

Parameters

None

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To enter the command alias view, run the command alias command.

The alias command can be used in the following scenarios:
  • Configure an easy-to-rember string of characters as the alias for a command. Then, you can just enter the alias string when you need to run the command. For example, define the alias for display as show. You can enter the alias show to substitute display.

  • Change the order of parameters. For example, after you configure the alias showif parameter $ifnum $iftype command "display interface $iftype $ifnum" command, you can enter showif 1 Eth-Trunk to substitute display interface Eth-Trunk 1.

Precautions

The undo command alias command deletes all alias configured on the device as well as the command alias view.

Follow-up Procedure

Run the alias command to configure an alias for a command.

Example

# Enter the command alias view.

<HUAWEI> system-view
[~HUAWEI] command alias
[~HUAWEI-cmdalias] 

command-privilege level

Function

The command-privilege level command sets the command level in a specified view.

The undo command-privilege command restores the default command level.

By default, each command in each view has a default command level.

Format

command-privilege level level view view-name command-key

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

Parameters

Parameter Description Value
level level Specifies the command level.

If the command-privilege level rearrange command is configured, the value of level ranges from 0 to 15.

If the command-privilege level rearrange command is not configured, the value of level ranges from 0 to 3.

NOTE:
If the command-privilege level rearrange command configuration is changed, the value of level changes based on the level mapping.
  • If the command-privilege level rearrange command configuration is added, the levels of level-0 and level-1 commands remain unchanged, the level of level-2 commands is upgraded to 10, and that of level-3 commands is upgraded to 15.
  • If the command-privilege level rearrange command configuration is deleted, the level of level-0 commands remains unchanged, the levels of level-1 to level-9 commands are downgraded to 1, the levels of level-10 to level-14 commands are downgraded to 2, and the level of level-15 commands is downgraded to 3.
view view-name

Specifies the view name. You can enter a question mark (?) in the terminal GUI to obtain all view names in the command view.

For example:
  • shell: user view
  • system: system view
  • global: all views
  • vlan: VLAN view
-
command-key

Specifies a command. The command must be entered manually because automatic command line completion is not supported.

The value is a character string.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

The system divides commands into four levels and sets the command level in the specified view. The device administrator can change the command level as required, so that a lower-level user can use some high-level commands. The device administrator can also change the command level to a larger value to improve device security.

A login user can configure commands according to the configured privilege corresponding to the user name (through the user privilege level command).

The command lines are classified into visit level (0), monitoring level (1), configuration level (2), and management level (3) in an ascending order without command-privilege level rearrange.
Table 3-1  Relationship between command levels and user levels

User Level

Command Level

Description

0

Visit level(0)

Commands of this level include network diagnosis tool commands (such as ping and tracert), commands for accessing external devices from the local device (such as Telnet) and some display commands.

1

Visit level(0), Monitoring level(1)

Commands of this level are used for system maintenance, including display commands.

NOTE:

Some display commands are not at this level. For example, the display current-configuration and display saved-configuration commands are at level 3. For details about command levels, see the CloudEngine 8800, 7800, 6800, and 5800 Series Switches Command Reference.

2

Visit level(0), Monitoring level(1), Configuration level(2)

Commands of this level are used for service configuration to provide direct network services, including routing commands and commands of each network layer.

3

Visit level(0), Monitoring level(1), Configuration level(2), Management level(3)

Commands of this level are used for basic system operations, including file system, FTP, TFTP download, user management, command level configuration, and debugging.

Precautions

You are not advised to change the default command level. If you need to change it, consult with professional personnel to ensure that routine operation and maintenance are not affected and security risk is avoided.

The command-key parameter specifies the command of which the level is to be changed. The view view-name parameter specifies the view to which the command belongs. The command matching rule is prefix-based matching. For example, the command-privilege level 2 view shell display interface command changes the level of all commands starting with display interface in the user view to level 2.

In versions earlier than V100R006C00, the user level ranges from 0 to 15. If the system software is upgraded to V100R006C00 or a later version, and the command-privilege level command is not configured, the levels of level-0 and level-1 users remain unchanged, and those of level-3 to level-15 users change to 3.

Example

# Set the privilege level of the save command to 5.
<HUAWEI> system-view
[~HUAWEI] command-privilege level 5 view shell save

command-privilege level rearrange

Function

The command-privilege level rearrange command upgrades command levels in batches.

The undo command-privilege level rearrange command restores the default command levels in batches.

By default, the command levels assigned by the system during registration are used.

Format

command-privilege level rearrange

undo command-privilege level rearrange

Parameters

None

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

When a command registers on the device, it is assigned with a default level–0, level–1, level–2, or level–3, corresponding to the visit level, monitoring level, configuration level, and management level respectively. You can run the command-privilege level rearrange command to upgrade all the level-2 and level-3 commands to level-10 and level-15 commands in batches. The levels of level-0 and level-1 commands remain unchanged. Changing the command-privilege level rearrange command configuration affects the value of level in the user privilege, command-privilege level, adminuser-priority, and local-user level commands. For details, see the "Parameters" table in the corresponding sections.

Precautions

  • The command-privilege level command has a higher priority than the command-privilege level rearrange command as follows:
    • During batch command level upgrade, the levels of commands that are separately changed using the command-privilege level command remain unchanged.

    • You can only restore the levels of the commands that are upgraded in batches. The levels of commands that are separately changed using the command-privilege level command remain unchanged.

  • Before running the command-privilege level rearrange or undo command-privilege level rearrange command, ensure that your level is the highest (level 3 or 15); otherwise, you cannot run the command. For an AAA authentication user, you can run the display aaa access-user self command and view the User level field to check the user's level.
  • After the levels of the commands are upgraded in batches and before the levels of the commands are restored, the operation of upgrading the levels of the commands is invalid and does not change the status of the commands.

Example

# Change the levels of the current commands in batches.

<HUAWEI> system-view
[~HUAWEI] command-privilege level rearrange

commit

Function

The commit command commits a configuration and generates a configuration rollback point.

Format

commit [ trial [ time ] ] [ label label ] [ description description ]

Parameters

Parameter Description Value
trial time Specifies the timeout period for the trial running of a configuration. The value is an integer ranging from 60 to 65535, in seconds. The default value is 600 seconds.
label label Specifies the user label of a configuration rollback point. The value is a string of 1 to 256 case-sensitive characters without spaces. It must start with a letter and cannot be a hyphen (-).
description description Specifies the description of a configuration rollback point. The value is a string of 1 to 60 case-sensitive characters with spaces.

Views

All views (excluding the user view)

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When performing configurations in two-stage mode, perform the following operations:
  • Edit a configuration in the first stage.
  • Run the commit command to commit the configuration in the second stage. The new configuration then takes effect in the current system.

If you want to add descriptions about configuration rollback, run the commit description description command in two-stage mode. Run the display configuration commit list verbose command to view the descriptions.

To enable the trial running of a configuration, run the trial command. This configuration enables the trial running of new functions and services without interrupting the services running on the live network, which improves network reliability. The time parameter specifies the timeout period for the trial running of a configuration. When the trial running time expires, the configuration that has been run in trial rolls back automatically. The system configuration restores to the configuration status before the configuration is committed. To validate the configuration that has been run in trial, reconfigure the function and commit the configuration.

NOTE:

During the trial running of a configuration, other users cannot perform any configuration on the device, and if the local user performs an operation and runs the commit command to commit the configuration, the configuration in trial running is also committed and the system exits from the trial running status and enters the normal configuration mode.

You can run the display configuration trial status command to check whether a system configuration is in the trial running status and the remaining time of the trial running. If you want to end the trial running status in advance, run the abort trial command to disable the trial running of a configuration.

Prerequisites

You can edit a configuration only after you have run the system-view command to enter a system view in two-stage mode.

Precautions

The system configurations change, including the configurations in two-stage mode.

You do not need to run the commit command to make the commands executed in the user view to take effect.

In two-phase validation mode, you must run the commit command for the configuration to take effect. However, you do not need to run the commit command in the following cases:
  • Query commands (such as display interface) are run.
  • Maintenance commands (such as slave switchover, dual-active restore, stack upgrade fast rollback-timer, stack upgrade fast stack member, switch mode, and reset keepalive packets count) are run.
  • Commands are run to enter the existing views (such as the stack view and physical interface view) on a physical device. For example, the interface 10ge1/0/1 command is run.
  • The existing configurations on a device are reconfigured.

Example

# Edit a configuration and commit it to make the change take effect.

<HUAWEI> system-view
[~HUAWEI] vlan 7
[*HUAWEI-vlan7] commit

# Set the configuration rollback information when committing a command.

<HUAWEI> system-view
[~HUAWEI] sysname ROLLBACK
[*HUAWEI] commit description This is a new name
[~ROLLBACK] display configuration commit list verbose
1) CommitId: 1000002027
        Label: - 
        User: huawei
        User-Intf: VTY 4
        Type: CLI
        TimeStamp: 2012-08-22 23:10:49+08:00
        Description: This is a new name

diagnose

Function

The diagnose command enters the diagnostic view from the system view.

Format

diagnose

Parameters

None

Views

System view

Default Level

3: Management level

Usage Guidelines

Diagnostic commands are mainly used for fault diagnosis. However, running some commands may cause device faults or service interruptions. Therefore, use these commands under the instruction of technical support personnel.

Example

# Enter the diagnostic view.

<HUAWEI> system-view
[~HUAWEI] diagnose
[~HUAWEI-diagnose]

display command alias

Function

The display command alias command displays configuration information of the command alias.

Format

display command alias

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To view configuration information of command alias on a device, run the display command alias command.

Example

# Display configuration information of the command alias.

<HUAWEI> display command alias
  show = display
  showif $ifnum $iftype = display interface $iftype $ifnum

display configuration candidate

Function

The display configuration candidate command displays uncommitted configurations or all configurations in the system.

Format

display configuration candidate [ merge ]

Parameters

Parameter Description Value
merge

Displays all the configurations in the system, including committed configurations and uncommitted configurations.

If you do not specify this keyword, the command displays only uncommitted configurations.

Views

All views in two-stage configuration mode

Default Level

2: Configuration level

NOTE:
If the merge parameter is used, the default level of the command is the management level.

Usage Guidelines

Usage Scenario

You can run the display configuration candidate command to check whether a configuration to be committed is correct and whether it conflicts with existing configurations.

Prerequisites

A configuration has been edited in two-stage mode.

Example

# Display uncommitted configurations.

<HUAWEI> system-view
[~HUAWEI] ftp server enable
[*HUAWEI] display configuration candidate
ftp server enable

display history-command

Function

The display history-command command displays the historical commands stored on the current device.

Format

display history-command [ all-users ]

Parameters

Parameter Description Value
all-users

Displays information about all successfully matched commands the users executed.

If the parameter is not specified, successfully matched historical commands the current user executed are displayed.

-

Views

All views

Default Level

0: Visit level

NOTE:
If the all-users parameter is used, the default level of the command is the management level.

Usage Guidelines

Usage Scenario

You can run this command to check historical commands the user has executed recently. This command facilitates information search. Historical commands are recorded in circular mode. The display history-command and display history-command all-users commands display a maximum of 10 and 200 historical commands, respectively.

Precautions

All the historical commands entered by a user are automatically saved on the terminal, that is, any input that ends with Enter is saved as a historical command.

NOTE:
  • Historical commands are saved in the same format as that used in the input. If a command that is entered by a user is in an incomplete format, the saved historical command is also in the incomplete format.

  • If a user runs a command several times, only the latest command is saved on the device. If the command is entered in different formats, they are considered as different commands.

You can view historical commands using the following methods:

  • To view the previous historical command, press the Up arrow key or Ctrl+P.

    If there is an earlier historical command, the earlier historical command is displayed.

  • To view the next historical command, press the Down arrow key or Ctrl+N.

    If there is a new historical command, the new historical command is displayed.

NOTE:

Access to historical commands using the Up arrow key does not apply to Windows 9X. The Up arrow key has different functions in Windows 9X and needs to be replaced by shortcut keys Ctrl+P.

Example

# Display the historical commands that have been executed on the current terminal.

<HUAWEI> display history-command
  system-view
  user-interface vty 0 4
  user privilege level 15
  quit 

display hotkey

Function

The display hotkey command displays the status of the defined, undefined, and system hotkeys.

Format

display hotkey

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

After you understand the defined, undefined, and system hotkeys in the system, you can use hotkeys to quickly enter commands. To redefine hotkeys for a command, run the hotkey command.

The system allows hotkeys in places where commands can be entered, and displays the commands corresponding to hotkeys. You can run the display hotkey command to view the commands corresponding to hotkeys.

Example

# Display defined, undefined, and system hotkeys.

<HUAWEI> display hotkey
----------------- HOTKEY -----------------

            =Defined hotkeys=
Hotkeys  Command
CTRL_G   display current-configuration
CTRL_L   display ip routing-table
CTRL_O   undo debugging all

           =Undefined hotkeys=
Hotkeys  Command
CTRL_U   NULL

            =System hotkeys=
Hotkeys  Function
CTRL_A   Move the cursor to the beginning of the current line.
CTRL_B   Move the cursor one character left.
CTRL_C   Stop current command function.
CTRL_D   Erase current character.
CTRL_E   Move the cursor to the end of the current line.
CTRL_F   Move the cursor one character right.
CTRL_H   Erase the character left of the cursor.
CTRL_K   Kill outgoing connection when connecting.
CTRL_N   Display the next command from the history buffer.
CTRL_P   Display the previous command from the history buffer.
CTRL_R   Redisplay the current line.
CTRL_T   Kill outgoing connection.
CTRL_V   Paste text from the clipboard.
CTRL_W   Delete the word left of the cursor.
CTRL_X   Delete all characters up to the cursor.
CTRL_Y   Delete all characters after the cursor.
CTRL_Z   Return to the user view.
CTRL_]   Kill incoming connection or redirect connection.
ESC_B    Move the cursor one word back.
ESC_D    Delete remainder of word.
ESC_F    Move the cursor forward one word.
ESC_N    Move the cursor down a line.
ESC_P    Move the cursor up a line.
ESC_<    Specify the beginning of clipboard.
ESC_>    Specify the end of clipboard.
Table 3-2  Description of the display hotkey command output

Item

Description

Defined hotkeys

Defined hotkeys.

Undefined hotkeys

Undefined hotkeys.

System hotkeys

System hotkeys.

Related Topics

display language character-set

Function

The display language character-set command displays the character set in the system or Chinese character set supported on the terminal login software.

Format

display language character-set [ test ]

Parameters

Parameter Description Value
test

Displays the character set in the system and Chinese character set supported on the terminal login software.

If this parameter is not specified, only the character set in the system is displayed.

-

Views

All views

Default Level

0: Visit level

Usage Guidelines

The system and terminal login software must use the same character set; otherwise, Chinese characters may be displayed as garbled characters. You can run the display language character-set [ test ] command to view the character set in the system and Chinese character set supported on the terminal login software.

Example

# Display the character set in the system.

<HUAWEI> display language character-set
Current language character set encode : GBK
Table 3-3  Description of the display language character-set command output

Item

Description

Current language character set encode

Character set in the system.

display terminal command alias

Function

The display terminal command alias command displays whether the command alias function is enabled for the current terminal.

Format

display terminal command alias

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

You can run the terminal command alias command to enable the command alias function for the current terminal. To view whether the command alias function is enabled for the current terminal, run the display terminal command alias command.

Example

# After the command alias function is enabled, display the status of the current terminal.
<HUAWEI> display terminal command alias
Info: Current terminal command alias feature is enable. 
# After the command alias function is disabled, display the status of the current terminal.
<HUAWEI> display terminal command alias
Info: Current terminal command alias feature is disable.

display this

Function

The display this command displays the running configuration in the current view.

Format

display this [ include-default ]

Parameters

Parameter Description Value
include-default Displays both the configurations that users have performed and default configurations. -

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

Usage Scenario

After the configurations are complete in a certain view, run the display this command to check the current configurations.

If include-default is not specified, the display this command displays only configurations that users have performed. If include-default is specified, the display this command displays both default configurations and configurations that users have performed.

Precautions

  • If a configuration parameter uses the default value, this parameter is not displayed. The set parameters that do not be committed successfully are neither displayed by display this.

  • If you run the display this command in an interface view, configuration of the interface view is displayed. If you run this command in a protocol view, configuration of the protocol view is displayed.

  • Configuration information marked with * in the front in the command output indicates the offline configuration.

Example

# Display the running configuration in the current view.

<HUAWEI> system-view
[~HUAWEI] interface 10ge 1/0/1
[~HUAWEI-10GE1/0/1] display this
#    
interface 10GE1/0/1    
 port link-type trunk     
#
return
# Display the configurations that take effect in the current view on the system and default configurations. (The command output is not all listed.)
<HUAWEI> system-view
[~HUAWEI] display this include-default
#
sysname HUAWEI
#
undo command-privilege level rearrange
#
FTP server enable
FTP server port 21
...

display configuration trial status

Function

The display configuration trial status command displays the trial running status of a system configuration.

Format

display configuration trial status

Parameters

None

Views

All views

Default Level

1: Monitoring level

Usage Guidelines

To view the trial running status of a system configuration, run the display configuration trial status command.

Example

# Display the trial running status of a system configuration.

<HUAWEI> display configuration trial status
Trial status:  ACTIVE
Trial time left (sec): 51
Table 3-4  Description of the display trial status command output

Item

Description

Trial status

Trial running status of a system configuration. The value can be:
  • INACTIVE: The configuration is not in the trial running status.
  • ACTIVE: The configuration is in the trial running status.
  • CANCELING: The trial run of the configuration is being canceled.
  • WAITCANCEL: The trial run of the configuration is waiting to be canceled.

Trial time left (sec)

Remaining time of a trial run

header

Function

The header command configures header information displayed on a terminal when users log in to a connected device.

The undo header command deletes header information displayed on a terminal when users log in to a connected device.

By default, no header information is displayed on a terminal when users log in to a connected device.

Format

header { login | shell } { information text | file file-name }

undo header { login | shell }

Parameters

Parameter Description Value
login Indicates header information displayed on a terminal when a user logs in to the device and a connection between the terminal and the device is activated. -
shell Indicates the header displayed on a terminal when the session is set up after the user logs in to the connected device. -
information text Specifies the header information and content. The value is a string. The maximum length of the string that can be entered at one time is 480 characters. The value can contain spaces, and starts and ends with the same character that is not displayed.
file file-name

Specifies the file name that the header uses.

The value is a string. The maximum length of the string is 64 characters. The file name must be in the [drive] [path] [file name] format, where [path] is the absolute path of the file. The maximum header file size is 2 KB. If the file size is greater than 2 KB, only the first 2 KB file information can be displayed.

Views

System view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To provide some prompts or alarms to users, you can use the header command to configure a title on the device. If a user logs in to the device, the title is displayed.

You can directly define header information by specifying the information text parameter, or configure the content of a specified file as header information by specifying the file file-name parameter.
  • If the information parameter is specified, the header content must start and end with the same case-insensitive letter. For example, the header content abcda starts and ends with a, and header information displayed on the terminal is bcd. You cannot press Enter to enter information in the next line.

  • If the file file-name parameter is specified, all the header content is header information displayed on the terminal without any start or end character, and you can press Enter to enter information in the next line.

When a terminal connection is activated and you attempt to log in (for example, before entering the user name and password), the terminal displays the content of the title that is set using the header login command. After the successful login, the terminal displays the content of the title that is configured using the header shell command.

Precautions

  • Before setting the login parameter, you must set login authentication parameters; otherwise, no header information about authentication is displayed.
  • Before setting the file parameter, ensure that the file containing the header exists; otherwise, the file name cannot be obtained.
  • If the header command is configured several times, only the latest configuration takes effect.
  • After the login title is configured, any user that logs in to the system can view the title.

Example

# Configure a shell header "Hello!".

<HUAWEI> system-view
[~HUAWEI] header shell information "Hello!"
[*HUAWEI] commit
[~HUAWEI] quit
<HUAWEI> quit      // Log off.

# Press Enter. The shell header is displayed when the user logs in again.

Hello!
<HUAWEI>

# Specify the file that stores a login header.

<HUAWEI> system-view
[~HUAWEI] header login file flash:/header-file.txt

hotkey

Function

The hotkey command sets a shortcut key for a command.

The undo hotkey restores the system shortcut keys to the default values.

By default, the system sets the default values for three shortcut keys CTRL+G, CTRL+L, and CTRL+O, while does not set default value for CTRL+U.

Format

hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_U } command-text

undo hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_U }

Parameters

Parameter Description Value
CTRL_G Specifies the shortcut key Ctrl+G for a command. -
CTRL_L Specifies the shortcut key Ctrl+L for a command. -
CTRL_O Specifies the shortcut key Ctrl+O for a command. -
CTRL_U Specifies the shortcut key Ctrl+U for a command. -
command-text Specifies the associated command line for shortcut keys. It is a string of 1 to 240 case-sensitive characters, with spaces supported.
NOTE:

When defining shortcut keys, mark the command with double quotation marks if the command consists of several words or the command includes spaces, and do not mark the command with double quotation marks if the command consists of only one word or the command includes no space.

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You can set a shortcut key for a command that is often used; you can also change the default value of the shortcut key that is defined by the system according to your requirements.

Four shortcut keys are customized by users: CTRL+G, CTRL+L, CTRL+O, and CTRL+U.

  • By default, the shortcut key CTRL+G corresponds to the display current-configuration command which displays current configuration.

  • By default, the shortcut key CTRL+L corresponds to the display ip routing-table command which displays routing table information.

  • By default, the shortcut key CTRL+O corresponds to the undo debugging all command which stops the output of all debugging information.

When specifying command-text, you can enter the abbreviation form of a command. For example, you can enter the hotkey CTRL_G "display cur" command instead of the hotkey CTRL_G "display current-configuration" command. These commands in two formats function the same.

After you use the hotkey command to set a shortcut key for a command, you can run the command by pressing the shortcut key or entering a command.

Configuration Impact

One shortcut key can be associated with only one command. If you run this command for a number of times to associate a shortcut key with multiple commands, the last association takes effect.

One shortcut key can be set for only one command. If you set a shortcut key for multiple commands, only the latest configuration takes effect.

Example

# Assign the display tcp status command for the shortcut key CTRL+L.

<HUAWEI> system-view
[~HUAWEI] hotkey ctrl_l "display tcp status"
[*HUAWEI] commit
[~HUAWEI] display hotkey
----------------- HOTKEY -----------------

            =Defined hotkeys=
Hotkeys  Command
CTRL_G   display current-configuration
CTRL_L   display tcp status
CTRL_O   undo debugging all

           =Undefined hotkeys=
Hotkeys  Command
CTRL_U   NULL

            =System hotkeys=
Hotkeys  Function
CTRL_A   Move the cursor to the beginning of the current line.
CTRL_B   Move the cursor one character left.
CTRL_C   Stop current command function.
CTRL_D   Erase current character.
CTRL_E   Move the cursor to the end of the current line.
CTRL_F   Move the cursor one character right.
CTRL_H   Erase the character left of the cursor.
CTRL_K   Kill outgoing connection when connecting.
CTRL_N   Display the next command from the history buffer.
CTRL_P   Display the previous command from the history buffer.
CTRL_R   Redisplay the current line.
CTRL_T   Kill outgoing connection.
CTRL_V   Paste text from the clipboard.
CTRL_W   Delete the word left of the cursor.
CTRL_X   Delete all characters up to the cursor.
CTRL_Y   Delete all characters after the cursor.
CTRL_Z   Return to the user view.
CTRL_]   Kill incoming connection or redirect connection.
ESC_B    Move the cursor one word back.
ESC_D    Delete remainder of word.
ESC_F    Move the cursor forward one word.
ESC_N    Move the cursor down a line.
ESC_P    Move the cursor up a line.
ESC_<    Specify the beginning of clipboard.
ESC_>    Specify the end of clipboard.
Related Topics

language character-set

Function

The language character-set command configures the character set in the system.

The undo language character-set command restores the default character set in the system.

The default character set in the system is ISO8859-1.

Format

language character-set character

undo language character-set

Parameters

Parameter Description Value
character Specifies the character set in the system. Currently, the system supports the following character sets: GBK, UTF-8, and ISO8859-1.

Views

System view

Default Level

3: Management level

Usage Guidelines

You can configure the character set so that the system supports Chinese or English input. The character set facilitates device identification and management, for example, configured Chinese device name and VLAN description.

Currently, the system supports the following character sets: GBK, UTF-8, and ISO8859-1. GBK and UTF-8 support both English and Chinese input, whereas ISO8859-1 supports only English input. To enter Chinese characters on the device, configure GBK or UTF-8 according to the character set supported on the terminal login software. You can run the display language character-set test command to view the character sets in the system and on the terminal login software.

NOTE:

If the character sets in the system and on the terminal login software are different, Chinese characters may be displayed as garbled characters.

Example

# Configure GBK as the character set in the system.

<HUAWEI> system-view
[~HUAWEI] language character-set GBK
Change language character-set, confirm? [Y/N]:y

quit

Function

The quit command returns from the current view to a lower-level view. If the current view is the user view, this command exits from the system.

Format

quit

Parameters

None

Views

All views

Default Level

0: Visit level

Usage Guidelines

Usage Scenario

Three types of views are available and they are listed as follows from a lower level to a higher level:

  • User view

  • System view

  • Service view, such as interface view

Run the quit command to return to a lower-level command view from the current view. If you are in the user view currently, after you run the quit command, you quit from the system.

In two-phase mode, if some configurations are not committed, a message is displayed when the quit command is run to return to the user view from the system view. You can enter Y, N, or C after the message is displayed.
  • Y: Configurations not committed are saved in the current configuration file, and the user view is displayed.
  • N: Configurations not committed are discarded, and the user view is displayed.
  • C: Configurations not committed remain unchanged, and the current view is kept.

Example

# Return to the system view from the AAA view, and then return to the user view. After this, quit the system.

<HUAWEI> system-view
[~HUAWEI] aaa
[~HUAWEI-aaa] quit
[~HUAWEI] quit
<HUAWEI> quit
Related Topics

reset history-command

Function

The reset history-command command deletes history commands entered by the current user in the system.

Format

reset history-command

Parameters

None

Views

User view

Default Level

0: Visit level

Usage Guidelines

This command can be used to delete history commands entered only by the current user but not by other users. The deleted history commands cannot be displayed.

Example

# Delete history commands entered by the current user.

<HUAWEI> reset history-command

reset history-command all-users

Function

The reset history-command all-users command deletes the historical commands of all users in the system.

Format

reset history-command all-users

Parameters

None

Views

User view

Level

3: Management level

Usage Guidelines

The reset history-command all-users command deletes only the query results of the display history-command all-users command. Query results of the display history-command command are not affected.

Example

# Delete the historical commands of all users.

<HUAWEI> reset history-command all-users

return

Function

The return command returns to the user view from other views except the user view.

Format

return

Parameters

None

Views

All views

Default Level

0: Visit level

Usage Guidelines

In other views, you can use the return command to return to the user view.

  • Run this command to return to the user view if the current view is another view except the user view.
  • If the current view is the user view, no change occurs after running this command.
  • The shortcut keys<Ctrl+Z> have the same function as the return command.

Example

# Return to the user view from the user interface view.

<HUAWEI> system-view
[~HUAWEI] user-interface vty 0
[~HUAWEI-ui-vty0] return
<HUAWEI>
Related Topics

system-view

Function

The system-view command enables you to enter the system view from the user view.

Format

system-view [ immediately ]

Parameters

Parameter Description Value
immediately Indicates that the configuration takes effect immediately. -

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

You must configure the device in the system view. Run this command in the user view to enter the system view.

The system supports two configuration validation modes: immediate validation and two-phase validation.
  • You can run the system-view command to enter the system view and edit the configuration in two-phase validation mode. In two-phase validation mode, the configuration takes effect after you run the commit command.
  • You can run the system-view immediately command to enter the system view and edit the configuration in immediate validation mode. In immediate validation mode, after you input a command line and press Enter, the configuration takes effect immediately.
Precautions

In a command line prompt, HUAWEI is the default device name. The prompt indicates the current view. <HUAWEI> indicates the user view. [HUAWEI] indicates the immediate validation mode of the system view. [~HUAWEI] indicates the two-phase validation mode of the system view.

Example

# Enter the system view.

<HUAWEI> system-view
Enter system view, return user view with return command.
[~HUAWEI]
Related Topics

terminal command alias

Function

The terminal command alias command enables the command alias function for the current terminal.

The undo terminal command alias disables the function.

By default, the function is enabled.

Format

terminal command alias

undo terminal command alias

Parameters

None

Views

User view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The alias configured by the alias command can take effect only when the command alias function is enabled.

If you run the undo terminal command alias command to disable the command alias function for the current terminal, the command alias function can still be configured, and the configuration information of command alias is not deleted, but the alias configured cannot take effect.

Precautions

The terminal command alias command takes effect only on the current terminal.

The command alias function can only be used in human-to-machine mode.

Example

# Disable the command alias function for the current terminal.

<HUAWEI> undo terminal command alias

timestamp enable

Function

The timestamp enable command enables the timestamp function for a system.

The undo timestamp enable command disables the timestamp function.

By default, the timestamp function is disabled for a system.

Format

timestamp enable

undo timestamp enable

Parameters

None

Views

System view

Default Level

2: Configuration level

Usage Guidelines

After the timestamp function is enabled, the system adds the query time to the output of the display command.

Example

# Enable the timestamp function for the system.

<HUAWEI> system-view
[~HUAWEI] timestamp enable
[*HUAWEI] commit
[~HUAWEI] display this
2014-08-19 14:39:39.227                                                                                                             
#                                                                                                                                   
sysname HUAWEI                                                                                                                      
#                                                                                                                                   
vlan batch 10                                                                                                                       
#                                                                                                                                   
dldp enable                                                                                                                         
#                                                                                                                                   
ip route-static 0.0.0.0 0.0.0.0 192.168.80.1                                                                                        
#                                                                                                                                   
lldp enable                                                                                                                         
#                                                                                                                                   
user-interface maximum-vty 15                                                                                                       
#                                                                                                                                   
timestamp enable                                                                                                                    
#                                                                                                                                   
return 
Translation
Download
Updated: 2019-03-21

Document ID: EDOC1000166501

Views: 42678

Downloads: 326

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