H3C S3600 Series Ethernet Switches Command Manual-Release 1510(V1.04)

HomeSupportSwitchesH3C S3600 Switch SeriesReference GuidesCommand ReferencesH3C S3600 Series Ethernet Switches Command Manual-Release 1510(V1.04)
02-Login Command
Title Size Download
02-Login Command 191 KB

Chapter 1  Login Commands

1.1  Login Commands

1.1.1  authentication-mode

Syntax

authentication-mode { password | scheme [ command-authorization ] | none }

View

User interface view

Parameter

password: Authenticates users using the local password.

scheme: Authenticates users locally or remotely using usernames and passwords.

command-authorization: Performs command authorization on TACACS authentication server.

none: Does not authenticate users.

Description

Use the authentication-mode command to specify the authentication mode.

l           If you specify the password keyword to authenticate users using the local password, remember to set the local password using the set authentication password { cipher | simple } password command.

l           If you specify the scheme keyword to authenticate users locally or remotely using usernames and passwords, the actual authentication mode, that is, local or remote, depends on other related configuration.

l           If this command is executed with the command-authorization keyword specified, authorization is performed on the TACACS server whenever you attempt to execute a command, and the command can be executed only when you pass the authorization. Normally, a TACACS server contains a list of the commands available to different users.

If you specify to perform local authentication when a user logs in through the Console port, a user can log into the switch with the password not configured. But for a VTY user interface, a password is needed for a user to log into the switch through it under the same circumstance.

By default, users logging in through the Console port are not authenticated, whereas modem users and Telnet users are authenticated.

 

&  Note:

To improve security and avoid malicious attack to the unused SOCKETs, TCP 23 and TCP 22, ports for Telnet and SSH services respectively, will be enabled or disabled after corresponding configurations.

l      If the authentication mode is none, TCP 23 will be enabled, and TCP 22 will be disabled.

l      If the authentication mode is password, and the corresponding password has been set, TCP 23 will be enabled, and TCP 22 will be disabled.

l      If the authentication mode is scheme, there are three scenarios: when the supported protocol is specified as telnet, TCP 23 will be enabled; when the supported protocol is specified as ssh, TCP 22 will be enabled; when the supported protocol is specified as all, both the TCP 23 and TCP 22 port will be enabled.

 

Example

# Configure to authenticate users using the local password on the AUX interface.

<H3C> system-view

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

[H3C] user-interface aux 0

[H3C-ui-aux0] authentication-mode password

1.1.2  auto-execute command

Syntax

auto-execute command text

undo auto-execute command

View

User interface view

Parameter

text: Command to be executed automatically.

Description

Use the auto-execute command command to set the command that is executed automatically after a user logs in.

Use the undo auto-execute command command to disable the specified command from being automatically executed.

Execute these two commands in VTY user interface view only.

Normally, the telnet command is specified to be executed automatically to enable the user to Telnet to a specific network device automatically.

By default, no command is automatically executed.

 

  Caution:

l      The auto-execute command command may cause you unable to perform common configuration in the user interface, so use it with caution.

l      Before executing the auto-execute command command and save your configuration, make sure you can log into the switch in other modes and cancel the configuration.

 

Example

# Configure the telnet 10.110.100.1 command to be executed automatically after users log into VTY 0.

<H3C> system-view

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

[H3C] user-interface vty 0

[H3C-ui-vty0] auto-execute command telnet 10.110.100.1

% This action will lead to configuration failure through ui-vty0. Are you sure?[

Y/N]y

1.1.3  databits

Syntax

databits { 7 | 8 }

undo databits

View

User interface view

Parameter

7: Sets the data bits to 7.

8: Sets the data bits to 8.

Description

Use the databits command to set the databits for the user interface.

Use the undo databits command to revert to the default data bits.

Execute these two commands in AUX user interface view only.

The default data bits is 8.

Example

# Set the data bits to 7.

<H3C> system-view

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

[H3C] user-interface aux 0

[H3C-ui-aux0] databits 7

1.1.4  display telnet-server source-ip

Syntax

display telnet-server source-ip

View

Any view

Parameter

None

Description

Use the display telnet-server source-ip command to display the source IP address configured for the switch operating as the Telnet server. If the source interface is also configured for the switch, this command displays the IP address of the source interface. If no source IP address is specified, 0.0.0.0 is displayed.

Example

# Display the source IP address configured for the switch operating as the Telnet server.

<H3C> display telnet-server source-ip

The source IP you specified is 192.168.1.1

1.1.5  display telnet source-ip

Syntax

display telnet source-ip

View

Any view

Parameter

None

Description

Use the display telnet source-ip command to display the source IP address configured for the switch operating as the Telnet client. If the source interface is also configured for the switch, this command displays the IP address of the source interface. If no source address is configured, 0.0.0.0 is displayed.

Example

# Display the source IP address configured for the switch operating as the Telnet client.

<H3C> display telnet source-ip

The source IP you specified is 192.168.1.1

1.1.6  display user-interface

Syntax

display user-interface [ type number | number ] [ summary ]

View

Any view

Parameter

type: User interface type.

number: User interface number.

summary: Displays the summary information about a user interface.

Description

Use the display user-interface command to display the information about a specified user interface or all user interfaces. If the summary keyword is not specified, this command displays user interface type, absolute/relative user interface number, transmission speed, available command level, authentication mode, and physical position. If the summary keyword is specified, this command displays the number and type of the user interfaces, including those that are in use and those that are not in use.

Example

# Display the information about user interface 0.

<H3C> display user-interface 0

  Idx  Type     Tx/Rx      Modem Privi Auth  Int

F 0    AUX 0    9600       -     3     N     -

 

  +    : Current user-interface is active.

  F    : Current user-interface is active and work in async mode.

  Idx  : Absolute index of user-interface.

  Type : Type and relative index of user-interface.

  Privi: The privilege of user-interface.

  Auth : The authentication mode of user-interface.

  Int  : The physical location of UIs.

  A      : Authenticate use AAA.

  N  : Current UI need not authentication.

  P  : Authenticate use current UI's password.

Table 1-1 Descriptions on the fields of the display user-interface command

Filed

Description

+

The user interface is in use.

F

The user interface operates in asynchronous mode.

Idx

The absolute index of the user interface

Type

User interface type and the relative index

Tx/Rx

Transmission speed of the user interface

Modem

Indicates whether or not a modem is used.

Privi

Available command level

Auth

Authentication mode

Int

Physical position of the user interface

A

The current user is authenticated by AAA.

N

Users are not authenticated.

P

Users need to provide passwords to pass the authentication.

 

# Display the summary information about the user interface.

<H3C> display user-interface summary

  User interface type : [AUX]

            0:UXXX XXXX

  User interface type : [VTY]

            8:UUUU X

 

    5 character mode users.      (U)

    8 UI never used.             (X)

    5 total UI in use               

1.1.7  display users

Syntax

display users [ all ]

View

Any view

Parameter

all: Displays the information about all user interfaces.

Description

Use the display users command to display the information about user interfaces. If you do not specify the all keyword, only the information about the current user interface is displayed.

Example

# Display the information about the current user interface.

<H3C> display users

        UI   Delay       Type        Ipaddress       Username        Userlevel

F 0   AUX 0  00:00:00                                                3

1   VTY 0    00:06:08        TEL     192.168.0.3                     3

 

 +   : Current operation user.

 F   : Current operation user work in async mode.

Table 1-2 Descriptions on the fields of the display users command

Field

Description

F

The information is about the current user interface, and the current user interface operates in asynchronous mode.

UI

The numbers in the left sub-column are the absolute user interface indexes, and those in the right sub-column are the relative user interface indexes.

Delay

The period (in seconds) the user interface idles for.

Type

User type

Ipaddress

The IP address form which the user logs in.

Username

The login name of the user that logs into the user interface.

Userlevel

The level of the commands available to the users logging into the user interface

+

The user interface is in use.

 

1.1.8  display web users

Syntax

display web users

View

Any view

Parameter

None

Description

Use the display web users command to display the information about the current on-line Web users.

Example

# Display the information about the current on-line Web users.

<H3C> display web users

ID       Name        Language        Level       Login Time  Last Req. Time

00800003 admin   English     Management  06:16:32        06:18:35

Table 1-3 Description on the fields of the display web users command

Field

Description

ID

ID of a Web user

Name

Name of a Web user

Language

Language a Web user uses

Level

Management level of a Web user

Login Time

Time when a Web user logs in

Last Req. Time

Time when the latest request is made

 

1.1.9  free user-interface

Syntax

free user-interface [ type ] number

View

User view

Parameter

type: User interface type.

number: Index of the user interface. This argument can be an absolute user interface index (if you do not provide the type argument) or a relative user interface index (if you provide the type argument).

Description

Use the free user-interface command to release a specified user interface. If you execute this command, the corresponding user interface will be disconnected.

Note that the current user interface cannot be released.

Example

# Release user interface VTY 0.

<H3C> free user-interface vty 0

Are you sure you want to free user-interface vty0 [Y/N]? y

 [OK]

After you execute this command, user interface VTY 0 will be disconnected. The user in it must log in again to connect to the switch.

1.1.10  header

Syntax

header [ incoming | login | shell ] text

undo header { incoming | login | shell }

View

System view

Parameter

incoming: Sets the login banner for users that log in through modems. If you specify to authenticate login users, the banner appears after a user passes the authentication. (The session does not appear in this case.)

login: Sets the login banner. The banner set by this keyword is valid only when users are authenticated before they log into the switch and appears while the switch prompts for user name and password.

shell: Sets the session banner, which appears after a session is established. If you specify to authenticate login users, the banner appears after a user passes the authentication.

text: Banner to be displayed. If no keyword is specified, this argument is the login banner. You can provide this argument in two ways. One is to enter the banner in the same line as the command (A command line can accept up to 254 characters.) The other is to enter the banner in multiple lines (you can start a new line by pressing <Enter>,) where you can enter a banner that can contain up to 2000 characters (including the invisible characters). Note that the first character is the beginning character and the end character of the banner. After entering the end character, you can press <Enter> to exit the interaction.

Description

Use the header command to set the banners that are displayed when a user logs into a switch. The login banner is displayed on the terminal when the connection is established. And the session banner is displayed on the terminal if a user successfully logs in.

Use the undo header command to disable displaying a specific banner or all banners.

Note that if you specify any one of the three keywords without providing the text argument, the specified keyword will be regarded as the login information.

You can specify the banner in the following three ways, each of which requires that the first character and the last character of the banner be the same.

l           Enter the banner in multiple lines. If you only type one character in the first line of a banner, the character and the last character do not act as part of the banner. The following gives an example of this way.

[H3C] header shell 0

Input banner text, and quit with the character '0'.

Welcome!0

When you log in the next time, “Welcome!” is displayed as the banner. The beginning character and the end character (character 0) do not appear.

l           Enter the banner in multiple lines. If you type multiple characters in the first line of a banner and the beginning and the end characters of the banner in this line are not the same, the beginning character is part of the banner. The following is an example.

[H3C] header shell hello

Input banner text, and quit with the character 'h'.

my friend !

h

When you log in the next time, “hello” and “my friend !“ is displayed respectively in two lines as the banner. The beginning character “h” appears in the banner.

l           Enter the banner in a single line. You can also specify the banner in a single line. In this case, the banner does contain the beginning and the end character. The following is an example.

[H3C] header shell 0welcome,my friend!0

When you log in the next time, “welcome, my friend!” is displayed as the banner.

Example

# Set the session banner.

Option 1: Enter the banner in the same line as the command.

<H3C> system-view

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

[H3C] header shell %SHELL: Hello! Welcome%

(Make sure the beginning and end characters of the banner are the same.)

When you log in the next time, the session banner appears on the terminal as the following:

[H3C] quit

<H3C> quit

Please press ENTER

SHELL: Hello! Welcome

(The beginning and end characters of the banner are not displayed.)

<H3C>

Option 2: Enter the banner in multiple lines.

<H3C> system-view

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

[H3C] header shell %SHELL:

(Following appears after you press <Enter>:)

Input banner text, and quit with the character '%'.

Continue entering the banner and end the banner with the character identical with the beginning character of the banner.

Hello! Welcome %

(Press <Enter>.)

[H3C]

When you log in the next time, the session banner appears on the terminal as the following:

[H3C] quit

<H3C> quit

Please press ENTER

%SHELL:

(Note that the beginning character of the banner appears.)

Hello! Welcome

<H3C>

1.1.11  history-command max-size

Syntax

history-command max-size value

undo history-command max-size

View

User interface view

Parameter

value: Size of the history command buffer. This argument ranges from 0 to 256 and defaults to 10. That is, the history command buffer can store 10 commands by default.

Description

Use the history-command max-size command to set the size of the history command buffer.

Use the undo history-command max-size command to revert to the default history command buffer size.

Example

# Set the size of the history command buffer of AUX 0 to 20 to enable it to store up to 20 commands.

<H3C> system-view

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

[H3C] user-interface aux 0

[H3C-ui-aux0] history-command max-size 20

1.1.12  idle-timeout

Syntax

idle-timeout minutes [ seconds ]

undo idle-timeout

View

User interface view

Parameter

minutes: Number of minutes. This argument ranges from 0 to 35,791.

seconds: Number of seconds. This argument ranges from 0 to 59.

Description

Use the idle-timeout command to set the timeout time. The connection to a user interface is terminated if no operation is performed in the user interface within the timeout time.

Use the undo idle-timeout command to revert to the default timeout time.

You can use the idle-timeout 0 command to disable the timeout function.

The default timeout time is 10 minutes.

Example

# Set the timeout time of AUX 0 to 1 minute.

<H3C> system-view

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

[H3C] user-interface aux 0

[H3C-ui-aux0] idle-timeout 1 0

1.1.13  ip http shutdown

Syntax

ip http shutdown

undo ip http shutdown

View

System view

Parameter

None

Description

Use the ip http shutdown command to shut down the Web server.

Use the undo ip http shutdown command to launch the Web server.

By default, the Web server is launched.

 

&  Note:

To improve security and avoid malicious attack to the unused SOCKETs, TCP 80 port for HTTP service will be enabled or disabled after corresponding configurations.

If you use the undo ip http shutdown command to enable the Web Server, TCP 80 will be enabled; if you use the ip http shutdown command to disabled the Web Server, TCP 80 will be disabled.

 

  Caution:

After the Web file is upgraded, you need to specify a new Web file from the boot menu. Otherwise, the Web Server function cannot be used normally.

 

Example

# Shut down the Web server.

<H3C> system-view

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

[H3C] ip http shutdown

%Apr  4 01:30:12:080 2000 H3C HTTPD/5/Log:- 1 -Stopped HTTP server.

# Launch the Web server.

[H3C] undo ip http shutdown

%Apr  4 01:33:16:212 2000 H3C HTTPD/5/Log:- 1 -Starting HTTP server.

1.1.14  lock

Syntax

lock

View

User view

Parameter

None

Description

Use the lock command to lock the current user interface to prevent unauthorized operations in the user interface. After you issue this command, the system prompts you to enter a password containing 1 to 16 characters. After you confirm the password, the current user interface is locked.

You can unlock the user interface by entering the correct password. If you set a password containing more than 16 characters, the system matches only the first 16 characters of the password entered for unlocking the user interface. That is, the system unlocks the user interface as long as the first 16 characters of the password entered are correct.

Example

# Lock the current user interface.

<H3C> lock

Password:

Again:

 

 

 

                  locked !

1.1.15  parity

Syntax

parity { even | none | odd | }

undo parity

View

User interface view

Parameter

even: Performs even checks.

none: Does not check.

odd: Performs odd checks.

Description

Use the parity command to set the check mode of the user interface.

Use the undo parity command to revert to the default check mode.

Execute these two commands in AUX user interface view only.

No check is performed by default.

Example

# Set to perform even checks.

<H3C> system-view

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

[H3C] user-interface aux 0

[H3C-ui-aux0] parity even

1.1.16  protocol inbound

Syntax

protocol inbound { all | ssh | telnet }

View

User interface view

Parameter

all: Supports both Telnet protocol and SSH protocol.

ssh: Supports SSH protocol.

telnet: Supports Telnet protocol.

Description

Use the protocol inbound command to specify the protocols supported by the user interface.

Execute this command in VTY user interface view only.

Both Telnet protocol and SSH protocol are supported by default.

Related command: user-interface vty.

 

&  Note:

To improve security and avoid malicious attack to the unused SOCKETs, TCP 23 and TCP 22, ports for Telnet and SSH services respectively, will be enabled or disabled after corresponding configurations.

l      If the authentication mode is none, TCP 23 will be enabled, and TCP 22 will be disabled.

l      If the authentication mode is password, and the corresponding password has been set, TCP 23 will be enabled, and TCP 22 will be disabled.

l      If the authentication mode is scheme, there are three scenarios: when the supported protocol is specified as telnet, TCP 23 will be enabled; when the supported protocol is specified as ssh, TCP 22 will be enabled; when the supported protocol is specified as all, both the TCP 23 and TCP 22 port will be enabled.

 

Example

# Configure that only SSH protocol is supported in VTY 0.

<H3C> system-view

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

[H3C] user-interface vty 0

[H3C-ui-vty0] protocol inbound ssh

1.1.17  screen-length

Syntax

screen-length screen-length

undo screen-length

View

User interface view

Parameter

screen-length: Number of lines the screen can contain. This argument ranges from 0 to 512 and defaults to 24.

Description

Use the screen-length command to set the number of lines the terminal screen can contain.

Use the undo screen-length command to revert to the default number of lines.

By default, the terminal screen can contain up to 24 lines.

You can use the screen-length 0 command to disable the function to display information in pages.

Example

# Set the number of lines the terminal screen can contain to 20.

<H3C> system-view

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

[H3C] user-interface aux0

[H3C-ui-aux0] screen-length 20

1.1.18  send

Syntax

send { all | number | type number }

View

User view

Parameter

all: Sends messages to all user interfaces.

type: User interface type.

number: Absolute or relative index of the user interface.

Description

Use the send command to send messages to a specified user interface or all user interfaces.

Example

# Send “hello” to all user interfaces.

<H3C> send all

Enter message, end with CTRL+Z or Enter; abort with CTRL+C:

hello^Z

Send message? [Y/N]y

1.1.19  service-type

Syntax

service-type { ftp | lan-access | { ssh | telnet | terminal }* [ level level ] }

undo service-type { ftp | lan-access | { ssh | telnet | terminal }* }

View

Local user view

Parameter

ftp: Specifies the users to be of FTP type.

lan-access: Specifies the users to be of LAN-access type, which normally means Ethernet users, such as 802.1x users.

ssh: Specifies the users to be of SSH type.

telnet: Specifies the users to be of Telnet type.

terminal: Makes terminal services available to users logging in through the Console port.

level level: Specifies the user level for Telnet users, Terminal users, or SSH users. The level argument ranges from 0 to 3 and defaults to 0.

Description

Use the service-type command to specify the login type and the corresponding available command level.

Use the undo service-type command to cancel login type configuration.

Commands fall into four command levels: visit, monitor, system, and manage, which are described as follows:

l           Visit level: Commands at this level are used to diagnose network and change the language mode of user interface, such as the ping, tracert, and language-mode command. The telnet command is also at this level. Commands at this level cannot be saved in configuration files.

l           Monitor level: Commands at this level are used to maintain the system, to debug service problems, and so on. The display and debugging commands are at monitor level. Commands at this level cannot be saved in configuration files.

l           System level: Commands at this level are used to configure services. Commands concerning routing and network layers are at system level. You can utilize network services by using these commands.

l           Manage level: Commands at this level are for the operation of the entire system and the system supporting modules. Services are supported by these commands. Commands concerning file system, file transfer protocol (FTP), trivial file transfer protocol (TFTP), downloading using XModem, user management, and level setting are at administration level.

 

&  Note:

To improve security and avoid malicious attack to the unused SOCKETs, TCP 23 and TCP 22, ports for Telnet and SSH services respectively, will be enabled or disabled after corresponding configurations.

l      If the authentication mode is none, TCP 23 will be enabled, and TCP 22 will be disabled.

l      If the authentication mode is password, and the corresponding password has been set, TCP 23 will be enabled, and TCP 22 will be disabled.

l      If the authentication mode is scheme, there are three scenarios: when the supported protocol is specified as telnet, TCP 23 will be enabled; when the supported protocol is specified as ssh, TCP 22 will be enabled; when the supported protocol is specified as all, both the TCP 23 and TCP 22 port will be enabled.

 

Example

# Configure commands at level 0 are available to the users logging in using the user name of “zbr”.

<H3C> system-view

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

[H3C] local-user zbr

[H3C-luser-zbr] service-type telnet level 0

# To verify the above configuration, you can quit the system, log in again using the user name of “zbr”, and then list the available commands, as listed in the following.

[H3C] quit

<H3C> ?

User view commands:

  cluster            Run cluster command

  language-mode Specify the language environment

  nslookup      Query Internet name servers

  ping               Ping function

  quit               Exit from current command view

  super              Set the current user priority level

  telnet             Establish one Telnet connection

  tracert            Trace route function

  undo               Cancel current setting

1.1.20  set authentication password

Syntax

set authentication password { cipher | simple } password

undo set authentication password

View

User interface view

Parameter

cipher: Specifies to display the local password in encrypted text when you display the current configuration.

simple: Specifies to display the local password in plain text when you display the current configuration.

password: Password. The password must be in plain text if you specify the simple keyword in the set authentication password command. If you specify the cipher keyword, the password can be in either encrypted text or plain text. When you enter the password in plain text containing up to 16 characters (such as 123), the system converts the password to the corresponding 24-character encrypted password (such as !TP<\*EMUHL,408`W7TH!Q!!). Make sure you are aware of the corresponding plain password if you enter the password in ciphered text (such as !TP<\*EMUHL,408`W7TH!Q!!).

Description

Use the set authentication password command to set the local password.

Use the undo set authentication password command to remove the local password.

Note that only plain text passwords are expected when users are authenticated.

 

&  Note:

By default, modem users and Telnet users need to provide their passwords to log in. If no password is set, the “Login password has not been set !” message appears on the terminal when users log in.

 

Example

# Set the local password of VTY 0 to “123”.

<H3C> system-view

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

[H3C] user-interface vty 0

[H3C-ui-vty0] set authentication password simple 123

1.1.21  shell

Syntax

shell

undo shell

View

User interface view

Parameter

None

Description

Use the shell command to make terminal services available for the user interface.

Use the undo shell command to make terminal services unavailable to the user interface.

By default, terminal services are available in all user interfaces.

Note the following when using the undo shell command:

l           This command is available in all user interfaces except the AUX (Console) user interface.

l           This command is unavailable in the current user interface.

l           This command prompts for confirmation when being executed in any valid user interface.

Example

# Log into user interface 0 and make terminal services unavailable in VTY 0 through VTY 4.

<H3C> system-view

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

[H3C] user-interface vty 0 4

[H3C-ui-vty0-4] undo shell

1.1.22  speed

Syntax

speed speed-value

undo speed

View

User interface view

Parameter

speed-value: Transmission speed (in bps). This argument can be 300, 600, 1200, 2400, 4800, 9600, 19,200, 38,400, 57,600, and 115,200 and defaults to 9,600.

Description

Use the speed command to set the transmission speed of the user interface.

Use the undo speed command to revert to the default transmission speed.

Execute these two commands in AUX user interface view only.

Example

# Set the transmission speed of the AUX user interface to 115,200 bps.

<H3C> system-view

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

[H3C] user-interface aux 0

[H3C-ui-aux0] speed 115200

1.1.23  stopbits

Syntax

stopbits { 1 | 1.5 | 2 }

undo stopbits

View

User interface view

Parameter

1: Sets the stop bits to 1.

1.5: Sets the stop bits to 1.5.

2: Sets the stop bits to 2.

Description

Use the stopbits command to set the stop bits of the user interface.

Use the undo stopbits command to revert to the default stop bits.

 Execute these two commands in AUX user interface view only.

By default, the stop bits is 1.

 

&  Note:

Changing the value of the stop bits does not affect the communications.

 

Example

# Set the stop bits to 2.

<H3C> system-view

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

[H3C] user-interface aux 0

[H3C-ui-aux0] stopbits 2

1.1.24  sysname

Syntax

sysname string

undo sysname

View

System view

Parameter

string: System name of the switch. This argument can contain 1 to 30 characters and defaults to “H3C”.

Description

Use the sysname command to set a system name for the switch.

Use the undo sysname command to revert to the default system name.

The CLI prompt reflects the system name of a switch. For example, if the system name of a switch is “H3C”, then the prompt of user view is <H3C>.

Example

# Set the system name of the switch to “ABC”.

<H3C> system-view

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

[H3C] sysname ABC

[ABC]

1.1.25  telnet

Syntax

telnet { hostname | ip-address } [ service-port ]

View

User view

Parameter

hostname: Host name of the remote switch. You can use the ip host command to assign a host name to a switch.

ip-address: IP address of the remote switch.

service-port: TCP port number of the port that provides Telnet service on the switch. This argument ranges from 0 to 65,535.

Description

Use the telnet command to Telnet to another switch from the current switch to manage the former remotely. You can terminate a Telnet connection by pressing <Ctrl + K> or by executing the quit command.

The default TCP port number is 23.

Related command: display tcp status, and ip host.

Example

# Telnet to the switch with the host name of H3C2 and IP address of 129.102.0.1 from the current switch (with the host name of H3C1).

<H3C1> telnet 129.102.0.1

Trying 129.102.0.1 ...

Press CTRL+K to abort

Connected to 129.102.0.1 ...

**************************************************************************

*  Copyright(c) 2004-2007 Hangzhou H3C Tech. Co., Ltd. All rights reserved.*

*  Without the owner's prior written consent,                                  *

*  no decompiling or reverse-engineering shall be allowed.                     *

**************************************************************************

 

<H3C2>

1.1.26  telnet-server source-interface

Syntax

telnet-server source-interface interface-type interface-number

undo telnet-server source-interface

View

System view

Parameter

interface-type: Type of the interface to be specified as the source interface.

interface-number: Number of the interface to be specified as the source interface.

Description

Use the telnet-server source-interface command to specify the source interface for a Telnet server. If the interface specified does not existent, your configuration fails.

Use the undo telnet-server source-interface command to clear the source interface configuration. After that, you can access the Telnet server from Telnet client using the IP address determined by the system.

Example

# Specify VLAN-interface2 as the source interface for the Telnet server.

<H3C> system-view

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

[H3C] telnet-server source-interface Vlan-interface 2 

1.1.27  telnet-server source-ip

Syntax

telnet-server source-ip ip-address

undo telnet-server source-ip

View

System view

Parameter

ip-address: Source IP address to be set.

Description

Use the telnet-server source-ip command to specify the source IP address for a Telnet server. If the IP address specified by the ip-address argument in the command is not an IP address of the device, your configuration fails.

Use the undo telnet-server source-ip command to cancel the source IP address configuration. After that, you can access the Telnet server from Telnet client using the IP address determined by the system.

Example

# Set the source IP address to 192.168.1.1 for the Telnet server.

<H3C> system-view

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

[H3C] telnet-server source-ip 192.168.1.1

1.1.28  telnet source-interface

Syntax

telnet source-interface interface-type interface-number

undo telnet source-interface

View

System view

Parameter

interface-type: Type of the interface to be specified as the source interface.

interface-number: Number of the interface to be specified as the source interface.

Description

Use the telnet source-interface command to specify the source interface for a Telnet client. If the interface specified does not exist, your configuration fails.

Use the undo telnet source-interface command to clear the source interface configuration. After that, you can access the Telnet server from Telnet client using the IP address determined by the system.

Example

# Specify VLAN-interface2 as the source interface for the Telnet client.

<H3C> system-view

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

[H3C] telnet source-interface Vlan-interface 2

1.1.29  telnet source-ip

Syntax

telnet source-ip ip-address

undo telnet source-ip

View

System view

Parameter

ip-address: Source IP address to set.

Description

Use the telnet source-ip command to specify the source IP address for a Telnet client. If the IP address specified is not an IP address of the device, your configuration fails.

Use the undo telnet source-ip command to clear the source IP address configuration. After that, you can access the Telnet server from Telnet client using the IP address determined by the system.

Example

# Specify the source IP address to be 192.168.1.1 for the Telnet client.

<H3C> system-view

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

[H3C] telnet source-ip 192.168.1.1

1.1.30  user-interface

Syntax

user-interface [ type ] first-number [ last-number ]

View

System view

Parameter

type: User interface type.

first-number: User interface index, which identifies the first user interface to be configured.

last-number: User interface index, which identifies the last user interface to be configured.

Description

Use the user-interface command to enter one or more user interface views to perform configuration.

Example

# Enter VTY 0 user interface view.

<H3C> system-view

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

[H3C] user-interface vty 0

[H3C-ui-vty0]

1.1.31  user privilege level

Syntax

user privilege level level

undo user privilege level

View

User interface view

Parameter

level: Command level ranging from 0 to 3.

Description

Use the user privilege level command to configure the command level available to the users logging into the user interface.

Use the undo user privilege level command to revert to the default command level.

By default, the commands at level 3 are available to the users logging into the AUX user interface. The commands at level 0 are available to the users logging into VTY user interfaces.

Example

# Configure that commands at level 0 are available to the users logging into VTY 0.

<H3C> system-view

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

[H3C] user-interface vty 0

[H3C-ui-vty0] user privilege level 0

# You can verify the above configuration by Telneting to VTY 0 and displaying the available commands, as listed in the following.

<H3C> ?

User view commands:

  cluster        Run cluster command

  language-mode  Specify the language environment

  nslookup       Query Internet name servers

  ping           Ping function

  quit           Exit from current command view

  super          Set the current user priority level

  telnet         Establish one Telnet connection

  tracert        Trace route function

  undo           Cancel current setting

 


Chapter 2  Commands for User Control

2.1  Commands for Controlling Logging in Users

2.1.1  acl

Syntax

acl acl-number { inbound | outbound }

undo acl { inbound | outbound }

View

User interface view

Parameter

acl-number: ACL number ranging from 2,000 to 4,999.

inbound: Filters the users Telneting to the current switch.

outbound: Filters the users Telneting to other switches from the current switch.

Description

Use the acl command to apply an ACL to filter Telnet users.

Use the undo acl command to disable the switch from filtering Telnet users using the ACL.

By default, Telnet users are not filtered by ACLs.

Example

# Apply ACL 2000 to filter users Telneting to the current switch (assuming that ACL 2000 already exists.)

<H3C> system-view

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

[H3C] user-interface vty 0 4

[H3C-ui-vty0-4] acl 2000 inbound

2.1.2  free web-users

Syntax

free web-users { all | user-id user-id | user-name user-name }

View

User view

Parameter

user-id: Web user ID.

user-name: User name of the Web user. This argument can contain 1 to 80 characters.

all: Specifies all Web users.

Description

Use the free web-users command to disconnect a specified Web user or all Web users by force.

Example

# Disconnect all Web users by force.

<H3C> free web-users all

2.1.3  ip http acl

Syntax

ip http acl acl-number

undo ip http acl

View

System view

Parameter

acl-number: ACL number ranging from 2,000 to 2,999.

Description

Use the ip http acl command to apply an ACL to filter Web users.

Use the undo ip http acl command to disable the switch from filtering Web users using the ACL.

By default, the switch does not use the ACL to filter Web users.

Example

# Apply ACL 2000 to filter Web users (assuming that ACL 2000 already exists.)

<H3C> system-view

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

[H3C] ip http acl 2000

2.1.4  snmp-agent community

Syntax

snmp-agent community { read | write } community-name [ mib-view view-name | acl acl-number ]*

undo snmp-agent community community-name

View

System view

Parameter

read: Specifies that the community has read-only permission in the specified view.

write: Specifies that the community has read/write permission in the specified view.

community-name: Community name.

mib-view: Sets the name of the MIB view accessible to the community.

view-name: MIB view name.

acl acl-number: Specifies the ACL number. The acl-number argument ranges from 2,000 to 2,999.

Description

Use the snmp-agent community command to set a community name and to enable users to access the switch through SNMP. You can also optionally use this command to apply an ACL to filter network management users.

Use the undo snmp-agent community command to cancel community-related configuration for the specified community.

By default, SNMPv1 and SNMPv2c access a switch by community names.

Example

# Set the community name to “h123”, enable users to access the switch in the name of the community (with read-only permission), and apply ACL 2000 to filter network management users (assuming that ACL 2000 already exists.)

<H3C> system-view

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

[H3C] snmp-agent community read h123 acl 2000

2.1.5  snmp-agent group

Syntax

snmp-agent group { v1 | v2c } group-name [ read-view read-view ] [ write-view write-view ] [ notify-view notify-view ] [ acl acl-number ]

undo snmp-agent group { v1 | v2c } group-name

snmp-agent group v3 group-name [ authentication | privacy ] [ read-view read-view ] [ write-view write-view ] [ notify-view notify-view ] [ acl acl-number ]

undo snmp-agent group v3 group-name [ authentication | privacy ]

View

System view

Parameter

v1: Specifies to adopt v1 security scheme.

v2c: Specifies to adopt v2c security scheme.

v3: Specifies to adopt v3 security scheme.

group-name: Group name. This argument can be of 1 to 32 characters.

authentication: Specifies to authenticate SNMP data without encrypting the data.

privacy: Authenticates and encrypts packets.

read-view: Sets a read-only view.

read-view: Name of the view to be set to read-only. This argument can be of 1 to 32 characters.

write-view: Sets a readable & writable view.

write-view: Name of the view to be set to readable & writable. This argument can be of 1 to 32 characters.

notify-view: Sets a notifying view.

notify-view: Name of the view to be set to a notifying view. This argument can be of 1 to 32 characters.

acl acl-number: Specifies an ACL. The acl-number argument ranges from 2,000 to 2,999.

Description

Use the snmp-agent group command to create an SNMP group. You can also optionally use this command to apply an ACL to filter network management users.

Use the undo snmp-agent group command to remove a specified SNMP group.

By default, the snmp-agent group v3 group-name command is provided without the authentication and privacy keyword. That is, the switch does not authenticate or encrypt the specified group.

Example

# Create an SNMP group named “h123” and apply ACL 2001 to filter network management users (assuming that ACL 2001 already exists).

<H3C> system-view

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

[H3C] snmp-agent group v1 h123 acl 2001

2.1.6  snmp-agent usm-user

Syntax

snmp-agent usm-user { v1 | v2c } user-name group-name [ acl acl-number ]

undo snmp-agent usm-user { v1 | v2c } user-name group-name

snmp-agent usm-user v3 user-name group-name [ authentication-mode { md5 | sha } auth-password [ privacy-mode des56 priv-password ] ] [ acl acl-number ]

undo snmp-agent usm-user v3 user-name group-name { local | engineid engineid-string }

View

System view

Parameter

v1: Specifies to adopt v1 security scheme.

v2c: Specifies to adopt v2c security scheme.

v3: Specifies to adopt v3 security scheme.

user-name: User name. This argument can be of 1 to 32 characters.

group-name: Name of the group to which the user corresponds. This argument can be of 1 to 32 characters.

authentication-mode: Specifies to require authentication.

md5: Specifies the authentication protocol to be HMAC-MD5-96.

sha: Specifies the authentication protocol to be HMAC-SHA-96.

auth-password: Authentication password. This argument is a string of 1 to 64 characters.

privacy-mode: Encrypts packets.

des56: Specifies the encryption protocol as data encryption standard (DES).

priv-password: Encrypted password. This argument is a string of 1 to 64 characters.

acl acl-number: Specifies an ACL. The acl-number argument ranges from 2,000 to 2,999.

local: Specifies local entity users.

engineid: Specifies an engine ID related to the user.

engineid-string: Engine ID string. It must consist of hexadecimal numbers and contain 10 to 64 characters.

Description

Use the snmp-agent usm-user command to add a user to an SNMP group. You can also optionally use this command to apply an ACL to filter network management users.

Use the undo snmp-agent usm-user command to remove an SNMP user from the corresponding SNMP group and to remove the ACL configuration on the user.

Example

# Add a user named "aaa" to an SNMP group named "group1", specify to require authentication, specify the authentication protocol as HMAC-MD5-96 and authentication password as 123, and apply ACL 2002 to filter network management users (assuming that ACL 2002 already exists).

<H3C> system-view

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

[H3C] snmp-agent usm-user v3 aaa group1 authentication-mode md5 123 acl 2002

 

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