01-Fundamentals Command Reference

HomeSupportReference GuidesCommand ReferencesH3C WX Series Access Controllers Command References(R3308 R2308)-6W10701-Fundamentals Command Reference
01-CLI Commands
Title Size Download
01-CLI Commands 110.44 KB

command-alias enable

Syntax

command-alias enable

undo command-alias enable

View

System view

Default level

2: System level

Parameters

None

Description

Use command-alias enable to enable the command keyword alias function.

Use undo command-alias enable to disable the command keyword alias function.

By default, the command keyword alias function is disabled.

Examples

# Enable the command keyword alias function.

<Sysname> system-view

[Sysname] command-alias enable

# Disable the command keyword alias function.

<Sysname> system-view

[Sysname] undo command-alias enable

command-alias mapping

Syntax

command-alias mapping cmdkey alias

undo command-alias mapping cmdkey

View

System view

Default level

2: System level

Parameters

cmdkey: Complete form of the first keyword of a non-undo command, or the second keyword of an undo command.

alias: Alias for the keyword, which must be different from the first keyword of any non-undo command.

Description

Use command-alias mapping to configure a command keyword alias.

Use undo command-alias mapping to delete a command keyword alias.

By default, a command keyword has no alias.

Examples

# Define show as the alias of the display keyword.

<Sysname> system-view

[Sysname] command-alias mapping display show

After you configure the alias, you can enter show to execute a display command. For example, you can enter show clock to execute the display clock command.

# Delete the alias of the display keyword.

<Sysname> system-view

[Sysname] undo command-alias mapping display

command-privilege

Syntax

command-privilege level level view view command

undo command-privilege view view command

View

System view

Default level

3: Manage level

Parameters

level level: Command level, in the range of 0 to 3.

view view: Specifies a view.

command: Command to be set in the specified view.

Description

Use command-privilege to assign a level for a specific command in a view.

Use undo command-privilege to restore the default.

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

Command levels include four privileges: visit (0), monitor (1), system (2), and manage (3). You can assign a privilege level according to the user's need. When logging in to the switch, the user can access the assigned level and all levels below it.

Level changes can cause maintenance, operation, and security problem. H3C recommends that you use the default command level or modify the command level under the guidance of professional staff.

The command specified in the command-privilege command must be complete, and has valid arguments. For example, the default level of the tftp server-address { get | put | sget } source-filename [ destination-filename ] [ source { interface interface-type interface-number | ip source-ip-address } ] command is 3. After the command-privilege level 0 view shell tftp 1.1.1.1 put a.cfg command is executed, when users with the user privilege level of 0 log in to the device, they can execute the tftp server-address put source-filename command (such as the tftp 192.168.1.26 put syslog.txt command), but cannot execute the command with the get, sget or source keyword, and cannot specify the destination-filename argument.

The command specified in the undo command-privilege view command can be incomplete. For example, after the undo command-privilege view system ftp command is executed, all commands starting with the keyword ftp (such as ftp server acl, ftp server enable, and ftp timeout) are restored to their default level. If you have modified the level of commands ftp server enable and ftp timeout, and you want to restore only the ftp server enable command to its default level, you should use the undo command-privilege view system ftp server command.

If you modify the command level of a command in a specified view from the default command level to a lower level, remember to modify the command levels of the quit command and the command used to enter this view. For example, the default command level of commands interface and system-view is 2 (system level). If you want to make the interface command available to the level 1 users, execute the following three commands: command-privilege level 1 view shell system-view, command-privilege level 1 view system interface gigabitethernet 1/0/1, and command-privilege level 1 view system quit. Then, the level 1 users can enter system view, execute the interface gigabitethernet command, and return to user view.

Examples

# Set the command level of the interface command to 0 in system view.

<Sysname> system-view

[Sysname] command-privilege level 0 view system interface

display clipboard

Syntax

display clipboard [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display clipboard to view the contents of the clipboard.

To copy the specified content to the clipboard:

1.     Move the cursor to the starting position of the content and press the <Esc+Shift+,> combination.

2.     Move the cursor to the ending position of the content and press the <Esc+Shift+.> combination.

Examples

# View the content of the clipboard.

<Sysname> display clipboard

---------------- CLIPBOARD-----------------

display current-configuration

display command-alias

Syntax

display command-alias [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display command-alias to display configuration information about the command keyword alias function.

Examples

# Display configuration information about the command keyword alias function.

<Sysname> display command-alias

Command alias is enabled

index  alias                        command key

1      show                         display

display history-command

Syntax

display history-command [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display history-command to display commands saved in the command history buffer.

By default, the system can save up to 10 commands in the buffer. You can use the history-command max-size command to change the buffer size.

Examples

# Display all commands saved in the command history buffer.

<Sysname> display history-command

  display history-command

  system-view

  vlan 2

  quit

display hotkey

Syntax

display hotkey [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use display hotkey to display hotkey information.

Examples

# Display hotkey information.

<Sysname> display hotkey

----------------- HOTKEY -----------------

 

            =Defined hotkeys=

Hotkeys Command

CTRL_G  display current-configuration

CTRL_L  display ip routing-table

CTRL_O  undo debug all

 

           =Undefined hotkeys=

Hotkeys Command

CTRL_T  NULL

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.

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_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.

hotkey

Syntax

hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_T | CTRL_U } command

undo hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_T | CTRL_U }

View

System view

Default level

2: System level

Parameters

CTRL_G: Assigns a command to Ctrl+G.

CTRL_L: Assigns a command to Ctrl+L.

CTRL_O: Assigns a command to Ctrl+O.

CTRL_T: Assigns a command to Ctrl+T.

CTRL_U: Assigns a command to Ctrl+U.

command: Command to be assigned to the hotkey.

Description

Use hotkey to assign a command to a configurable hotkey.

Use undo hotkey to restore the default.

The default settings are as follows:

·     Ctrl_Gdisplay current-configuration (display the current configuration)

·     Ctrl_Ldisplay ip routing-table (display the IPv4 routing table information)

·     Ctrl_Oundo debugging all (disable all debugging functions)

·     Ctrl_T–No command is assigned to this hotkey.

·     Ctrl_U–No command is assigned to this hotkey.

Examples

# Assign the display tcp status command to the hotkey Ctrl+T.

<Sysname> system-view

[Sysname] hotkey ctrl_t display tcp status

quit

Syntax

quit

View

Any view

Default level

0: Visit level (in user view)

2: System level (in other views)

Parameters

None

Description

Use quit to return to the upper-level view.

In user view, the quit command disconnects you from the device.

Examples

# Return from GigabitEthernet 1/0/1 interface view to system view, and then to user view.

[Sysname-GigabitEthernet1/0/1] quit

[Sysname] quit

<Sysname>

return

Syntax

return

View

Any view except user view

Default level

2: System level

Parameters

None

Description

Use return to return to user view from any other view. Pressing Ctrl+Z has the same effect.

Related commands: quit.

Examples

# Return to user view from GigabitEthernet 1/0/1 view.

[Sysname-GigabitEthernet1/0/1] return

<Sysname>

screen-length disable

Syntax

screen-length disable

undo screen-length disable

View

User view

Default level

1: Monitor level

Parameters

None

Description

Use screen-length disable to disable pausing between screens of output for the current session.

Use undo screen-length disable to enable pausing between screens of output for the current session.

By default, a login user uses the settings of the screen-length command. The default settings of the screen-length command are: pausing between screens of output and displaying up to 24 lines on a screen.

This command only takes effect for the current session. When you log out, the setting by this command is restored to the default.

Related commands: screen-length.

Examples

# Disable pausing between screens of output for the current session.

<Sysname> screen-length disable

super

Syntax

super [ level ]

View

User view

Default level

0: Visit level

Parameters

level: User level, which ranges from 0 to 3 and defaults to 3.

Description

Use super to switch from the current user privilege level to a specified user privilege level.

If a level is not specified, the command switches the user privilege level to 3.

There are four user privilege levels: visit (0), monitor (1), system (2), and manage (3). You can assign different privilege levels to different users. After login, a user can access the commands that are at or under the assigned level.

A user can switch to a lower privilege level unconditionally. To switch to a higher privilege level, a console user does not need to provide any password, but an AUX or VTY user must enter the switching password set with the super password command. If the entered password is incorrect or no password is configured for switching to the level, the switching operation fails.

Related commands: super password, super authentication-mode.

Examples

# Switch to user privilege level 2 from user privilege level 3.

<Sysname> super 2

User privilege level is 2, and only those commands can be used

whose level is equal or less than this.

Privilege note: 0-VISIT, 1-MONITOR, 2-SYSTEM, 3-MANAGE

# Switch back to user privilege level 3. (Suppose the switching password is 123. If no password is set, users cannot switch to user privilege level 3.)

<Sysname> super 3

 Password:

User privilege level is 3, and only those commands can be used

whose level is equal or less than this.

Privilege note: 0-VISIT, 1-MONITOR, 2-SYSTEM, 3-MANAGE

super authentication-mode

Syntax

super authentication-mode { local | scheme } *

undo super authentication-mode

View

System view

Default level

2: System level

Parameters

local: Authenticates a user by using the local password set with the super password command. When no password is set with the super password command, two results can occur: The privilege level switching succeeds if the user is logged in through the console port or the AUX port used as the console port. The switching fails if the user logs in through any of the AUX or VTY user interfaces or enters an incorrect switching password.

scheme: Performs AAA authentication. For more information about AAA, see Security Configuration Guide.

local scheme: Authenticates a user by using the local password first. If no password is set for the user logged in through the console port, the privilege level switching succeeds. If no password is set for the user logged in through any of the AUX or VTY user interfaces, the AAA authentication is performed.

scheme local: Performs AAA authentication first. If the AAA configuration is invalid (the domain parameters or authentication scheme are not configured) or the server does not respond, the local password authentication is performed.

Description

Use super authentication-mode to set the authentication mode for user privilege level switching.

Use undo super authentication-mode to restore the default.

By default, the authentication mode for the user privilege level switching is local.

Related commands: super password.

Examples

# Set the authentication mode for the user privilege level switching to local.

<Sysname> system-view

[Sysname] super authentication-mode local

# Set the authentication mode for the user privilege level switching to scheme local.

<Sysname> system-view

[Sysname] super authentication-mode scheme local

super password

Syntax

super password [ level user-level ] { simple | cipher } password

undo super password [ level user-level ]

View

System view

Default level

2: System level

Parameters

level user-level: User privilege level, which is in the range of 1 to 3 and defaults to 3.

simple: Displays the password in plain text.

cipher: Displays the password in cipher text.

password: Password used for user privilege level switching, case-sensitive. It must be in plain text if you specify the simple keyword and can be in plain or cipher text if you specify the cipher keyword. A password in plain text must be a string of 1 to 16 characters. A password in cipher text must be a string of 24 characters. For example, if you specify the cipher keyword, you can enter the plaintext string 1234567 or ciphertext string _(TT8F]Y\5SQ=^Q`MAF4<1!! to achieve the same effect.

Description

Use super password to set the password used to switch from the current user privilege level to a higher one.

Use undo super password to restore the default.

By default, no password is set for switching to a higher privilege level.

If you specify the simple keyword, the password is saved in plain text when saved to a configuration file.

If you specify the cipher keyword, the password is saved in cipher text when saved to a configuration file.

For security, specify the cipher keyword.

During authentication, a user must enter the password in plain text, regardless of the password type you set.

Examples

# Use the password abc in plain text to authenticate a user who wants to switch to privilege level 3.

<Sysname> system-view

[Sysname] super password level 3 simple abc

# Display the configured level switching password.

[Sysname] display current-configuration

#

 super password level 3 simple abc

# Use the password abc in cipher text to authenticate a user who wants to switch to privilege level 3.

<Sysname> system-view

[Sysname] super password level 3 cipher abc

# Display the configured level switching password.

[Sysname] display current-configuration | include super

#

super password level 3 cipher ;)<01%^&;YGQ=^Q`MAF4<1!!

system-view

Syntax

system-view

View

User view

Default level

2: System level

Parameters

None

Description

Use system-view to enter system view from user view.

Related commands: quit, return.

Examples

# Enter system view from user view.

<Sysname> system-view

System View: return to User View with Ctrl+Z.

[Sysname]

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网