H3C S5120-SI Series Ethernet Switches Command Reference-Release 1101-6W105-Book
H3C S5120-SI Series Ethernet Switches Command Reference-Release 1101-6W105-Book
Command Reference
Trademarks
Notice
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute the warranty of any kind, express or implied.
Preface
The H3C S5120-SI Series Ethernet Switches Command Reference, Release 1101 describes the
commands available in the H3C S5120-SI series software release 1101.
This preface includes:
1) About This Document
z Audience
z Organization
z Conventions
2) Documentation Guide
z Related Documentation
z Obtaining Documentation
z Technical Support
z Documentation Feedback
2-1
1 About This Document
Audience
This documentation is intended for:
z Network planners
z Field technical support and servicing engineers
z Network administrators working with the S5120-SI series
Organization
The H3C S5120-SI Series Ethernet Switches Command Reference, Release 1101 comprises these
chapters:
Chapter Content
04-Loopback Interface
Loopback Interface and Null Interface Configuration Commands
and Null Interface
05-Ethernet Link
Ethernet Link Aggregation Configuration Commands
Aggregation
12-IP Performance
IP Performance Optimization Configuration Commands
Optimization
z ARP Configuration Commands
13-ARP
z ARP Active Acknowledgement Configuration Commands
z DHCP Relay Agent Configuration Commands
z DHCP Client Configuration Commands
14-DHCP
z DHCP Snooping Configuration Commands
z BOOTP Client Configuration Commands
2-1
Chapter Content
z FTP Server Configuration Commands
15-FTP and TFTP z FTP Client Configuration Commands
z TFTP Client Configuration Commands
16-IP Routing Basics
Routing-table Display and Reset Commands
Configuration
2-2
Chapter Content
Conventions
This section describes the conventions used in this documentation set.
Command conventions
Convention Description
Boldface Bold text represents commands and keywords that you enter literally as shown.
italic Italic text represents arguments that you replace with actual values.
The argument or keyword and argument combination before the ampersand (&)
&<1-n>
sign can be entered 1 to n times.
GUI conventions
Convention Description
Window names, button names, field names, and menu items are in Boldface.
Boldface
For example, the New User window appears; click OK.
Multi-level menus are separated by angle brackets. For example, File > Create
>
> Folder.
Symbols
Convention Description
Means reader be careful. Improper operation may cause data loss or damage to
equipment.
2-3
Convention Description
2-4
2 Documentation Guide
Related Documentation
The H3C S5120-SI documentation set also includes:
Product
description and Marketing brochures Describe product specifications and benefits.
specifications
Compliance and safety Provides regulatory information and the safety instructions that
manual must be followed during installation.
Power Provides the RPS and switch compatibility matrix and RPS cable
RPS ordering guide
configuration specifications.
Login password Tells how to find the lost password or recover the password
recovery manual when the login password is lost.
Operations and Provide information about the product release, including the
maintenance version history, hardware and software compatibility matrix,
Release notes
version upgrade information, technical support information, and
software upgrading.
Obtaining Documentation
You can access the most up-to-date H3C product documentation on the World Wide Web at this URL:
http://www.h3c.com.
Click the links on the top navigation bar to obtain different categories of product documentation:
z [Technical Support & Documents > Technical Documents] – Provides hardware installation,
software upgrading, and software feature configuration and maintenance documentation.
z [Products & Solutions] – Provides information about products and technologies, as well as
solutions.
2-1
z [Technical Support & Documents > Software Download] – Provides the documentation released
with the software version.
Technical Support
customer_service@h3c.com
http://www.h3c.com
Documentation Feedback
You can e-mail your comments about product documentation to info@h3c.com.
We appreciate your comments.
2-2
Table of Contents
i
1 CLI Commands
CLI Commands
display history-command
Syntax
display history-command
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display history-command command to display commands saved in the history buffer.
The system will save validated history commands performed last in current user view to the history
buffer, which can save up to ten commands by default. You can use the history-command max-size
command to set the size of the history buffer. Refer to the history-command max-size command in
Login Commands in the Command Reference- Part 1- Login for related configuration.
Examples
# Display validated history commands in current user view (the display information varies with
configuration).
<Sysname> display history-command
display history-command
system-view
vlan 2
quit
quit
Syntax
quit
View
Any view
1-1
Default Level
Parameters
None
Description
Use the quit command to exit to a lower-level view. If the current view is user view, the quit command
terminates the current connection and quits the system.
Examples
# Switch from GigabitEthernet1/0/1 interface view to system view, and then to user view.
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] quit
<Sysname>
return
Syntax
return
View
Default Level
2: System level
Parameters
None
Description
Use the return command to return to user view from current view (non user view).
You can also use the hot key Ctrl+Z to return to user view from the current view (non user view), which
equals execution of the return command.
Related commands: quit.
Examples
1-2
screen-length disable
Syntax
screen-length disable
undo screen-length disable
View
User view
Default Level
1: Monitor level
Parameters
None
Description
Use the screen-length disable command to disable the multiple-screen output function of the current
user.
Use the undo screen-length disable command to enable the multiple-screen output function of the
current user.
By default, a login user uses the settings of the screen-length command. The default settings of the
screen-length command are: multiple-screen output is enabled and 24 lines are displayed on the next
screen. (For the details of the screen-length command, refer to Login Commands in the Command
Reference- Part 1- Login.)
Note that this command is applicable to the current user only and when a user re-logs in, the settings
restore to the system default.
Examples
system-view
Syntax
system-view
View
User view
Default Level
2: System level
Parameters
None
1-3
Description
Use the system-view command to enter system view from the current user view.
Related commands: quit, return.
Examples
1-4
Table of Contents
i
1 Commands for Logging into an Ethernet Switch
Syntax
activation-key character
undo activation-key
View
Default Level
3: Manage level
Parameters
character: Shortcut key for starting terminal sessions, a character or its ASCII decimal equivalent in the
range 0 to 127; or a string of 1 to 3 characters.
Description
Use the activation-key command to define a shortcut key for starting a terminal session.
Use the undo activation-key command to restore the default shortcut key.
You can use a single character (or its corresponding ASCII code value in the range 0 to 127) or a string
of 1 to 3 characters to define a shortcut key. In the latter case, the system takes only the first character
to define the shortcut key. For example, if you input an ASCII code value 97, the system will set the
shortcut key to <a>; if you input the string b@c, the system will set the shortcut key to <b>.
You may use the display current-configuration command to verify the shortcut key you have defined.
By default, pressing Enter key will start a terminal session.
Examples
1-1
**************************************************************************
* Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All rights reserved.*
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
**************************************************************************
User interface aux0 is available.
<Sysname>
%Apr 28 04:33:11:611 2005 Sysname SHELL/5/LOGIN: Console login from aux0
authentication-mode
Syntax
View
Default Level
3: Manage level
Parameters
Description
1-2
For VTY user interface, if you want to set the login authentication mode to none or password, you must
first verify that the SSH protocol is not supported by the user interface. Otherwise, your configuration
will fail. Refer to protocol inbound.
Examples
auto-execute command
Syntax
View
Default Level
3: Manage level
Parameters
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.
Use these two commands in the VTY user interface 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.
1-3
z The auto-execute command command may cause you unable to perform common configuration
in the user interface, so use it with caution.
z 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.
Examples
# Configure the telnet 10.110.100.1 command to be executed automatically after users log into VTY 0.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface vty 0
[Sysname-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
After the above configuration, when a user logs onto the device through VTY 0, the device automatically
executes the configured command and logs off the current user.
databits
Syntax
databits { 5 | 6 | 7 | 8 }
undo databits
View
Default Level
2: System level
Parameters
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.
The default data bits is 8.
1-4
H3C S5120-SI Switch Series only supports data bits 7 and 8. To establish the connection again, you
need to modify the configuration of the termination emulation utility running on your PC accordingly.
Examples
Syntax
View
Any view
Default Level
1: Monitor level
Parameter
None
Description
Use the display telnet client configuration command to display the source IP address or source
interface configured for the current device.
Example
# Display the source IP address or source interface configured for the current device.
<Sysname> display telnet client configuration
The source IP address is 1.1.1.1.
display user-interface
Syntax
View
Any view
1-5
Default Level
1: Monitor level
Parameters
Description
Use the display user-interface command to view information about the specified or all user interfaces.
When the summary keyword is absent, the command will display the type of the user interface, the
absolute or relative number, the speed, the user privilege level, the authentication mode and the
physical location.
When the summary keyword is present, the command will display all the number and type of user
interfaces under use and without use.
Examples
Filed Description
+ The information displayed is about the current user interface.
The information displayed is about the current user interface. And the
F
current 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
1-6
Filed Description
Modem Indicates whether or not a modem is used.
Privi The available command level
Auth The authentication mode
display users
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
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.
Examples
1-7
F : Current operation user work in async mode.
Field Description
+ The information displayed is about the current user interface.
The information is about the current user interface, and the current user interface
F
operates in asynchronous mode.
Idx The absolute user interface indexes
UI The relative user interface indexes.
Syntax
View
Any view
Parameter
None
Description
Use the display web users command to display information about web users.
Example
Table 1-3 Description on the fields of the display web users command
Field Description
UserID ID of a web user
1-8
Field Description
LinkCount Number of tasks that the web user runs
LoginTime Time when the web user logged in
LastTime Last time when the web user accessed the switch
escape-key
Syntax
View
Default Level
3: Manage level
Parameters
Description
Use the escape-key command to define a shortcut key for aborting tasks.
Use the undo escape-key command to restore the default shortcut key.
You can use a single character (or its corresponding ASCII code value in the range 0 to 127) or a string
of 1 to 3 characters to define a shortcut key. But in fact, only the first character functions as the shortcut
key. For example, if you enter an ASCII value 113, the system will use its corresponding character <q>
as the shortcut key; if you input the string q@c, the system will use the first letter <q> as the shortcut
key.
By default, you can use <Ctrl + C> to terminate a task. You can use the display current-configuration
command to verify the shortcut key you have defined.
Examples
1-9
Request time out
Enter <Q>, if the ping task is terminated and return to the current view, the configuration is correct.
<Sysname>
flow-control
Syntax
View
Default Level
2: System level
Parameters
Description
Using flow-control command, you can configure the flow control mode on AUX port. Using undo
flow-control command, you can restore the default flow control mode.
By default, the value is none. That is, no flow control will be performed.
Examples
1-10
free user-interface
Syntax
View
User view
Default Level
3: Manage level
Parameters
Description
Use the free user-interface command to clear a specified user interface. If you execute this command,
the corresponding user interface will be disconnected.
Note that the current user interface can not be cleared.
Examples
After you execute this command, user interface 1 will be disconnected. The user in it must log in again
to connect to the switch.
history-command max-size
Syntax
View
Default Level
2: System level
1-11
Parameters
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.
Examples
# Set the size of the history command buffer to 20 to enable it to store up to 20 commands.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] history-command max-size 20
idle-timeout
Syntax
View
Default Level
2: System level
Parameters
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 specified period.
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.
Examples
1-12
ip http enable
Syntax
ip http enable
undo ip http enable
View
System view
Parameter
None
Description
Example
lock
Syntax
lock
View
User view
Default Level
3: Manage level
Parameters
None
Description
Use the lock command to lock the current user interface to prevent unauthorized users from operating
the user interface.
With the execution of this command, the system prompts to enter and confirm the password (up to 16
characters), and then locks the user interface.
To cancel the lock, press the Enter key and enter the correct password.
1-13
By default, the system will not lock the current user interface automatically.
Examples
locked !
parity
Syntax
View
Default Level
2: System level
Parameters
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.
No check is performed by default.
1-14
H3C S5120-SI switch series supports the even, none, and odd check modes only. To establish the
connection again, you need to modify the configuration of the termination emulation utility running on
your PC accordingly.
Examples
protocol inbound
Syntax
View
Default Level
3: Manage level
Parameters
Description
Use the protocol inbound command to configure the user interface to support specified protocols.
Both Telnet and SSH protocols are supported by default.
Related command: user-interface vty.
If you want to configure the user interface to support SSH, to ensure a successful login, you must first
configure the authentication mode to scheme on the user interface. If you set the authentication mode
to password or none, the protocol inbound ssh command will fail. Refer to authentication-mode.
1-15
Examples
screen-length
Syntax
screen-length screen-length
undo screen-length
View
Default Level
2: System level
Parameters
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.
You can use the screen-length 0 command to disable the function to display information in pages.
Examples
# Set the number of lines the terminal screen can contain to 20.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] screen-length 20
send
Syntax
View
User view
Default Level
1: Monitor level
1-16
Parameters
Description
Use the send command to send messages to a specified user interface or all user interfaces.
Examples
***
***
***Message from vty0 to vty0
***
hello
<Sysname>
Syntax
View
Default Level
3: Manage level
Parameters
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.
1-17
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. Whether the password is in encrypted text or plain text depends on the
password string entered. Strings containing up to 16 characters (such as 123) are regarded as plain text
passwords and are converted to the corresponding 24-character encrypted password (such
as !TP<\*EMUHL,408`W7TH!Q!!). A encrypted password must contain 24 characters and must be 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.
By default, 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.
Examples
shell
Syntax
shell
undo shell
View
Default Level
3: Manage level
Parameters
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.
1-18
By default, terminal services are available in all user interfaces.
Note the following when using the undo shell command:
z This command is available in all user interfaces except the AUX user interface, because the AUX
port (also the Console) is exclusively used for configuring the switch.
z This command is unavailable in the current user interface.
z This command prompts for confirmation when being executed in any valid user interface.
Examples
# Log into user interface 0 and make terminal services unavailable in VTY 0 through VTY 4.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface vty 0 4
[Sysname-ui-vty0-4] undo shell
% Disable ui-vty0-4 , are you sure ? [Y/N]y
speed
Syntax
speed speed-value
undo speed
View
Default Level
2: System level
Parameters
speed-value: Transmission speed (in bps). This argument can be 300, 600, 1200, 2400, 4800, 9600,
19,200, 38,400, 57,600, 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.
After you use the speed command to configure the transmission speed of the AUX user interface, you
must change the corresponding configuration of the terminal emulation program running on the PC, to
keep the configuration consistent with that on the switch.
Examples
# Set the transmission speed of the AUX user interface to 9600 bps.
1-19
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] speed 9600
stopbits
Syntax
stopbits { 1 | 1.5 | 2 }
undo stopbits
View
Default Level
2: System level
Parameters
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.
By default, the stop bits is 1.
z The S5120-SI series do not support communication with a terminal emulation program with
stopbits set to 1.5.
z Changing the stop bits value of the switch to a value different from that of the terminal emulation
utility does not affect the communication between them.
Examples
1-20
sysname
Syntax
sysname string
undo sysname
View
System view
Default Level
2: System level
Parameters
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>.
Examples
telnet
Syntax
View
User view
Default Level
0: Visit level
Parameters
remote-system: IP address or host name of the remote system. The host name is a string of 1 to 20
characters, which can be specified using the ip host command.
port-number: TCP port number assigned to Telnet service on the remote system, in the range 0 to
65535.
ip-address: Source IP address of the packets sent by the Telnet client.
1-21
interface-type interface-number: Type and number of the interface through which the Telnet client sends
packets.
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>.
Related commands: display tcp status, ip host.
Examples
# Telnet to the switch with the host name of Sysname2 and IP address of 129.102.0.1 from the current
switch (with the host name of Sysname1).
<Sysname1> telnet 129.102.0.1
Trying 129.102.0.1 ...
Press CTRL+K to abort
Connected to 129.102.0.1 ...
**************************************************************************
* Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All rights reserved.*
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
**************************************************************************
<Sysname2>
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Use the telnet client source command to specify the source IP address or source interface for the
Telnet packets to be sent.
Use the undo telnet client source command to remove the source IP address or source interface
configured for Telnet packets.
By default, source IP address or source interface of the Telnet packets sent is not configured.
1-22
Examples
Syntax
View
System view
Default Level
3: Manage level
Parameters
None
Description
Use the telnet server enable command to make the switch to operate as a Telnet Server.
Use the undo telnet server enable command disable the switch from operating as a Telnet server.
By default, a switch does operate as a Telnet server.
Examples
terminal type
Syntax
View
1-23
Default Level
2: System level
Parameters
Description
Use the terminal type command to configure the type of terminal display .
Use the undo terminal type command to restore the default.
Currently, the system support two types of terminal display : ANSI and VT100.
By default, the terminal display type is ANSI. The device must use the same display type as the terminal.
If the terminal uses VT 100, the device should also use VT 100.
Examples
user-interface
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the user-interface command to enter one or more user interface views to perform configuration.
Examples
1-24
[Sysname-ui-vty0]
Syntax
View
Default Level
3: Manage level
Parameters
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 of level 3 are available to the users logging into the AUX user interface. The
commands of level 0 are available to the users logging into VTY user interfaces.
Commands fall into four command levels: visit, monitor, system, and manage, which are described as
follows:
z Visit level: Commands of this level are used to diagnose network and change the language mode
of user interface, such as the ping, tracert. The Telnet command is also of this level. Commands
of this level cannot be saved in configuration files.
z Monitor level: Commands of this level are used to maintain the system, to debug service problems,
and so on. The display and debugging command are of monitor level. Commands of this level
cannot be saved in configuration files.
z System level: Commands of this level are used to configure services. Commands concerning
routing and network layers are of system level. You can utilize network services by using these
commands.
z Manage level: Commands of 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 of administration level.
Examples
# Configure that commands of level 0 are available to the users logging into VTY 0.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface vty 0
[Sysname-ui-vty0] user privilege level 0
1-25
# You can verify the above configuration by Telnetting to VTY 0 and displaying the available commands,
as listed in the following.
<Sysname> ?
User view commands:
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 Undo a command or set to its default status
1-26
2 Commands for Controlling Login Users
Syntax
View
Default Level
2: System level
Parameters
Description
Examples
# Apply ACL 2000 to filter users Telnetting to the current switch (assuming that ACL 2,000 already
exists.)
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface vty 0 15
[Sysname-ui-vty0-15] acl 2000 inbound
2-1
free web-users
Syntax
View
User view
Parameter
Description
Use the free web-users command to disconnect a specified Web user or all Web users by force.
Example
ip http acl
Syntax
View
System view
Parameter
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.
Example
# Apply ACL 2000 to filter Web users (assuming that ACL 2,000 already exists.)
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ip http acl 2000
2-2
Table of Contents
i
1 Ethernet Port Configuration Commands
Syntax
View
Default Level
2: System level
Parameters
ratio: Maximum percentage of broadcast traffic to the total transmission capability of an Ethernet port.
The smaller the ratio, the less broadcast traffic is allowed to pass through the interface. This argument
ranges from 1 to 100. The system default is 100.
pps max-pps: Specifies the maximum number of broadcast packets that can be forwarded on an
Ethernet port per second, in the range 1 to 1488100 (in pps, representing packets per second).
kbps max-bps: Specifies the maximum number of broadcast kilobits that can be forwarded on an
Ethernet port per second, in the range 1 to 1024000 (in kbps, representing kilobits per second).
Description
Use the broadcast-suppression command to set a broadcast traffic threshold on one or multiple
Ethernet ports.
Use the undo broadcast-suppression command to restore the default.
By default, broadcast traffic is not suppressed.
If you execute this command in Ethernet port view, the configuration takes effect only on the current
interface. If you execute this command in port-group view, the configuration takes effect on all the ports
in the port group.
When broadcast traffic exceeds the broadcast traffic threshold, the system begins to discard broadcast
packets until the broadcast traffic drops below the threshold to ensure operation of network services.
1-1
z If you set different suppression ratios in Ethernet port view or port-group view for multiple times, the
latest configuration takes effect.
z Do not use the broadcast-suppression command along with the storm-constrain command.
Otherwise, the broadcast storm suppression ratio configured may get invalid.
Examples
# For Ethernet port GigabitEthernet 1/0/1, allow broadcast traffic equivalent to 20% of the total
transmission capability of GigabitEthernet 1/0/1 to pass.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] broadcast-suppression 20
# For all the ports of the manual port group named group1, allow broadcast traffic equivalent to 20% of
the total transmission capability of each port to pass and suppress excessive broadcast packets.
<Sysname> system-view
[Sysname] port-group manual group1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/2
[Sysname-port-group-manual-group1] broadcast-suppression 20
description
Syntax
description text
undo description
View
Default Level
2: System level
Parameters
text: Description of an Ethernet port, a string of 1 to 80 characters. Currently, the device supports the
following types of characters or symbols: standard English characters (numbers and case-sensitive
letters), special English characters, spaces, and other characters or symbols that conform to the
Unicode standard.
1-2
z A port description can be the mixture of English characters and other Unicode characters. The
mixed description cannot exceed the specified length.
z To use a type of Unicode characters or symbols in a port description, you need to install the
corresponding Input Method Editor (IME) and log in to the device through remote login software
that supports this character type.
z Each Unicode character or symbol (non-English characters) takes the space of two regular
characters. When the length of a description string reaches or exceeds the maximum line width on
the terminal software, the software starts a new line, possibly breaking a Unicode character into
two. As a result, garbled characters may be displayed at the end of a line.
Description
Use the description command to set the description string of the current interface.
Use the undo description command to restore the default.
By default, the description of an interface is the interface name followed by the “Interface” string,
GigabitEthernet1/0/1 Interface for example.
Related commands: display interface.
Examples
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
1-3
exclude: Displays the lines that do not match the regular expression.
include: Displays the lines that match the regular expression.
regular-expression: Regular expression, a string of 1 to 256 characters. Note that this argument is
case-sensitive.
Description
Use the display brief interface command to display brief interface information.
z If neither interface type nor interface number is specified, all interface information will be displayed.
z If only interface type is specified, then only information of this particular type of interface will be
displayed.
z If both interface type and interface number are specified, then only information of the specified
interface will be displayed.
Related commands: interface.
Examples
1-4
Loop0 UP UP(spoofing) LOOP 5.5.5.5
NULL0 UP UP(spoofing) NULL --
Vlan999 UP UP ETHERNET 10.1.1.1
Field Description
Interface Abbreviated interface name
Link Interface physical link state, which can be up or down
Protocol-link Interface protocol link state, which can be up or down
Protocol type Interface protocol type
Speed Interface rate, in bps
Duplex mode, which can be half (half duplex), full (full duplex), or auto
Duplex
(auto-negotiation).
PVID Default VLAN ID
display loopback-detection
Syntax
display loopback-detection
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display loopback-detection command to display loopback detection information on a port.
1-5
If loopback detection is already enabled, this command will also display the detection interval and
information on the ports currently detected with a loopback.
Examples
display interface
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display interface command to display the current state of a specified interface and related
information.
z If neither interface type nor interface number is specified, all interface information will be displayed.
z If only interface type is specified, then only information of this particular type of interface will be
displayed.
z If both interface type and interface number are specified, then only information of the specified
interface will be displayed.
Related commands: interface.
Examples
# Display the current state of Layer 2 interface GigabitEthernet 1/0/1 and related information.
<Sysname> display interface gigabitethernet1/0/1
GigabitEthernet1/0/1 current state: DOWN
IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 000f-e2f9-f3c2
Description: GigabitEthernet1/0/1 Interface
Loopback is not set
Media type is twisted pair, Port hardware type is 1000_BASE_T
Unknown-speed mode, unknown-duplex mode
Link speed type is autonegotiation, link duplex type is autonegotiation
Flow-control is not enabled
1-6
The Maximum Frame Length is 10240
Broadcast MAX-ratio: 100%
Unicast MAX-ratio: 100%
Multicast MAX-ratio: 100%
PVID: 1
Mdi type: auto
Port link-type: access
Tagged VLAN ID : none
Untagged VLAN ID : 1
Port priority: 0
Peak value of input: 0 bytes/sec, at 00-00-00 00:00:00
Peak value of output: 0 bytes/sec, at 00-00-00 00:00:00
Last 300 seconds input: 0 packets/sec 0 bytes/sec -%
Last 300 seconds output: 0 packets/sec 0 bytes/sec -%
Input (total): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts
Input (normal): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts
Input: 0 input errors, 0 runts, 0 giants, 0 throttles
0 CRC, 0 frame, 0 overruns, 0 aborts
0 ignored, 0 parity errors
Output (total): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Output (normal): 0 packets, 0 bytes
0 unicasts, 0 broadcasts, 0 multicasts, 0 pauses
Output: 0 output errors, 0 underruns, 0 buffer failures
0 aborts, 0 deferred, 0 collisions, 0 late collisions
0 lost carrier, 0 no carrier
Field Description
GigabitEthernet1/0/1 current state Current physical link state of the Ethernet port
IP Packet Frame Type Frame type of the Ethernet port
Description Description of the interface
Unknown-speed mode, in which mode speed is negotiated
Unknown-speed mode
between the current host and the peer.
Unknown-duplex mode, in which mode speed is negotiated
unknown-duplex mode
between the current host and the peer.
The Maximum Frame Length The maximum frame length allowed on an interface
Broadcast storm suppression ratio (the maximum ratio of
Broadcast MAX-ratio allowed number of broadcast packets to overall traffic through
an interface)
Unicast storm suppression ratio (the maximum ratio of allowed
Unicast MAX-ratio number of unknown unicast packets to overall traffic over an
interface)
1-7
Field Description
Multicast storm suppression ratio (the maximum ratio of
Multicast MAX-ratio allowed number of multicast packets to overall traffic through an
interface)
PVID Default VLAN ID
1-8
Field Description
Total number of illegal packets received, including:
z Fragment frames: Frames that were shorter than 64 bytes
(with an integral or non-integral length) and contained
checksum errors
z Jabber frames: Frames that were longer than the maximum
frame length supported on the Ethernet port and contained
checksum errors (the frame lengths in bytes may or may not
be integers). For an Ethernet port that permits jumbo
frames, jabber frames refer to frames that are longer than
10236 bytes (without VLAN tags) or 10240 bytes (with VLAN
tags) and contain checksum errors; for an Ethernet port that
forbids jumbo frames, jabber frames refer to frames that are
longer than 1536 bytes (without VLAN tags) or 1540 bytes
aborts (with VLAN tags) and contain checksum errors.
z Fragment frames: Frames that were shorter than 64 bytes
(with an integral or non-integral length) and contained
checksum errors
z Jabber frames: Frames that were longer than 1518 or 1522
bytes and contained checksum errors (the frame lengths in
bytes may or may not be integers)
z Symbol error frames: Frames that contained at least one
undefined symbol
z Unknown operation code frames: Frames that were MAC
control frames but not pause frames
z Length error frames: Frames whose 802.3 length fields did
not match the actual frame lengths (46 bytes to 1500 bytes)
Number of received packets ignored by the interface because
ignored
the interface hardware ran low on internal buffers
1-9
Field Description
Number of times frames were delayed due to Ethernet
collisions
collisions detected during the transmission
Number of times frames were delayed due to the detection of
late collisions collisions after the first 512 bits of the frames were already on
the network
Number of times the carrier was lost during transmission. This
lost carrier
counter applies to serial WAN interfaces.
Number of times the carrier was not present in the
no carrier
transmission. This counter applies to serial WAN interfaces.
Syntax
View
Any view
Default Level
2: System level
Parameters
Description
Use the display port-group manual command to display the information about a manual port group or
all the manual port groups.
z If you provide the port-group-name argument, this command displays the details for a specified
manual port group, including its name and the Ethernet port ports included.
z If you provide the all keyword, this command displays the details for all manual port groups,
including their names and the Ethernet port ports included.
z Absence of parameters indicates that the names of all the port groups will be displayed.
Examples
1-10
Member of group2:
None
Field Description
Member of group Member of the manual port group
display storm-constrain
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
broadcast: Displays the information about storm constrain for broadcast packets.
multicast: Displays the information about storm constrain for multicast packets.
unicast: Displays the information about storm constrain for unicast packets.
interface interface-type interface-number: Specifies an interface by its type and number.
Description
Use the display storm-constrain command to display the information about storm constrain.
If you provide no argument or keyword, this command displays the information about storm constrain
for all types of packets on all the interfaces.
Examples
# Display the information about storm constrain for all types of packets on all the interfaces.
<Sysname> display storm-constrain
1-11
Table 1-4 display storm-constrain command output description
Field Description
Flow Statistic Interval Interval for generating storm constrain statistics
PortName Abbreviated port name
Type of the packets for which storm constrain function is enabled,
StormType which can be broadcast (for broadcast packets), multicast (for
multicast packets), and unicast (for unicast packets).
LowerLimit Lower threshold (in pps, kbps or percentage)
UpperLimit Upper threshold (in pps, kbps or percentage)
Action to be taken when the upper threshold is reached, which can be
CtrMode
block, shutdown, and N/A.
Interface state, which can be normal (indicating the interface operates
Status
properly), control (indicating the interface is blocked or shut down).
State of trap messages sending. “on” indicates trap message sending
Trap
is enabled; “off” indicates trap message sending is disabled.
State of log sending. “on” indicates log sending is enabled; “off”
Log
indicates log sending is disabled.
duplex
Syntax
View
Default Level
2: System level
Parameters
Description
Use the duplex command to configure the duplex mode for an Ethernet port.
Use the undo duplex command to restore the duplex mode for an Ethernet port to the default.
By default, the duplex mode for an Ethernet port is auto.
Related commands: speed.
1-12
Examples
flow-control
Syntax
flow-control
undo flow-control
View
Default Level
2: System level
Parameters
None
Description
The flow control function takes effect on the local Ethernet port only when it is enabled on both the local
and peer devices.
Examples
flow-interval
Syntax
flow-interval interval
undo flow-interval
1-13
View
Default Level
2: System level
Parameters
interval: Interval at which the interface collects statistics. It ranges from 5 to 300 seconds and must be a
multiple of 5. The default value is 300 seconds.
Description
Use the flow-interval command to configure the time interval for collecting interface statistics.
Use the undo flow-interval command to restore the default interval.
Examples
# Set the time interval for collecting interface statistics to 100 seconds.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] flow-interval 100
group-member
Syntax
group-member interface-list
undo group-member interface-list
View
Default Level
2: System level
Parameters
Description
Use the group-member command to assign an Ethernet port or a list of Ethernet ports to the port
group.
Use the undo group-member command to remove an Ethernet port or a list of Ethernet ports from the
port group.
By default, there is no Ethernet port in a port group.
Examples
1-14
<Sysname> system-view
[Sysname] port-group manual group1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/1
interface
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Examples
jumboframe enable
Syntax
jumboframe enable
undo jumboframe enable
View
System view
Default Level
2: System level
Parameters
None
Description
Use the jumboframe enable command to allow jumbo frames with 10240 bytes to pass through an
Ethernet port.
1-15
Use the undo jumboframe enable command to prevent jumbo frames from passing through an
Ethernet port.
By default, the device allows frames no larger than 10240 bytes to pass through an Ethernet port.
Examples
loopback
Syntax
View
Default Level
2: System level
Parameters
Description
z Ethernet port loopback testing should be enabled while testing certain functionalities, such as
during the initial identification of any network failure.
z While enabled, Ethernet port loopback testing will work in full-duplex mode. The interface will return
to its original state upon completion of the loopback testing.
z Loopback testing is a one-time operation, and is not recorded in the configuration file.
Examples
1-16
loopback-detection control enable
Syntax
View
Default Level
2: System level
Parameters
None
Description
Use the loopback-detection control enable command to enable loopback detection for a trunk port or
hybrid port.
Use the undo loopback-detection control enable command to restore the default.
By default, loopback detection for a trunk port or hybrid port is disabled.
z With loopback detection enabled, when the device detects a loop on a port, the device puts the port
in control mode. In this mode, inbound packets on the port are all discarded, while outbound
packets on the port are forwarded normally. Meanwhile, the device sends trap messages to the
terminal, and deletes the corresponding MAC address forwarding entry.
z With loopback detection disabled, when the device detects a loop on a port, it only sends a trap
message to the terminal. In the mean time, the port still works normally.
Note that this command is not applicable to an access port as loopback detection is enabled on it by
default.
Examples
loopback-detection enable
Syntax
loopback-detection enable
undo loopback-detection enable
1-17
View
Default Level
2: System level
Parameters
None
Description
Use the loopback-detection enable command to enable loopback detection globally or on a specified
port.
Use the undo loopback-detection enable command to disable loopback detection globally or on a
specified port.
By default, loopback detection is disabled for an access, trunk, or hybrid port.
z When a loop is detected on an access port, the device puts the port in control mode. In this mode,
inbound packets on the port are all discarded, while outbound packets on the port are forwarded
normally. Meanwhile, the device sends trap messages to the terminal, and deletes the
corresponding MAC address forwarding entry.
z When a loop is detected on a trunk port or a hybrid port, the device sends a trap message to the
terminal. If loopback detection control is enabled on the port, the device places the port in control
mode and discards all inbound packets on the port while normally forwarding outbound packets on
it. Meanwhile, the device sends trap messages to the terminal, and deletes the corresponding MAC
address forwarding entry.
z Loopback detection on a given port is enabled only after the loopback-detection enable
command has been configured in both system view and interface view of the port.
z Loopback detection on all ports will be disabled after you configure the undo loopback-detection
enable command in system view.
Examples
loopback-detection interval-time
Syntax
View
System view
Default Level
2: System level
Parameters
time: Time interval for performing port loopback detection, in the range 5 to 300 (in seconds).
Description
Use the loopback-detection interval-time command to configure time interval for performing port
loopback detection.
Use the undo loopback-detection interval-time command to restore the default time interval for port
loopback detection, which is 30 seconds.
Related commands: display loopback-detection.
Examples
# Set the time interval for performing port loopback detection to 10 seconds.
<Sysname> system-view
[Sysname] loopback-detection interval-time 10
Syntax
View
Default Level
2: System level
Parameters
None
Description
Use the loopback-detection per-vlan enable command to enable loopback detection in all VLANs
with trunk ports or hybrid ports.
Use the undo loopback-detection per-vlan enable command to enable loopback detection in the
default VLAN with trunk ports or hybrid ports.
By default, loopback detection is only enabled in the default VLAN(s) with trunk ports or hybrid ports.
Note that the loopback-detection per-vlan enable command is not applicable to access ports.
1-19
Examples
# Enable loopback detection in all the VLANs to which the hybrid port GigabitEthernet 1/0/1 belongs.
<Sysname> system-view
[Sysname] loopback-detection enable
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] loopback-detection enable
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] loopback-detection per-vlan enable
mdi
Syntax
View
Default Level
2: System level
Parameters
Description
Use the mdi command to configure the MDI mode for an Ethernet port.
Use the undo mdi command to restore the system default.
By default, the MDI mode of an Ethernet port is auto, that is, the Ethernet port determines the physical
pin roles (transmit or receive) through negotiation.
Examples
1-20
multicast-suppression
Syntax
View
Default Level
2: System level
Parameters
ratio: Maximum percentage of multicast traffic to the total transmission capability of an Ethernet port, in
the range 1 to 100. The smaller the ratio is, the less multicast traffic is allowed to pass through the
interface.
pps max-pps: Specifies the maximum number of multicast packets allowed on an Ethernet port per
second. The max-pps argument ranges from 1 to 1488100 (in pps, representing packets per second).
kbps max-bps: Specifies the maximum number of multicast kilobits that can be forwarded on an
Ethernet port per second The max-bps argument ranges from 1 to 1024000 (in kbps, representing
kilobits per second).
Description
z If you set different suppression ratios in Ethernet port view or port-group view for multiple times, the
latest configuration takes effect.
z Do not use the multicast-suppression command along with the storm-constrain command.
Otherwise, the multicast storm suppression ratio configured may get invalid.
1-21
Examples
# For Ethernet port GigabitEthernet 1/0/1, allow multicast traffic equivalent to 20% of the total
transmission capability of GigabitEthernet 1/0/1 to pass.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/1] multicast-suppression 20
# For all the ports of the manual port group group1, allow multicast traffic equivalent to 20% of the total
transmission capability of each port to pass.
<Sysname> system-view
[Sysname] port-group manual group1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/2
[Sysname-port-group-manual-group1] multicast-suppression 20
port auto-power-down
Syntax
port auto-power-down
undo port auto-power-down
View
Default Level
2: System level
Parameters
None
Description
Use the port auto-power-down command to enable auto power down on an Ethernet port.
Use the undo port auto-power-down to restore the default.
By default, auto power down is not enabled on an Ethernet port.
Examples
# Enable auto power down on all member ports of manual port group group1.
<Sysname> system-view
[Sysname] port-group manual group1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/2
[Sysname-port-group-manual-group1] port auto-power-down
1-22
port-group manual
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the port-group manual command to create a port group and enter port group view.
Use the undo port-group manual command to remove a port group.
By default, no manual port group is created.
Examples
Syntax
View
Default Level
2: System level
Parameters
None
Description
Use the port bridge enable command to enable bridging on an Ethernet port. When bridging is
enabled on an Ethernet port, the device forwards packets received on the interface through the
receiving interface itself when both the following conditions are met:
1-23
z The destination MAC addresses of the received packets are already in the MAC address table of
the device.
z The egress interfaces in the corresponding MAC address table entries are the receiving interface.
Use the undo port bridge enable command to disable bridging on an Ethernet port.
By default, bridging is not enabled on an Ethernet port.
Examples
Syntax
View
User view
Default Level
2: System level
Parameters
Description
Use the reset counters interface command to clear the statistics of an interface.
Before sampling network traffic within a specific period of time on an interface, you need to clear the
existing statistics.
z If neither interface type nor interface number is specified, this command clears the statistics of all
the interfaces.
z If only the interface type is specified, this command clears the statistics of the interfaces that are of
the interface type specified.
z If both the interface type and interface number are specified, this command clears the statistics of
the specified interface.
Examples
1-24
shutdown
Syntax
shutdown
undo shutdown
View
Default Level
2: System level
Parameters
None
Description
Examples
speed
Syntax
View
Default Level
2: System level
1-25
Parameters
10: Specifies the interface rate as 10 Mbps. The optical interface of a SFP port does not support the 10
keyword.
100: Specifies the interface rate as 100 Mbps. The optical interface of a SFP port does not support the
100 keyword.
1000: Specifies the interface rate as 1,000 Mbps.
auto: Specifies to determine the interface rate through auto-negotiation.
Description
Examples
# Configure the interface rate as 100 Mbps for interface GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] speed 100
speed auto
Syntax
View
Default Level
2: System level
Parameters
Description
Use the speed auto command to configure the auto-negotiation rate range of the current Ethernet port.
1-26
Use the undo speed command to restore the default.
The default value of the command varies with your device models.
If you repeatedly use the speed command and the speed auto command to configure the rate of an
interface, only the latest configuration takes effect. For example, if you configure speed 100 after
configuring speed auto 100 1000 on an interface, the rate is 100 Mbps by force, with no negotiation
performed between the interface and the peer end; if you configure speed auto 100 1000 after
configuring speed 100 on the interface, the rate through negotiation can be either 100 Mbps or 1000
Mbps only.
Note that:
z If the auto negotiation rate range specified on the local port and that on the peer do not overlap,
for example, 10 Mbps and 100 Mbps are specified on one end while 1000 Mbps is specified on the
other, the auto negotiation of interface rate will fail.
z If the auto negotiation rate range specified on the local port and that on the peer overlap, for
example, 10 Mbps and 100 Mbps are specified on one end while 100 Mbps and 1000 Mbps are
specified on the other, the result of the interface rate auto negotiation is the overlapped part, that
is, 100 Mbps in the example.
z If the auto negotiation rate range specified on the local port and that on the peer are the same, for
example, 100 Mbps and 1000 Mbps are specified on both ends, the result of the interface rate
auto negotiation is the larger value, that is, 1000 Mbps in the example.
z This function is available for auto-negotiation-capable Gigabit Layer-2 Ethernet electrical ports
only..
z If you repeatedly use the speed and the speed auto commands to configure the transmission rate
on an port, only the latest configuration takes effect.
Examples
# Set the auto-negotiation rate of interface GigabitEthernet 1/0/1 to 10 Mbps or 1000 Mbps.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] speed auto 10 1000
storm-constrain
Syntax
1-27
View
Default Level
2: System level
Parameters
all: Disables the storm constrain function for all types of packets (that is, unicast packets, multicast
packets, and broadcast packets).
broadcast: Enables/Disables the storm constrain function for broadcast packets.
multicast: Enables/Disables the storm constrain function for multicast packets.
unicast: Enables/Disables the storm constrain function for unicast packets.
pps: Specifies the storm constrain threshold in packets.
max-values: Upper threshold to be set, in pps.
min-values: Lower threshold to be set, in pps, this value ranges from 1 to max-values.
Description
Use the storm-constrain command to enable the storm constrain function for specific type of packets
and set the upper and lower thresholds.
Use the undo storm-constrain command to disable the storm constrain function for specific type of
packets.
By default, the storm constrain function is not enabled.
z Do not use the storm-constrain command along with the unicast-suppression command, the
multicast-suppression command, or the broadcast-suppression command. Otherwise, traffics
may be suppressed in an unpredictable way.
z An upper threshold cannot be less than the corresponding lower threshold. Besides, do not
configure the two thresholds as the same value.
Examples
# Enable the storm constrain function for unicast packets on GigabitEthernet 1/0/1, setting the upper
and lower threshold to 200 pps and 150 pps.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] storm-constrain unicast pps 200 150
1-28
storm-constrain control
Syntax
View
Default Level
2: System level
Parameters
block: Blocks the traffic of a specific type on a port when the traffic detected exceeds the upper
threshold.
shutdown: Shuts down a port when a type of traffic exceeds the corresponding upper threshold. A port
shut down by the storm constrain function stops forwarding all types of packets.
Description
Use the storm-constrain control command to set the action to be taken when a type of traffic exceeds
the corresponding upper threshold.
Use the undo storm-constrain control command to restore the default.
By default, no action is taken when a type of traffic exceeds the corresponding threshold.
Examples
# Configure to block interface GigabitEthernet 1/0/1 when a type of traffic reaching it exceeds the
corresponding upper threshold.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] storm-constrain control block
Syntax
View
Default Level
2: System level
Parameters
None
1-29
Description
Use the storm-constrain enable log command to enable log sending. With log sending enabled, the
system sends logs when traffic reaching a port exceeds the corresponding threshold or when the traffic
drops down below the lower threshold after exceeding the upper threshold.
Use the undo storm-constrain enable log command to disable log sending.
By default, log sending is enabled.
Examples
Syntax
View
Default Level
2: System level
Parameters
None
Description
Use the storm-constrain enable trap command to enable trap message sending. With trap message
sending enabled, the system sends trap messages when traffic reaching a port exceeds the
corresponding threshold or the traffic drops down below the lower threshold after exceeding the upper
threshold.
Use the undo storm-constrain enable trap command to disable trap message sending.
By default, trap message sending is enabled.
Examples
1-30
storm-constrain interval
Syntax
View
System view
Default Level
2: System level
Parameters
seconds: Interval for generating traffic statistics, in the range 1 to 300 (in seconds).
Description
Use the storm-constrain interval command to set the interval for generating traffic statistics.
Use the undo storm-constrain interval command to restore the default.
By default, the interval for generating traffic statistics is 10 seconds.
z The interval set by the storm-constrain interval command is specifically for the storm constrain
function. It is different form that set by the flow-interval command.
z For network stability consideration, configure the interval for generating traffic statistics to a value
that is not shorter than the default.
Examples
unicast-suppression
Syntax
View
Default Level
2: System level
1-31
Parameters
ratio: Maximum percentage of unicast traffic to the total transmission capability of an Ethernet port, in
the range of 1 to 100. The smaller the ratio is, the less unicast traffic is allowed through the interface.
pps max-pps: Specifies the maximum number of unknown unicast packets passing through an Ethernet
port per second. The max-pps argument ranges from 1 to 1488100 (in pps, representing packets per
second).
kbps max-bps: Specifies the maximum number of unknown unicast kilobits passing through an
Ethernet port per second, The max-bps argument ranges from 1 to 1024000 (in kbps, representing
kilobits per second).
Description
z If you set different suppression ratios in Ethernet port view or port-group view repeatedly, the latest
configuration takes effect.
z Do not use the unicast-suppression command along with the storm-constrain command.
Otherwise, the unicast storm suppression ratio configured may get invalid.
Examples
# For Ethernet port GigabitEthernet 1/0/1, allow unknown unicast traffic equivalent to 20% of the total
transmission capability of the interface to pass and suppress the excessive unknown unicast packets.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] unicast-suppression 20
# For all the ports of the manual port group group1, allow unknown unicast traffic equivalent to 20% of
the total transmission capability of each port to pass and suppress excessive unknown unicast packets.
<Sysname> system-view
[Sysname] port-group manual group1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/1
[Sysname-port-group-manual-group1] group-member gigabitethernet 1/0/2
[Sysname-port-group-manual-group1] unicast-suppression 20
1-32
virtual-cable-test
Syntax
virtual-cable-test
View
Default Level
2: System level
Parameters
None
Description
Use the virtual-cable-test command to test the cable connected to the Ethernet port once and to
display the testing result. The tested items include:
Note that:
z When the cable is functioning properly, the cable length in the test result represents the total cable
length;
z When the cable is not functioning properly, the cable length in the test result represents the length
from the current interface to the failed position.
z The optical interface of a SFP port does not support this command.
z A link in the up state goes down and then up automatically if you execute this command on one of
the Ethernet ports forming the link.
z The test result is for your information only. The maximum error in the tested cable length is 5 m. A
hyphen “-” indicates that the corresponding test item is not supported.
Examples
# Enable the virtual cable test for the interface GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] virtual-cable-test
Cable status: normal, 1 metres
Pair Impedance mismatch: -
Pair skew: - ns
Pair swap: -
Pair polarity: -
Insertion loss: - db
Return loss: - db
1-33
Near-end crosstalk: - db
1-34
Table of Contents
i
1 Loopback Interface and Null Interface
Configuration Commands
Syntax
description text
undo description
View
Default Level
2: System level
Parameters
text: Description of the interface, a string of 1 to 80 characters. Currently, the device supports the
following types of characters or symbols: standard English characters (numbers and case-sensitive
letters), special English characters, spaces, and other characters or symbols that conform to the
Unicode standard.
z A port description can be the mixture of English characters and other Unicode characters. The
mixed description cannot exceed the specified length.
z To use a type of Unicode characters or symbols in a port description, you need to install the
corresponding Input Method Editor (IME) and log in to the device through remote login software
that supports this character type.
z Each Unicode character or symbol (non-English characters) takes the space of two regular
characters. When the length of a description string reaches or exceeds the maximum line width on
the terminal software, the software starts a new line, possibly breaking a Unicode character into
two parts. As a result, garbled characters may be displayed at the end of a line.
Description
Use the description command to set a description for the current interface.
Use the undo description command to restore the default.
1-1
By default, the description of an interface is the interface name followed by the word interface,
Loopback1 interface for example.
Related commands: display interface.
Examples
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
interface-number: Loopback interface number, which can be the number of any existing Loopback
interface.
Description
Use the display interface loopback command to display the information about a Loopback interface. If
you do not specify the interface-number argument, this command will display the information about all
the existing Loopback interfaces.
Related commands: interface loopback.
Examples
1-2
Table 1-1 display interface loopback command output description
Field Description
current state Physical state of the interface (up or administratively down)
Line protocol current state State of the data link layer protocol: up
Description Description string of the interface
The Maximum Transmit Unit Maximum transmit unit (MTU) of the interface
Internet protocol processing State of the network layer protocol (enabled or disabled)
Physical is Loopback Physical type of the interface is Loopback
Because the S5120-SI switch series do not count the average input/output rate or input/output packets
of a loopback interface, these fields are displayed as “0” in the display interface loopback command
output.
Syntax
1-3
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display interface null command to display the information about the null interface. As Null 0
interface is the only null interface on a device, this command displays the information about Null 0
interface even if you do not specify the 0 keyword.
Related commands: interface null.
Examples
Refer to Table 1-1 for the description on the fields in the display interface null command output.
Because the S5120-SI switch series do not count the average input/output rate or input/output packets
of interface Null 0, these fields are displayed as “0” in the display interface null command output.
interface loopback
Syntax
1-4
View
System view
Default Level
2: System level
Parameters
Description
Use the interface loopback command to create a Loopback interface or enter Loopback interface
view.
Use the undo interface loopback command to remove a Loopback interface.
Related commands: display interface loopback.
Examples
interface null
Syntax
interface null 0
View
System view
Default Level
2: System level
Parameters
Description
Examples
1-5
[Sysname-NULL0]
Syntax
View
User view
Default Level
2: System level
Parameters
Description
Use the reset counters interface command to clear the statistics of a logical interface.
Before collecting traffic statistics within a specific period of time on a logical interface, you need to clear
the existing statistics.
z If neither the interface type nor the interface number is specified, this command clears the statistics
on all interfaces in the system.
z If only the interface type is specified, this command clears the statistics on logical interfaces of the
specified interface type.
z If both the interface type and interface number are specified, this command clears the statistics on
the specified logical interface.
Examples
shutdown
Syntax
shutdown
undo shutdown
View
Default Level
2: System level
Parameters
None
1-6
Description
Use the shutdown command to shut down the current loopback interface.
Use the undo shutdown command to bring up the current loopback interface.
By default, a loopback interface is up.
Examples
1-7
Table of Contents
i
1 Ethernet Link Aggregation Configuration
Commands
Syntax
description text
undo description
View
Default Level
2: System level
Parameters
Description
Use the description command to configure a description for an interface. You can include information
such as the purpose of the interface for the ease of management.
Use the undo description command to restore the default.
By default, the description of an interface is interface-name Interface. For example, the default
description of Bridge-Aggregation1 is Bridge-Aggregation1 Interface.
Examples
# Set the description of Layer 2 aggregate interface Bridge-Aggregation 1 to connect to the lab.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] description connect to the lab
Syntax
View
Any view
1-1
Default Level
1: Monitor level
Parameters
None
Description
Use the display lacp system-id command to display the system ID of the local system.
The system ID comprises the system LACP priority and the system MAC address.
You can use the lacp system-priority command to change the LACP priority of the local system. When
you do that, the LACP priority value you specify in the command is in decimal format. However, it is
displayed as a hexadecimal value with the display lacp system-id command.
Related commands: lacp system-priority.
Examples
Field Description
The local system ID, which comprises the LACP system priority
Actor System ID: 0x8000,
(0x8000 in this sample output) and the system MAC address
0000-fc00-6504
(0000-fc00-6504 in this sample output).
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
interface-list: Link aggregation member port list, in the form of interface-type interface-number [ to
interface-type interface-number ], where interface-type interface-number indicates port type and port
number.
Description
Use the display link-aggregation member-port command to display the detailed link aggregation
information on the specified member port(s) or all member ports if no interface is specified.
1-2
For a member port in a static aggregation group, only its port number and operational key are displayed,
because it is not aware of the information of the partner.
Examples
# Display the detailed link aggregation information of GigabitEthernet 1/0/1, a member port of a static
aggregation group.
<Sysname> display link-aggregation member-port gigabitEthernet1/0/1
GigabitEthernet1/0/1:
Aggregation Interface: Bridge-Aggregation1
Port Number: 1
Oper-Key: 1
# Display the detailed link aggregation information of GigabitEthernet 1/0/2, a member port of a
dynamic aggregation group.
<Sysname> display link-aggregation member-port gigabitEthernet1/0/2
GigabitEthernet1/0/2:
Aggregation Interface: Bridge-Aggregation10
Local:
Port Number: 2
Port Priority: 32768
Oper-Key: 2
Flag: {ACDEF}
Remote:
System ID: 0x8000, 000f-e267-6c6a
Port Number: 26
Port Priority: 32768
Oper-Key: 2
Flag: {ACDEF}
Received LACP Packets: 5 packet(s)
Illegal: 0 packet(s)
Sent LACP Packets: 7 packet(s)
1-3
Table 1-2 display link-aggregation member-port command output description
Field Description
One-octet LACP state flags field. From the least to the most significant
bit, they are represented by A through H as follows:
z A indicates whether LACP is enabled. 1 for enabled and 0 for
disabled.
z B indicates the timeout control value. 1 for short timeout, and 0 for
long timeout.
z C indicates whether the link is considered as aggregatable by the
sending system. 1 for true, and 0 for false.
z D indicates whether the link is considered as synchronized by the
sending system. 1 for true, and 0 for false.
Flags z E indicates whether the sending system considers that collection of
incoming frames is enabled on the link. 1 for true and 0 for false.
z F indicates whether the sending system considers that distribution of
outgoing frames is enabled on the link. 1 for true and 0 for false.
z G indicates whether the receive state machine of the sending system
is using default operational partner information. 1 for true and 0 for
false.
z H indicates whether the receive state machine of the sending system
is in the expired state. 1 for true and 0 for false.
If a flag bit is set to 1, the corresponding English letter that otherwise is
not output is displayed.
Aggregation Interface Aggregate interface to which the current member port belongs
Local Information about the local end
Syntax
View
Any view
Default Level
1: Monitor level
1-4
Parameters
None
Description
Use the display link-aggregation summary command to display the summary information of all
aggregation groups.
You may find that information about the remote system for a static link aggregation group is either
displayed as none or not displayed at all. This is normal because this type of aggregation group is not
aware of its partner.
Examples
Field Description
Aggregate interface type:
Aggregation Interface Type z BAGG for Layer 2 aggregate interface
z RAGG for Layer 3 aggregate interface
Aggregation group type:
Aggregation Mode z S for static link aggregation
z D for dynamic aggregation
Loadsharing type:
Loadsharing Type z Shar for load sharing
z NonS for non-load sharing
Local system ID, which comprises the system LACP priority
Actor System ID
and the system MAC address
AGG Interface Type and number of the aggregate interface
AGG Mode Aggregation group type
System ID of the partner, which comprises the system LACP
Partner ID
priority and the system MAC address
Select Ports Total number of selected ports
Unselect Ports Total number of unselected ports
1-5
Field Description
Share Type Load sharing type
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
bridge-aggregation: Displays detailed information about the Layer 2 aggregate groups corresponding
to Layer 2 aggregate interfaces.
interface-number: Aggregate interface number. Note that the aggregate interface you specify must
already exist.
Description
Use the display link-aggregation verbose command to display detailed information about the
aggregation groups corresponding to the aggregate interfaces.
Note that:
z To display the information of a specific Layer 2 aggregate group, use the display link-aggregation
verbose bridge-aggregation interface-number command.
z To display the information of all Layer 2 aggregate groups, use the display link-aggregation
verbose bridge-aggregation command.
z To display the information of all aggregate groups, use the display link-aggregation verbose
command.
z The bridge-aggregation keyword becomes available only after you create Layer 2 aggregate
interfaces on the device.
Examples
# Display the detailed information of the aggregation group corresponding to Layer 2 aggregate
interface Bridge-Aggregation 10.
<Sysname> display link-aggregation verbose bridge-aggregation 10
1-6
Aggregation Mode: Dynamic
Loadsharing Type: Shar
System ID: 0x8000, 000f-e267-6c6a
Local:
Port Status Priority Oper-Key Flag
-------------------------------------------------------------------------------
GE1/0/2 S 32768 2 {ACDEF}
GE1/0/3 S 32768 2 {ACDEF}
Remote:
Actor Partner Priority Oper-Key SystemID Flag
-------------------------------------------------------------------------------
GE1/0/2 S 32768 2 {ACDEF}
GE1/0/3 S 32768 2 {ACDEF}
Field Description
Loadsharing type:
Loadsharing Type z Shar for load sharing
z NonS for non-load sharing
Port Status Port state: Selected or unselected.
One-octet LACP state flags field. From the least to the most
significant bit, they are represented by A through H as follows:
z A indicates whether LACP is enabled. 1 for enabled and 0
for disabled.
z B indicates the timeout control value. 1 for short timeout,
and 0 for long timeout.
z C indicates whether the link is considered as aggregatable
by the sending system. 1 for true, and 0 for false.
z D indicates whether the link is considered as synchronized
by the sending system. 1 for true, and 0 for false.
z E indicates whether the sending system considers that
Flags collection of incoming frames is enabled on the link. 1 for
true and 0 for false.
z F indicates whether the sending system considers that
distribution of outgoing frames is enabled on the link. 1 for
true and 0 for false.
z G indicates whether the receive state machine of the
sending system is using default operational partner
information. 1 for true and 0 for false.
z H indicates whether the receive state machine of the
sending system is in the expired state. 1 for true and 0 for
false.
If a flag bit is set to 1, the corresponding English letter that
otherwise is not output is displayed.
Aggregation Interface Name of the aggregate interface
Mode of the aggregation group: Static for static aggregation,
Aggregation Mode
and Dynamic for dynamic aggregation.
Local system ID, which comprises the system LACP priority
System ID
and the system MAC address.
Local Information about the local end
Port Port type and number
1-7
Field Description
Status Port state: selected or unselected
Priority Port LACP priority
Oper-Key Operational key
Syntax
View
Default Level
2: System level
Parameters
None
Description
Use the enable snmp trap updown command to enable link state trapping for the current aggregate
interface.
Use the undo enable snmp trap updown command to disable link state trapping for the current
aggregate interface.
By default, link state trapping is enabled for an aggregate interface.
With the link state trapping function enabled, an aggregate interface generates linkUp trap messages
when its link goes up and linkDown trap messages when its link goes down.
Note that for an aggregate interface to generate linkUp/linkDown traps when its link state changes, you
must also enable link state trapping globally with the snmp-agent trap enable [ standard [ linkdown |
linkup ] * ] command.
Refer to SNMP-RMON Commands for information about the snmp-agent trap enable command.
Examples
1-8
[Sysname-Bridge-Aggregation1] enable snmp trap updown
interface bridge-aggregation
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the interface bridge-aggregation command to create a Layer 2 aggregate interface and enter the
Layer 2 aggregate interface view.
Use the undo interface bridge-aggregation command to remove a Layer 2 aggregate interface.
Upon creation of a Layer 2 aggregate interface, a Layer 2 aggregation group numbered the same is
created automatically. Removing the Layer 2 aggregate interface also removes the Layer 2 aggregation
group. At the same time, the member ports of the aggregation group, if any, leave the aggregation
group.
Examples
lacp port-priority
Syntax
View
Default Level
2: System level
1-9
Parameters
port-priority: Port LACP priority, in the range of 0 to 65535. The smaller this value, the higher the LACP
priority.
Description
Use the lacp port-priority command to set the LACP priority of a port.
Use the undo lacp port-priority command to restore the default.
The default LACP priority of a port is 32768.
Examples
lacp system-priority
Syntax
View
System view
Default Level
2: System level
Parameters
system-priority: LACP priority of the local system, in the range of 0 to 65535. The smaller this value, the
higher the system LACP priority.
Description
Use the lacp system-priority command to set the LACP priority of the local system.
Use the undo lacp system-priority command to restore the default.
By default, the system LACP priority is 32768.
Examples
link-aggregation mode
Syntax
1-10
undo link-aggregation mode
View
Default Level
2: System level
Parameters
None
Description
Use the link-aggregation mode dynamic command to configure an aggregation group to work in
dynamic aggregation mode.
Use the undo link-aggregation mode command to restore the default.
By default, an aggregation group works in static aggregation mode.
To change the aggregation mode of an aggregation group that contains member ports, remove all the
member ports from the aggregation group first.
Examples
Syntax
View
Default Level
2: System level
Parameters
number: Number of the aggregate interface corresponding to an aggregation group, in the rang of 1 to
26
Description
Use the port link-aggregation group command to assign the current Ethernet interface to the
specified aggregation group.
1-11
Use the undo port link-aggregation group command to remove the current Ethernet interface from
the aggregation group to which it currently belongs.
Note that, an Ethernet port can belong to only one aggregation group.
To achieve better load sharing results for data traffic among the member ports of a link aggregation
group, you are recommended to assign ports of the same type (all GE ports or all 10-GE optical ports) to
the link aggregation group.
Examples
Syntax
View
User view
Default Level
2: System level
Parameters
Description
Use the reset counters interface command to clear the statistics of the specified aggregate interface
or interfaces.
Before collecting statistics for a Layer 2 aggregate interface within a specific period, you need to clear
the existing statistics of the interface.
Note that:
z If none of the keywords and argument is specified, this command clears the statistics of all
interfaces in the system.
z If only the bridge-aggregation keyword is specified, the command clears the statistics of all Layer
2 aggregate interfaces.
1-12
z If the bridge-aggregation interface-number keyword and argument combination is specified, this
command clears the statistics of the specified Layer 2 aggregate interface.
z The bridge-aggregation keyword becomes available only after you create Layer 2 aggregate
interfaces on the device.
Examples
Syntax
View
User view
Default Level
1: Monitor level
Parameters
interface-list: Link aggregation member port list, in the form of interface-type interface-number [ to
interface-type interface-number ], where interface-type interface-number indicates port type and port
number.
Description
Use the reset lacp statistics command to clear the LACP statistics on the specified member ports or all
member ports if no member ports are specified.
Related commands: display link-aggregation member-port.
Examples
shutdown
Syntax
shutdown
undo shutdown
View
Default Level
2: System level
1-13
Parameters
None
Description
Use the shutdown command to shut down the current aggregate interface/subinterface.
Use the undo shutdown command to bring up the current aggregate interface/subinterface.
By default, aggregate interfaces are up.
Examples
1-14
Table of Contents
i
1 Port Isolation Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display port-isolate group command to display information about one or all isolation groups.
If an isolation group is specified, this command displays information about the specified isolation group;
if not, the command displays information about all isolation groups.
Examples
Group ID: 5
Group members:
GigabitEthernet1/0/2 GigabitEthernet1/0/4
1-1
GigabitEthernet1/0/1
Field Description
Port-isolate group information Display the information of a port-isolation group
Uplink port support Indicates whether the uplink port is supported.
Group ID Isolation group number
Group members Isolated ports in the isolation group
port-isolate enable
Syntax
View
Ethernet interface view, Layer-2 aggregate interface view, port group view
Default Level
2: System level
Parameters
group group-number: Specifies the ID of the group to which the ports are to be added.
Description
Use the port-isolate enable command to add a port in Ethernet interface view or a group of ports in
port group view to an isolation group as isolated ports.
Use the undo port-isolate enable command to remove the port or ports from the isolation group.
z In Ethernet interface view, the configuration applies to the current port.
z In port group view, the configuration applies to all ports in the port group.
z In Layer-2 aggregate interface view, the configuration applies to the Layer-2 aggregate interface
and all its member ports. After you make the configuration, the system starts applying the
configuration to the aggregate interface and its aggregation member ports. If the system fails to do
that on the aggregate interface, it stops applying the configuration to the aggregation member ports.
If it fails to do that on an aggregation member port, it simply skips the port and moves to the next
port. For detailed information about Layer-2 aggregate interfaces, refer to Link Aggregation
Configuration.
Note that: This command adds a port to the specified isolation group. In this case, you need to make
sure the isolation group already exists.
Examples
1-2
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port-isolate enable group 2
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] interface GigabitEthernet 1/0/2
[Sysname-GigabitEthernet1/0/2] port-isolate enable group 2
port-isolate group
Syntax
View
System view
Default Level
2: System level
Parameters
group-number: Specifies the number of the isolation group, the value ranges from 1 to 26.
Description
Use the undo port isolate group command to remove one or all isolation groups.
Examples
1-3
Table of Contents
i
1 Port Mirroring Configuration Commands
Syntax
View
Any view
Default Level
2: System level
Parameters
Description
Use the display mirroring-group command to display information about the specified mirroring group.
Examples
Field Description
mirroring-group Number of the mirroring group
type Type of the mirroring group, which can be local only.
status Status of the mirroring group, which can be active or inactive.
1-1
mirroring-group
Syntax
View
System view
Default Level
2: System level
Parameters
group-id: Specifies the number of the mirroring group to be created or removed. Its value can only be 1.
local: Creates a local mirroring group or removes a local mirroring group with the undo command.
Description
Examples
mirroring-group mirroring-port
Syntax
View
System view
Default Level
2: System level
Parameters
1-2
both: Mirrors both inbound and outbound packets on the specified port(s).
inbound: Mirrors only inbound packets on the specified port(s).
outbound: Mirrors only outbound packets on the specified port(s).
Description
Use the mirroring-group mirroring-port command to assign ports to a local mirroring group as
mirroring ports.
Use the undo mirroring-group mirroring-port command to remove mirroring ports from the mirroring
group.
By default, no source port is configured for any mirroring group.
Note that:
z When removing a source port from a mirroring group, make sure the traffic direction you specified
in the undo mirroring-group mirroring-port command matches the actual monitored direction
specified earlier in the mirroring-group mirroring-port command.
z The mirroring group specified by the group-id argument must already exist.
Related commands: mirroring-group.
Examples
# Create local mirroring group 1, and configure ports GigabitEthernet 1/0/1, GigabitEthernet 1/0/2 and
GigabitEthernet 1/0/3 as mirroring ports in the mirroring group 1..
<Sysname> system-view
[Sysname] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 to gigabitethernet 1/0/23
both
mirroring-group monitor-port
Syntax
View
System view
Default Level
2: System level
Parameters
1-3
monitor-port-id: Port to be assigned to the specified mirroring group as the monitor port. The argument
takes the form of interface-type interface-number, where interface-type specifies the port type and
interface-number specifies the port number.
Description
Use the mirroring-group monitor-port command to assign a port to a local mirroring group as the
monitor port.
Use the undo mirroring-group monitor-port command to remove the monitor port from the local
mirroring group.
By default, no monitor port is configured for a mirroring group.
In a local mirroring group, you must configure a monitor port. From this port, mirrored packets are sent
to the monitor device for analysis.
Note that:
z You can configure only one monitor port for a mirroring group.
z The mirroring group specified by group-id must already exist.
z In a mirroring group, you can configure only one monitor port. This port must not belong to any
other mirroring group.
Related commands: mirroring-group.
Examples
mirroring-port
Syntax
View
Interface view
Default Level
2: System level
Parameters
1-4
Description
Use the mirroring-port command to assign the current port to a local mirroring group as a mirroring
port.
Use the undo mirroring-port command to remove the current port from the mirroring group.
By default, a port does not serve as a mirroring port for any mirroring group.
When assigning a port to a mirroring group as a mirroring port, note that:
z If no mirroring group is specified, the port is assigned to mirroring group 1.
z When removing a mirroring port from a mirroring group, make sure the traffic direction you
specified in the undo mirroring-group command matches the actual monitored direction of the
port.
Examples
monitor-port
Syntax
View
Interface view
Default Level
2: System level
Parameters
Description
Use the monitor-port command to assign the current port to a local mirroring group as the monitor port.
Use the undo monitor-port command to remove the current port from the mirroring group.
When assigning a port to a mirroring group as the monitor port, note that:
z If no mirroring group is specified, the port is assigned to mirroring group 1.
z The port cannot belong to any other mirroring groups.
1-5
Related commands: mirroring-group.
Examples
# Configure GigabitEthernet 1/0/1 as the monitor port in local mirroring group numbered 1.
<Sysname> system-view
[Sysname] mirroring-group 1 local
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] monitor-port
1-6
Table of Contents
i
1 LLDP Configuration Commands
Syntax
View
Any view
Default level
1: Monitor level
Parameters
Description
Use the display lldp local-information command to display the LLDP information to be sent, which will
be contained in the LLDP TLVs and sent to neighbor devices.
If no keyword or argument is specified, this command displays all the LLDP information to be sent,
including the global LLDP information and the LLDP information about the LLDP-enabled ports in the up
state.
Examples
MED information
Device class: Connectivity device
HardwareRev : REV.A
FirmwareRev : 109
1-1
SoftwareRev : 5.20 Alpha 2101
SerialNum : NONE
Manufacturer name : Manufacturer
Model name : Model
Asset tracking identifier : Unknown
LLDP local-information of port 1[GigabitEthernet1/0/1]:
Port ID subtype : Interface name
Port ID : GigabitEthernet1/0/1
Port description : GigabitEthernet1/0/1 Interface
PoE supported: No
MED information
Media policy type : Unknown
Unknown Policy : Yes
VLAN tagged : No
Media policy VlanID : 0
Media policy L2 priority : 0
Media policy Dscp : 0
Field Description
Global LLDP local-information The global LLDP information to be sent
1-2
Field Description
Chassis ID Bridge MAC address of the device
Port ID subtype Port ID type, which can be MAC address or interface name
Port ID Port ID, the value of which depends on the port ID subtype
Management address interface type Numbering type of the interface identified by the management address
Management address interface ID Index of the interface identified by the management address
Port and protocol VLAN supported Indicates whether protocol VLAN is supported on the port.
Port and protocol VLAN enabled Indicates whether protocol VLAN is enabled on the port.
1-3
Field Description
PoE device type, which can be :
Power port class z PSE: power sourcing equipment
z PD: powered device
PSE power supported Indicates whether the device can operate as a PSE.
PSE pairs control ability Indicates whether the PSE-PD pair control is available.
PoE mode, which can be Signal (PoE via signal lines) or Spare (PoE
Power pairs
via spare lines).
Aggregation port ID Aggregation group ID, which is 0 if link aggregation is not enabled.
VLAN tagged Indicates whether packets of the media VLAN are tagged.
1-4
Field Description
PoE power supply priority of PSE ports, which can be:
z Unknown
Port PSE Priority z Critical
z High
z Low
Port available power value Available PoE power on PSE ports, in watts
Syntax
View
Any view
Default level
1: Monitor level
Parameters
brief: Displays the summary of LLDP information sent from the neighboring devices. If this keyword is
not specified, this command displays the LLDP information sent from the neighboring devices in details.
interface interface-type interface-number: Displays the LLDP information sent from the neighboring
devices received through a port specified by its type and number. If this keyword-argument combination
is not specified, this command displays the LLDP information sent from the neighboring devices
received through all ports.
list: Displays the LLDP information sent from the neighboring devices in the form of a list.
system-name system-name: Displays the LLDP information sent from a neighboring device specified
by its system name. The system-name argument is a character string of 1 to 255 characters. If this
keyword-argument combination is not specified, this command displays the LLDP information sent from
all the neighboring devices in the form of a list.
Description
Use the display lldp neighbor-information command to display the LLDP information carried in LLDP
TLVs sent from the neighboring devices.
Examples
# Display the LLDP information sent from the neighboring devices received through all the ports.
<Sysname> display lldp neighbor-information
1-5
Chassis ID : 000f-0055-0002
Port ID type : Interface name
Port ID : GigabitEthernet1/0/1
Port description : GigabitEthernet1/0/1 Interface
System name : Sysname
System description : System
System capabilities supported : Bridge,Router
System capabilities enabled : Bridge,Router
# Display the LLDP information sent from all the neighboring devices in the form of a list.
<Sysname> display lldp neighbor-information list
1-6
Table 1-2 display lldp neighbor-information command output description
Field Description
LLDP neighbor-information of port 1 LLDP information received through port 1
Port and protocol VLAN supported Indicates whether protocol VLAN is supported.
Port and protocol VLAN enabled Indicates whether protocol VLAN is enabled.
1-7
Field Description
PoE device type, which can be:
Power port class z PSE: power sourcing equipment
z PD: powered device
PSE power supported Indicates whether the device can operate as a PSE.
PSE pairs control ability Indicates whether the PSE-PD pair control is available.
PoE mode, which can be Signal (PoE via signal lines) or Spare (PoE
Power pairs
via spare lines).
Aggregation port ID Aggregation group ID, which is 0 if link aggregation is not enabled.
Unknown organizationally-defined
Unknown organizationally specific TLV
TLV
1-8
display lldp statistics
Syntax
View
Any view
Default level
1: Monitor level
Parameters
Description
Use the display lldp statistics command to display the global LLDP statistics or the LLDP statistics of
a port.
If no keyword/argument is specified, this command displays the global LLDP statistics as well as the
LLDP statistics of all ports.
Examples
# Display the global LLDP statistics as well as the LLDP statistics of all ports.
<Sysname> display lldp statistics
LLDP statistics global Information:
LLDP neighbor information last change time:0 days,0 hours,4 minutes,40 seconds
The number of LLDP neighbor information inserted : 1
The number of LLDP neighbor information deleted : 1
The number of LLDP neighbor information dropped : 0
The number of LLDP neighbor information aged out : 1
LLDP statistics information of port 1 [GigabitEthernet1/0/1]:
The number of LLDP frames transmitted : 0
The number of LLDP frames received : 0
The number of LLDP frames discarded : 0
The number of LLDP error frames : 0
The number of LLDP TLVs discarded : 0
The number of LLDP TLVs unrecognized : 0
The number of LLDP neighbor information aged out : 0
The number of CDP frames transmitted : 0
The number of CDP frames received : 0
The number of CDP frames discarded : 0
The number of CDP error frames : 0
1-9
Table 1-3 display lldp statistics command output description
Field Description
LLDP statistics global information Global LLDP statistics
LLDP neighbor information last change time Time the neighbor information is latest updated
The number of LLDP neighbor information inserted Number of times of adding neighbor information
The number of LLDP neighbor information deleted Number of times of removing neighbor information
The number of LLDP frames transmitted Total number of the LLDPDUs transmitted
The number of LLDP frames received Total number of the LLDPDUs received
The number of LLDP frames discarded Total number of the LLDPDUs dropped
The number of LLDP error frames Total number of the LLDP error frames received
The number of LLDP TLVs discarded Total number of the LLDP TLVs dropped
The number of CDP frames transmitted Total number of the CDP frames transmitted
The number of CDP frames received Total number of the CDP frames received
The number of CDP frames discarded Total number of the CDP frames dropped
The number of CDP error frames Total number of the CDP error frames received
Syntax
View
Any view
Default level
1: Monitor level
Parameters
Description
Use the display lldp status command to display LLDP status information.
If no port is specified, this command displays the global LLDP status as well as the LLDP status
information of all ports.
1-10
Examples
# Display the global LLDP status as well as the LLDP status information of all ports.
<Sysname> display lldp status
Global status of LLDP: Enable
The current number of LLDP neighbors: 0
The current number of CDP neighbors: 0
LLDP neighbor information last changed time: 0 days,0 hours,4 minutes,40 seconds
Transmit interval : 30s
Hold multiplier : 4
Reinit delay : 2s
Transmit delay : 2s
Trap interval : 5s
Fast start times : 3
Port 1 [GigabitEthernet1/0/1]:
Port status of LLDP : Enable
Admin status : Tx_Rx
Trap flag : No
Polling interval : 0s
Number of neighbors : 5
Number of MED neighbors : 2
Number of CDP neighbors : 0
Number of sent optional TLV : 12
Number of received unknown TLV : 5
Field Description
Global status of LLDP Indicating whether LLDP is globally enabled
1-11
Field Description
LLDP mode of the port, which can be:
z TxRx. A port in this mode sends and receives LLDPDUs.
Admin status z Rx_Only. A port in this mode receives LLDPDUs only.
z Tx_Only. A port in this mode sends LLDPDUs only.
z Disable. A port in this mode does not send or receive
LLDPDUs.
Trap Flag Indicates whether trap is enabled.
Polling interval LLDP polling interval. A value of 0 indicates LLDP polling is disabled.
Number of CDP neighbors Number of the CDP neighbors connecting to the port
Number of received unknown TLV Number of the unknown TLVs contained in a received LLDPDU
Syntax
View
Any view
Default level
1: Monitor level
Parameters
Description
Use the display lldp tlv-config command to display the types of advertisable optional LLDP TLVs of a
port.
If no port is specified, this command displays the types of advertisable optional TLVs of each port.
Examples
1-12
Management Address TLV YES YES
IEEE 802.1 extend TLV:
Port VLAN ID TLV YES YES
Port And Protocol VLAN ID TLV YES YES
VLAN Name TLV YES YES
IEEE 802.3 extend TLV:
MAC-Physic TLV YES YES
Power via MDI TLV YES YES
Link Aggregation TLV YES YES
Maximum Frame Size TLV YES YES
LLDP-MED extend TLV:
Capabilities TLV YES YES
Network Policy TLV YES YES
Location Identification TLV NO NO
Extended Power via MDI TLV YES YES
Inventory TLV YES YES
Field Description
LLDP tlv-config of port 1 Advertisable optional TLVs of port 1
1-13
lldp admin-status
Syntax
View
Default level
2: System level
Parameters
disable: Specifies the Disable mode. A port in this mode does not send or receive LLDPDUs.
rx: Specifies the Rx mode. A port in this mode receives LLDPDUs only.
tx: Specifies the Tx mode. A port in this mode sends LLDPDUs only.
txrx: Specifies the TxRx mode. A port in this mode sends and receives LLDPDUs.
Description
Use the lldp admin-status command to specify the LLDP operating mode for a port or all the ports in a
port group.
Use the undo lldp admin-status command to restore the default LLDP operating mode.
The default LLDP operating mode is TxRx.
Examples
lldp check-change-interval
Syntax
View
Default level
2: System level
Parameters
1-14
Description
Use the lldp check-change-interval command to enable LLDP polling and set the polling interval.
Use the undo lldp check-change-interval command to restore the default.
By default, LLDP polling is disabled.
Examples
# Enable LLDP polling on GigabitEthernet 1/0/1, setting the polling interval to 30 seconds.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] lldp check-change-interval 30
Syntax
View
Default Level
2: System level
Parameters
disable: Specifies the disable mode, where CDP-compatible LLDP neither receives nor transmits CDP
packets.
txrx: Specifies the TxRx mode, where CDP-compatible LLDP can send and receive CDP packets.
Description
Use the lldp compliance admin-status cdp command to configure the operating mode of
CDP-compatible LLDP on a port or port group.
By default, CDP-compatible LLDP operates in disable mode.
To have your device work with Cisco IP phones, you must enable CDP-compatible LLDP globally and
then configure CDP-compatible LLDP to operate in TxRx mode on the specified port(s).
Related commands: lldp compliance cdp.
Examples
1-15
lldp compliance cdp
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Use the lldp compliance cdp command to enable CDP compatibility globally.
Use the undo lldp compliance cdp command to restore the default.
By default, CDP compatibility is disabled globally.
Note that, as the maximum TTL allowed by CDP is 255 seconds, your TTL configuration, namely, the
product of the TTL multiplier and the LLDPDU transmit interval, must be no more than 255 seconds for
CDP-compatible LLDP to work properly with Cisco IP phones.
Related commands: lldp hold-multiplier, lldp timer tx-interval.
Examples
lldp enable
Syntax
lldp enable
undo lldp enable
View
Default level
2: System level
Parameters
None
1-16
Description
Examples
Syntax
View
Default level
2: System level
Parameters
None
Description
Use the lldp encapsulation snap command to configure the encapsulation format for LLDPDUs as
SNAP on a port or a group of ports.
Use the undo lldp encapsulation command to restore the default encapsulation format for LLDPDUs.
By default, Ethernet II encapsulation applies.
The command does not apply to LLDP-CDP packets, which use only SNAP encapsulation.
Examples
1-17
lldp fast-count
Syntax
View
System view
Default level
2: System level
Parameters
count: Number of the LLDPDUs sent each time fast LLDPDU transmission is triggered. This argument
ranges from 1 to 10.
Description
Use the lldp fast-count command to set the number of the LLDPDUs sent each time fast LLDPDU
transmission is triggered.
Use the undo lldp fast-count command to restore the default.
By default, the number is 3.
Examples
# Configure to send four LLDPDUs each time fast LLDPDU transmission is triggered.
<Sysname> system-view
[Sysname] lldp fast-count 4
lldp hold-multiplier
Syntax
View
System view
Default level
2: System level
Parameters
Description
1-18
The TTL multiplier defaults to 4.
You can set the TTL of the local device information by configuring the TTL multiplier.
The TTL of the information about a device is determined by the following expression:
TTL multiplier × LLDPDU transmit interval
Note that the TTL can be up to 65535 seconds. TTLs longer than 65535 will be rounded off to 65535
seconds.
Related commands: lldp timer tx-interval.
Examples
Syntax
View
Default Level
2: System level
Parameters
None
Description
Examples
# Configure GigabitEthernet 1/0/1 to encapsulate the management address in the form of strings in
management address TLVs.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] lldp management-address-format string
lldp management-address-tlv
Syntax
1-19
undo lldp management-address-tlv
View
Default level
2: System level
Parameters
Description
Use the lldp management-address-tlv command to enable management address advertising and set
the management address.
Use the undo lldp management-address-tlv command to disable management address advertising in
LLDPDUs.
By default, the management address is sent through LLDPDUs, and the management address is the
primary IP address of the VLAN with the smallest VLAN ID among the VLANs whose packets are
permitted on the port. If the primary IP address is not configured, the management address is 127.0.0.1.
Note that: an LLDPDU carries only one management address TLV. If you set the management address
repeatedly, the latest one takes effect.
Examples
Syntax
View
Default level
2: System level
Parameters
None
Description
Use the lldp notification remote-change enable command to enable LLDP trapping for a port or all
the ports in a port group.
1-20
Use the undo lldp notification remote-change enable command to restore the default.
By default, LLDP trapping is disabled on a port.
Examples
Syntax
View
System view
Default level
2: System level
Parameters
interval: Interval to send LLDP traps, in the range 5 to 3600 (in seconds).
Description
Use the lldp timer notification-interval command to set the interval to send LLDP traps.
Use the undo lldp timer notification-interval command to restore the default.
By default, the interval to send LLDP traps is 5 seconds.
Examples
Syntax
View
System view
Default level
2: System level
1-21
Parameters
Description
Use the lldp timer reinit-delay command to set the LLDP re-initialization delay.
Use the undo lldp timer reinit-delay command to restore the default.
By default, the LLDP re-initialization delay is 2 seconds.
Examples
Syntax
View
System view
Default level
2: System level
Parameters
Description
Use the lldp timer tx-delay command to set the LLDPDU transmit delay.
Use the undo lldp timer tx-delay command to restore the default.
By default, the LLDPDU transmit delay is 2 seconds.
Examples
Syntax
1-22
View
System view
Default level
2: System level
Parameters
Description
Use the lldp timer tx-interval command to set the LLDPDU transmit interval.
Use the undo lldp timer tx-interval command to restore the default.
By default, the LLDPDU transmit interval is 30 seconds.
Examples
lldp tlv-enable
Syntax
View
Default level
2: System level
Parameters
all: Advertises all the basic LLDP TLVs, all the IEEE 802.1 organizationally specific LLDP TLVs, or all
the IEEE 802.3 organizationally specific LLDP TLVs when the all keyword is specified for basic-tlv,
dot1-tlv, or dot3-tlv; or advertises all the LLDP-MED TLVs except location identification TLVs when the
all keyword is specified for med-tlv.
basic-tlv: Advertises basic LLDP TLVs.
port-description: Advertises port description TLVs.
1-23
system-capability: Advertises system capabilities TLVs.
system-description: Advertises system description TLVs.
system-name: Advertises system name TLVs.
dot1-tlv: Advertises IEEE 802.1 organizationally specific LLDP TLVs.
port-vlan-id: Advertises port VLAN ID TLVs.
protocol-vlan-id: Advertises port and protocol VLAN ID TLVs.
vlan-name: Advertises VLAN name TLVs.
vlan-id: ID of the VLAN in the TLVs to be advertised. This argument ranges from 1 to 4094 and defaults
to the least VLAN ID on the port.
dot3-tlv: Advertises IEEE 802.3 organizationally specific LLDP TLVs.
link-aggregation: Advertises link aggregation TLVs.
mac-physic: Advertises MAC/PHY configuration/status TLVs.
max-frame-size: Advertises maximum frame size TLVs.
power: Advertises power via MDI TLVs.
med-tlv: Advertises LLDP-MED TLVs.
capability: Advertises LLDP-MED capabilities TLVs.
inventory: Advertises hardware revision TLVs, firmware revision TLVs, software revision TLVs, serial
number TLVs, manufacturer name TLVs, model name TLVs, and asset ID TLVs.
location-id: Advertises location identification TLVs.
civic-address: Inserts the normal address information about the network device in location
identification TLVs .
device-type: Device type value, in the range of 0 to 2. A value of 0 specifies DHCP server; a value of 1
specifies switch, and a value of 2 specifies LLDP-MED endpoint.
country-code: Country code, confirming to ISO 3166.
{ ca-type ca-value }&<1-10>: Configures address information, where ca-type represents the address
information type, in the range 0 to 255, ca-value represents address information, which is a string of 1 to
250 characters, and &<1-10> indicates that you can enter up to ten such parameters.
elin-address: Inserts telephone numbers for urgencies in location identification TLVs.
tel-number: Telephone number for urgencies, a string of 10 to 25 characters.
network-policy: Advertises network policy TLVs.
power-over-ethernet: Advertises extended power-via-MDI TLVs.
Description
Use the lldp tlv-enable command to configure the types of advertisable TLVs for a port or all the ports
in a port group.
Use the undo lldp tlv-enable command to disable the advertising of specific types of TLVs.
By default, all types of LLDP TLVs, except location identification TLVs, are advertisable on a Layer 2
Ethernet port.
Note that:
1-24
z To enable LLDP-MED TLV advertising , you must enable LLDP-MED capabilities TLV advertising
first. Conversely, to disable LLDP-MED capabilities TLV advertising , you must disable the
advertising of other LDP-MED TLV.
z To disable MAC/PHY configuration/status TLV advertising , you must disable LLDP-MED
capabilities TLV advertising first.
z Enabling the advertising of LLDP-MED capabilities TLVs also enables the advertising of MAC/PHY
configuration/status TLVs.
z Without specifying the all keyword, you can execute the lldp tlv-enable command repeatedly to
specify to advertise multiple types of TLVs.
Examples
# Enable the advertising of link aggregation TLVs of the IEEE 802.3 organizationally specific TLVs on
GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] lldp tlv-enable dot3-tlv link-aggregation
1-25
Table of Contents
i
1 VLAN Configuration Commands
Syntax
description text
undo description
View
Default Level
2: System level
Parameters
text: Description of a VLAN or VLAN interface. Currently, the device supports the following types of
characters or symbols: standard English characters (numbers and case-sensitive letters), special
English characters, spaces, and other characters or symbols that conform to the Unicode standard.
z For a VLAN, the description string contains 1 to 32 characters.
z For a VLAN interface, the description string contains 1 to 80 characters.
z A port description can be the mixture of English characters and other Unicode characters. The
mixed description cannot exceed the specified length.
z To use a type of Unicode characters or symbols in a port description, you need to install the
corresponding Input Method Editor (IME) and log in to the device through remote login software
that supports this character type.
z Each Unicode character or symbol (non-English characters) takes the space of two regular
characters. When the length of a description string reaches or exceeds the maximum line width on
the terminal software, the software starts a new line, possibly breaking a Unicode character into
two parts. As a result, garbled characters may be displayed at the end of a line.
Case-sensitive string that describes the current VLAN or VLAN interface. Spaces can be included in the
description.
z For a VLAN, this is a string of 1 to 32 characters.
z For a VLAN interface, this is a string of 1 to 80 characters.
1-1
Description
Use the description command to configure the description of the current VLAN or VLAN interface.
Use the undo description command to restore the default.
For a VLAN, the default description is the VLAN ID, for example, VLAN 0001; for a VLAN interface, the
default description is the name of the interface, for example, Vlan-interface 1 Interface.
You can configure a description to describe the function or connection of a VLAN or VLAN interface for
management sake.
Examples
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display interface vlan-interface command to display information about a specified or all
VLAN interfaces if no interface is specified.
Related commands: interface vlan-interface.
Examples
1-2
The Maximum Transmit Unit is 1500
Internet protocol processing : disabled
IP Packet Frame Type: PKTFMT_ETHNT_2, Hardware Address: 000f-e249-8050
Last clearing of counters: Never
Last 300 seconds input: 0 bytes/sec 0 packets/sec
Last 300 seconds output: 0 bytes/sec 0 packets/sec
0 packets input, 0 bytes, 0 drops
0 packets output, 0 bytes, 0 drops
Field Description
The physical state of the VLAN interface, which can be one of
the following:
z DOWN ( Administratively ): The administrative state of the
VLAN interface is down because it has been manually shut
down with the shutdown command.
Vlan-interface2 current state z DOWN: The administrative state of this VLAN interface is
up, but its physical state is down. It indicates that the VLAN
corresponding to this interface does not contain any port in
the UP state (possibly because the ports are not physical
connected or the lines have failed).
z UP: both the administrative state and the physical state of
this VLAN interface are up.
The link layer protocol state of a VLAN interface, which can be
one of the following:
Line protocol current state z DOWN: The protocol state of this VLAN interface is down,
usually because no IP address is configured.
z UP: The protocol state of this VLAN interface is up.
Description The description string of a VLAN interface
display vlan
Syntax
1-3
View
Any view
Default Level
1: Monitor level
Parameters
vlan-id1: Displays the information of a VLAN specified by VLAN ID in the range of 1 to 4094.
vlan-id1 to vlan-id2: Displays the information of a range of VLANs specified by a VLAN ID range.
all: Displays all current VLAN information except for the reserved VLANs.
dynamic: Displays the number of dynamic VLANs and the ID of each dynamic VLAN. Dynamic VLANs
refer to VLANs that are generated through GVRP or those distributed by a RADIUS server.
reserved: Displays information of the reserved VLANs. Protocol modules determine which VLANs are
reserved VLANs according to function implementation, and reserved VLANs serve protocol modules.
You cannot do any configuration on reserved VLANs.
static: Displays the number of static VLANs and the ID of each static VLAN. Static VLANs refer to
VLANs manually created.
Description
Examples
1-4
Table 1-2 display vlan command output description
Field Description
VLAN Type VLAN type (static or dynamic)
Whether a VLAN interface is configured for the VLAN: not configured
Route interface
or configured
Description Description of the VLAN
Name Name configured for the VLAN
interface vlan-interface
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the interface vlan-interface command to create a VLAN interface and enter its view or enter the
view of an existing VLAN interface.
Before you can create the VLAN interface of a VLAN, create the VLAN first.
Use the undo interface vlan-interface command to remove the specified VLAN interface.
You can use the ip address command in VLAN interface view to configure an IP address for a VLAN
interface to perform IP routing.
Related commands: display interface Vlan-interface.
Examples
# Create VLAN-interface 2.
<Sysname> system-view
1-5
[Sysname] vlan 2
[Sysname-vlan2] quit
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2]
ip address
Syntax
View
Default Level
2: System level
Parameters
ip-address: IP address to be assigned to the current VLAN interface, in dotted decimal format.
mask: Subnet mask in dotted decimal notation.
mask-length: Subnet mask length, the number of consecutive ones in the mask. The value range is 0 to
32.
Description
Use the ip address command to assign an IP address and subnet mask to a VLAN interface.
Use the undo ip address command to remove the IP address and subnet mask for a VLAN interface.
By default, no IP address is assigned to any VLAN interface.
Related commands: display ip interface (IP Address Commands).
Examples
# Specify the IP address as 1.1.0.1, the subnet mask as 255.255.255.0 for VLAN-interface 1.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ip address 1.1.0.1 255.255.255.0
name
Syntax
name text
undo name
View
VLAN view
1-6
Default Level
2: System level
Parameters
text: VLAN name, a string of 1 to 32 characters. Spaces and special characters can be included in the
name.
Description
Use the name command to configure a name for the current VLAN.
Use the undo name command to restore the default name of the VLAN.
The default name of a VLAN is its VLAN ID, VLAN 0001 for example.
When 802.1X or MAC address authentication is configured on a switch, you can use a RADIUS server
to issue VLAN configuration to ports that have passed the authentication. Some servers can send IDs
or names of the issued VLANs to the switch. When there are a large number of VLANs, you can use
VLAN names rather than VLAN IDs to better locate VLANs.
Examples
shutdown
Syntax
shutdown
undo shutdown
View
Default Level
2: System level
Parameters
None
Description
1-7
The state of any Ethernet port in a VLAN is independent of the VLAN interface state.
Examples
vlan
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the vlan vlan-id command to create a VLAN and enter its view or enter the view of an existing
VLAN.
Use the vlan vlan-id1 to vlan-id2 command to create a range of VLANs specified by vlan-id1 to vlan-id2,
except reserved VLANs.
Use the undo vlan command to remove the specified VLAN(s).
1-8
Examples
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display port command to display information about the hybrid or trunk ports on the device,
including the port names, default VLAN IDs, and allowed VLAN IDs.
Examples
1-9
Table 1-3 display port command output description
Field Description
Interface Port name
PVID Default VLAN ID of the port
VLAN passing VLANs whose packets are allowed to pass through the port.
Tagged VLANs whose packets are required to pass through the port tagged.
Untagged VLANs whose packets are required to pass through the port untagged.
port
Syntax
port interface-list
undo port interface-list
View
VLAN view
Default Level
2: System level
Parameters
interface interface-list: Specifies an Ethernet port list or Layer 2 aggregate interface list, in the format of
interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where
&<1-10> indicates that you can specify up to 10 ports or port ranges.
Description
Use the port command to assign the specified access port(s) to the current VLAN.
Use the undo port command to remove the specified access port(s) from the current VLAN.
By default, all ports are in VLAN 1.
Note that:
z This command is only applicable on access ports.
z All ports are access ports by default. However, you can manually configure the port type. For more
information, refer to port link-type.
z If you use this command to assign a Layer 2 aggregate interface to a VLAN, this command assigns
the Layer 2 aggregate interface but not its member ports to the current VLAN. For detailed
information about Layer 2 aggregate interfaces, refer to Link Aggregation Configuration.
Related commands: display vlan.
Examples
1-10
[Sysname-vlan2] port gigabitethernet 1/0/1 to gigabitethernet 1/0/3
Syntax
View
Ethernet interface view, port group view, Layer 2 aggregate interface view
Default Level
2: System level
Parameters
vlan-id: VLAN ID, in the range of 1 to 4094. Be sure that the VLAN specified by the VLAN ID already
exists.
Description
Use the port access vlan command to assign the current access port(s) to the specified VLAN.
Use the undo port access vlan command to restore the default.
By default, all access ports belong to VLAN 1.
You can assign an access port to only one VLAN. When doing that, note the following:
z In port group view, this command applies to all ports in the port group. For information about port
groups, refer to Ethernet Interface Configuration.
z In Layer 2 aggregate interface view, this command applies to the Layer 2 aggregate interface and
all its member ports. After you perform the configuration, the system starts applying the
configuration to the aggregate interface and its aggregation member ports. If the system fails to do
that on the aggregate interface, it stops applying the configuration to the aggregation member ports.
If it fails to do that on an aggregation member port, it simply skips the port and moves to the next
port. For information about Layer 2 aggregate interfaces, refer to Link Aggregation Configuration.
Examples
# Assign Layer 2 aggregate interface Bridge-aggregation 1 and its member ports to VLAN 3.
<Sysname> system-view
1-11
[Sysname] vlan 3
[Sysname-vlan3] quit
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port access vlan 3
Syntax
View
Ethernet interface view, port group view, Layer 2 aggregate interface view
Default Level
2: System level
Parameters
Description
Use the port hybrid pvid command to configure the default VLAN ID of the hybrid port.
Use the undo port hybrid pvid command to restore the default.
By default, the default VLAN of a hybrid port is VLAN 1.
You can use a nonexistent VLAN as the default VLAN for a hybrid port. Removing the default VLAN of a
hybrid port with the undo vlan command does not affect the setting of the default VLAN on the port.
z In port group view, this command applies to all ports in the port group. For information about port
groups, refer to Ethernet Interface Configuration.
z In Layer 2 aggregate interface view, this command applies to the Layer 2 aggregate interface and
all its member ports. After you perform the configuration, the system starts applying the
configuration to the aggregate interface and its aggregation member ports. If the system fails to do
that on the aggregate interface, it stops applying the configuration to the aggregation member ports.
If it fails to do that on an aggregation member port, it simply skips the port and moves to the next
port. For information about Layer 2 aggregate interfaces, refer to Link Aggregation Configuration.
z You are recommended to set the same default VLAN ID for the local and remote hybrid ports.
z After configuring the default VLAN for a hybrid port, you must use the port hybrid vlan command
to configure the hybrid port to allow packets from the default VLAN to pass through, so that the port
can forward packets from the default VLAN.
Related commands: port link-type, port hybrid vlan.
Examples
# Configure VLAN 100 as the default VLAN of the hybrid port GigabitEthernet1/0/1.
<Sysname> system-view
[Sysname] vlan 100
[Sysname-vlan100] quit
[Sysname] interface gigabitethernet 1/0/1
1-12
[Sysname-GigabitEthernet1/0/1] port link-type hybrid
[Sysname-GigabitEthernet1/0/1] port hybrid pvid vlan 100
# Configure VLAN 100 as the default VLAN of the hybrid Layer 2 aggregate interface
Bridge-aggregation 1.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type hybrid
[Sysname-Bridge-Aggregation1] port hybrid pvid vlan 100
Syntax
View
Ethernet interface view, port group view, Layer 2 aggregate interface view
Default Level
2: System level
Parameters
vlan-id-list: VLANs that the hybrid ports will be assigned to. This argument is expressed in the format of
[ vlan-id1 [ to vlan-id2 ] ]&<1-10>, where vlan-id ranges from 1 to 4094 and &<1-10> indicates that you
can specify up to 10 VLAN IDs or VLAN ID ranges. Be sure that the specified VLANs already exist.
tagged: Configures the port(s) to send the packets of the specified VLAN(s) with the tags kept.
untagged: Configures the port to send the packets of the specified VLAN(s) with the tags removed.
Description
Use the port hybrid vlan command to assign the current hybrid port(s) to the specified VLAN(s).
Use the undo port hybrid vlan command to remove the current hybrid port(s) from the specified
VLAN(s).
By default, a hybrid port only allows packets from VLAN 1 to pass through untagged.
A hybrid port can carry multiple VLANs. If you execute the port hybrid vlan command multiple times,
the VLANs the hybrid port carries are the set of VLANs specified by vlan-id-list in each execution.
z In port group view, this command applies to all ports in the port group. For information about port
groups, refer to Ethernet Interface Configuration.
z In Layer 2 aggregate interface view, this command applies to the Layer 2 aggregate interface and
all its member ports. After you perform the configuration, the system starts applying the
configuration to the aggregate interface and its aggregation member ports. If the system fails to do
that on the aggregate interface, it stops applying the configuration to the aggregation member ports.
If it fails to do that on an aggregation member port, it simply skips the port and moves to the next
port. For information about Layer 2 aggregate interfaces, refer to Link Aggregation Configuration.
Related commands: port link-type.
1-13
Examples
# Assign the hybrid port GigabitEthernet1/0/1 to VLAN 2, VLAN 4, and VLAN 50 through VLAN 100, and
configure GigabitEthernet1/0/1 to send packets of these VLANs with tags kept.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type hybrid
[Sysname-GigabitEthernet1/0/1] port hybrid vlan 2 4 50 to 100 tagged
# Assign hybrid ports in port group 2 to VLAN 2, and configure these hybrid ports to send packets of
VLAN 2 with VLAN tags removed.
<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] quit
[Sysname] port-group manual 2
[Sysname-port-group-manual-2] group-member gigabitethernet 1/0/1 to gigabitethernet 1/0/6
[Sysname-port-group-manual-2] port link-type hybrid
[Sysname-port-group-manual-2] port hybrid vlan 2 untagged
Configuring GigabitEthernet1/0/1... Done.
Configuring GigabitEthernet1/0/2... Done.
Configuring GigabitEthernet1/0/3... Done.
Configuring GigabitEthernet1/0/4... Done.
Configuring GigabitEthernet1/0/5... Done.
Configuring GigabitEthernet1/0/6... Done.
# Assign the hybrid Layer 2 aggregate interface Bridge-aggregation 1 and its member ports to VLAN 2,
and configure them to send packets of VLAN 2 with tags removed.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type hybrid
[Sysname-Bridge-Aggregation1] port hybrid vlan 2 untagged
Please wait... Done.
Configuring GigabitEthernet1/0/2... Done.
Configuring GigabitEthernet1/0/3... Done.
Note that GigabitEthernet1/0/2 and GigabitEthernet1/0/3 are the member ports of the aggregation
group corresponding to Bridge-aggregation 1.
port link-type
Syntax
View
Ethernet interface view, port group view, Layer 2 aggregate interface view
Default Level
2: System level
1-14
Parameters
Description
Use the port link-type command to configure the link type of a port.
Use the undo port link-type command to restore the default link type of a port.
By default, any port is an access port.
z In port group view, this command applies to all ports in the port group. For information about port
groups, refer to Ethernet Interface Configuration.
z In Layer 2 aggregate interface view, this command applies to the Layer 2 aggregate interface and
all its member ports. After you perform the configuration, the system starts applying the
configuration to the aggregate interface and its aggregation member ports. If the system fails to do
that on the aggregate interface, it stops applying the configuration to the aggregation member ports.
If it fails to do that on an aggregation member port, it simply skips the port and moves to the next
port. For information about Layer 2 aggregate interfaces, refer to Link Aggregation Configuration.
To change the link type of a port from trunk to hybrid or vice versa, you must set the link type to access
first.
Examples
# Configure all the ports in the manual port group group1 as hybrid ports.
<Sysname> system-view
[Sysname] port-group manual group1
[Sysname-port-group manual group1] group-member gigabitethernet 1/0/10
[Sysname-port-group manual group1] group-member gigabitethernet 1/0/11
[Sysname-port-group manual group1] port link-type hybrid
# Configure Layer 2 aggregate interface Bridge-aggregation 1 and its member ports as hybrid ports.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type hybrid
1-15
port trunk permit vlan
Syntax
View
Ethernet interface view, port group view, Layer 2 aggregate interface view
Default Level
2: System level
Parameters
vlan-id-list: VLANs that the trunk port(s) will be assigned to. This argument is expressed in the format of
[vlan-id1 [ to vlan-id2 ] ]&<1-10>, where vlan-id ranges from 1 to 4094 and &<1-10> indicates that you
can specify up to 10 VLAN IDs or VLAN ID ranges.
all: Permits all VLANs to pass through the trunk port(s). On GVRP-enabled trunk ports, you must
configure the port trunk permit vlan all command to ensure that the traffic of all dynamically registered
VLANs can pass through. However, When GVRP is disabled on a port, you are discouraged to
configure the command on the port. This is to prevent users of unauthorized VLANs from accessing
restricted resources through the port.
Description
Use the port trunk permit vlan command to assign the current trunk port(s) to the specified VLAN(s).
Use the undo port trunk permit vlan command to remove the trunk port(s) from the specified VLANs.
By default, a trunk port allows only packets from VLAN 1 to pass through.
A trunk port can carry multiple VLANs. If you execute the port trunk permit vlan command multiple
times, the VLANs the trunk port carries are the set of VLANs specified by vlan-id-list in each execution.
Note that on a trunk port, only traffic of the default VLAN can pass through untagged.
z In port group view, this command applies to all ports in the port group. For information about port
groups, refer to Ethernet Interface Configuration.
z In Layer 2 aggregate interface view, this command applies to the Layer 2 aggregate interface and
all its member ports. After you perform the configuration, the system starts applying the
configuration to the aggregate interface and its aggregation member ports. If the system fails to do
that on the aggregate interface, it stops applying the configuration to the aggregation member ports.
If it fails to do that on an aggregation member port, it simply skips the port and moves to the next
port. For information about Layer 2 aggregate interfaces, refer to Link Aggregation Configuration.
Related commands: port link-type.
Examples
# Assign the trunk port GigabitEthernet1/0/1 to VLAN 2, VLAN 4, and VLAN 50 through VLAN 100.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] port trunk permit vlan 2 4 50 to 100
1-16
Please wait........... Done.
# Assign the trunk Layer 2 aggregate interface Bridge-aggregation 1 to VLAN 2, assuming that
Bridge-aggregation 1 does not have member ports.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type trunk
[Sysname-Bridge-Aggregation1] port trunk permit vlan 2
Please wait... Done.
# Assign the trunk Layer 2 aggregate interface Bridge-aggregation 1 to VLAN 13 and VLAN 15.
Among the member ports of the aggregation group corresponding to Bridge-aggregation 1,
GigabitEthernet1/0/2 is an access port, and GigabitEthernet1/0/3 is a trunk port.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type trunk
[Sysname-Bridge-Aggregation1] port trunk permit vlan 13 15
Please wait... Done.
Error: Failed to configure on interface GigabitEthernet1/0/2! This port is not a Trunk port!
Configuring GigabitEthernet1/0/3... Done.
Among the output fields above, the message “Please wait... Done” indicates that the configuration on
Bridge-aggregation 1 succeeded; “Error: Failed to configure on interface GigabitEthernet1/0/2! This
port is not a Trunk port!” indicates that the configuration failed on GigabitEthernet1/0/2 because
GigabitEthernet1/0/2 was not a trunk port; “Configuring GigabitEthernet1/0/3... Done” indicates that the
configuration on GigabitEthernet1/0/3 succeeded.
Syntax
View
Ethernet interface view, port group view, Layer 2 aggregate interface view
Default Level
2: System level
Parameters
Description
Use the port trunk pvid command to configure the default VLAN ID for the trunk port.
Use the undo port trunk pvid command to restore the default.
By default, the default VLAN of a trunk port is VLAN 1.
You can use a nonexistent VLAN as the default VLAN for a trunk port. Removing the default VLAN of a
trunk port with the undo vlan command does not affect the setting of the default VLAN on the port.
1-17
z In port group view, this command applies to all ports in the port group. For information about port
groups, refer to Ethernet Interface Configuration.
z In Layer 2 aggregate interface view, this command applies to the Layer 2 aggregate interface and
all its member ports. After you perform the configuration, the system starts applying the
configuration to the aggregate interface and its aggregation member ports. If the system fails to do
that on the aggregate interface, it stops applying the configuration to the aggregation member ports.
If it fails to do that on an aggregation member port, it simply skips the port and moves to the next
port. For information about Layer 2 aggregate interfaces, refer to Link Aggregation Configuration.
z The local and remote trunk ports must use the same default VLAN ID for the traffic of the default
VLAN to be transmitted properly.
z After configuring the default VLAN for a trunk port, you must use the port trunk permit vlan
command to configure the trunk port to allow packets from the default VLAN to pass through, so
that the port can forward packets from the default VLAN.
Related commands: port link-type, port trunk permit vlan.
Examples
# Configure VLAN 100 as the default VLAN of the trunk port GigabitEthernet1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] port trunk pvid vlan 100
# Configure VLAN 100 as the default VLAN of the trunk Layer 2 aggregate interface
Bridge-aggregation 1, assuming Bridge-aggregation 1 does not have member ports.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type trunk
[Sysname-Bridge-Aggregation1] port trunk pvid vlan 100
# Configure VLAN 100 as the default VLAN of the trunk Layer 2 aggregate interface
Bridge-aggregation 1. Among the member ports of the aggregation group corresponding to
Bridge-aggregation 1, GigabitEthernet1/0/2 is an access port and GigabitEthernet1/0/3 is a trunk port.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type trunk
[Sysname-Bridge-Aggregation1] port trunk pvid vlan 100
Error: Failed to configure on interface GigabitEthernet1/0/2! This port is not a Trunk port!
The output above shows that the configuration on Bridge-aggregation 1 and the member port
GigabitEthernet1/0/3 succeeded; the configuration on GigabitEthernet1/0/2 failed because
GigabitEthernet1/0/2 was not a trunk port.
1-18
2 Voice VLAN Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display voice vlan oui command to display the currently supported organizationally unique
identifier (OUI) addresses, the OUI address masks, and the description strings.
Related commands: voice vlan mac-address.
In general, as the first 24 bits of a MAC address (in binary format), an OUI address is a globally unique
identifier assigned to a vendor by IEEE. OUI addresses mentioned in this document, however, are
different from those in common sense. OUI addresses in this document are used to determine whether
a received packet is a voice packet. They are the results of the AND operation of the two arguments
mac-address and oui-mask in the voice vlan mac-address command.
Examples
2-1
0060-b900-0000 ffff-ff00-0000 Philips/NEC phone
00e0-7500-0000 ffff-ff00-0000 Polycom phone
00e0-bb00-0000 ffff-ff00-0000 3com phone
Field Description
Oui Address OUI addresses supported
Mask Masks of the OUI addresses supported
Description Description strings of the OUI addresses supported
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display voice vlan state command to display voice VLAN configuration.
Related commands: voice vlan vlan-id enable, voice vlan enable, voice vlan qos cos-value
dscp-value, voice vlan qos trust.
Examples
2-2
Table 2-2 display voice vlan state command output description
Field Description
Voice VLAN system capacity Maximum number of voice VLANs supported by the system
Current Voice VLAN Count Number of existing voice VLANs
Security mode of the voice VLAN: Security for security mode;
Voice VLAN security mode
Normal for normal mode
Voice VLAN aging time Aging time of the voice VLAN
Current voice vlan enabled port
Voice VLAN-enabled port and its voice VLAN assignment mode
and its mode
PORT Voice VLAN-enabled port name
VLAN ID of the voice VLAN enabled on the port
MODE Voice VLAN assignment mode of the port: manual or automatic.
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the voice vlan aging command to configure the voice VLAN aging time.
Use the undo voice vlan aging command to restore the default.
By default, the voice VLAN aging time is 1440 minutes.
When a port in automatic voice VLAN assignment mode receives a voice packet, the system decides
whether to assign the port to the voice VLAN based on the source MAC address of the voice packet.
Upon assigning the port to the voice VLAN, the system starts the aging timer. If no voice packets are
received on the port until the aging time expires, the system automatically removes the port from the
voice VLAN. This aging time only applies to the ports in automatic voice VLAN assignment mode.
Related commands: display voice vlan state.
Examples
2-3
voice vlan enable
Syntax
View
Default Level
2: System level
Parameters
vlan-id: VLAN to be configured as the voice VLAN for the current port.
Description
Use the voice vlan enable command to enable the voice VLAN feature and configure a VLAN as the
voice VLAN for the current Ethernet port.
Use the undo voice vlan enable command to disable the voice VLAN feature on an Ethernet port.
By default, the voice VLAN feature is disabled on ports.
You can enable the voice VLAN feature on a hybrid or trunk port operating in automatic voice VLAN
assignment mode but not on an access port operating in automatic voice VLAN assignment mode.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
mac-address: Source MAC address of voice traffic, in the format of H-H-H, such as 1234-1234-1234.
2-4
mask oui-mask: Specifies the valid length of the OUI address by a mask in the format of H-H-H, formed
by consecutive fs and 0s, for example, ffff-0000-0000. To filter the voice device of a specific vendor, set
the mask to ffff-ff00-0000.
description text: Specifies a string that describes the OUI address. The string is of 1 to 30
case-sensitive characters.
oui: Specifies the OUI address to be removed, in the format of H-H-H, such as 1234-1200-0000. An OUI
address is the logic AND result of mac-address and oui-mask. An OUI address cannot be a broadcast
address, a multicast address, or an address of all 0s. You can use the display voice vlan oui
command to display the OUI addresses supported currently.
Description
Use the voice vlan mac-address command to add a recognizable OUI address.
Use the undo voice vlan mac-address command to remove a recognizable OUI address.
The system supports up to 16 OUI addresses.
By default, the system is configured with the default OUI addresses, as illustrated in Table 2-3. You can
remove the default OUI addresses and then add recognizable OUI addresses manually.
Examples
2-5
00e0-bb00-0000 ffff-ff00-0000 3com phone
1234-1200-0000 ffff-ff00-0000 PhoneA
Syntax
View
Default Level
2: System level
Parameters
None
Description
Use the voice vlan mode auto command to configure the current port to operate in automatic voice
VLAN assignment mode.
Use the undo voice vlan mode auto command to configure the current port to operate in manual voice
VLAN assignment mode.
By default, a port operates in automatic voice VLAN assignment mode.
The voice VLAN modes of different ports are independent of one another.
To make voice VLAN take effect on a port which is enabled with voice VLAN and operates in manual
voice VLAN assignment mode, you need to assign the port to the voice VLAN manually.
Examples
Syntax
View
System view
2-6
Default Level
2: System level
Parameters
None
Description
Use the voice vlan security enable command to enable voice VLAN security mode.
Use the undo voice vlan security enable command to disable voice VLAN security mode.
After you enable the security mode for a voice VLAN, only voice traffic can be transmitted in the voice
VLAN. The device matches the source MAC addresses of the packets against the supported OUI
addresses to determine whether they are voice traffic and filters all non-voice traffic, guaranteeing high
priority and high quality for voice traffic. On the other hand, when a voice VLAN operates in common
mode, other service traffic is also allow to be transmitted in the voice VLAN.
By default, voice VLAN security mode is not enabled.
Examples
2-7
Table of Contents
i
stp timer-factor·······························································································································1-39
stp transmit-limit ····························································································································1-40
vlan-mapping modulo ····················································································································1-41
ii
1 MSTP Configuration Commands
active region-configuration
Syntax
active region-configuration
View
Default Level
2: System level
Parameters
None
Description
Use the active region-configuration command to activate your MST region configuration.
Note that:
z The configuration of MST region–related parameters, especially the VLAN-to-instance mapping
table, will cause MSTP to launch a new spanning tree calculation process, which may result in
network topology instability. To reduce the possibility of topology instability caused by configuration,
MSTP will not immediately launch a new spanning tree calculation process when processing MST
region–related configurations; instead, such configurations will take effect only after you activate
the MST region–related parameters using this command, or enable MSTP using the stp enable
command in the case that MSTP is not enabled.
z Before running this command, you are recommended to use the check region-configuration
command to check whether the MST region pre-configurations are correct. You should run this
command only if the result returns positive.
Related commands: instance, region-name, revision-level, vlan-mapping modulo, check
region-configuration.
Examples
1-1
check region-configuration
Syntax
check region-configuration
View
Default Level
2: System level
Parameters
None
Description
Use the check region-configuration command to view MST region pre-configuration information,
including the region name, revision level, and VLAN-to-instance mapping settings.
Note that:
z Two or more MSTP-enabled devices belong to the same MST region only if they are configured to
have the same format selector, MST region name, the same VLAN-to-instance mapping entries in
the MST region and the same MST region revision level, and they are interconnected via a physical
link.
z Before activating the configurations of an MST region, you are recommended to use this command
to check whether the MST region pre-configurations are correct. You should activate the MST
region pre-configurations only if the result returns positive.
Related commands: instance, region-name, revision-level, vlan-mapping modulo, active
region-configuration.
Examples
1-2
Table 1-1 check region-configuration command output description
Field Description
Format selector of the MST region, which defaults to 0 and
Format selector
is not configurable.
Region name MST region name
Revision level Revision level of the MST region
Instance Vlans Mapped VLAN-to-instance mappings in the MST region
display stp
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
instance instance-id: Displays the status and statistics of a particular MSTI. The minimum value of
instance-id is 0, representing the common internal spanning tree (CIST), and the maximum value is 3.
interface interface-list: Displays the MSTP status and statistics on the ports specified by a port list, in
the format of interface-list = { interface-type interface-number [ to interface-type
interface-number ] }&<1-10>, where &<1-10> indicates that you can specify up to 10 ports or port
ranges.
brief: Displays brief MSTP status and statistics.
Description
Use the display stp command to view the MSTP status and statistics.
Based on the MSTP status and statistics, you can analyze and maintain the network topology or check
whether MSTP is working normally.
Note that:
z If you do not specify any MSTI or port, this command will display the MSTP information of all MSTIs
on all ports. The displayed information is sorted by MSTI ID and by port name in each MSTI.
z If you specify an MSTI but not a port, this command will display the MSTP information on all ports in
that MSTI. The displayed information is sorted by port name.
z If you specify some ports but not an MSTI, this command will display the MSTP information of all
MSTIs on the specified ports. The displayed information is sorted by MSTI ID, and by port name in
each MSTI.
z If you specify both an MSTI ID and a port list, this command will display the MSTP information on
the specified ports in the specified MSTI. The displayed information is sorted by port name.
The MSTP status information includes:
1-3
z CIST global parameters: Protocol work mode, device priority in the CIST (Priority), MAC address,
hello time, max age, forward delay, maximum hops, common root of the CIST, external path cost
from the device to the CIST common root, regional root, the internal path cost from the device to
the regional root, CIST root port of the device, and status of the BPDU guard function (enabled or
disabled).
z CIST port parameters: Port status, role, priority, path cost, designated bridge, designated port,
edge port/non-edge port, whether connecting to a point-to-point link, maximum transmission rate
(transmit limit), status of the root guard function (enabled or disabled), BPDU format, boundary
port/non-boundary port, hello time, max age, forward delay, message age, remaining hops, and
whether rapid state transition enabled for designated ports.
z MSTI global parameters: MSTI ID, bridge priority of the MSTI, regional root, internal path cost,
MSTI root port, and master bridge.
z MSTI port parameters: Port status, role, priority, path cost, designated bridge, designated port,
remaining hops, and whether rapid state transition enabled (for designated ports).
The statistics include:
z The number of TCN BPDUs, configuration BPDUs, RST BPDUs and MST BPDUs sent from each
port
z The number of TCN BPDUs, configuration BPDUs, RST BPDUs, MST BPDUs and wrong BPDUs
received on each port
z The number of BPDUs discarded on each port
Related commands: reset stp.
Examples
Field Description
MSTID MSTI ID in the MST region
Port Port name, corresponding to each MSTI
Port role, which can be one of the following:
z ALTE: The port is an alternate port
z BACK: The port is a backup port
Role z ROOT: The port is a root port
z DESI: The port is a designated port
z MAST: The port is a master port
z DISA: The port is disabled
1-4
Field Description
MSTP status on the port, which can be:
z FORWARDING: The port learns MAC addresses and forwards user
traffic
STP State z DISCARDING: The port does not learn MAC addresses or forward
user traffic
z LEARNING: The port learns MAC addresses but does not forward
user traffic
Protection type on the port, which can be:
z ROOT: Root guard
Protection z LOOP: Loop guard
z BPDU: BPDU guard
z NONE: No protection
----[Port1(GigabitEthernet1/0/1)][FORWARDING]----
Port Protocol :enabled
Port Role :CIST Designated Port
Port Priority :128
Port Cost(Legacy) :Config=auto / Active=200
Desg. Bridge/Port :32768.000f-e200-2200 / 128.2
Port Edged :Config=disabled / Active=disabled
Point-to-point :Config=auto / Active=true
Transmit Limit :10 packets/hello-time
Protection Type :None
MST BPDU Format :Config=auto / Active=legacy
Port Config-
Digest-Snooping :disabled
Rapid transition :false
Num of Vlans Mapped :1
PortTimes :Hello 2s MaxAge 20s FwDly 15s MsgAge 2s RemHop 20
BPDU Sent :186
TCN: 0, Config: 0, RST: 0, MST: 186
BPDU Received :0
TCN: 0, Config: 0, RST: 0, MST: 0
1-5
-------[MSTI 1 Global Info]-------
MSTI Bridge ID :0.000f-e23e-9ca4
MSTI RegRoot/IRPC :0.000f-e23e-9ca4 / 0
MSTI RootPortId :0.0
MSTI Root Type :PRIMARY root
Master Bridge :32768.000f-e23e-9ca4
Cost to Master :0
TC received :0
# View the MSTP status and statistics when STP is not enabled.
<Sysname> display stp
Protocol Status :disabled
Protocol Std. :IEEE 802.1s
Version :3
CIST Bridge-Prio. :32768
MAC address :000f-e200-8048
Max age(s) :20
Forward delay(s) :15
Hello time(s) :2
Max hops :20
Field Description
CIST bridge ID, which comprises the device’s priority in the CIST and its
MAC address. For example, in output information
CIST Bridge “32768.000f-e200-2200”, the value preceding the period (“.”) is the
device’s priority in the CIST, and the value following the period is the
device’s MAC address.
Major parameters for the bridge:
z Hello: Hello timer
Bridge Times z MaxAge: Max Age timer
z FWDly: Forward delay timer
z Max Hop: Max hops within the MST region
CIST root ID and external path cost (the path cost from the device to the
CIST Root/ERPC
CIST root)
CIST regional root ID and internal path cost (the path cost from the device
CIST RegRoot/IRPC
to the CIST regional root)
CIST root port ID. “0.0” indicates that the device is the root and there is no
CIST RootPortId
root port.
BPDU-Protection Indicates whether BPDU protection is enabled globally.
Bridge Config-
Indicates whether Digest Snooping is enabled globally on the bridge.
Digest-Snooping
TC or TCN received Number of received TC/TCN packets
Time since last TC Time since the latest topology change
[FORWARDING] The port learns MAC addresses and forwards user traffic
[DISCARDING] The port does not learn MAC addresses or forward user traffic
1-6
Field Description
[LEARNING] The port learns MAC addresses but does not forward user traffic
Port Protocol Indicates whether STP is enabled on the port
Port role, which can be Alternate, Backup, Root, Designated, Master, or
Port Role
Disabled
Port Priority Port priority
Path cost of the port. The field in the bracket indicates the standard used
for port path cost calculation, which can be legacy, dot1d-1998, or dot1t.
Port Cost(Legacy)
Config indicates the configured value, and Active indicates the actual
value.
Designated bridge ID and port ID of the port
Desg. Bridge/Port The port ID displayed is insignificant for a port which does not support
port priority.
Indicates whether the port is an edge port. Config indicates the
Port Edged
configured value, and Active indicates the actual value.
Indicates whether the port is connected to a point-to-point link. Config
Point-to-point
indicates the configured value, and Active indicates the actual value.
Transmit Limit The maximum number of packets sent within each Hello time
Protection type on the port, which can be one of the following:
z Root: Root guard
Protection Type z Loop: Loop guard
z BPDU: BPDU guard
z None: No protection
Format of the MST BPDUs that the port can send, which can be legacy or
MST BPDU Format 802.1s. Config indicates the configured value, and Active indicates the
actual value.
Port Config-
Indicates whether digest snooping is enabled on the port.
Digest-Snooping
Indicates whether the current port rapidly transitions to the forwarding
Rapid transition
state.
Num of Vlans Mapped Number of VLANs mapped to the current MSTI
1-7
Field Description
Protocol Status MSTP protocol status
Protocol Std. MSTP protocol standard
Version MSTP protocol version
CIST Bridge-Prio. The device’s priority in the CIST
MAC address MAC address of the device
Max age(s) Aging timer for BPDUs (in seconds)
Forward delay(s) Port state transition delay (in seconds)
Hello time(s) Interval for the root bridge to send BPDUs (in seconds)
Max hops Maximum hops in the MSTI
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display stp abnormal-port command to view the information about abnormally blocked ports.
Any of the following reasons may cause a port to be abnormally blocked:
z Root guard function
z Loop guard function
z MSTP BPDU format incompatibility protection function
Examples
1-8
Table 1-4 display stp abnormal-port command output description
Field Description
MSTID ID of the MSTI to which an abnormally blocked port belongs
Blocked Port Name of an abnormally blocked port
Reason that caused abnormal blocking of the port.
z ROOT-Protected: root guard function
Reason z LOOP-Protected: loop guard function
z Formatcompatibility-Protected: MSTP BPDU format incompatibility
protection function
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display stp down-port command to display the information about ports blocked by STP
protection functions.
These functions include:
z BPDU attack guard function
z MSTP BPDU format frequent change protection function
Examples
Field Description
Down Port Name of a blocked port
Reason that caused the port to be blocked.
Reason z BPDU-Protected: BPDU attack guard function
z Formatfrequency-Protected: MSTP BPDU format frequent change
protection function
1-9
display stp history
Syntax
View
Any view
Default Level
0: Visit level
Parameters
instance instance-id: Displays the historic port role calculation information of a particular MSTI. The
minimum value of instance-id is 0, representing the common internal spanning tree (CIST), and the
maximum value of instance-id is 3.
Description
Use the display stp history command to view the historic port role calculation information of the
specified MSTI or all MSTIs.
Note that:
z If you do not specify an MSTI ID, this command will display the historic port role calculation
information of all MSTIs. The displayed information is sorted by MSTI ID, and by port role
calculation time in each MSTI.
z If you specify an MSTI ID, this command will display the historic port role calculation information of
only this specified MSTI by the sequence of port role calculation time.
Examples
Port GigabitEthernet1/0/2
Role change : ALTER->ROOT
Time : 2006/08/08 00:22:56
Port priority : 0.00e0-fc01-6510 0 0.00e0-fc01-6510 128.2
Field Description
Port Port name
1-10
Field Description
A role change of the port (“Age” means that the change was caused by
Role change
expiry of the received configuration BPDU)
Time Time of port role calculation
Port priority Port priority
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display stp ignored-vlan command to display VLAN Ignore enabled VLANs.
Examples
Field Description
STP-Ignored VLAN List of VLAN Ignore enabled VLANs
Syntax
View
Any view
Default Level
1: Monitor level
1-11
Parameters
None
Description
Use the display stp region-configuration command to view the currently effective configuration
information of the MST region, including the region name, revision level, and user-configured
VLAN-to-instance mappings.
Related commands: instance, region-name, revision-level, vlan-mapping modulo.
Examples
Field Description
MSTP-defined format selector, which defaults to 0 and is not
Format selector
configurable
Region name MST region name
Revision level of the MST region, which can be configured using the
Revision level
revision-level command and defaults to 0.
Instance Vlans Mapped VLAN-to-instance mappings in the MST region
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
1-12
Description
Use the display stp root command to view the root bridge information of all MSTIs.
Examples
Field Description
MSTID MSTI ID
Root Bridge ID Root bridge ID
External path cost. The device can automatically calculate the default path
ExtPathCost cost of a port, or alternatively, you can use the stp cost command to configure
the path cost of a port.
Internal path cost. The device can automatically calculate the default path cost
IntPathCost of a port, or alternatively, you can use the stp cost command to configure the
path cost of a port.
Root port name (displayed only if a port of the current device is the root port of
Root Port
MSTIs)
display stp tc
Syntax
View
Any view
Default Level
0: Visit level
Parameters
instance instance-id: Displays the statistics of TC/TCN BPDUs received and sent by all ports in the
specified MSTI. The minimum value of instance-id is 0, representing the common internal spanning tree
(CIST), and the maximum value of instance-id is 3.
Description
Use the display stp tc command to view the statistics of TC/TCN BPDUs received and sent by all ports
in an MSTI or all MSTIs.
Note that:
z If you do not specify an MSTI ID, this command will display the statistics of TC/TCN BPDUs
received and sent by all ports in all MSTIs. The displayed information is sorted by instance ID and
by port name in each MSTI.
1-13
z If you specify an MSTI ID, this command will display the statistics of TC/TCN BPDUs received and
sent by all ports in the specified MSTI, in port name order.
Examples
# View the statistics of TC/TCN BPDUs received and sent by all ports in MSTI 0.
<Sysname> display stp instance 0 tc
MSTID Port Receive Send
0 GigabitEthernet1/0/1 6 4
0 GigabitEthernet1/0/2 0 2
Field Description
MSTID MSTI ID
Port Port name
Receive Number of TC/TCN BPDUs received on each port
Send Number of TC/TCN BPDUs sent by each port
instance
Syntax
View
Default Level
2: System level
Parameters
instance-id: MSTI ID. The minimum value is 0, representing the CIST, and the maximum value is 3.
vlan vlan-list: Specifies a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id2 }&<1-10>, in which
vlan-id represents the VLAN ID and ranges from 1 to 4094. &<1-10> indicates you can specify up to 10
VLAN IDs or VLAN ID ranges.
Description
Use the instance command to map the specified VLANs to the specified MSTI.
Use the undo instance command to remap the specified VLAN or all VLANs to the CIST (MSTI 0).
By default, all VLANs are mapped to the CIST.
Notice that:
z If you specify no VLAN in the undo instance command, all VLANs mapped to the specified MSTI
will be remapped to the CIST.
1-14
z You cannot map the same VLAN to different MSTIs. If you map a VLAN that has been mapped to
an MSTI to a new MSTI, the old mapping will be automatically removed.
z After configuring this command, you need to run the active region-configuration command to
activate the VLAN-to-instance mapping.
Related commands: display stp region-configuration, check region-configuration, active
region-configuration.
Examples
region-name
Syntax
region-name name
undo region-name
View
Default Level
2: System level
Parameters
Description
Examples
1-15
reset stp
Syntax
View
User view
Default Level
1: Monitor level
Parameters
interface interface-list: Clears the MSTP statistics of the ports specified in the format of interface-list =
{ interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where &<1-10>
indicates that you can specify up to 10 ports or port ranges.
Description
Examples
# Clear the spanning tree-related statistics on ports GigabitEthernet 1/0/1 through GigabitEthernet
1/0/3.
<Sysname> reset stp interface gigabitethernet 1/0/1 to gigabitethernet 1/0/3
revision-level
Syntax
revision-level level
undo revision-level
View
Default Level
2: System level
Parameters
1-16
Description
Examples
stp bpdu-protection
Syntax
stp bpdu-protection
undo stp bpdu-protection
View
System view
Default Level
2: System level
Parameters
None
Description
Use the stp bpdu-protection command to enable the BPDU guard function.
Use the undo stp bpdu-protection command to disable the BPDU guard function.
By default, the BPDU guard function is disabled.
Examples
1-17
stp bridge-diameter
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the stp bridge-diameter command to specify the network diameter, namely the maximum possible
number of stations between any two terminal devices on the switched network.
Use the undo stp bridge-diameter command to restore the default.
By default, the network diameter of the switched network is 7.
Note that:
z An appropriate setting of hello time, forward delay and max age can speed up network
convergence. The values of these timers are related to the network size. You can set these three
timers indirectly by setting the network diameter. Based on the network diameter you configured,
MSTP automatically sets an optimal hello time, forward delay, and max age for the device. With the
network diameter set to 7 (the default), the three timer are also set to their defaults.
z This configuration must be configured on the root bridge and is effective for the CIST only, not for
MSTIs.
Related commands: stp timer forward-delay, stp timer hello, stp timer max-age.
Examples
stp compliance
Syntax
View
Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view
1-18
Default Level
2: System level
Parameters
auto: Configures the port(s) to recognize the MSTP BPDU format automatically and accordingly
determine the format of MSTP BPDUs to send.
dot1s: Configures the port(s) to receive and send only standard-format (802.1s-compliant) MSTP
BPDUs.
legacy: Configures the port(s) to receive and send only compatible-format MSTP BPDUs.
Description
Use the stp compliance command to configure the mode the specified port(s) will use to recognize and
send MSTP BPDUs.
Use the undo stp compliance command to restore the system default.
By default, a port automatically recognizes the formats of received MSTP packets and determines the
formats of MSTP packets to be sent based on the recognized formats.
Note that:
z Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only;
configured in port group view, the setting takes effect on all ports in the port group.
z Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port;
configured on a member port in an aggregation group, the setting can take effect only after the port
leaves the aggregation group.
Examples
# Configure GigabitEthernet 1/0/1 to receive and send only standard-format (802.1s) MSTP packets.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] stp compliance dot1s
stp config-digest-snooping
Syntax
stp config-digest-snooping
undo stp config-digest-snooping
View
System view, Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view
Default Level
2: System level
Parameters
None
1-19
Description
Examples
stp cost
Syntax
View
Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view
Default Level
2: System level
Parameters
instance instance-id: Sets the path cost of the port(s) in a particular MSTI. The minimum value of
instance-id is 0, representing the CIST, and the maximum value of instance-id is 3.
cost: Path cost of the port, the effective range of which depends on the path cost calculation standard
adopted.
z With the IEEE 802.1d-1998 standard selected for path cost calculation, the cost argument ranges
from 1 to 65535.
z With the IEEE 802.1t standard selected for path cost calculation, the cost argument ranges from 1
to 200000000.
1-20
z With the private standard selected for path cost calculation, the cost argument ranges from 1 to
200000.
Description
Use the stp cost command to set the path cost of the port(s) in the specified MSTI or all MSTIs.
Use the undo stp cost command to restore the system default.
By default, the device automatically calculates the path costs of ports in each MSTI based on the
corresponding standard.
Note that:
z Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only;
configured in port group view, the setting takes effect on all ports in the port group.
z Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port;
configured on a member port in an aggregation group, the setting can take effect only after the port
leaves the aggregation group.
z Path cost is an important factor in spanning tree calculation. Setting different path costs for a port in
MSTIs allows VLAN traffic flows to be forwarded along different physical links, thus achieving
VLAN-based load balancing.
z The path cost setting of a port can affect the role selection of the port. When the path cost of a port
is changed, MSTP will re-compute the role of the port and initiate a state transition.
Related commands: display stp.
Examples
stp edged-port
Syntax
View
Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view
Default Level
2: System level
Parameters
Description
Use the stp edged-port enable command to configure the port(s) as an edge port or ports.
1-21
Use the stp edged-port disable command to configure the port(s) as a non-edge port or non-edge
ports.
Use the undo stp edged-port command to restore the default.
All ports are non-edge ports by default.
Note that:
z Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only;
configured in port group view, the setting takes effect on all ports in the port group.
z Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port;
configured on a member port in an aggregation group, the setting can take effect only after the port
leaves the aggregation group.
z If a port directly connects to a user terminal rather than another device or a shared LAN segment,
this port is regarded as an edge port. When the network topology changes, an edge port will not
cause a temporary loop. Therefore, configuring a port as an edge port can enable the port to
transition to the forwarding state rapidly. We recommend that you configure a port directly
connecting to a user terminal as an edge port to enable it to transition to the forwarding state
rapidly.
z Normally, configuration BPDUs from other devices will not be received by an edge port because it
does not connect to any other device. Before the BPDU guard function is enabled, if a port receives
a configuration BPDU, the port is working actually as a non-edge port even if you have configured
it as an edge port.
z Among loop guard, root guard and edge port settings, only one function (whichever is configured
the earliest) can take effect on a port at the same time.
Related commands: stp loop-protection, stp root-protection.
Examples
stp enable
Syntax
stp enable
undo stp enable
View
System view, Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view
Default Level
2: System level
Parameters
None
1-22
Description
Use the stp enable command to enable MSTP globally in system view, on a port in port view, or on
multiple ports in port group view.
Use the undo stp enable command to disable MSTP globally or on the port(s).
The device is globally MSTP-disabled by default. After you enable MSTP globally, MSTP is enabled on
all ports.
Note that:
z Configured in system view, the setting takes effect globally; configured in Layer 2 Ethernet port
view, the setting takes effect on the current port only; configured in port group view, the setting
takes effect on all ports in the port group; configured in Layer 2 aggregate port view, the setting
takes effect only on the aggregate port; configured on a member port in an aggregation group, the
setting can take effect only after the port leaves the aggregation group.
z After you enable MSTP, the device works in STP-compatible mode, RSTP mode or MSTP mode
depending on the MSTP mode setting.
z After being enabled, MSTP dynamically maintains the spanning tree status of VLANs based on
received configuration BPDUs; after being disabled, it stops maintaining the spanning tree status.
Related commands: stp mode.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
vlan vlan-list: Specifeis a VLAN list in the format of vlan-list = { vlan-id [ to vlan-id2 }&<1-10>, in which
vlan-id represents the VLAN ID and ranges from 1 to 4094. &<1-10> indicates you can specify up to 10
VLAN IDs or VLAN ID ranges.
1-23
Description
Use the stp ignored vlan command to enable VLAN Ignore for the specified VLAN(s).
Use the undo stp ignored vlan command to disable VLAN Ignore for the specified VLAN(s).
Examples
stp loop-protection
Syntax
stp loop-protection
undo stp loop-protection
View
Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view
Default Level
2: System level
Parameters
None
Description
Use the stp loop-protection command to enable the loop guard function on the port(s).
Use the undo stp loop-protection command to restore the system default.
By default, the loop guard function is disabled.
Note that:
z Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only;
configured in port group view, the setting takes effect on all ports in the port group; configured in
Layer 2 aggregate port view, the setting takes effect only on the aggregate port; configured on a
member port in an aggregation group, the setting can take effect only after the port leaves the
aggregation group.
z Among loop guard, root guard and edge port settings, only one function (whichever is configured
the earliest) can take effect on a port at the same time.
Related commands: stp edged-port, stp root-protection.
Examples
1-24
[Sysname-GigabitEthernet1/0/1] stp loop-protection
stp max-hops
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the stp max-hops command to set the maximum hops of the MST region on the device.
Use the undo stp max-hops command to restore the maximum hops to the default setting.
Setting the maximum hops of MST regions is to limit the sizes of MST regions. By default, the maximum
number of hops of an MST region is 20.
Related commands: display stp.
Examples
# Set the maximum hops of the MST region on the device to 35.
<Sysname> system-view
[Sysname] stp max-hops 35
stp mcheck
Syntax
stp mcheck
View
System view, Layer 2 Ethernet port view, Layer 2 aggregate port view
Default Level
2: System level
Parameters
None
Description
Use the stp mcheck command to carry out the mCheck operation globally or on the current port.
1-25
If a port on a device running MSTP (or RSTP) connects to a device running STP, this port will
automatically migrate to the STP-compatible mode. However, it will not be able to migrate automatically
back to the MSTP (or RSTP) mode, but will remain working in the STP-compatible mode under the
following circumstances:
z The device running STP is shut down or removed.
z The device running STP migrates to the MSTP (or RSTP) mode.
By then, you can perform an mCheck operation to force the port to migrate to the MSTP (or RSTP)
mode.
Note that:
z The device works in STP-compatible mode, RSTP mode or MSTP mode depending on the MSTP
mode setting.
z The stp mcheck command is meaningful only when the device works in RSTP or MSTP mode.
z Configured in system view, the setting takes effect globally; configured in Layer 2 Ethernet port
view, the setting takes effect on the current port only; configured in port group view, the setting
takes effect on all member ports in the port group.
z Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port;
configured on a member port in an aggregation group, the setting can take effect only after the port
leaves the aggregation group.
Related commands: stp mode.
Examples
stp mode
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the stp mode command to configure the MSTP work mode of the device.
1-26
Use the undo stp mode command to restore the MSTP work mode to the default setting.
By default, an MSTP-enabled device works in MSTP mode.
Related commands: stp mcheck, stp enable.
Examples
stp no-agreement-check
Syntax
stp no-agreement-check
undo stp no-agreement-check
View
Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view
Default Level
2: System level
Parameters
None
Description
Use the stp no-agreement-check command to enable No Agreement Check on the port(s).
Use the undo stp no-agreement-check command to disable No Agreement Check on the port(s).
By default, No Agreement Check is disabled.
Note that:
z Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only;
configured in port group view, the setting takes effect on all member ports in the port group.
z Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port;
configured on a member port in an aggregation group, the setting can take effect only after the port
leaves the aggregation group.
z This feature takes effect only after you enable it on the root port.
Examples
1-27
stp pathcost-standard
Syntax
View
System view
Default Level
2: System level
Parameters
dot1d-1998: The device calculates the default path cost for ports based on IEEE 802.1d-1998.
dot1t: The device calculates the default path cost for ports based on IEEE 802.1t.
legacy: The device calculates the default path cost for ports based on a private standard.
Description
Use the stp pathcost-standard command to specify a standard for the device to use when calculating
the default path costs for ports of the device.
Use the undo stp pathcost-standard command to restore the system default.
By default, the device calculates the default path cost for ports based on a private standard.
Note that:
z If you change the standard that the device uses in calculating the default path cost, the port path
cost value set through the stp cost command will be invalid.
z Table 1-11 shows the path costs calculated using different standards at different link speed. When
calculating path cost for an aggregate port, 802.1d-1998 does not take into account the number of
member ports in its aggregation group as 802.1t does. The calculation formula of 802.1t is: Path
Cost = 200,000,000/link speed (in 100 kbps), where link speed is the sum of the link speed values
of the non-blocked ports in the aggregation group.
1-28
Path cost in Path cost in
Path cost in
Link speed Duplex state 802.1d-1998 IEEE 802.1t
private standard
standard standard
Single Port 4 20,000 20
Aggregate Link 2 Ports 4 10,000 18
1000 Mbps
Aggregate Link 3 Ports 4 6,666 16
Aggregate Link 4 Ports 4 5,000 14
Single Port 2 2,000 2
Aggregate Link 2 Ports 2 1,000 1
10 Gbps
Aggregate Link 3 Ports 2 666 1
Aggregate Link 4 Ports 2 500 1
Examples
# Configure the device to calculate the default path cost for ports based on IEEE 802.1d-1998.
<Sysname> system-view
[Sysname] stp pathcost-standard dot1d-1998
stp point-to-point
Syntax
View
Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view
Default Level
2: System level
Parameters
Description
Use the stp point-to-point command to configure the link type of the current port(s).
Use the undo stp point-to-point command to restore the system default.
The default setting is auto; namely the MSTP-enabled device automatically detects whether a port
connects to a point-to-point link.
Note that:
z Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only;
configured in port group view, the setting takes effect on all member ports in the port group.
1-29
z Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port.
Configured on a member port in an aggregation group, the setting can take effect only after the port
leaves the aggregation group.
z When connecting to a non-point-to-point link, a port is incapable of rapid state transition.
z If the current port is a Layer 2 aggregate port or if it works in full duplex mode, the link to which the
current port connects is a point-to-point link. We recommend that you use the default setting,
namely let MSTP detect the link status automatically.
z This setting takes effect on the CIST and all MSTIs. If a port is configured as connecting to a
point-to-point link or a non-point-to-point link, the setting takes effect for the port in all MSTIs. If the
physical link to which the port connects is not a point-to-point link and you force it to be a
point-to-point link by configuration, your configuration may incur a temporary loop.
Related commands: display stp.
Examples
Syntax
View
Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view
Default Level
2: System level
Parameters
instance instance-id: Sets the priority of the current port(s) in a particular MSTI. The minimum value of
instance-id is 0, representing the CIST, and the maximum value of instance-id is 3.
priority: Port priority, in the range of 0 to 240 at the step of 16 (0, 16, 32…, for example).
Description
Use the stp port priority command to set the priority of the port(s).
Use the undo stp port priority command to restore the system default.
Port priority affects the role of a port in an MSTI.
By default, the port priority is 128.
Note that:
z Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only;
configured in port group view, the setting takes effect on all ports in the port group.
1-30
z Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port.
Configured on a member port in an aggregation group, the setting can take effect only after the port
leaves the aggregation group.
z Setting different priorities for the same port in different MSTIs allows VLAN traffic flows to be
forwarded along different physical links, thus to achieve VLAN-based load balancing.
z When the priority of a port is changed in an MSTI, MSTP will re-compute the role of the port and
initiate a state transition in the MSTI.
Related commands: display stp.
Examples
stp port-log
Syntax
View
System view
Default Level
2: System level
Parameters
all: Enables output of port state transition information for all MSTIs.
instance instance-id: Enables output of port state transition information for the specified MSTI. The
minimum value of instance-id is 0, representing the CIST, and the maximum value of this argument is 3.
Description
Use the stp port-log command to enable output of port state transition information for the specified
MSTI or all MSTIs.
Use the undo stp port-log command to disable output of port state transition information for the
specified MSTI or all MSTIs.
This function is enabled by default.
Examples
1-31
%Aug 16 00:49:41:856 2006 Sysname MSTP/3/PFWD: Instance 2's GigabitEthernet1/0/2 has been
set to forwarding state!
// The information above shows that in MSTI 2 the state of GigabitEthernet 1/0/1 has changed to
discarding and that of GigabitEthernet 1/0/2 has changed to forwarding.
stp priority
Syntax
View
System view
Default Level
2: System level
Parameters
instance instance-id: Sets the priority of the device in a MSTI. The minimum value of instance-id is 0,
representing the CIST, and the maximum value of instance-id is 3.
priority: Device priority, in the range of 0 to 61440 at the step of 4096, namely you can set up to 16
priority values, such as 0, 4096, 8192…, on the device. The smaller the priority value, the higher the
device priority.
Description
Use the stp priority command to set the priority of the device.
Use the undo stp priority command to restore the default device priority.
By default, the device priority is 32768.
Examples
stp region-configuration
Syntax
stp region-configuration
undo stp region-configuration
View
System view
Default Level
2: System level
1-32
Parameters
None
Description
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
instance instance-id: Configures the device as the root bridge in a particular MSTI. The minimum value
of instance-id is 0, representing the CIST, and the maximum value of instance-id is 3.
Description
Use the stp root primary command to configure the current device as the root bridge.
Use the undo stp root command to restore the system default.
By default, a device is not a root bridge in any MSTI.
Note that:
z There is only one root bridge in effect in an MSTI. If two or more devices have been designated to
be root bridges of the same MSTI, MSTP will select the device with the lowest MAC address as the
root bridge.
z You can specify a root bridge for each MSTI without caring about the device priority. After
specifying the current device as the root bridge or a secondary root bridge, you cannot change the
priority of the device.
1-33
Related commands: stp priority, stp root secondary.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
instance instance-id: Configures the device as a secondary root bridge in a particular MSTI. The
minimum value of instance-id is 0, representing the CIST, and the maximum value of instance-id is 3.
Description
Use the stp root secondary command to configure the device as a secondary root bridge.
Use the undo stp root command to restore the system default.
By default, a device is not a secondary root bridge.
Note that:
z You can configure one or more secondary root bridges for each MSTI. When the root bridge of an
MSTI fails or is shut down, the secondary root bridge can take over the role of the root bridge of the
specified MSTI. However, if you specify a new primary root bridge for the instance then, the
secondary root bridge will not become the root bridge. If you specify more than one secondary root
bridge, the secondary root bridge with the lowest MAC address will become the root bridge.
z After specifying the current device as a secondary root bridge, you cannot change the priority of the
device.
Related commands: stp priority, stp root primary.
Examples
stp root-protection
Syntax
stp root-protection
1-34
undo stp root-protection
View
Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view
Default Level
2: System level
Parameters
None
Description
Use the stp root-protection command to enable the root guard function on the port(s).
Use the undo stp root-protection command to restore the default.
By default, the root guard function is disabled.
Note that:
z Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only;
configured in port group view, the setting takes effect on all ports in the port group; configured in
Layer 2 aggregate port view, the setting takes effect only on the aggregate port; configured on the
member port in an aggregation group, the setting can take effect only after the port leaves the
aggregation group.
z Among loop guard, root guard and edge port settings, only one function (whichever is configured
the earliest) can take effect on a port at the same time.
Related commands: stp edged-port, stp loop-protection.
Examples
stp tc-protection
Syntax
View
System view
Default Level
2: System level
Parameters
None
1-35
Description
Use the stp tc-protection enable command to enable the TC-BPDU attack guard function for the
device.
Use the stp tc-protection disable command to disable the TC-BPDU attack guard function for the
device.
By default, the TC-BPDU attack guard function is enabled.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
number: Maximum number of immediate forwarding address entry flushes that the switch can perform
within a certain period of time after it receives the first TC-BPDU. The value range for the argument is 1
to 255.
Description
Use the stp tc-protection threshold command to configure the maximum number of forwarding
address entry flushes that the device can perform within a certain period of time after it receives the first
TC-BPDU.
Use the undo stp tc-protection threshold command to restore the default.
By default, the device can perform a maximum of six forwarding address entry flushes within 10
seconds after it receives the first TC-BPDU.
Examples
# Set the maximum number of forwarding address entry flushes that the device can perform within 10
seconds after it receives the first TC-BPDU to 10.
<Sysname> system-view
[Sysname] stp tc-protection threshold 10
1-36
stp timer forward-delay
Syntax
View
System view
Default Level
2: System level
Parameters
time: Forward delay in centiseconds, ranging form 400 to 3000 at the step of 100.
Description
Use the stp timer forward-delay command to set the forward delay timer of the device.
Use the undo stp timer forward-delay command to restore the system default.
By default, the forward delay timer is set to 1,500 centiseconds.
In order to prevent temporary loops, a port must go through an intermediate state, the learning state,
before it transitions from the discarding state to the forwarding state, and must wait a certain period of
time before it transitions from one state to another to keep synchronized with the remote device during
state transition. The forward delay timer set on the root bridge determines the time interval of state
transition.
If the current device is the root bridge, the state transition interval of the device depends on the forward
delay value configured through this command; for a non- root bridge, its state transition interval is
determined by the forward delay timer set on the root bridge.
The settings of the hello time, forward delay and max age timers must meet the following formulae, thus
avoiding frequent network changes:
z 2 × (forward delay – 1 second) ƒ max age
z Max age ƒ 2 × (hello Time + 1 second)
We recommend that you specify the network diameter of the switched network using the stp root
primary command and let MSTP automatically calculate optimal settings of these three timers.
Related commands: stp timer hello, stp timer max-age, stp bridge-diameter.
Examples
Syntax
System view
Default Level
2: System level
Parameters
time: Hello time in centiseconds, ranging from 100 to 1000 at the step of 100.
Description
Use the stp timer hello command to set the hello time of the device.
Use the undo stp timer hello command to restore the system default.
By default, the hello time is set to 200 centiseconds.
Hello time is the time interval at which MSTP-enabled devices send configuration BPDUs to maintain
spanning tree. If a device fails to receive configuration BPDUs within the set period of time, a new
spanning tree calculation process will be triggered due to timeout. The root bridge sends configuration
BPDUs at the interval of the hello time set through this command, while non-root bridges use the hello
time set on the root bridge.
The settings of the hello time, forward delay and max age timers must meet the following formulae, thus
avoiding frequent network changes:
z 2 × (forward delay – 1 second) ƒ max age
z Max age ƒ 2 × (hello time + 1 second)
We recommend that you specify the network diameter of the switched network using the stp root
primary command and let MSTP automatically calculate optimal settings of these three timers.
Related commands: stp timer forward-delay, stp timer max-age, stp bridge-diameter.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
time: Max age in centiseconds, ranging from 600 to 4000 at the step of 100.
1-38
Description
Use the stp timer max-age command to set the max age timer of the device.
Use the undo stp timer max-age command to restore the system default.
By default, the max age is set to 2,000 centiseconds.
MSTP can detect link failures and automatically restore the forwarding state of the redundant link. In the
CIST, the device determines whether a configuration BPDU received on a port has expired based on
the max age timer. If a port receives a configuration BPDU that has expired, that MSTI needs to be
re-computed.
The max age timer is not meaningful for MSTIs. If the current device is the root bridge of the CIST, it
determines whether a configuration BPDU has expired based on the configured max age timer; if the
current device is not the root bridge of the CIST, it uses the max age timer set on the CIST root bridge.
The settings of the hello time, forward delay and max age timers must meet the following formulae, thus
avoiding frequent network changes:
z 2 × (forward delay – 1 second) ƒ max age
z Max age ƒ 2 × (hello time + 1 second)
We recommend that you specify the network diameter using the stp root primary command and let
MSTP automatically calculate an optimal setting of these three timers.
Related commands: stp timer forward-delay, stp timer hello, stp bridge-diameter.
Examples
stp timer-factor
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the stp timer-factor command to set the timeout factor, which decides the timeout time. Timeout
time = timeout factor × 3 × hello time.
Use the undo stp timer-factor command to restore the default.
By default, the timeout factor is 3.
1-39
Note that:
z After the network topology is stabilized, each non-root-bridge device forwards configuration
BPDUs to the surrounding devices at the interval of hello time to check whether any link is faulty.
Typically, if a device does not receive a BPDU from the upstream device within nine times the hello
time, it will assume that the upstream device has failed and start a new spanning tree calculation
process.
z In a very stable network, this kind of spanning tree calculation may occur because the upstream
device is busy. In this case, you can avoid such unwanted spanning tree calculations by
lengthening the timeout time, thus saving the network resources. We recommend that you set the
timeout factor to 5, or 6, or 7 for a stable network.
Examples
stp transmit-limit
Syntax
View
Layer 2 Ethernet port view, port group view, Layer 2 aggregate port view
Default Level
2: System level
Parameters
limit: Maximum number of BPDUs the port(s) can send within each hello time, in the range of 1 to 255.
Description
Use the stp transmit-limit command to set the maximum transmission rate of the port(s), that is, the
maximum number of BPDUs the port(s) can send within each hello time.
Use the undo stp transmit-limit command to restore the system default.
By default, the maximum transmission rate of all ports of the device is 10, that is, each port can send up
to 10 BPDUs within each hello time.
Note that:
z Configured in Layer 2 Ethernet port view, the setting takes effect on the current port only;
configured in port group view, the setting takes effect on all member ports in the port group.
z Configured in Layer 2 aggregate port view, the setting takes effect only on the aggregate port;
configured on a member port in an aggregation group, the setting can take effect only after the port
leaves the aggregation group.
z A larger maximum transmission rate value represents more BPDUs that the port will send within
each hello time, but this means that more system resources will be used. An appropriate maximum
transmission rate setting can limit the speed at which a port sends BPDUs and prevent MSTP from
1-40
using excessive bandwidth resources during network topology changes. You are recommended to
use the default value.
Examples
vlan-mapping modulo
Syntax
View
Default Level
2: System level
Parameters
modulo: Modulo value. The minimum value is 1, and the maximum value is 3.
Description
Use the vlan-mapping modulo command to map VLANs in the current MST region to MSTIs
according to the specified modulo value, thus quickly creating a VLAN-to-instance mapping table.
By default, all VLANs are mapped to the CIST (MSTI 0).
Note that:
z You cannot map the same VLAN to different MSTIs. If you map a VLAN that has been mapped to
an MSTI to a new MSTI, the old mapping will be automatically removed.
z This command maps each VLAN to the MSTI whose ID is (VLAN ID–1) %modulo + 1, where
(VLAN ID-1) %modulo is the modulo operation for (VLAN ID–1). If the modulo value is 3, for
example, then VLAN 1 will be mapped to MSTI 1, VLAN 2 to MSTI 2, VLAN 3 to MSTI 3, VLAN 4 to
MSTI 1, and so on.
Related commands: region-name, revision-level, display stp region-configuration, check
region-configuration, active region-configuration.
Examples
1-41
Table of Contents
i
1 IP Addressing Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display ip interface command to display information about a specified or all Layer 3
interfaces.
Examples
1-1
Router advert: 0
Router solicit: 0
Time exceed: 0
IP header bad: 0
Timestamp request: 0
Timestamp reply: 0
Information request: 0
Information reply: 0
Netmask request: 0
Netmask reply: 0
Unknown type: 0
Field Description
Current physical state of the interface, which can be
z Administrative DOWN: Indicates that the interface is
administratively down; that is, the interface is shut down with
the shutdown command.
current state z DOWN: Indicates that the interface is administratively up but
its physical state is down, which may be caused by a
connection or link failure.
z UP: Indicates that both the administrative and physical
states of the interface are up.
Current state of the link layer protocol, which can be
z DOWN: Indicates that the protocol state of the interface is
Line protocol current state down, which is usually because that no IP address is
assigned to the interface.
z UP: Indicates that the protocol state of the interface is up.
IP address of an interface followed by:
Internet Address z Primary: Identifies a primary IP address, or
z Sub: Identifies a secondary IP address.
Broadcast address Broadcast address of the subnet attached to an interface
The Maximum Transmit Unit Maximum transmission units on the interface, in bytes
input packets, bytes, multicasts Unicast packets, bytes, and multicast packets received on an
output packets, bytes, multicasts interface (the statistics start at the device startup)
ARP packet input number: Total number of ARP packets received on the interface (the
statistics start at the device startup), including
Request packet:
z ARP request packets
Reply packet:
z ARP reply packets
Unknown packet: z Unknown packets
Number of TTL-invalid packets received on the interface (the
TTL invalid packet number
statistics start at the device startup)
1-2
Field Description
ICMP packet input number: Total number of ICMP packets received on the interface (the
Echo reply: statistics start at the device startup), including the following
Unreachable: packets:
Source quench: z Echo reply packets
z Unreachable packets
Routing redirect:
z Source quench packets
Echo request:
z Routing redirect packets
Router advert: z Echo request packets
Router solicit: z Router advertisement packets
Time exceed: z Router solicitation packets
IP header bad: z Time exceeded packets
Timestamp request: z IP header bad packets
z Timestamp request packets
Timestamp reply:
z Timestamp reply packets
Information request:
z Information request packets
Information reply: z Information reply packets
Netmask request: z Netmask request packets
Netmask reply: z Netmask reply packets
Unknown type: z Unknown type packets
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display ip interface brief command to display brief information about a specified or all Layer 3
interfaces.
Note that,without the interface type and interface number specified, the information about all Layer 3
interfaces is displayed; with only the interface type specified, the information about all Layer 3 interfaces
of the specified type is displayed; with both the interface type and interface number specified, only the
information about the specified interface is displayed.
Related commands: display ip interface.
Examples
1-3
<Sysname> display ip interface brief vlan-interface
*down: administratively down
(s): spoofing
Interface Physical Protocol IP Address Description
Vlan-interface1 up up 6.6.6.6 Vlan-inte...
Vlan-interface2 up up 7.7.7.7 VLAN2
Field Description
The interface is administratively shut down with the shutdown
*down: administratively down
command.
Spoofing attribute of the interface. It indicates that an interface
(s) : spoofing whose network layer protocol is displayed up may have no link
present or the link is set up only on demand.
Interface Interface name
Physical state of the interface, which can be
z *down: Indicates that the interface is administratively down; that
is, the interface is shut down with the shutdown command.
Physical z down: Indicates that the interface is administratively up but its
physical state is down, which may be caused by a connection or
link failure.
z up: Indicates that both the administrative and physical states of
the interface are up.
Link layer protocol state of the interface, which can be
z down: Indicates that the protocol state of the interface is down,
Protocol which is usually because that no IP address is assigned to the
interface.
z up: Indicates that the protocol state of the interface is up.
IP address of the interface (If no IP address is configured,
IP Address
“unassigned” is displayed.)
Interface description information, for which at most 12 characters
Description can be displayed. If there are more that 12 characters, only the first
nine characters are displayed.
ip address
Syntax
View
Interface view
Default Level
2: System level
Parameters
1-4
mask: Subnet mask in dotted decimal notation.
mask-length: Subnet mask length, the number of consecutive ones in the mask.
Description
Use the ip address command to assign an IP address and mask to the interface.
Use the undo ip address command to remove all IP addresses from the interface.
By default, no IP address is assigned to any interface.
Related commands: display ip interface.
Examples
# Assign VLAN-interface 1 a primary IP address 129.12.0.1, with subnet masks being 255.255.255.0.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ip address 129.12.0.1 255.255.255.0
1-5
Table of Contents
i
1 IP Performance Optimization Configuration
Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
|: Uses a regular expression to match FIB entries. For detailed information about regular expression,
refer to CLI display in Basic System Configuration.
begin: Displays the first entry that matches the specified regular expression and all the FIB entries
following it.
exclude: Displays the FIB entries that do not match the specified regular expression.
include: Displays the FIB entries that match the specified regular expression.
regular-expression: A case-sensitive string of 1 to 256 characters, excluding spaces.
acl acl-number: Displays FIB entries matching a specified ACL numbered from 2000 to 2999. If the
specified ACL does not exist, all FIB entries are displayed.
ip-prefix ip-prefix-name: Displays FIB entries matching a specified IP prefix list, a string of 1 to 19
characters. If the specified IP prefix list does not exist, all FIB entries are displayed.
Currently, the S5120-SI series Ethernet switches do not support the ip-prefix keyword. That is, they do
not display FIB entries matching a specified IP prefix list.
1-1
Description
Use the display fib command to display FIB entries. If no parameters are specified, all FIB entries will
be displayed.
Examples
Flag:
U:Useable G:Gateway H:Host B:Blackhole D:Dynamic S:Static
R:Relay
Flag:
U:Useable G:Gateway H:Host B:Blackhole D:Dynamic S:Static
R:Relay
# Display all entries that contain the string 127 and start from the first one.
<Sysname> display fib | begin 127
Flag:
U:Useable G:Gateway H:Host B:Blackhole D:Dynamic S:Static
R:Relay
1-2
Table 1-1 display fib command output description
Field Description
Destination count Total number of destination addresses
FIB entry count Total number of FIB entries
Destination/Mask Destination address/length of mask
Nexthop Address of next hop
Flags of routes:
z “U”—Usable route
z “G”—Gateway route
Flag z “H”—Host route
z “B”—Blackhole route
z “D”—Dynamic route
z “S”—Static route
z “R”—Relay route
OutInterface Outbound interface
InnerLabel Inner label
Token LSP index number
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display fib ip-address command to display FIB entries that match the specified destination IP
address.
If no mask or mask length is specified, the FIB entry that matches the destination IP address and has
the longest mask will be displayed; if the mask is specified, the FIB entry that exactly matches the
specified destination IP address will be displayed.
Examples
# Display the FIB entries that match the destination IP address of 10.2.1.1.
1-3
<Sysname> display fib 10.2.1.1
Destination count: 1 FIB entry count: 1
Flag:
U:Useable G:Gateway H:Host B:Blackhole D:Dynamic S:Static
R:Relay
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Examples
1-4
Table 1-2 display icmp statistics command output description
Field Description
bad formats Number of input wrong format packets
bad checksum Number of input wrong checksum packets
echo Number of input/output echo packets
destination unreachable Number of input/output destination unreachable packets
source quench Number of input/output source quench packets
redirects Number of input/output redirection packets
echo reply Number of input/output replies
parameter problem Number of input/output parameter problem packets
timestamp Number of input/output time stamp packets
information request Number of input information request packets
mask requests Number of input/output mask requests
mask replies Number of input/output mask replies
display ip socket
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
socktype sock-type: Displays the socket information of this type. The sock type is in the range 1 to 3,
corresponding to TCP, UDP and raw IP respectively.
task-id: Displays the socket information of this task. Task ID is in the range 1 to 150.
socket-id: Displays the information of the socket. Socket ID is in the range 0 to 3072.
Description
Examples
1-5
Task = VTYD(38), socketid = 1, Proto = 6,
LA = 0.0.0.0:23, FA = 0.0.0.0:0,
sndbuf = 8192, rcvbuf = 8192, sb_cc = 0, rb_cc = 0,
socket option = SO_ACCEPTCONN SO_KEEPALIVE SO_REUSEPORT SO_SENDVPNID(3073) SO_SETKEEPALIVE,
socket state = SS_PRIV SS_ASYNC
SOCK_DGRAM:
Task = NTPT(37), socketid = 1, Proto = 17,
LA = 0.0.0.0:123, FA = 0.0.0.0:0,
sndbuf = 9216, rcvbuf = 41600, sb_cc = 0, rb_cc = 0,
socket option = SO_UDPCHECKSUM SO_SENDVPNID(3073),
socket state = SS_PRIV
1-6
socket state = SS_PRIV SS_NBIO SS_ASYNC
SOCK_RAW:
Task = ROUT(69), socketid = 8, Proto = 89,
LA = 0.0.0.0, FA = 0.0.0.0,
sndbuf = 262144, rcvbuf = 262144, sb_cc = 0, rb_cc = 0,
socket option = SO_SENDVPNID(0) SO_RCVVPNID(0),
socket state = SS_PRIV SS_ASYNC
1-7
sndbuf = 4194304, rcvbuf = 4194304, sb_cc = 0, rb_cc = 0,
socket option = 0,
socket state = SS_PRIV SS_NBIO SS_ASYNC
Field Description
SOCK_STREAM TCP socket
SOCK_DGRAM UDP socket
SOCK_RAW Raw IP socket
display ip statistics
Syntax
display ip statistics
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Examples
1-8
<Sysname> display ip statistics
Input: sum 7120 local 112
bad protocol 0 bad format 0
bad checksum 0 bad options 0
Output: forwarding 0 local 27
dropped 0 no route 2
compress fails 0
Fragment:input 0 output 0
dropped 0
fragmented 0 couldn't fragment 0
Reassembling:sum 0 timeouts 0
Field Description
sum Total number of packets received
local Total number of packets with destination being local
bad protocol Total number of unknown protocol packets
Input:
bad format Total number of packets with incorrect format
bad checksum Total number of packets with incorrect checksum
bad options Total number of packets with incorrect option
forwarding Total number of packets forwarded
local Total number of packets sent from the local
Output: dropped Total number of packets discarded
no route Total number of packets for which no route is available
compress fails Total number of packets failed to be compressed
input Total number of fragments received
output Total number of fragments sent
Fragment: dropped Total number of fragments dropped
fragmented Total number of packets successfully fragmented
Syntax
View
Any view
1-9
Default Level
1: Monitor level
Parameters
None
Description
Use the display tcp statistics command to display statistics of TCP traffic.
Related commands: display tcp status, reset tcp statistics.
Examples
Sent packets:
Total: 6726
urgent packets: 0
control packets: 21 (including 0 RST)
window probe packets: 0, window update packets: 0
1-10
Table 1-5 display tcp statistics command output description
Field Description
Total Total number of packets received
packets in sequence Number of packets arriving in sequence
window probe packets Number of window probe packets received
window update packets Number of window update packets received
checksum error Number of checksum error packets received
offset error Number of offset error packets received
Number of received packets with length being too
short error
small
Received duplicate packets Number of completely duplicate packets received
packets:
partially duplicate packets Number of partially duplicate packets received
out-of-order packets Number of out-of-order packets received
packets of data after
Number of packets outside the receiving window
window
packets received after Number of packets that arrived after connection is
close closed
ACK packets Number of ACK packets received
duplicate ACK packets Number of duplicate ACK packets received
too much ACK packets Number of ACK packets for data unsent
Total Total number of packets sent
urgent packets Number of urgent packets sent
control packets Number of control packets sent
Number of window probe packets sent; in the brackets
window probe packets
Sent are resent packets
packets: window update packets Number of window update packets sent
data packets Number of data packets sent
data packets retransmitted Number of data packets retransmitted
1-11
Field Description
Number of connections closed; in brackets are
connections closed accidentally (before receiving SYN
Closed connections
from the peer) and connections closed initiatively (after
receiving SYN from the peer)
Packets dropped with MD5 authentication Number of packets dropped by MD5 authentication
Packets permitted with MD5 authentication Number of packets permitted by MD5 authentication
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display tcp status command to display status of all TCP connections for monitoring TCP
connections.
Examples
Field Description
If the status information of a TCP connection contains *, the TCP adopts
*
the MD5 algorithm for authentication.
TCPCB TCP control block
Local Add:port Local IP address and port number
Foreign Add:port Remote IP address and port number
State State of the TCP connection
1-12
display udp statistics
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display udp statistics command to display statistics of UDP packets.
Related commands: reset udp statistics.
Examples
Field Description
Total Total number of UDP packets received
checksum error Total number of packets with incorrect checksum
shorter than header Number of packets with data shorter than head
data length larger than packet Number of packets with data longer than packet
Received unicast(no socket on port) Number of unicast packets with no socket on port
packets:
broadcast/multicast(no socket Number of broadcast/multicast packets without
on port) socket on port
Number of packets not delivered to an upper layer
not delivered, input socket full
due to a full socket cache
input packets missing pcb Number of packets without matching protocol
cache control block (PCB) cache
1-13
Field Description
Sent
Total Total number of UDP packets sent
packets:
Syntax
View
Interface view
Default Level
2: System level
Parameters
acl acl-number: Access control list number, in the range 2000 to 3999. From 2000 to 2999 are numbers
for basic ACLs, and from 3000 to 3999 are numbers for advanced ACLs. Only directed broadcasts
permitted by the ACL can be forwarded.
Description
Use the ip forward-broadcast command to enable the interface to forward directed broadcasts to a
directly-connected network.
Use the undo ip forward-broadcast command to disable the interface from forwarding directed
broadcasts to a directly-connected network.
By default, an interface is disabled from forwarding directed broadcasts to a directly-connected
network.
Examples
Syntax
ip forward-broadcast
undo ip forward-broadcast
View
System view
1-14
Default Level
2: System level
Parameters
None
Description
Use the ip forward-broadcast command to enable the device to receive directed broadcasts.
Use the undo ip forward-broadcast command to disable the device from receiving directed
broadcasts.
By default, the device is enabled from receiving directed broadcasts.
Currently, this command is ineffective on the S5120-SI series Ethernet switches. That is, the switches
cannot be disabled from receiving directed broadcasts.
Examples
ip ttl-expires enable
Syntax
ip ttl-expires enable
undo ip ttl-expires
View
System view
Default Level
2: System level
Parameters
None
Description
Use the ip ttl-expires enable command to enable sending of ICMP timeout packets.
Use the undo ip ttl-expires command to disable sending of ICMP timeout packets.
Sending ICMP timeout packets is disabled by default.
1-15
If the feature is disabled, the device will not send TTL timeout ICMP packets, but still send “reassembly
timeout” ICMP packets.
Examples
ip unreachables enable
Syntax
ip unreachables enable
undo ip unreachables
View
System view
Default Level
2: System level
Parameters
None
Description
Use the ip unreachables enable command to enable sending of ICMP destination unreachable
packets.
Use the undo ip unreachables command to disable sending of ICMP destination unreachable
packets.
Sending ICMP destination unreachable packets is disabled by default.
Examples
reset ip statistics
Syntax
reset ip statistics
View
User view
Default Level
2: System level
1-16
Parameters
None
Description
Examples
Syntax
View
User view
Default Level
2: System level
Parameters
None
Description
Use the reset tcp statistics command to clear statistics of TCP traffic.
Related commands: display tcp statistics.
Examples
Syntax
View
User view
Default Level
2: System level
Parameters
None
1-17
Description
Use the reset udp statistics command to clear statistics of UDP traffic.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Use the tcp anti-naptha enable command to enable the protection against Naptha attack.
Use the undo tcp anti-naptha enable command to disable the protection against Naptha attack.
By default, the protection against Naptha attack is disabled.
Note that the configurations made by using the tcp state and tcp timer check-state commands will be
removed after the protection against Naptha attack is disabled.
Examples
tcp state
Syntax
View
System view
1-18
Default Level
2: System level
Parameters
Description
Use the tcp state command to configure the maximum number of TCP connections in a state. When
this number is exceeded, the aging of TCP connections in this state will be accelerated.
Use the undo tcp state command to restore the default.
By default, the maximum number of TCP connections in each state is 5.
Note the following points:
z You need to enable the protection against Naptha attack before executing this command.
Otherwise, an error will be prompted.
z You can respectively configure the maximum number of TCP connections in each state.
z If the maximum number of TCP connections in a state is 0, the aging of TCP connections in this
state will not be accelerated.
Related commands: tcp anti-naptha enable.
Examples
# Set the maximum number of TCP connections in the ESTABLISHED state to 100.
<Sysname> system-view
[Sysname] tcp anti-naptha enable
[Sysname] tcp state established connection-number 100
Syntax
View
System view
Default Level
2: System level
1-19
Parameters
None
Description
Use the tcp syn-cookie enable command to enable the SYN Cookie feature to protect the device
against SYN Flood attacks.
Use the undo tcp syn-cookie enable command to disable the SYN Cookie feature.
By default, the SYN Cookie feature is disabled.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
time-value: TCP connection state check interval in seconds, in the range of 1 to 60.
Description
Use the tcp timer check-state command to configure the TCP connection state check interval.
Use the undo tcp timer check-state command to restore the default.
By default, the TCP connection state check interval is 30 seconds.
The device periodically checks the number of TCP connections in each state. If it detects that the
number of TCP connections in a state exceeds the maximum number, it will accelerate the aging of TCP
connections in such a state.
Note that you need to enable the protection against Naptha attack before executing this command.
Otherwise, an error will be prompted.
Related commands: tcp anti-naptha enable.
Example
1-20
[Sysname] tcp timer check-state 40
Syntax
View
System view
Default Level
2: System level
Parameters
time-value: Length of the TCP finwait timer in seconds, in the range 76 to 3,600.
Description
Use the tcp timer fin-timeout command to configure the length of the TCP finwait timer.
Use the undo tcp timer fin-timeout command to restore the default.
By default, the length of the TCP finwait timer is 675 seconds.
Note that the actual length of the finwait timer is determined by the following formula:
Actual length of the finwait timer = (Configured length of the finwait timer – 75) + configured length of the
synwait timer
Related commands: tcp timer syn-timeout, tcp window.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
1-21
Description
Use the tcp timer syn-timeout command to configure the length of the TCP synwait timer.
Use the undo tcp timer syn-timeout command to restore the default.
By default, the value of the TCP synwait timer is 75 seconds.
Related commands: tcp timer fin-timeout, tcp window.
Examples
tcp window
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the tcp window command to configure the size of the TCP send/receive buffer.
Use the undo tcp window command to restore the default.
The size of the TCP send/receive buffer is 8 KB by default.
Related commands: tcp timer fin-timeout, tcp timer syn-timeout.
Examples
1-22
Table of Contents
i
1 ARP Configuration Commands
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Use the arp check enable command to enable ARP entry check. With this function enabled, the device
cannot learn any ARP entry with a multicast MAC address. Configuring such a static ARP entry is not
allowed either; otherwise, the system displays error messages.
Use the undo arp check enable command to disable the function. After the ARP entry check is
disabled, the device can learn the ARP entry with a multicast MAC address, and you can also configure
such a static ARP entry on the device.
By default, ARP entry check is enabled.
Examples
arp max-learning-num
Syntax
View
Ethernet interface view, VLAN interface view, Layer-2 aggregate interface view
1-1
Default Level
2: System level
Parameters
number: Maximum number of dynamic ARP entries that an interface can learn. The value is in the range
0 to 256.
Description
Use the arp max-learning-num command to configure the maximum number of dynamic ARP entries
that an interface can learn.
Use the undo arp max-learning-num command to restore the default.
By default, the maximum number of dynamic ARP entries that a interface can learn is 256.
Examples
# Specifiy Layer-2 aggregate interface Bridge-aggregation 1 to learn up to 100 dynamic ARP entries.
<Sysname> system-view
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] arp max-learning-num 100
arp static
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the arp static command to configure a static ARP entry in the ARP mapping table.
Use the undo arp command to remove an ARP entry.
1-2
Note that:
z A static ARP entry is effective when the device works normally. However, when the VLAN or VLAN
interface to which an ARP entry corresponds is deleted, the entry, if permanent, will be deleted,
and if non-permanent and resolved, will become unresolved.
z The vlan-id argument is used to specify the corresponding VLAN of an ARP entry and must be the
ID of an existing VLAN. In addition, the Ethernet interface following the argument must belong to
that VLAN. The VLAN interface of the VLAN must have been created.
z If both the vlan-id and ip-address arguments are specified, the IP address of the VLAN interface
corresponding to the vlan-id argument must belong to the same network segment as the IP
address specified by the ip-addres argument.
Related commands: reset arp, display arp.
Examples
# Configure a static ARP entry, with the IP address being 202.38.10.2, the MAC address being
00e0-fc01-0000, and the outbound interface being GigabitEthernet 1/0/1 of VLAN 10.
<Sysname> system-view
[Sysname] arp static 202.38.10.2 00e0-fc01-0000 10 GigabitEthernet 1/0/1
Syntax
View
System view
Default Level
2: System level
Parameters
aging-time: Aging time for dynamic ARP entries in minutes, in the range 1 to 1,440.
Description
Use the arp timer aging command to set aging time for dynamic ARP entries.
Use the undo arp timer aging command to restore the default.
By default, the aging time for dynamic ARP entries is 20 minutes.
Related commands: display arp timer aging.
Examples
1-3
display arp
Syntax
display arp [ [ all | dynamic | static ] | vlan vlan-id | interface interface-type interface-number ] [ [ |
{ begin | exclude | include } regular-expression ] | count ]
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display arp command to display ARP entries in the ARP mapping table.
If no parameter is specified, all ARP entries are displayed.
Related commands: arp static, reset arp.
Examples
Field Description
IP Address IP address in an ARP entry
1-4
Field Description
MAC Address MAC address in an ARP entry
VLAN ID VLAN ID contained a static ARP entry
Interface Outbound interface in an ARP entry
Aging time for a dynamic ARP entry in minutes (“N/A” means unknown
Aging
aging time or no aging time)
Type ARP entry type: D for dynamic, S for static.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display arp ip-address command to display the ARP entry for a specified IP address.
Related commands: arp static, reset arp.
Examples
1-5
display arp timer aging
Syntax
View
Any view
Default Level
2: System level
Parameters
None
Description
Use the display arp timer aging command to display the aging time for dynamic ARP entries.
Related commands: arp timer aging.
Examples
reset arp
Syntax
View
User view
Default Level
2: System level
Parameters
Description
Use the reset arp command to clear ARP entries except authorized ARP entries from the ARP mapping
table.
Related commands: arp static, display arp.
1-6
Examples
Syntax
gratuitous-arp-sending enable
undo gratuitous-arp-sending enable
View
System view
Default Level
2: System level
Parameters
None
Description
Use the gratuitous-arp-sending enable command to enable a device to send gratuitous ARP packets
when receiving ARP requests from another network segment.
Use the undo gratuitous-arp-sending enable command to restore the default.
By default, a device cannot send gratuitous ARP packets when receiving ARP requests from another
network segment.
Examples
gratuitous-arp-learning enable
Syntax
gratuitous-arp-learning enable
undo gratuitous-arp-learning enable
View
System view
Default Level
2: System level
1-7
Parameters
None
Description
Use the gratuitous-arp-learning enable command to enable the gratuitous ARP packet learning
function.
Use the undo gratuitous-arp-learning enable command to disable the function.
By default, the function is enabled.
With this function enabled, a device receiving a gratuitous ARP packet can add the source IP and MAC
addresses carried in the packet to its own dynamic ARP table if it finds no ARP entry in the cache
corresponding to the source IP address of the ARP packet exists; if the corresponding ARP entry exists
in the cache, the device updates the ARP entry regardless of whether this function is enabled.
Examples
1-8
2 ARP Attack Defense Configuration Commands
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Use the arp anti-attack active-ack enable command to enable the ARP active acknowledgement
function.
Use the undo arp anti-attack active-ack enable command to restore the default.
By default, the ARP active acknowledgement function is disabled.
Typically, this feature is configured on gateway devices to identify invalid ARP packets.
With this feature enabled, the gateway, upon receiving an ARP packet with a different source MAC
address from that in the corresponding ARP entry, checks whether the ARP entry has been updated
within the last minute:
z If yes, the ARP entry is not updated;
z If not, the gateway sends a unicast request to the source MAC address of the ARP entry.
Then,
z If a response is received within five seconds, the ARP packet is ignored;
z If no response is received, the gateway sends a unicast request to the source MAC address of the
ARP packet.
Then,
z If a response is received within five seconds, the gateway updates the ARP entry;
z If not, the ARP entry is not updated.
Examples
2-1
<Sysname> system-view
[Sysname] arp anti-attack active-ack enable
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the arp anti-attack source-mac command to enable source MAC address based ARP attack
detection and specify the detection mode.
Use the undo arp anti-attack source-mac command to restore the default.
By default, source MAC address based ARP attack detection is disabled.
After you enable this feature, the device checks the source MAC address of ARP packets received from
the VLAN. If the number of ARP packets received from a source MAC address within five seconds
exceeds the specified threshold:
z In filter detection mode, the device displays an alarm and filters out the ARP packets from the MAC
address.
z In monitor detection mode, the device only displays an alarm.
Note that: If no detection mode is specified in the undo arp anti-attack source-mac command, both
detection modes are disabled.
Examples
Syntax
2-2
undo arp anti-attack source-mac aging-time
View
System view
Default Level
2: System level
Parameters
time: Aging timer for protected MAC addresses, in the range of 60 to 6000 seconds.
Description
Use the arp anti-attack source-mac aging-time command to configure the aging timer for protected
MAC addresses.
Use the undo arp anti-attack source-mac aging-time command to restore the default.
By default, the aging timer for protected MAC addresses is 300 seconds (five minutes).
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
mac-address&<1-10>: MAC address list. The mac-address argument indicates a protected MAC
address in the format H-H-H. &<1-10> indicates the number of protected MAC addresses that you can
configure.
Description
Use the arp anti-attack source-mac exclude-mac command to configure protected MAC addresses
which will be excluded from ARP packet detection.
Use the undo arp anti-attack source-mac exclude-mac command to remove the configured
protected MAC addresses.
By default, no protected MAC address is configured.
2-3
Note that: If no MAC address is specified in the undo arp anti-attack source-mac exclude-mac
command, all the configured protected MAC addresses are removed.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
threshold-value: Threshold for source MAC address based ARP attack detection, in the range of 10 to
100.
Description
Use the arp anti-attack source-mac threshold command to configure the threshold for source MAC
address based ARP attack detection. If the number of ARP packets sent from a MAC address within five
seconds exceeds this threshold, the device considers this an attack.
Use the undo arp anti-attack source-mac threshold command to restore the default.
By default, the threshold for source MAC address based ARP attack detection is 50.
Examples
# Configure the threshold for source MAC address based ARP attack detection as 30.
<Sysname> system-view
[Sysname] arp anti-attack source-mac threshold 30
Syntax
View
Any view
Default Level
1: Monitor level
2-4
Parameters
Description
Use the display arp anti-attack source-mac command to display attacking MAC addresses detected
by source MAC address based ARP attack detection.
If no interface is specified, the display arp anti-attack source-mac command displays attacking MAC
addresses detected on all the interfaces.
Examples
# Display the attacking MAC addresses detected by source MAC address based ARP attack detection.
<Sysname> display arp anti-attack source-mac
Source-MAC VLAN ID Interface Aging-time
23f3-1122-3344 4094 GE1/0/1 10
23f3-1122-3355 4094 GE1/0/2 30
23f3-1122-33ff 4094 GE1/0/3 25
23f3-1122-33ad 4094 GE1/0/4 30
23f3-1122-33ce 4094 GE1/0/5 2
Syntax
View
Default Level
2: System level
Parameters
Description
Use the arp rate-limit command to configure or disable ARP packet rate limit on an interface.
Use the undo arp rate-limit command to restore the default.
By default, ARP packet rate limit is not enabled.
2-5
Examples
# Specify the ARP packet rate on GigabitEthernet1/0/1 as 50 pps, and exceeded packets will be
discarded.
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] arp rate-limit rate 50 drop
Syntax
View
VLAN view
Default Level
2: System level
Parameters
None
Description
Use the arp detection enable command to enable ARP detection for the VLAN.
Use the undo arp detection enable command to disable ARP detection for the VLAN.
By default, ARP detection is disabled for a VLAN.
Examples
Syntax
View
System view
2-6
Default Level
2: System level
Parameters
dhcp-snooping: Implements ARP attack detection based on DHCP snooping entries. This mode is
mainly used to prevent source address spoofing attacks.
dot1x: Implements ARP attack detection based on 802.1X security entries. This mode is mainly used to
prevent source address spoofing attacks.
static-bind: Implements ARP attack detection based on static IP-to-MAC binding entries. This mode is
mainly used to prevent gateway spoofing attacks.
Description
Use the arp detection mode command to specify an ARP attack detection mode.
Use the undo arp detection mode command to cancel the specified ARP detection mode.
By default, no ARP detection mode is specified, that is, all packets are considered to be invalid.
Note that, if you specify the three modes at the same time, the system uses static IP-to-MAC bindings
first, then DHCP snooping entries, and then 802.1X security entries.
Examples
# Enable ARP detection based on both DHCP snooping entries and 802.1X security entries.
<Sysname> system-view
[Sysname] arp detection mode dhcp-snooping
[Sysname] arp detection mode dot1x
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the arp detection static-bind command to configure a static IP-to-MAC binding.
Use the undo arp detection static-bind command to remove the configure static binding.
By default, no static IP-to-MAC binding is configured.
2-7
With ARP detection based on static IP-to-MAC bindings configured, the device, upon receiving an ARP
packet from an ARP trusted/untrusted port, compares the source IP and MAC addresses of the ARP
packet against the static IP-to-MAC bindings.
z If an entry with a matching IP address but different MAC address is found, the ARP packet is
considered invalid and discarded.
z If an entry with both matching IP and MAC addresses is found, the ARP packet is considered valid
and can pass the detection.
z If no match is found, the ARP packet is considered valid and can pass the detection.
Note that: If no IP address is specified in the undo arp detection static-bind command, all configured
static IP-to-MAC bindings are removed.
Examples
Syntax
View
Default Level
2: System level
Parameters
None
Description
Use the arp detection trust command to configure the port as an ARP trusted port.
Use the undo arp detection trust command to configure the port as an ARP untrusted port.
By default, the port is an ARP untrusted port.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
dst-mac: Checks the target MAC address of ARP responses. If the target MAC address is all-zero,
all-one, or inconsistent with the destination MAC address in the Ethernet header, the packet is
considered invalid and discarded.
ip: Checks the source and destination IP addresses of ARP packets. The all-zero, all-one or multicast
IP addresses are considered invalid and the corresponding packets are discarded. With this keyword
specified, the source and destination IP addresses of ARP replies, and the source IP address of ARP
requests will be checked.
src-mac: Checks whether the source MAC address of an ARP packet is identical to that in its Ethernet
header. If they are identical, the packet is considered valid; otherwise, the packet is discarded.
Description
Use the arp detection validate command to configure ARP detection based on specified objects. You
can specify one or more objects in one command line.
Use the undo arp detection validate command to remove detected objects. If no keyword is specified,
all the detected objects are removed.
By default, ARP detection based on specified objects is disabled.
Examples
# Enable the checking of the MAC addresses and IP addresses of ARP packets.
<Sysname> system-view
[Sysname] arp detection validate dst-mac src-mac ip
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
2-9
Description
Use the display arp detection command to display the VLAN(s) enabled with ARP detection.
Related commands: arp detection enable.
Examples
Field Description
ARP detection is enabled in the following VLANs VLANs that are enabled with ARP detection
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
interface interface-type interface-number: Displays the ARP detection statistics of a specified interface.
Description
Use the display arp detection statistics command to display statistics about ARP detection. This
command only displays numbers of discarded packets. If no interface is specified, the statistics of all the
interfaces will be displayed.
Examples
2-10
GE1/0/6(U) 0 0 0 0
Field Description
Interface(State) State T or U identifies a trusted or untrusted port.
Number of ARP packets discarded due to invalid source and
IP
destination IP addresses
Src-MAC Number of ARP packets discarded due to invalid source MAC address
Number of ARP packets discarded due to invalid destination MAC
Dst-MAC
address
Number of ARP packets that failed to pass ARP detection (based on
Inspect DHCP snooping entries/802.1X security entries/static IP-to-MAC
bindings)
Syntax
View
User view
Default Level
2: System level
Parameters
interface interface-type interface-number: Clears the ARP detection statistics of a specified interface.
Description
Use the reset arp detection statistics command to clear ARP detection statistics of a specified
interface. If no interface is specified, the statistics of all the interfaces will be cleared.
Examples
Syntax
2-11
View
Default Level
2: System level
Parameters
interval milliseconds: Sets the interval at which gratuitous ARP packets are sent. The value ranges 200
to 5000, in milliseconds. The default value is 2000 ms.
Description
Use the arp anti-attack send-gratuitous-arp command to enable periodic sending of gratuitous ARP
packets and set the sending interval.
Use the undo arp anti-attack send-gratuitous-arp command to disable the device from periodically
sending gratuitous ARP packets.
By default, the device is disabled from sending gratuitous ARP packets periodically.
Note that:
z This function takes effect only when the link of the interface goes up and an IP address has been
assigned to the interface.
z If you change the interval of sending ARP packets, the configuration is effective at the next sending
interval.
Examples
2-12
Table of Contents
i
display dhcp-snooping information··································································································3-9
display dhcp-snooping packet statistics ························································································3-10
display dhcp-snooping trust···········································································································3-10
reset dhcp-snooping ······················································································································3-11
reset dhcp-snooping packet statistics ···························································································3-12
ii
1 DHCP Relay Agent Configuration Commands
Syntax
View
Interface view
Default Level
2: System level
Parameters
Description
Use the dhcp relay address-check enable command to enable IP address match check on the relay
agent.
Use the dhcp relay address-check disable command to disable IP address match check on the relay
agent.
By default, the function is disabled.
If a requesting client’s IP and MAC addresses do not match any binding (both dynamic and static
bindings) on the DHCP relay agent, the client cannot access external networks via the DHCP relay
agent.
Note that,The dhcp relay address-check enable command only checks IP and MAC addresses of
clients.
Examples
Syntax
1-1
undo dhcp relay information circuit-id format-type
View
Interface view
Default Level
2: System level
Parameters
ascii: Specifies the code type for the circuit ID sub-option as ascii.
hex: Specifies the code type for the circuit ID sub-option as hex.
Description
Use the dhcp relay information circuit-id format-type command to configure the code type for the
non-user-defined circuit ID sub-option.
Use the undo dhcp relay information circuit-id format-type command to restore the default.
By default, the code type for the circuit ID sub-option depends on the specified padding format of Option
82. Each field has its own code type.
Note that:
This command applies to configuring the non-user-defined circuit ID sub-option only. After you
configure the padding content for the circuit ID sub-option using the dhcp relay information circuit-id
string command, ASCII is adopted as the code type.
Related commands: display dhcp relay information.
Examples
# Configure the code type for the non-user-defined circuit ID sub-option as ascii.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay information circuit-id format-type ascii
Syntax
View
Interface view
Default Level
2: System level
Parameters
circuit-id: Padding content for the user-defined circuit ID sub-option, a case-sensitive string of 3 to 63
characters.
1-2
Description
Use the dhcp relay information circuit-id string command to configure the padding content for the
user-defined circuit ID sub-option.
Use the undo dhcp relay information circuit-id string command to restore the default.
By default, the padding content for the circuit ID sub-option depends on the padding format of Option
82.
Note that:
After you configure the padding content for the circuit ID sub-option using this command, ASCII is
adopted as the code type.
Related commands: dhcp relay information format, display dhcp relay information.
Examples
Syntax
View
Interface view
Default Level
2: System level
Parameters
None
Description
Use the dhcp relay information enable command to enable the relay agent to support Option 82.
Use the undo dhcp relay information enable command to disable Option 82 support.
By default, Option 82 support is disabled on DHCP relay agent.
Related commands: display dhcp relay information.
Examples
1-3
dhcp relay information format
Syntax
dhcp relay information format { normal | verbose [ node-identifier { mac | sysname | user-defined
node-identifier } ] }
undo dhcp relay information format [ verbose node-identifier ]
View
Interface view
Default Level
2: System level
Parameters
Description
Use the dhcp relay information format command to specify a padding format for Option 82.
Use the undo dhcp relay information format command to restore the default padding format.
The Option 82 padding format defaults to normal.
z Using the undo dhcp relay information format command without the keyword verbose
node-identifier restores the default normal padding format, or with the keyword verbose
node-identifier restores the mac mode of the verbose padding format.
z If configuring the handling strategy of the DHCP relay agent as replace, you need to configure a
padding format of Option 82. If the handling strategy is keep or drop, you need not configure any
padding format.
z If sub-option 1 (node identifier) of Option 82 is padded with the device name (sysname) of a node,
the device name must contain no spaces. Otherwise, the DHCP relay agent will drop the message.
Examples
1-4
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay information enable
[Sysname-Vlan-interface1] dhcp relay information strategy replace
[Sysname-Vlan-interface1] dhcp relay information format verbose
Syntax
View
Interface view
Default Level
2: System view
Parameters
ascii: Specifies the code type for the remote ID sub-option as ascii.
hex: Specifies the code type for the remote ID sub-option as hex.
Description
Use the dhcp relay information remote-id format-type command to configure the code type for the
non-user-defined remote ID sub-option.
Use the undo dhcp relay information remote-id format-type command to restore the default.
By default, the code type for the remote ID sub-option is HEX.
Note that:
This command applies to configuring the non-user-defined remote ID sub-option only. After you
configure the padding content for the remote ID sub-option using the dhcp relay information
remote-id string command, ASCII is adopted as the code type.
Related commands: display dhcp relay information.
Examples
# Configure the code type for the non-user-defined remote ID sub-option as ascii.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay information remote-id format-type ascii
Syntax
1-5
View
Interface view
Default Level
2: System level
Parameters
remote-id: Padding content for the user-defined remote ID sub-option, a case sensitive string of 1 to 63
characters.
sysname: Specifies the device name as the padding content for the remote ID sub-option.
Description
Use the dhcp relay information remote-id string command to configure the padding content for the
user-defined remote ID sub-option.
Use the undo dhcp relay information remote-id string command to restore the default.
By default, the padding content for the remote ID sub-option depends on the padding format of Option
82.
Note that: After you configure the padding content for the remote ID sub-option using this command,
ASCII is adopted as the code type.
If you want to specify the character string sysname (a case-insensitive character string) as the padding
content for the remote ID sub-option, you need to use quotation marks to make it take effect. For
example, if you want to specify Sysname as the padding content for the remote ID sub-option, you
need to enter the dhcp relay information remote-id string “Sysname” command.
Related commands: dhcp relay information format, display dhcp relay information.
Examples
Syntax
View
Interface view
1-6
Default Level
2: System level
Parameters
Description
Use the dhcp relay information strategy command to configure DHCP relay agent handling strategy
for messages containing Option 82.
Use the undo dhcp relay information strategy command to restore the default handling strategy.
The handling strategy for messages containing Option 82 defaults to replace.
Related commands: display dhcp relay information.
Examples
# Configure the DHCP relay agent handling strategy for messages containing Option 82 as keep.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp relay information enable
[Sysname-Vlan-interface1] dhcp relay information strategy keep
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the dhcp relay release ip command to request the DHCP server to release a specified client IP
address.
Examples
1-7
dhcp relay security static
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the dhcp relay security static command to configure a static client entry, that is, the binding
between IP address, MAC address, and Layer 3 interface on the relay agent.
Use the undo dhcp relay security command to remove specified client entries from the relay agent.
No manual client entry is configured on the DHCP relay agent by default.
Note that:
z When using the dhcp relay security static command to bind an interface to a static client entry,
make sure that the interface is configured as a DHCP relay agent; otherwise, entry conflicts may
occur.
z The undo dhcp relay security interface command is used to remove all the dynamic client
entries from the interface.
Related commands: display dhcp relay security.
Examples
# Bind DHCP relay interface VLAN-interface 2 to IP address 10.10.1.1 and MAC address
0005-5d02-f2b3 of the client.
<Sysname> system-view
[Sysname] dhcp relay security static 10.10.1.1 0005-5d02-f2b3 interface vlan-interface 2
1-8
dhcp relay security refresh enable
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Use the dhcp relay security refresh enable command to enable the DHCP relay agent to periodically
refresh dynamic client entries.
Use the undo dhcp relay security refresh enable command to disable periodic refresh of dynamic
client entries.
By default, the DHCP relay agent is enabled to periodically refresh dynamic client entries.
Note that:
If you disable the DHCP relay agent from periodically refreshing dynamic client entries, such entries do
not age automatically. Therefore, if a client relinquishes its IP address, you need to manually remove
the corresponding dynamic client entry on the DHCP relay agent.
Related commands: dhcp relay security tracker and dhcp relay security static.
Examples
# Disable the DHCP relay agent from periodically refreshing dynamic client entries.
<Sysname> system-view
[Sysname] undo dhcp relay security refresh enable
Syntax
View
System view
Default Level
2: System level
1-9
Parameters
Description
Use the dhcp relay security tracker command to set a refreshing interval at which the relay agent
contacts the DHCP server for refreshing dynamic bindings.
Use the undo dhcp relay security tracker command to restore the default interval.
The default refreshing interval is auto, the value of 60 seconds divided by the number of binding entries.
Related commands: display dhcp relay security tracker.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Use the dhcp relay server-detect command to enable unauthorized DHCP server detection.
Use the undo dhcp relay server-detect command to disable unauthorized DHCP server detection.
By default, unauthorized DHCP server detection is disabled.
With this function enabled, upon receiving a DHCP request, the DHCP relay agent will record the IP
addresses of all DHCP servers which ever offered IP addresses to the DHCP client and the receiving
interface. Each server detected is recorded only once. The administrator can get this information from
logs to check out unauthorized DHCP servers.
After the information of recorded DHCP servers is cleared, the relay agent will re-record server
information following this mechanism.
1-10
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the dhcp relay server-group command to specify a DHCP server for a DHCP server group.
Use the undo dhcp relay server-group command to remove a DHCP server from a DHCP server
group, if no ip ip-address is specified, all servers in the DHCP server group and the server group itself
will be removed.
By default, no DHCP server is specified for a DHCP server group.
Note that:
z The IP address of any DHCP server and any interface’s IP address of the DHCP relay agent
cannot be in the same network segment. Otherwise, the client may fail to obtain an IP address.
z If a server group has been correlated to multiple interfaces, you need to cancel these correlations
before removing the server group.
Related commands: display dhcp relay server-group.
Examples
# Specify DHCP server 1.1.1.1 for DHCP server group 1 on the relay agent.
<Sysname> system-view
[Sysname] dhcp relay server-group 1 ip 1.1.1.1
Syntax
1-11
View
Interface view
Default Level
2: System level
Parameters
Description
Use the dhcp relay server-select command to correlate specified interface(s) to a specified DHCP
server group.
Use the undo dhcp relay server-select command to remove a configured correlation.
By default, no DHCP server group is correlated with an interface on the relay agent.
Note that:
z A DHCP server group can correlate with one or multiple DHCP relay agent interfaces.
z A relay agent interface can only correlate with one DHCP server group, and a newly configured
correlation overwrites the previous one. If the server group in the new correlation does not exist,
the new configuration will not work. The interface still maintains the previous correlation.
z The DHCP server group referenced in this command should have been configured by using the
dhcp relay server-group command.
Related commands: dhcp relay server-group, display dhcp relay.
Examples
Syntax
View
Interface view
Default Level
2: System level
Parameters
None
1-12
Description
Use the dhcp select relay command to enable the relay agent on the current interface. Upon receiving
requests from an enabled interface, the relay agent will forward these requests to outside DHCP
servers for IP address allocation.
Use the undo dhcp select relay command to restore the default.
After DHCP is enabled, the DHCP server is enabled on an interface by default. That is, upon receiving a
client’s request from the interface, the DHCP server allocates an IP address from the DHCP address
pool to the client.
When the working mode of the interface is changed from DHCP server to DHCP relay agent, neither the
IP address leases nor the authorized ARP entries will be deleted. However, these ARP entries may
conflict with new ARP entries generated on the DHCP relay agent; therefore, you are recommended to
delete the existing IP address leases when changing the interface working mode to DHCP relay agent.
Examples
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
all: Displays information of DHCP server groups that all interfaces correspond to.
interface interface-type interface-number: Displays information of the DHCP server group that a
specified interface corresponds to.
Description
Use the display dhcp relay command to display information about DHCP server groups correlated to
an interface or all interfaces.
Examples
1-13
Table 1-1 display dhcp relay all command output description
Field Description
Server-group DHCP server group number correlated to the interface.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display dhcp relay information command to display Option 82 configuration information on
the DHCP relay agent.
Examples
1-14
Table 1-2 display dhcp relay information all command output description
Field Description
Interface Interface name
Status Option 82 state, which can be Enable or Disable.
Handling strategy for requesting messages containing Option 82,
Strategy
which can be Drop, Keep, or Replace.
Format Padding format of Option 82, which can be Normal or Verbose.
Non-user-defined code type of the circuit ID sub-option, which can be
Circuit ID format-type
ASCII or HEX.
Non-user-defined code type of the remote ID sub-option, which can
Remote ID format-type
be ASCII or HEX.
Node identifier Access node identifier
User defined Content of user-defined sub-options
Circuit ID User-defined padding content of the circuit ID sub-option
Remote ID User-defined padding content of the remote ID sub-option
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display dhcp relay security command to display information about bindings of DHCP relay
agents. If no parameter is specified, information about all bindings will be displayed.
Examples
1-15
Table 1-3 display dhcp relay security command output description
Field Description
IP Address Client IP address
MAC Address Client MAC address
Type Type of binding, including dynamic, static, and temporary.
Layer 3 interface connecting to the DHCP client. If no interface is recorded in
Interface
the binding entry, “N/A” is displayed.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display dhcp relay security statistics command to display statistics information about
bindings of DHCP relay agents.
Examples
Table 1-4 display dhcp relay security statistics command output description
Field Description
Static Items Static binding items
Dynamic Items Dynamic binding items
1-16
display dhcp relay security tracker
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display dhcp relay security tracker command to display the interval for refreshing dynamic
bindings on the relay agent.
Examples
# Display the interval for refreshing dynamic bindings on the relay agent.
<Sysname> display dhcp relay security tracker
Current tracker interval : 10s
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
group-id: Displays the information of the specified DHCP server group numbered from 0 to 19.
all: Displays the information of all DHCP server groups.
Description
Use the display dhcp relay server-group command to display the configuration information of a
specified or all DHCP server groups.
Examples
1-17
No. Group IP
1 1.1.1.1
2 1.1.1.2
Field Description
No. Sequence number
Group IP IP address in the server group
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
group-id: Specifies a server group number in the range of 0 to 19 about which to display DHCP packet
statistics.
all: Specifies all server groups about which to display DHCP packet statistics. Information for each
group will be displayed.
Description
Use the display dhcp relay statistics command to display DHCP packet statistics related to a
specified or all DHCP server groups.
Note that if no parameter (server-group and all) is specified, all DHCP packet statistics on the relay
agent will be displayed.
Related commands: reset dhcp relay statistics.
Examples
1-18
DHCPOFFER packets received: 0
DHCPACK packets received: 0
DHCPNAK packets received: 0
BOOTPREPLY packets received: 0
DHCP packets relayed to servers: 0
DHCPDISCOVER packets relayed: 0
DHCPREQUEST packets relayed: 0
DHCPINFORM packets relayed: 0
DHCPRELEASE packets relayed: 0
DHCPDECLINE packets relayed: 0
BOOTPREQUEST packets relayed: 0
DHCP packets relayed to clients: 0
DHCPOFFER packets relayed: 0
DHCPACK packets relayed: 0
DHCPNAK packets relayed: 0
BOOTPREPLY packets relayed: 0
DHCP packets sent to servers: 0
DHCPDISCOVER packets sent: 0
DHCPREQUEST packets sent: 0
DHCPINFORM packets sent: 0
DHCPRELEASE packets sent: 0
DHCPDECLINE packets sent: 0
BOOTPREQUEST packets sent: 0
DHCP packets sent to clients: 0
DHCPOFFER packets sent: 0
DHCPACK packets sent: 0
DHCPNAK packets sent: 0
BOOTPREPLY packets sent: 0
# Display DHCP packet statistics related to every server group on the relay agent.
<Sysname> display dhcp relay statistics server-group all
DHCP relay server-group #0
Packet type Packet number
Client -> Server:
DHCPDISCOVER 0
DHCPREQUEST 0
DHCPINFORM 0
DHCPRELEASE 0
DHCPDECLINE 0
BOOTPREQUEST 0
Server -> Client:
DHCPOFFER 0
DHCPACK 0
DHCPNAK 0
BOOTPREPLY 0
1-19
reset dhcp relay statistics
Syntax
View
User view
Default Level
1: Monitor level
Parameters
server-group group-id: Specifies a server group ID (in the range of 0 to 19) about which to remove
statistics from the relay agent.
Description
Use the reset dhcp relay statistics command to remove statistics from the relay agent.
If no server-group is specified, all statistics will be removed from the relay agent.
Related commands: display dhcp relay statistics.
Examples
1-20
2 DHCP Client Configuration Commands
When multiple VLAN interfaces having the same MAC address use DHCP for IP address acquisition via
a relay agent, the DHCP server cannot be the Windows 2000 Server or Windows 2003 Server.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display dhcp client command to display DHCP client information. If no interface
interface-type interface-number is specified, DHCP client information of all interfaces will be displayed.
Examples
2-1
<Sysname> display dhcp client verbose
Vlan-interface1 DHCP client information:
Current machine state: BOUND
Allocated IP: 40.1.1.20 255.255.255.0
Allocated lease: 259200 seconds, T1: 129600 seconds, T2: 226800 seconds
Lease from 2005.08.13 15:37:59 to 2005.08.16 15:37:59
DHCP server: 40.1.1.2
Transaction ID: 0x1c09322d
Default router: 40.1.1.2
Classless static route:
Destination: 1.1.0.1, Mask: 255.0.0.0, NextHop: 192.168.40.16
Destination: 10.198.122.63, Mask: 255.255.255.255, NextHop: 192.168.40.16
DNS server: 44.1.1.11
DNS server: 44.1.1.12
Domain name: ddd.com
Boot server: 200.200.200.200 1.1.1.1
Client ID: 3030-3066-2e65-3234-
392e-3830-3438-2d56-
6c61-6e2d-696e-7465-
7266-6163-6531
T1 will timeout in 1 day 11 hours 58 minutes 52 seconds.
Field Description
Vlan-interface1 DHCP client
Information of the interface acting as the DHCP client
information
2-2
Field Description
Transaction ID, a random number chosen by the client to
Transaction ID
identify an IP address allocation.
Default router The gateway address assigned to the client
Classless static route Classless static routes assigned to the client
Static route Classful static routes assigned to the client
ip address dhcp-alloc
Syntax
View
Interface view
Default Level
2: System level
Parameters
client-identifier mac interface-type interface-number: Specifies the MAC address of an interface using
which as the client ID to obtain an IP address.
Description
Use the ip address dhcp-alloc command to configure an interface to use DHCP for IP address
acquisition.
Use the undo ip address dhcp-alloc command to cancel an interface from using DHCP.
By default, an interface does not use DHCP for IP address acquisition.
Note that:
z If no parameter is specified, the client uses a character string comprised of the current interface
name and MAC address as its ID for address acquisition.
z The DHCP client sends a DHCP-RELEASE message for releasing the IP address obtained via
DHCP, if the interface of the client is down, the message cannot be sent.
Examples
2-3
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ip address dhcp-alloc
2-4
3 DHCP Snooping Configuration Commands
The DHCP snooping enabled device does not work if it is between the DHCP relay agent and DHCP
server, and it can work when it is between the DHCP client and relay agent or between the DHCP client
and server.
Syntax
dhcp-snooping
undo dhcp-snooping
View
System view
Default Level
2: System level
Parameters
None
Description
Examples
3-1
dhcp-snooping information circuit-id format-type
Syntax
View
Default Level
2: System level
Parameters
ascii: Specifies the code type for the circuit ID sub-option as ascii.
hex: Specifies the code type for the circuit ID sub-option as hex.
Description
Use the dhcp-snooping information circuit-id format-type command to configure the code type for
the non-user-defined circuit ID sub-option.
Use the undo dhcp-snooping information circuit-id format-type command to restore the default.
By default, the code type for the circuit ID sub-option depends on the padding format of Option 82. Each
field has its own code type.
Note that:
This command applies to configuring the non-user-defined circuit ID sub-option only. After you
configure the padding content for the circuit ID sub-option using the dhcp-snooping information
circuit-id string command, ASCII is adopted as the code type.
Related commands: display dhcp-snooping information.
Examples
# Configure the padding format for the non-user-defined circuit ID sub-option as ascii.
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dhcp-snooping information circuit-id format-type ascii
Syntax
View
Default Level
2: System level
3-2
Parameters
Description
Use the dhcp-snooping information circuit-id string command to configure the padding content for
the user-defined circuit ID sub-option.
Use the undo dhcp-snooping information circuit-id string command to restore the default.
By default, the padding content for the circuit ID sub-option depends on the padding format of Option
82.
Note that:
z After you configure the padding content for the circuit ID sub-option using this command, ASCII is
adopted as the code type.
z If a VLAN is specified, the configured circuit ID sub-option only takes effect within the VLAN; if no
VLAN is specified, the configured circuit ID sub-option takes effect in all VLANs. The former case
has a higher priority; that is, the circuit ID sub-option specified for a VLAN will be padded for
packets within the VLAN.
Related commands: dhcp-snooping information format, display dhcp-snooping information.
Examples
# Configure the global padding content for the user-defined circuit ID sub-option as company001.
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dhcp-snooping information circuit-id string company001
Syntax
View
Default Level
2: System level
Parameters
None
Description
Use the dhcp-snooping information enable command to configure DHCP snooping to support Option
82.
Use the undo dhcp-snooping information enable command to disable this function.
3-3
By default, DHCP snooping does not support Option 82.
Related commands: display dhcp-snooping information.
Examples
Syntax
View
Default Level
2: System level
Parameters
Description
Use the dhcp-snooping information format command to specify the padding format for Option 82.
Use the undo dhcp-snooping information format command to restore the default.
By default, the padding format for Option 82 is normal.
Note that when you use the undo dhcp-snooping information format command, if the verbose
node-identifier argument is not specified, the padding format will be restored to normal; if the verbose
node-identifier argument is specified, the padding format will be restored to verbose with MAC
address as the node identifier.
Related commands: display dhcp-snooping information.
Examples
3-4
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dhcp-snooping information enable
[Sysname-GigabitEthernet1/0/1] dhcp-snooping information strategy replace
[Sysname-GigabitEthernet1/0/1] dhcp-snooping information format verbose
Syntax
View
Default Level
2: System level
Parameters
ascii: Specifies the code type for the remote ID sub-option as ascii.
hex: Specifies the code type for the remote ID sub-option as hex.
Description
Use the dhcp-snooping information remote-id format-type command to configure the code type for
the non-user-defined remote ID sub-option.
Use the undo dhcp-snooping information remote-id format-type command to restore the default.
By default, the code type for the remote ID sub-option is HEX.
Note that:
This command applies to configuring a non-user-defined remote ID sub-option only. After you configure
the padding content for the remote ID sub-option using the dhcp-snooping information remote-id
string command, ASCII is adopted as the code type.
Related commands: display dhcp-snooping information.
Examples
# Configure the code type for the non-user-defined remote ID sub-option as ascii.
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dhcp-snooping information remote-id format-type ascii
Syntax
3-5
View
Default Level
2: System level
Parameters
Description
Use the dhcp-snooping information remote-id string command to configure the padding content for
the user-defined remote ID sub-option.
Use the undo dhcp-snooping information remote-id string command to restore the default.
By default, the padding content for the remote ID sub-option depends on the padding format of Option
82.
Note that:
z After you configure the padding content for the remote ID sub-option using this command, ASCII is
adopted as the code type.
z If a VLAN is specified, the configured remote ID sub-option only takes effect within the VLAN; if no
VLAN is specified, the configured remote ID sub-option takes effect in all VLANs. The former case
has a higher priority; that is, the remote ID sub-option configured for a VLAN will be padded for the
packets within the VLAN.
If you want to specify the character string sysname (a case-insensitive character string) as the padding
content for the remote ID sub-option, you need to use quotation marks to make it take effect. For
example, if you want to specify Sysname as the padding content for the remote ID sub-option, you
need to enter the dhcp relay information remote-id string “Sysname” command.
Examples
3-6
dhcp-snooping information strategy
Syntax
View
Default Level
2: System level
Parameters
Description
Use the dhcp-snooping information strategy command to configure the handling strategy for Option
82 in requesting messages.
Use the undo dhcp-snooping information strategy command to restore the default.
By default, the handling strategy for Option 82 in requesting messages is replace.
Related commands: display dhcp-snooping information.
Examples
dhcp-snooping trust
Syntax
View
Default Level
2: System level
3-7
Parameters
no-user-binding: Specifies the port not to record the clients’ IP-to-MAC bindings in DHCP requests it
receives. The command without this keyword records the IP-to-MAC bindings of clients.
Description
Examples
# Specify GigabitEthernet 1/0/1 as a trusted port and enable it to record the IP-to-MAC bindings of
clients.
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dhcp-snooping trust
display dhcp-snooping
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
ip ip-address: Displays the DHCP snooping entries corresponding to the specified IP address.
Description
Only the DHCP snooping entries containing IP-to-MAC bindings that are present both in the
DHCP-ACK and DHCP-REQUEST messages are displayed by using the display dhcp-snooping
command.
3-8
Examples
Field Description
Binding type, which can be:
Type z D: Dynamic IP-to-MAC binding.
z S: Static IP-to-MAC binding. Currently, static IP-to-MAC bindings
are not supported.
IP Address IP address assigned to the DHCP client
MAC Address MAC address of the DHCP client
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
all: Displays the Option 82 configuration information of all Layer 2 Ethernet interfaces.
interface interface-type interface-number: Displays the Option 82 configuration information of a
specified interface.
Description
Use the display dhcp-snooping information command to display Option 82 configuration information
on the DHCP snooping device.
3-9
Examples
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display dhcp-snooping packet statistics command to display DHCP packet statistics on the
DHCP snooping device.
Related commands: reset dhcp-snooping packet statistics.
Examples
Syntax
3-10
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display dhcp-snooping trust command to display information about trusted ports.
Related commands: dhcp-snooping trust.
Examples
The above output shows that DHCP snooping is enabled, DHCP snooping trust is active, and port
GigabitEthernet1/0/1 is trusted.
reset dhcp-snooping
Syntax
View
User view
Default Level
1: Monitor level
Parameters
Description
3-11
Examples
Syntax
View
User view
Default Level
2: System level
Parameters
None
Description
Use the reset dhcp-snooping packet statistics command to clear DHCP packet statistics on the
DHCP snooping device.
Related commands: display dhcp-snooping packet statistics.
Examples
3-12
4 BOOTP Client Configuration Commands
If several VLAN interfaces sharing the same MAC address obtain IP addresses through a BOOTP relay
agent, the BOOTP server cannot be a Windows 2000 Server or Windows 2003 Server.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
interface interface-type interface-number: Displays the BOOTP client information of the interface.
Description
Use the display bootp client command to display related information about a BOOTP client.
Note:
z If interface interface-type interface-number is not specified, the command will display information
about BOOTP clients on all interfaces.
z If interface interface-type interface-number is specified, the command will display information
about the BOOTP client on the specified interface.
Examples
4-1
Table 4-1 display bootp client command output description
Field Description
Ethernet1/1 BOOTP client information or Information of the interface serving as a BOOTP
Vlan-interface1 BOOTP client information client
BOOTP client’s IP address allocated by the BOOTP
Allocated IP
server
Value of the XID field in a BOOTP message, namely,
a random number chosen while the BOOTP client
sends a BOOTP request to the BOOTP server. It is
Transaction ID used to match a response message from the BOOTP
server. If the values of the XID field are different in the
BOOTP response and request, the BOOTP client will
drop the BOOTP response.
Mac Address MAC address of a BOOTP client
ip address bootp-alloc
Syntax
ip address bootp-alloc
undo ip address bootp-alloc
View
Interface view
Default Level
2: System level
Parameters
None
Description
Use the ip address bootp-alloc command to enable an interface to obtain an IP address through
BOOTP.
Use the undo ip address bootp-alloc command to disable the interface from obtaining an IP address
through BOOTP.
By default, an interface does not obtain an IP address through BOOTP.
Related commands: display bootp client.
Examples
4-2
Table of Contents
i
ii
1 FTP Configuration Commands
Syntax
display ftp-server
View
Any view
Default Level
3: Manage level
Parameters
None
Description
Use the display ftp-server command to display the FTP server configuration.
After configuring FTP server parameters, you may verify them with this command.
Related commands: ftp server enable, ftp timeout, ftp update.
Examples
Field Description
Max user number Maximum number of login users at a time
User count Number of the current login users
Allowed idle time of an FTP connection. If there is no packet
Timeout value (in minute) exchange between the FTP server and client during the whole
period, the FTP connection will be disconnected.
1-1
Field Description
File update method of the FTP server, including:
Put Method z fast: Fast update
z normal: Normal update
display ftp-user
Syntax
display ftp-user
View
Any view
Default Level
3: Manage level
Parameters
None
Description
Use the display ftp-user command to display the detailed information of current FTP users.
Examples
# If the name of the logged-in user exceeds 10 characters, the exceeded characters will be displayed in
the next line and right justified, for example, if the logged-in user name is administrator, the information
is displayed as follows:
<Sysname> display ftp-user
UserName HostIP Port Idle HomeDir
administra
tor 192.168.0.152 1031 0 flash:
Field Description
UserName Name of the currently logged-in user
HostIP IP address of the currently logged-in user
Port Port which the currently logged-in user is using
Idle Duration time of the current FTP connection, in minutes
HomeDir Authorized path of the present logged-in user
1-2
free ftp user
Syntax
View
User view
Default Level
3: Manage level
Parameters
username: Username. You can use the display ftp-user command to view the logged-in user name of
the current FTP connection.
Description
Use the free ftp user command to manually release the FTP connection established with the specified
username.
Note that if the user to be released is transmitting a file, the connection between the user and the FTP
server is terminated after the file transmission.
Examples
Syntax
View
System view
Default Level
3: Manage level
Parameters
acl-number: Basic access control list (ACL) number, in the range 2000 to 2999.
Description
Use the ftp server acl command to control FTP clients’ access to the device using an ACL.
Use the undo ftp server acl command to restore the default.
By default, no ACL is used to control FTP clients’ access to the device.
1-3
Associated with an ACL, the FTP server can deny the FTP requests of some FTP clients and only
permit the access of clients allowed by the ACL rules. This configuration only filters the FTP
connections to be established, and has no effect on the established FTP connections and operations. If
you execute the command for multiple times, the last specified ACL takes effect.
Examples
# Associate the FTP service with ACL 2001 to allow only the client 1.1.1.1 to access the device through
FTP.
<Sysname> system-view
[Sysname] acl number 2001
[Sysname-acl-basic-2001] rule 0 permit source 1.1.1.1 0
[Sysname-acl-basic-2001] rule 1 deny source any
[Sysname-acl-basic-2001] quit
[Sysname] ftp server acl 2001
Syntax
View
System view
Default Level
3: Manage level
Parameters
None
Description
Use the ftp server enable command to enable the FTP server and allow the login of FTP users.
Use the undo ftp server command to disable the FTP server.
By default, the FTP server is disabled.
Examples
ftp timeout
Syntax
1-4
View
System view
Default Level
3: Manage level
Parameters
Description
Examples
ftp update
Syntax
View
System view
Default Level
3: Manage level
Parameters
Description
Use the ftp update command to set the file update mode that the FTP server uses while receiving data.
Use the undo ftp update command to restore the default, namely, the normal mode.
1-5
Examples
z In this section, the configuration procedure of entering FTP client view is omitted. You must use the
ftp command to enter FTP client view for configurations under this view. For details, refer to ftp.
z Before executing the FTP client configuration commands in this section, make sure you have
configured the proper authority for users on the FTP server, such as view the files under the current
directory, read/download the specified file, create directory/upload files, rename/remove files, and
so on.
z The prompt information in the examples of this section varies with FTP server types.
ascii
Syntax
ascii
View
Default Level
3: Manage level
Parameters
None
Description
Use the ascii command to set the file transfer mode to ASCII.
By default, the file transfer mode is ASCII.
The carriage return characters vary with operating systems. For example, to indicate the end of a line
and transfer to the next line, the H3C device system and Windows system use characters /r/n, and the
Linux system uses characters /n. Therefore, after the file transmission between two systems that use
different carriage return characters, such as Linux system and H3C device system, the FTP
transmission mode must be applied to ensure the correct resolution of the files.
FTP transfers files in two modes:
z Binary mode: for program file or picture transmission.
z ASCII mode: for text file transmission.
1-6
Related commands: binary.
Examples
binary
Syntax
binary
View
Default Level
3: Manage level
Parameters
None
Description
Use the binary command to set the file transfer mode to binary (also called flow mode).
By default, the transfer mode is ASCII mode.
Related commands: ascii.
Examples
bye
Syntax
bye
View
Default Level
3: Manage level
Parameters
None
1-7
Description
Use the bye command to disconnect from the remote FTP server and return to user view. If the device
establishes no connection with the remote FTP server, you will return to user view directly.
Related commands: close, disconnect, quit.
Examples
# Terminate the connection with the remote FTP server and return to user view.
[ftp] bye
221 Server closing.
cd
Syntax
cd { directory | .. | / }
View
Default Level
3: Manage level
Parameters
directory: Name of the target directory, in the format of [drive:/]path. For the detailed explanation of the
drive and path arguments, refer to File System Management Configuration. If no drive information is
provided, the argument represents a folder or subfolder under the current directory.
..: Returns to an upper directory. If the current working directory is the root directory, or no upper
directory exists, the current working directory does not change when the cd .. command is executed.
This argument does not support command online help.
/: Returns to the root directory of the storage medium. The keyword does not support command line
online help.
Description
Use the cd command to change the current working directory on the remote FTP server.
You can use this command to access another authorized directory on the FTP server.
Related commands: pwd.
Examples
# Change the working directory to the sub-directory logfile of the current directory.
[ftp] cd logfile
250 CWD command successful.
# Change the working directory to the sub-directory folder of the authorized directory.
[ftp] cd /folder
250 CWD command successful.
1-8
cdup
Syntax
cdup
View
Default Level
3: Manage level
Parameters
None
Description
Use the cdup command to exit the current directory and enter the upper directory of the FTP server.
Execution of this command will not change the working directory if the current directory is already the
authorized directory (that is, work-directory).
Related commands: cd, pwd.
Examples
close
Syntax
close
View
Default Level
3: Manage level
Parameters
None
Description
Use the close command to terminate the connection to the FTP server, but remain in FTP client view.
This command is equal to the disconnect command.
1-9
Examples
# Terminate the connection to the FTP server and remain in FTP client view.
[ftp] close
221 Server closing.
[ftp]
debugging
Syntax
debugging
undo debugging
View
Default Level
3: Manage level
Parameters
None
Description
Examples
# The device serves as the FTP client. Enable FTP client debugging and use the active mode to
download file sample.file from the current directory of the FTP server.
<Sysname> terminal monitor
<Sysname> terminal debugging
<Sysname> ftp 192.168.1.46
Trying 192.168.1.46 ...
Press CTRL+K to abort
Connected to 192.168.1.46.
220 FTP service ready.
User(192.168.1.46:(none)):ftp
331 Password required for ftp.
Password:
230 User logged in.
[ftp]undo passive
FTP: passive is off
[ftp] debugging
FTP: debugging switch is on
[ftp] get sample.file
1-10
---> PORT 192,168,1,44,4,21
200 Port command okay.
The parsed reply is 200
---> RETR sample.file
150 Opening ASCII mode data connection for /sample.file.
The parsed reply is 150
FTPC: File transfer started with the signal light turned on.
FTPC: File transfer completed with the signal light turned off.
.226 Transfer complete.
FTP: 3304 byte(s) received in 4.889 second(s), 675.00 byte(s)/sec.
[ftp]
Field Description
Give an FTP order, with data port numbers
---> PORT
being…
The received reply code, which is defined in RFC
The parsed reply is
959.
---> RETR Download the file
FTPC: File transfer started with the signal light File transfer starts, and the signal light is turned
turned on. on.
FTPC: File transfer completed with the signal File transfer is completed, and the signal light is
light turned off. turned off.
delete
Syntax
delete remotefile
View
Default Level
3: Manage level
Parameters
Description
Use the delete command to permanently delete a specified file on the remote FTP server. A deleted file
cannot be restored.
To do this, you must be a user with the delete permission on the FTP server.
1-11
Examples
dir
Syntax
View
Default Level
3: Manage level
Parameters
Description
Use the dir command to view the detailed information of the files and subdirectories under the current
directory on the remote FTP server.
Use the dir remotefile command to display the detailed information of the specified file or directory on
the remote FTP server.
Use the dir remotefile localfile command to display the detailed information of the specified file or
directory on the remote FTP server, and save the displayed information into a local file specified by the
localfile argument.
You can use the dir command to display the folder- and file-related information, such as the size, and
the date they were created. If you only need to view the name of all the files and subdirectories under
the current directory, you can use the Is command.
Examples
# View the detailed information of the files and subdirectories under the current directory on the remote
FTP server.
[ftp] dir
227 Entering Passive Mode (192,168,1,46,5,68).
125 ASCII mode data connection already open, transfer starting for /*.
drwxrwxrwx 1 noone nogroup 0 Aug 08 2006 logfile
-rwxrwxrwx 1 noone nogroup 20471748 May 11 10:21 test.app
1-12
-rwxrwxrwx 1 noone nogroup 4001 Dec 08 2007 config.cfg
-rwxrwxrwx 1 noone nogroup 3608 Jun 13 2007 startup.cfg
drwxrwxrwx 1 noone nogroup 0 Dec 03 2007 test
-rwxrwxrwx 1 noone nogroup 299 Oct 15 2007 key.pub
226 Transfer complete.
FTP: 394 byte(s) received in 0.189 second(s), 2.00K byte(s)/sec.
[ftp]
# View the information of the file ar-router.cfg, and save the result to aa.txt.
[ftp] dir ar-router.cfg aa.txt
227 Entering Passive Mode (192,168,1,50,17,158).
125 ASCII mode data connection already open, transfer starting for /ar-router.cfg.
....226 Transfer complete.
FTP: 67 byte(s) received in 4.600 second(s), 14.00 byte(s)/sec.
disconnect
Syntax
disconnect
View
Default Level
3: Manage level
Parameters
None
Description
Use the disconnect command to disconnect from the remote FTP server but remain in FTP client view.
This command is equal to the close command.
Examples
# Disconnect from the remote FTP server but remain in FTP client view.
[ftp] disconnect
221 Server closing.
Syntax
1-13
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display ftp client configuration command to display the configuration information of the FTP
client.
Currently this command displays the configured source IP address or source interface of the FTP client.
Examples
ftp
Syntax
View
User view
Default Level
3: Manage level
Parameters
1-14
ip source-ip-address: The source IP address of the current FTP client. This source address must be the
one that has been configured on the device.
Description
Use the ftp command to log in to the remote FTP server and enter FTP client view.
Note that:
z This command applies to IPv4 networks.
z If you use this command without specifying any parameters, you will simply enter the FTP client
view without logging in to the FTP server.
z If you specify the parameters, you will be prompted to enter the username and password for
accessing the FTP server.
z The priority of the source address specified with this command is higher than that with the ftp
client source command. If you specify the source address with the ftp client source command
first and then with the ftp command, the source address specified with the ftp command is used to
communicate with the FTP server.
Related commands: ftp client source.
Examples
# Log in from the current device Sysname1 to the device Sysname2 with the IP address of
192.168.0.211. The source IP address of the packets sent is 192.168.0.212.
<Sysname> ftp 192.168.0.211 source ip 192.168.0.212
Trying 192.168.0.211 ...
Press CTRL+K to abort
Connected to 192.168.0.211.
220 FTP Server ready.
User(192.168.0.211:(none)):abc
331 Password required for abc
Password:
230 User logged in.
[ftp]
Syntax
View
System view
Default Level
2: System level
1-15
Parameters
interface interface-type interface-number: Source interface for the FTP connection, including interface
type and interface number. The primary IP address configured on the source interface is the source IP
address of the packets sent by FTP. If no primary IP address is configured on the source interface, the
connection fails.
ip source-ip-address: Source IP address of the FTP connection. It must be an IP address that has been
configured on the device.
Description
Use the ftp client source command to configure the source address of the transmitted FTP packets
from the FTP client.
Use the undo ftp client source command to restore the default.
By default, a device uses the IP address of the interface determined by the matched route as the source
IP address to communicate with an FTP server.
Note that:
z The source address can be specified as the source interface and the source IP address. If you use
the ftp client source command to specify the source interface and then the source IP address, the
newly specified source IP address overwrites the configured source interface and vice versa.
z If the source address is specified with the ftp client source command and then with the ftp
command, the source address specified with the latter one is used to communicate with the FTP
server.
z The source address specified with the ftp client source command is valid for all FTP connections
and the source address specified with the ftp command is valid only for the current FTP
connection.
Related commands: display ftp client configuration.
Examples
get
Syntax
View
Default Level
3: Manage level
1-16
Parameters
Description
Use the get command to download a file from a remote FTP server and save it.
Examples
lcd
Syntax
lcd
View
Default Level
3: Manage level
Parameters
None
Description
Use the lcd command to display the local working directory of the FTP client.
Examples
The above information indicates that the working directory of the FTP client before execution of the ftp
command is flash:/clienttemp.
ls
Syntax
ls [ remotefile [ localfile ] ]
1-17
View
Default Level
3: Manage level
Parameters
Description
Use the ls command to view the information of all the files and subdirectories under the current
directory of the remote FTP server. The file names and subdirectory names are displayed.
Use the ls remotefile command to view the information of a specified file or subdirectory.
Use the ls remotefile localfile command to view the information of a specified file or subdirectory, and
save the result to a local file specified by the localfile argument.
The Is command can only display the names of files and directories on the FTP server, whereas the dir
command can display other related information of the files and directories, such as the size, and the
date they were created.
Examples
# View the information of all files and subdirectories under the current directory of the FTP server.
[ftp] ls
227 Entering Passive Mode (192,168,1,50,17,165).
125 ASCII mode data connection already open, transfer starting for /*.
ar-router.cfg
logfile
mainar.app
arbasicbtm.app
ftp
test
bb.cfg
testcfg.cfg
226 Transfer complete.
FTP: 87 byte(s) received in 0.132 second(s) 659.00 byte(s)/sec.
# View the information of directory logfile, and save the result to file aa.txt.
[ftp] ls logfile aa.txt
227 Entering Passive Mode (192,168,1,46,4,3).
125 ASCII mode data connection already open, transfer starting for /logfile/*.
1-18
....226 Transfer complete.
FTP: 20 byte(s) received in 3.962 second(s), 5.00 byte(s)/sec.
mkdir
Syntax
mkdir directory
View
Default Level
3: Manage level
Parameters
Description
Use the mkdir command to create a subdirectory under the current directory on the remote FTP server.
To do this, you must be a user with the permission on the FTP server.
Examples
# Create subdirectory mytest on the current directory of the remote FTP server.
[ftp] mkdir mytest
257 "/mytest" new directory created.
open
Syntax
View
Default Level
3: Manage level
Parameters
1-19
service-port: Port number of the remote FTP server, in the range 0 to 65535, with the default value of
21.
Description
Use the open command to log in to the IPv4 FTP server under FTP client view.
At login, you will be asked to enter the username and password for accessing the FTP server. If your
input is correct, the login succeeds; otherwise, it fails.
If you have logged in to the IPv4 FTP server currently, you cannot use the open command to log in to
another server. You need to disconnect with the current server first, and then try to connect with another
one.
Related commands: close.
Examples
# In FTP client view, log in to the FTP server with the IP address of 192.168.1.50.
<Sysname> ftp
[ftp] open 192.168.1.50
Trying 192.168.1.50 ...
Press CTRL+K to abort
Connected to 192.168.1.50.
220 FTP service ready.
User(192.168.1.50:(none)):aa
331 Password required for aa.
Password:
230 User logged in.
[ftp]
passive
Syntax
passive
undo passive
View
Default Level
3: Manage level
Parameters
None
Description
Use the passive command to set the data transmission mode to passive.
Use the undo passive command to set the data transmission mode to active.
The default transmission mode is passive.
1-20
Data transmission modes fall into the passive mode and the active mode. The active mode means that
the data connection request is initiated by a server. The passive mode means that the data connection
request is initiated by a client. This command is mainly used in conjunction with a firewall to restrict the
FTP session connection between private and public network users.
Examples
put
Syntax
View
Default Level
3: Manage level
Parameters
Description
Use the put command to upload a file on the client to the remote FTP server.
If no name is assigned to the file to be saved on the FTP server, the name of the source file is used by
default. After a file is uploaded, it will be saved under the user’s authorized directory, which can be set
with the authorization-attribute command.
Examples
# Upload source file cc.txt to the remote FTP server and save it as dd.txt.
[ftp] put cc.txt dd.txt
227 Entering Passive Mode (192,168,1,50,17,169).
125 ASCII mode data connection already open, transfer starting for /dd.txt.
226 Transfer complete.
FTP: 9 byte(s) sent in 0.112 second(s), 80.00 byte(s)/sec.
pwd
Syntax
pwd
View
1-21
Default Level
3: Manage level
Parameters
None
Description
Use the pwd command to display the currently accessed directory on the remote FTP server.
Examples
The above information indicates that the servertemp folder under the root directory of the remote FTP
server is being accessed by the user.
quit
Syntax
quit
View
Default Level
3: Manage level
Parameters
None
Description
Use the quit command to disconnect from the remote FTP server and exit to user view.
Examples
# Disconnect from the remote FTP server and exit to user view.
[ftp] quit
221 Server closing.
<Sysname>
remotehelp
Syntax
remotehelp [ protocol-command ]
1-22
View
Default Level
3: Manage level
Parameters
Description
Use the remotehelp command to display the help information of FTP-related commands supported by
the remote FTP server.
If no argument is specified, FTP-related commands supported by the remote FTP server are displayed.
Examples
[ftp]
Field Description
214-Here is a list of available ftp commands The following is an available FTP command list.
Those commands with “*” are not yet
Those with '*' are not yet implemented.
implemented.
USER Username
PASS Password
CWD Change the current working directory
CDUP Change to parent directory
SMNT* File structure setting
QUIT Quit
REIN* Re-initialization
1-23
Field Description
PORT Port number
PASV Passive mode
TYPE Request type
1-24
rmdir
Syntax
rmdir directory
View
Default Level
3: Manage level
Parameters
Description
Use the rmdir command to remove a specified directory from the FTP server.
Note that only authorized users are allowed to use this command.
Note that:
z The directory to be deleted must be empty, meaning you should delete all files and subdirectories
under the directory before you delete a directory. For the deletion of files, refer to the delete
command.
z After you execute the rmdir command successfully, the files in the remote recycle bin under the
directory will be automatically deleted.
Examples
# Delete the temp1 directory from the authorized directory on the FTP server.
[ftp] rmdir /temp1
200 RMD command successful.
user
Syntax
View
Default Level
3: Manage level
Parameters
1-25
Description
Use the user command to relog in to the currently accessed FTP server with another username.
Before using this command, you must configure the corresponding username and password on the FTP
server; otherwise, your login fails and the FTP connection is closed.
Examples
# User ftp1 has logged in to the FTP server. Use username ftp2 to log in to the current FTP server.
(Suppose username ftp2 and password 123123123123 have been configured on the FTP server).
z Method 1
[ftp] user ftp2
331 Password required for ftp2.
Password:
230 User logged in.
[ftp]
z Method 2
[ftp] user ftp2 123123123123
331 Password required for ftp.
230 User logged in.
[ftp]
verbose
Syntax
verbose
undo verbose
View
Default Level
3: Manage level
Parameters
None
Description
Use the verbose command to enable the protocol information function to display detailed prompt
information.
Use the undo verbose command to disable the protocol information function.
By default, the protocol information function is enabled.
Examples
1-26
[ftp] verbose
FTP: verbose is on
# Disable the protocol information function and perform the Get operation.
[ftp] undo verbose
FTP: verbose is off
[ftp]
# Enable the protocol information function and perform the Get operation.
[ftp] verbose
FTP: verbose is on
1-27
2 TFTP Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display tftp client configuration command to display the configuration information of the
TFTP client.
Related commands: tftp client source.
Examples
Currently this command displays the configured source IP address or source interface of the TFTP
client.
tftp-server acl
Syntax
2-1
View
System view
Default Level
3: Manage level
Parameters
Description
Use the tftp server acl command to control the device’s access to a specific TFTP server using an
ACL.
Use the undo tftp server acl command to restore the default.
By default, no ACL is used to control the device’s access to TFTP servers.
You can use the rules in an ACL to allow or permit the device’s access to a specific TFTP server in a
network.
For more information about ACL, refer to ACL Configuration and ACL Commands.
Examples
# In IPv4 networking environment, allow the device to access the TFTP server with the IP address of
1.1.1.1 only.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule permit source 1.1.1.1 0
[Sysname-acl-basic-2000] quit
[Sysname] tftp-server acl 2000
tftp
Syntax
View
User view
Default Level
3: Manage level
Parameters
2-2
source-filename: Source file name.
destination-filename: Destination file name.
source: Configures parameters for source address binding.
z interface interface-type interface-number: Specifies the source interface by its type and number.
The primary IP address configured on the source interface is the source IP address of the packets
sent by TFTP. If no primary IP address is configured on the source interface, the transmission fails.
z ip source-ip-address: Specifies the source IP address for the current TFTP client to transmit
packets. This source address must be an IP address that has been configured on the device.
Description
Use the tftp command to upload files from the local device to a TFTP server or download files from the
TFTP server to the local device.
z If no destination file name is specified, a file is saved using the same name as that on the remote
FTP server to the current working directory of the user (namely, the working directory where the
tftp command is executed).
z The priority of the source address specified with this command is higher than that specified with the
tftp client source command. If you use the tftp client source command to specify the source
address first and then with the tftp command, the latter one is adopted.
Related commands: tftp client source.
Examples
# Download the config.cfg file from the TFTP server with the IP address of 192.168.0.98 and save it as
config.bak. Specify the source IP address to be 192.168.0.92.
<Sysname> tftp 192.168.0.98 get config.cfg config.bak source ip 192.168.0.92
...
File will be transferred in binary mode
Downloading file from remote TFTP server, please wait....
TFTP: 372800 bytes received in 1 second(s)
File downloaded successfully.
# Upload the config.cfg file from the local device to the default path of the TFTP server with the IP
address of 192.168.0.98 and save it as config.bak. Specify the source IP interface to be
Vlan-interface1.
<Sysname> tftp 192.168.0.98 put config.cfg config.bak source interface vlan-interface1
Syntax
2-3
View
System view
Default Level
2: System level
Parameters
interface interface-type interface-number: Specifies the source interface by its type and number. The
primary IP address configured on the source interface is the source IP address of the packets sent by
TFTP. If no primary IP address is configured on the source interface, the transmission fails.
ip source-ip-address: The source IP address of TFTP connections. It must be an IP address that has
been configured on the device.
Description
Use the tftp client source command to configure the source address of the TFTP packets from the
TFTP client.
Use the undo tftp client source command to restore the default.
By default, a device uses the IP address of the interface determined by the matched route as the source
IP address to communicate with a TFTP server.
Note that:
z The source address can be specified as the source interface and the source IP; if you use the tftp
client source command to specify the source interface and then the source IP, the newly specified
source IP overwrites the configured source interface and vice versa.
z If the source address is specified with the tftp client source command and then with the tftp
command, the source address specified with the latter one is used to communicate with the TFTP
server.
z The source address specified with the tftp client source command is valid for all tftp connections
and the source address specified with the tftp command is valid for the current tftp command.
Related commands: display tftp client configuration.
Examples
2-4
Table of Contents
i
1 IP Routing Basics Configuration Commands
The term “router” in this document refers to a router in a generic sense or a Layer 3 switch.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
verbose: Displays detailed routing table information, including that for inactive routes. With this
keyword absent, the command displays only brief information about active routes.
|: Uses a regular expression to filter output information. For details about regular expressions, refer to
the section CLI Display in Basic System Configuration.
begin: Displays route entries starting from the one specified by the regular expression.
exclude: Displays route entries not matching the regular expression.
include: Displays route entries matching the regular expression.
regular-expression: Regular expression, a string of 1 to 256 case-sensitive characters used for
specifying routing entries.
Description
Use the display ip routing-table command to display brief information about active routes in the
routing table.
This command displays brief information about a routing table, with a routing entry contained in one line.
The information displayed includes destination IP address/mask length, protocol, priority, cost, next hop
and outbound interface. This command only displays the routes currently in use, that is, the optimal
routes.
1-1
Use the display ip routing-table verbose command to display detailed information about all routes in
the routing table.
This command displays detailed information about all active and inactive routes, including the statistics
of the entire routing table and information for each route.
Examples
Field Description
Destinations Number of destination addresses
Routes Number of routes
Destination/Mask Destination address/mask length
Proto Protocol that presents the route
Pre Priority of the route
Cost Cost of the route
Nexthop Address of the next hop on the route
Interface Outbound interface for packets to be forwarded along the route
1-2
Preference: 0 Cost: 0
NextHop: 127.0.0.1 Interface: InLoopBack0
BkNextHop: 0.0.0.0 BkInterface:
RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0
Tunnel ID: 0x0 Label: NULL
State: Active NoAdv Age: 04h20m03s
Tag: 0
Destination: 127.0.0.1/32
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
NextHop: 127.0.0.1 Interface: InLoopBack0
BkNextHop: 0.0.0.0 BkInterface:
RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0
Tunnel ID: 0x0 Label: NULL
State: Active NoAdv Age: 04h20m03s
Tag: 0
Destination: 192.168.0.0/24
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
NextHop: 192.168.0.53 Interface: Vlan-interface1
BkNextHop: 0.0.0.0 BkInterface:
RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0
Tunnel ID: 0x0 Label: NULL
State: Active Adv Age: 04h12m07s
Tag: 0
Destination: 192.168.0.53/32
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
NextHop: 127.0.0.1 Interface: InLoopBack0
BkNextHop: 0.0.0.0 BkInterface:
RelyNextHop: 0.0.0.0 Neighbor : 0.0.0.0
Tunnel ID: 0x0 Label: NULL
State: Active NoAdv Age: 04h12m07s
Tag: 0
Displayed first are statistics for the whole routing table, followed by detailed description of each route (in
sequence).
Field Description
Destination Destination address/mask length
Protocol Protocol that presents the route
Process ID Process ID
Preference Priority of the route
Cost Cost of the route
NextHop Address of the next hop on the route
1-3
Field Description
Interface Outbound interface for packets to be forwarded along the route
BkNexthop Backup next hop
BkInterface Backup outbound interface
Label Label
Route status:
Active This is an active unicast route.
Adv This route can be advertised.
Delete This route is deleted.
Gateway This is an indirect route.
1-4
display ip routing-table acl
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display ip routing-table acl command to display information about routes permitted by a
specified basic ACL.
This command is intended for the follow-up display of routing policies.
If the specified ACL does not exist or it has no rules configured, the entire routing table is displayed.
Examples
# Define basic ACL 2000 and set the route filtering rules.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule permit source 10.1.0.0 0.0.255.255
[Sysname-acl-basic-2000] rule deny source any
# Display brief information about active routes permitted by basic ACL 2000.
[Sysname-acl-basic-2000] display ip routing-table acl 2000
Routes Matched by Access list : 2000
Summary Count : 6
1-5
10.1.3.1/32 Direct 0 0 127.0.0.1 InLoop0
Destination: 10.1.1.0/24
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
NextHop: 10.1.1.2 Interface: Vlan-interface1
RelyNextHop: 0.0.0.0 Neighbour: 0.0.0.0
Tunnel ID: 0x0 Label: NULL
State: Active Adv Age: 1d00h25m32s
Tag: 0
Destination: 10.1.1.2/32
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
NextHop: 127.0.0.1 Interface: InLoopBack0
RelyNextHop: 0.0.0.0 Neighbour: 0.0.0.0
Tunnel ID: 0x0 Label: NULL
State: Active NoAdv Age: 1d00h41m34s
Tag: 0
Destination: 10.1.2.0/24
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
NextHop: 10.1.2.1 Interface: Vlan-interface2
RelyNextHop: 0.0.0.0 Neighbour: 0.0.0.0
Tunnel ID: 0x0 Label: NULL
State: Active Adv Age: 1d00h05m42s
Tag: 0
Destination: 10.1.2.1/32
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
NextHop: 127.0.0.1 Interface: InLoopBack0
RelyNextHop: 0.0.0.0 Neighbour: 0.0.0.0
Tunnel ID: 0x0 Label: NULL
State: Active NoAdv Age: 1d00h05m42s
Tag: 0
Destination: 10.1.3.0/24
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
NextHop: 10.1.3.1 Interface: Vlan-interface1
1-6
RelyNextHop: 0.0.0.0 Neighbour: 0.0.0.0
Tunnel ID: 0x0 Label: NULL
State: Active Adv Age: 1d00h05m31s
Tag: 0
Destination: 10.1.3.1/32
Protocol: Direct Process ID: 0
Preference: 0 Cost: 0
NextHop: 127.0.0.1 Interface: InLoopBack0
RelyNextHop: 0.0.0.0 Neighbour: 0.0.0.0
Tunnel ID: 0x0 Label: NULL
State: Active NoAdv Age: 1d00h05m32s
Tag: 0
For the description of the command output above, see Table 1-2.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display ip routing-table ip-address command to display information about routes to a
specified destination address.
Executing the command with different parameters yields different output:
z display ip routing-table ip-address
The system ANDs the input destination IP address with the subnet mask in each route entry; and ANDs
the destination IP address in each route entry with its corresponding subnet mask.
If the two operations yield the same result for an entry and this entry is active, it is displayed.
z display ip routing-table ip-address mask
1-7
The system ANDs the input destination IP address with the input subnet mask; and ANDs the
destination IP address in each route entry with the input subnet mask.
If the two operations yield the same result for an entry and the entry is active with a subnet mask less
than or equal to the input subnet mask, the entry is displayed.
Only route entries that exactly match the input destination address and mask are displayed.
z display ip routing-table ip-address longer-match
The system ANDs the input destination IP address with the subnet mask in each route entry; and ANDs
the destination IP address in each route entry with its corresponding subnet mask.
If the two operations yield the same result for multiple entries that are active, the one with longest mask
length is displayed.
z display ip routing-table ip-address mask longer-match
The system ANDs the input destination IP address with the input subnet mask; and ANDs the
destination IP address in each route entry with the input subnet mask.
If the two operations yield the same result for multiple entries with a mask less than or equal to the input
subnet mask, the one that is active with longest mask length is displayed.
Use the display ip routing-table ip-address1 { mask-length | mask } ip-address2 { mask-length | mask }
command to display route entries with destination addresses within a specified range.
Examples
1-8
Destination/Mask Proto Pre Cost NextHop Interface
# Display route entries by specifying a destination IP address and mask and the longer-match
keyword.
[Sysname] display ip routing-table 11.1.1.1 24 longer-match
Routing Table : Public
Summary Count : 1
Destination/Mask Proto Pre Cost NextHop Interface
11.1.1.0/24 Static 60 0 0.0.0.0 NULL0
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
1-9
Description
Use the display ip routing-table protocol command to display routing information of a specified
routing protocol.
Examples
Syntax
View
Any view
1-10
Default Level
1: Monitor level
Parameters
None
Description
Use the display ip routing-table statistics command to display the route statistics of the network
routing table.
Examples
Field Description
Proto Origin of the routes.
route Number of routes from the origin
Syntax
View
User view
Default Level
2: System level
Parameters
protocol: Clears statistics for the IPv4 routing protocol, which can be direct or static.
all: Clears statistics for all IPv4 routing protocols.
1-11
Description
Use the reset ip routing-table statistics protocol command to clear routing statistics for the routing
table.
Examples
1-12
Table of Contents
i
1 Static Routing Configuration Commands
The term “router” in this document refers to a router in a generic sense or a Layer 3 switch.
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Use the delete static-routes all command to delete all static routes.
When you use this command to delete static routes, the system will prompt you to confirm the operation
before deleting all the static routes.
Related commands: ip route-static and display ip routing-table in IP Routing Basics Commands.
Examples
1-1
ip route-static
Syntax
View
System view
Default Level
2: System level
Parameters
Description
1-2
3) When configuring a static route, you can specify the output interface or the next hop address based
on the actual requirement. Note that the next hop address must not be the IP address of the local
interface; otherwise, the route configuration will not take effect. For interfaces that support network
address to link layer address resolution or point-to-point interfaces, you can specify the output
interface or next hop address. When specifying the output interface, note that:
z For a Null 0 interface, if the output interface has already been configured, there is no need to
configure the next hop address.
z If you specify a broadcast interface (such as a VLAN interface) as the output interface, you must
specify the corresponding next hop of the interface at the same time.
Related commands: ip route-static default-preference and display ip routing-table in IP Routing
Basics Commands.
z The static route does not take effect if you specify its next hop address first and then configure the
address as the IP address of a local interface, such as VLAN interface.
z To configure track monitoring for an existing static route, simply associate the static route with a
track entry. For a non-existent static route, configure it and associate it with a track entry.
z If a static route needs route recursion, the associated track entry must monitor the nexthop of the
recursive route instead of that of the static route; otherwise, a valid route may be mistakenly
considered invalid.
Examples
# Configure a static route, whose destination address is 1.1.1.1/24, next hop address is 2.2.2.2, and
description information is for internet & intranet.
<Sysname> system-view
[Sysname] ip route-static 1.1.1.1 24 2.2.2.2 description for internet & intranet
ip route-static default-preference
Syntax
View
System view
Default Level
2: System level
Parameters
default-preference-value: Default preference for static routes, which is in the range of 1 to 255.
1-3
Description
Use the ip route-static default-preference command to configure the default preference for static
routes.
Use the undo ip route-static default-preference command to restore the default.
By default, the default preference of static routes is 60.
Note that:
z If no preference is specified when configuring a static route, the default preference is used.
z When the default preference is re-configured, it applies to newly added static routes only.
Related commands: ip route-static and display ip routing-table in IP Routing Basics Commands.
Examples
1-4
Table of Contents
i
port (multicast VLAN view) ··············································································································2-2
port multicast-vlan ···························································································································2-3
ii
1 IGMP Snooping Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
vlan vlan-id: Displays the IGMP snooping multicast group information in the specified VLAN, where
vlan-id is in the range of 1 to 4094. If you do not specify a VLAN, this command will display the IGMP
snooping multicast group information in all VLANs.
verbose: Specifies to display the detailed IGMP snooping multicast group information.
Description
Use the display igmp-snooping group command to view the IGMP snooping multicast group
information.
Examples
1-1
Attribute: Host Port
Host port(s):total 1 port.
GE1/0/2 (D) ( 00:03:23 )
MAC group(s):
MAC group address:0100-5e01-0101
Host port(s):total 1 port.
GE1/0/2
Field Description
Total 1 IP Group(s). Total number of IP multicast groups
Total 1 IP Source(s). Total number of multicast sources
Total 1 MAC Group(s). Total number of MAC multicast groups
Port flags: D-Dynamic port, Port flags: D for dynamic port, S for static port, C for port copied
S-Static port, C-Copy port from a (*, G) entry to an (S, G) entry
Subvlan flags: R-Real VLAN, Sub-VLAN flags: R for real egress sub-VLAN under the current
C-Copy VLAN entry, C for sub-VLAN copied from a (*, G) entry to an (S, G) entry
Router port(s) Number of router ports
Remaining time of the aging timer for the dynamic member port or
( 00:01:30 )
router port.
IP group address Address of IP multicast group
(0.0.0.0, 224.1.1.1) An (S, G), where 0.0.0.0 implies any multicast source
MAC group address Address of MAC multicast group
Attribute Attribute of IP multicast group
Host port(s) Number of member ports
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display igmp-snooping statistics command to view the statistics information of IGMP
messages learned by IGMP snooping.
1-2
Examples
Field Description
general queries General query messages
specific queries Group-specific query messages
dot1p-priority
Syntax
dot1p-priority priority-number
undo dot1p-priority
View
IGMP-Snooping view
Default Level
2: System level
Parameters
priority-number: Specifies 802.1p precedence for IGMP messages, in the range of 0 to 7. The higher the
number, the higher the precedence.
1-3
Description
Use the dot1p-priority command to configure 802.1p precedence for IGMP messages globally.
Examples
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] dot1p-priority 3
Syntax
View
IGMP-Snooping view
Default Level
2: System level
Parameters
vlan vlan-list: Defines one or multiple VLANs. You can provide up to 10 VLAN lists, by each of which
you can specify an individual VLAN in the form of vlan-id, or a VLAN range in the form of start-vlan-id to
end-vlan-id, where the end VLAN ID must be greater than the start VLAN ID. The effective range of a
VLAN ID is 1 to 4094.
Description
Use the fast-leave command to enable fast leave processing globally. With this function enabled, when
the switch receives an IGMP leave message on a port, it directly removes that port from the multicast
forwarding entry of the specific group.
Use the undo fast-leave command to disable fast leave processing globally.
By default, fast leave processing is disabled.
Note that:
z This command works on IGMP snooping–enabled VLANs.
z If you do not specify any VLAN, the command will take effect for all VLANs; if you specify a VLAN or
multiple VLANs, the command will take effect for the specified VLAN(s) only.
Related commands: igmp-snooping fast-leave.
Examples
1-4
[Sysname] igmp-snooping
[Sysname-igmp-snooping] fast-leave vlan 2
Syntax
View
IGMP-Snooping view
Default Level
2: System level
Parameters
acl-number: Basic or advanced ACL number, in the range of 2000 to 3999. The source address or
address range specified in the advanced ACL rule is used to match the multicast source address(es)
specified in IGMPv3 reports, rather than the source address in the IP packets. The system assumes
that an IGMPv1 or IGMPv2 report or an IGMPv3 IS_EX or TO_EX report that does not carry a multicast
source address carries a multicast source address of 0.0.0.0.
vlan vlan-list: Defines one or multiple VLANs. You can provide up to 10 VLAN lists, by each of which
you can specify an individual VLAN in the form of vlan-id, or a VLAN range in the form of start-vlan-id to
end-vlan-id, where the end VLAN ID must be greater than the start VLAN ID. The effective range of a
VLAN ID is 1 to 4094.
Description
Use the group-policy command to configure a global multicast group filter, namely to control the
multicast groups a host can join.
Use the undo group-policy command to remove the configured global multicast group filter.
By default, no global multicast group filter is configured, namely a host can join any valid multicast
group.
Note that:
z If you do not specify any VLAN, the command will take effect for all VLANs; if you specify a VLAN or
multiple VLANs, the command will take effect for the specified VLAN(s) only.
z If the specified ACL does not exist or the ACL rule is null, all multicast groups will be filtered out.
z You can configure different ACL rules for a port in different VLANs; for a given VLAN, a newly
configured ACL rule will override the existing one.
Related commands: igmp-snooping group-policy.
Examples
# Apply ACL 2000 as a multicast group filter in VLAN 2 so that hosts in this VLAN can join 225.1.1.1
only.
<Sysname> system-view
[Sysname] acl number 2000
1-5
[Sysname-acl-basic-2000] rule permit source 225.1.1.1 0
[Sysname-acl-basic-2000] quit
[Sysname] igmp-snooping
[Sysname-igmp-snooping] group-policy 2000 vlan 2
Syntax
host-aging-time interval
undo host-aging-time
View
IGMP-Snooping view
Default Level
2: System level
Parameters
interval: Dynamic member port aging time, in seconds. The effective range is 200 to 1,000.
Description
Use the host-aging-time command to configure the aging time of dynamic member ports globally.
Use the undo host-aging-time command to restore the default setting.
By default, the aging time of dynamic member ports is 260 seconds.
This command works only on IGMP snooping–enabled VLANs.
Related commands: igmp-snooping host-aging-time.
Examples
# Set the aging time of dynamic member ports globally to 300 seconds.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] host-aging-time 300
igmp-snooping
Syntax
igmp-snooping
undo igmp-snooping
View
System view
Default Level
2: System level
1-6
Parameters
None
Description
Use the igmp-snooping command to enable IGMP snooping globally and enter IGMP-Snooping view.
Use the undo igmp-snooping command to disable IGMP snooping globally.
By default, IGMP snooping is disabled.
Related commands: igmp-snooping enable.
Examples
igmp-snooping dot1p-priority
Syntax
View
VLAN view
Default Level
2: System level
Parameters
priority-number: Specifies 802.1p precedence for IGMP messages, in the range of 0 to 7. The higher the
number, the higher the precedence.
Description
Use the igmp-snooping dot1p-priority command to configure 802.1p precedence for IGMP
messages in a VLAN.
Before configuring this command in a VLAN, enable IGMP Snooping in the VLAN.
Examples
# Enable IGMP Snooping in VLAN 2 and set 802.1p precedence for IGMP messages in the VLAN to 3.
<Sysname> system-view
1-7
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping dot1p-priority 3
igmp-snooping drop-unknown
Syntax
igmp-snooping drop-unknown
undo igmp-snooping drop-unknown
View
VLAN view
Default Level
2: System level
Parameters
None
Description
Use the igmp-snooping drop-unknown command to enable the function of dropping unknown
multicast data in the current VLAN.
Use the undo igmp-snooping drop-unknown command to disable the function of dropping unknown
multicast data in the current VLAN.
By default, this function is disabled, that is, unknown multicast data is flooded.
This command takes effect only if IGMP snooping is enabled in the VLAN.
Related commands: igmp-snooping enable.
Examples
# In VLAN 2, enable IGMP snooping and the function of dropping unknown multicast data.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping drop-unknown
igmp-snooping enable
Syntax
igmp-snooping enable
undo igmp-snooping enable
1-8
View
VLAN view
Default Level
2: System level
Parameters
None
Description
Use the igmp-snooping enable command to enable IGMP snooping in the current VLAN.
Use the undo igmp-snooping enable command to disable IGMP snooping in the current VLAN.
By default, IGMP snooping is disabled in a VLAN.
IGMP snooping must be enabled globally before it can be enabled in a VLAN.
Related commands: igmp-snooping.
Examples
igmp-snooping fast-leave
Syntax
View
Ethernet interface view, Layer 2 aggregate interface view, port group view
Default Level
2: System level
Parameters
vlan vlan-list: Defines one or multiple VLANs. You can provide up to 10 VLAN lists, by each of which
you can specify an individual VLAN in the form of vlan-id, or a VLAN range in the form of start-vlan-id to
end-vlan-id, where the end VLAN ID must be greater than the start VLAN ID. The effective range of a
VLAN ID is 1 to 4094.
Description
Use the igmp-snooping fast-leave command to enable fast leave processing on the current port or
group of ports.
1-9
Use the undo igmp-snooping fast-leave command to disable fast leave processing on the current
port or group of ports.
By default, fast leave processing is disabled.
Note that:
z This command works on IGMP snooping–enabled VLANs.
z If you do not specify any VLAN when using this command in Ethernet interface view or Layer 2
aggregate interface view, the command will take effect for all VLANs the interface belongs to; if you
specify a VLAN or multiple VLANs, the command will take effect only if the interface belongs to the
specified VLAN(s).
z If you do not specify any VLAN when using this command in port group view, the command will
take effect on all the ports in this group; if you specify a VLAN or multiple VLANs, the command will
take effect only on those ports in this group that belong to the specified VLAN(s).
Related commands: fast-leave.
Examples
Syntax
View
VLAN view
Default Level
2: System level
Parameters
ip-address: Specifies the source address of IGMP general queries, which can be any legal IP address.
current-interface: Sets the source address of IGMP general queries to the address of the current
VLAN interface. If the current VLAN interface does not have an IP address, the default IP address
0.0.0.0 will be used as the source IP address of IGMP general queries.
Description
Use the igmp-snooping general-query source-ip command to configure the source address of IGMP
general queries.
Use the undo igmp-snooping general-query source-ip command to restore the default
configuration.
By default, the source IP address of IGMP general queries is 0.0.0.0.
This command takes effect only if IGMP snooping is enabled in the VLAN.
1-10
Related commands: igmp-snooping enable.
Examples
# In VLAN 2, enable IGMP snooping and specify 10.1.1.1 as the source IP address of IGMP general
queries.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping general-query source-ip 10.1.1.1
igmp-snooping group-limit
Syntax
View
Ethernet interface view, Layer 2 aggregate interface view, port group view
Default Level
2: System level
Parameters
limit: Maximum number of multicast groups that can be joined on a port. The effective range is 1 to 256.
vlan vlan-list: Defines one or multiple VLANs. You can provide up to 10 VLAN lists, by each of which
you can specify an individual VLAN in the form of vlan-id, or a VLAN range in the form of start-vlan-id to
end-vlan-id, where the end VLAN ID must be greater than the start VLAN ID. The effective range of a
VLAN ID is 1 to 4094.
Description
Use the igmp-snooping group-limit command to configure the maximum number of multicast groups
that can be joined on a port.
Use the undo igmp-snooping group-limit command to restore the default setting.
The default the maximum number of multicast groups is 256.
Note that:
z If you do not specify any VLAN when using this command in Ethernet interface view or Layer 2
aggregate interface view, the command will take effect for all VLANs the interface belongs to; if you
specify a VLAN or multiple VLANs, the command will take effect only if the interface belongs to the
specified VLAN(s).
z If you do not specify any VLAN when using this command in port group view, the command will
take effect on all the ports in this group; if you specify a VLAN or multiple VLANs, the command will
take effect only on those ports in this group that belong to the specified VLAN(s).
1-11
Examples
igmp-snooping group-policy
Syntax
View
Ethernet interface view, Layer 2 aggregate interface view, port group view
Default Level
2: System level
Parameters
acl-number: Basic or advanced ACL number, in the range of 2000 to 3999. The source address or
address range specified in the advanced ACL rule is used to match the multicast source address(es)
specified in IGMPv3 reports, rather than the source address in the IP packets. The system assumes
that an IGMPv1 or IGMPv2 report or an IGMPv3 IS_EX and TO_EX report that does not carry a
multicast source address carries a multicast source address of 0.0.0.0.
vlan vlan-list: Defines one or multiple VLANs. You can provide up to 10 VLAN lists, by each of which
you can specify an individual VLAN in the form of vlan-id, or a VLAN range in the form of start-vlan-id to
end-vlan-id, where the end VLAN ID must be greater than the start VLAN ID. The effective range of a
VLAN ID is 1 to 4094.
Description
Use the igmp-snooping group-policy command to configure a multicast group filter on the current
port(s).
Use the undo igmp-snooping group-policy command to remove a multicast group filter on the
current port(s), namely to control the multicast groups hosts on the port(s) can join.
By default, no multicast group filter is configured on an interface, namely a host can join any valid
multicast group.
Note that:
z If you do not specify any VLAN when using this command in Ethernet interface view or Layer 2
aggregate interface view, the command will take effect for all VLANs the interface belongs to; if you
specify a VLAN or multiple VLANs, the command will take effect only if the interface belongs to the
specified VLAN(s).
z If you do not specify any VLAN when using this command in port group view, the command will
take effect on all the ports in this group; if you specify a VLAN or multiple VLANs, the command will
take effect only on those ports in this group that belong to the specified VLAN(s).
z If the specified ACL does not exist or the ACL rule is null, all multicast groups will be filtered out.
1-12
z You can configure different ACL rules for a port in different VLANs; for a given VLAN, a newly
configured ACL rule will override the existing one.
Related commands: group-policy.
Examples
# Apply ACL 2000 as a multicast group filter so that hosts on GigabitEthernet 1/0/1 in VLAN 2 can join
225.1.1.1 only.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule permit source 225.1.1.1 0
[Sysname-acl-basic-2000] quit
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] igmp-snooping group-policy 2000 vlan 2
igmp-snooping host-aging-time
Syntax
View
VLAN view
Default Level
2: System level
Parameters
interval: Dynamic member port aging time, in seconds. The effective range is 200 to 1,000.
Description
Use the igmp-snooping host-aging-time command to configure the aging time of dynamic member
ports in the current VLAN.
Use the undo igmp-snooping host-aging-time command to restore the default setting.
By default, the aging time of dynamic member ports is 260 seconds.
This command takes effect only if IGMP snooping is enabled in the VLAN.
Related commands: igmp-snooping enable, host-aging-time.
Examples
# Enable IGMP snooping and set the aging time of dynamic member ports to 300 seconds in VLAN 2.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping host-aging-time 300
1-13
igmp-snooping host-join
Syntax
View
Ethernet interface view, Layer 2 aggregate interface view, port group view
Default Level
2: System level
Parameters
group-address: Address of the multicast group that the simulated host is to join, in the range of
224.0.1.0 to 239.255.255.255.
source-address: Address of the multicast source that the simulated host is to join. The value of this
argument should be a valid unicast address or 0.0.0.0. If the value is 0.0.0.0, this means that no
multicast source is specified.
vlan vlan-id: Specifies the VLAN that comprises the port(s), where vlan-id is in the range of 1 to 4094.
Description
Use the igmp-snooping host-join command to configure the current port(s) as simulated member
host(s), namely configure the current port as a member host for the specified multicast group or source
and group.
Use the undo igmp-snooping host-join command to remove the current port(s) as simulated member
host(s) for the specified multicast group or source and group.
By default, this function is disabled.
Note that:
z This command works on IGMP snooping–enabled VLANs. The version of IGMP on the simulated
host depends on the version of IGMP snooping running in the VLAN.
z The source-ip source-address option in the command is meaningful only for IGMP snooping
version 3. If IGMP snooping version 2 is running, although you can include source-ip
source-address in the command, the simulated host does not respond to a query message.
z If configured in Ethernet interface view or Layer 2 aggregate interface view, this feature takes effect
only if the interface belongs to the specified VLAN.
z If configured in port group view, this feature takes effect only on those ports in this port group that
belong to the specified VLAN.
Examples
# Configure GigabitEthernet 1/0/1 as a simulated member host in VLAN 2 for multicast source 1.1.1.1
and multicast group 232.1.1.1.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
1-14
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping version 3
[Sysname-vlan2] quit
[Sysname] interface gigabitethernet 1/0/1
[Sysname-Gigabitethernet1/0/1] igmp-snooping host-join 232.1.1.1 source-ip 1.1.1.1 vlan 2
igmp-snooping last-member-query-interval
Syntax
View
VLAN view
Default Level
2: System level
Parameters
interval: Interval between IGMP last-member queries, in seconds. The effective range is 1 to 5.
Description
Examples
# Enable IGMP snooping and set the interval between IGMP last-member queries to 3 seconds in VLAN
2.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping last-member-query-interval 3
Syntax
1-15
View
VLAN view
Default Level
2: System level
Parameters
ip-address: Specifies a source address for the IGMP leave messages sent by the IGMP Snooping proxy,
which can be any legal IP address.
current-interface: Specifies the IP address of the current VLAN interface as the source address of
IGMP leave messages sent by the IGMP Snooping proxy. If no IP address has been assigned to the
current VLAN interface, the default IP address 0.0.0.0 is used.
Description
Use the igmp-snooping leave source-ip command to configure the source IP address of the IGMP
leave messages sent by the IGMP Snooping proxy.
Use the undo igmp-snooping leave source-ip command to restore the default.
By default, the source IP address of the IGMP leave messages sent by the IGMP Snooping proxy is
0.0.0.0.
Note that:
z Before configuring this command in a VLAN, enable IGMP Snooping in the VLAN.
z The source IP address configured in the igmp-snooping leave source-ip command also applies
when the simulated host sends IGMP leave messages.
Examples
# Enable IGMP Snooping in VLAN 2 and configure the source IP address of IGMP leave messages sent
by the IGMP Snooping proxy in VLAN 2 to 10.1.1.1.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping leave source-ip 10.1.1.1
igmp-snooping max-response-time
Syntax
1-16
View
VLAN view
Default Level
2: System level
Parameters
interval: Maximum response time to IGMP general queries, in seconds. The effective range is 1 to 25.
Description
Use the igmp-snooping max-response-time command to configure the maximum response time to
IGMP general queries in the VLAN.
Use the undo igmp-snooping max-response-time command to restore the default setting.
By default, the maximum response time to IGMP general queries is 10 seconds.
This command takes effect only if IGMP snooping is enabled in the VLAN.
Related commands: igmp-snooping enable, max-response-time, igmp-snooping query-interval.
Examples
# Enable IGMP snooping and set the maximum response time to IGMP general queries to 5 seconds in
VLAN 2.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping max-response-time 5
igmp-snooping overflow-replace
Syntax
View
Ethernet interface view, Layer 2 aggregate interface view, port group view
Default Level
2: System level
Parameters
vlan vlan-list: Defines one or multiple VLANs. You can provide up to 10 VLAN lists, by each of which
you can specify an individual VLAN in the form of vlan-id, or a VLAN range in the form of start-vlan-id to
end-vlan-id, where the end VLAN ID must be greater than the start VLAN ID. The effective range of a
VLAN ID is 1 to 4094.
1-17
Description
Use the igmp-snooping overflow-replace command to enable the multicast group replacement
function on the current port(s).
Use the undo igmp-snooping overflow-replace command to disable the multicast group replacement
function on the current port(s).
By default, the multicast group replacement function is disabled.
Note that:
z This command works on IGMP snooping–enabled VLANs.
z If you do not specify any VLAN when using this command in Ethernet interface view or Layer 2
aggregate interface view, the command will take effect for all VLANs the interface belongs to; if you
specify a VLAN or multiple VLANs, the command will take effect only if the interface belongs to the
specified VLAN(s).
z If you do not specify any VLAN when using this command in port group view, the command will
take effect on all the ports in this group; if you specify a VLAN or multiple VLANs, the command will
take effect only on those ports in this group that belong to the specified VLAN(s).
Related commands: overflow-replace.
Examples
Syntax
View
VLAN view
Default Level
2: System level
Parameters
None
Description
Use the igmp-snooping proxying enable command to enable the IGMP snooping Proxying function
in a VLAN.
Use the undo igmp-snooping proxying enable command to disable the IGMP snooping Proxying
function in a VLAN.
By default, IGMP snooping Proxying is disabled in all VLANs.
1-18
Before configuring this command in a VLAN, enable IGMP snooping in the VLAN.
Related commands: igmp-snooping enable.
Examples
igmp-snooping querier
Syntax
igmp-snooping querier
undo igmp-snooping querier
View
VLAN view
Default Level
2: System level
Parameters
None
Description
Use the igmp-snooping querier command to enable the IGMP snooping querier function.
Use the undo igmp-snooping querier command to disable the IGMP snooping querier function.
By default, the IGMP snooping querier function is disabled.
Note that: This command takes effect only if IGMP snooping is enabled in the VLAN.
Related commands: igmp-snooping enable.
Examples
# Enable IGMP snooping and the IGMP snooping querier function in VLAN 2.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping querier
1-19
igmp-snooping query-interval
Syntax
View
VLAN view
Default Level
2: System level
Parameters
interval: Interval between IGMP general queries, in seconds. The effective range is 2 to 300.
Description
Use the igmp-snooping query-interval command to configure the interval between IGMP general
queries.
Use the undo igmp-snooping query-interval command to restore the default setting.
By default, the IGMP general query interval is 60 seconds.
This command takes effect only if IGMP snooping is enabled in the VLAN.
Related commands: igmp-snooping enable, igmp-snooping querier, igmp-snooping
max-response-time, max-response-time.
Examples
# Enable IGMP snooping and set the interval between IGMP general queries to 20 seconds in VLAN 2.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping query-interval 20
Syntax
View
VLAN view
Default Level
2: System level
1-20
Parameters
ip-address: Specifies a source address for the IGMP reports sent by the IGMP Snooping proxy, which
can be any legal IP address.
current-interface: Specifies the IP address of the current VLAN interface as the source address of
IGMP reports sent by the IGMP Snooping proxy. If no IP address has been assigned to the current
VLAN interface, the default IP address 0.0.0.0 is used.
Description
Use the igmp-snooping report source-ip command to configure the source IP address of the IGMP
reports sent by the IGMP snooping proxy.
Use the undo igmp-snooping report source-ip command to restore the default.
By default, the source IP address of the IGMP reports sent by the IGMP snooping proxy is 0.0.0.0.
Note that:
z Before configuring this command in a VLAN, enable IGMP snooping in the VLAN.
z The source IP address configured in the igmp-snooping report source-ip command also applies
when the simulated host sends IGMP reports.
Related commands: igmp-snooping enable.
Examples
# Enable IGMP Snooping in VLAN 2 and configure the source IP address of IGMP reports sent by the
IGMP Snooping proxy in VLAN 2 to 10.1.1.1.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping report source-ip 10.1.1.1
igmp-snooping router-aging-time
Syntax
View
VLAN view
Default Level
2: System level
Parameters
interval: Dynamic router port aging time, in seconds. The effective range is 1 to 1,000.
1-21
Description
Use the igmp-snooping router-aging-time command to configure the aging time of dynamic router
ports in the current VLAN.
Use the undo igmp-snooping router-aging-time command to restore the default setting.
By default, the aging time of dynamic router ports is 105 seconds.
This command takes effect only if IGMP snooping is enabled in the VLAN.
Related commands: igmp-snooping enable, router-aging-time.
Examples
# Enable IGMP snooping and set the aging time of dynamic router ports to 100 seconds in VLAN 2.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping router-aging-time 100
Syntax
View
VLAN view
Default Level
2: System level
Parameters
ip-address: Sets the source address of IGMP group-specific queries to the specified address.
current-interface: Sets the source address of IGMP group-specific queries to the address of the
current VLAN interface. If the current VLAN interface does not have an IP address, the default IP
address 0.0.0.0 will be used as the source IP address of IGMP group-specific queries.
Description
Use the igmp-snooping special-query source-ip command to configure the source IP address of
IGMP group-specific queries.
Use the undo igmp-snooping special-query source-ip command to restore the default configuration.
By default, the source IP address of IGMP group-specific queries is 0.0.0.0.
This command takes effect only if IGMP snooping is enabled in the VLAN.
Related commands: igmp-snooping enable.
1-22
Examples
# In VLAN 2, enable IGMP snooping and specify 10.1.1.1 as the source IP address of IGMP
group-specific queries.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping special-query source-ip 10.1.1.1
igmp-snooping static-group
Syntax
View
Ethernet interface view, Layer 2 aggregate interface view, port group view
Default Level
2: System level
Parameters
group-address: Address of the multicast group to be statically joined, in the range of 224.0.0.0 to
239.255.255.255.
source-address: Address of the multicast source to be statically joined. The value of this argument
should be a valid unicast address or 0.0.0.0. If the value is 0.0.0.0, this means no multicast source is
specified.
vlan vlan-id: Specifies the VLAN that comprises the port(s), where vlan-id is in the range of 1 to 4094.
Description
Use the igmp-snooping static-group command to configure the static (*, G) or (S, G) joining function,
namely to configure the current port or port group as static multicast group or source-group member(s).
Use the undo igmp-snooping static-group command to restore the system default.
By default, no ports are static member ports.
Note that:
z The source-ip source-address option in the command is meaningful only for IGMP snooping
version 3. If IGMP snooping version 2 is running, although you can include the source-ip
source-address option in your command, the configuration will not take effect.
z If configured in Ethernet interface view or Layer 2 aggregate interface view, this feature takes effect
only if the interface belongs to the specified VLAN.
z If configured in port group view, this feature takes effect only on those ports in this port group that
belong to the specified VLAN.
1-23
Examples
# Configure GigabitEthernet 1/0/1 in VLAN 2 to be a static member port for (1.1.1.1, 232.1.1.1).
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping version 3
[Sysname-vlan2] quit
[Sysname] interface gigabitethernet 1/0/1
[Sysname-Gigabitethernet1/0/1] igmp-snooping static-group 232.1.1.1 source-ip 1.1.1.1 vlan
2
igmp-snooping static-router-port
Syntax
View
Ethernet interface view, Layer 2 aggregate interface view, port group view
Default Level
2: System level
Parameters
vlan vlan-id: Specifies a VLAN in which one or more static router ports are to be configured, where
vlan-id is in the range of 1 to 4094.
Description
Use the igmp-snooping static-router-port command to configure the current port(s) as static router
port(s).
Use the undo igmp-snooping static-router-port command to restore the system default.
By default, no ports are static router ports.
Note that:
z This command works on IGMP snooping–enabled VLANs.
z If configured in Ethernet interface view or Layer 2 aggregate interface view, this feature takes effect
only if the interface belongs to the specified VLAN.
z If configured in port group view, this feature takes effect only on those ports in this port group that
belong to the specified VLAN.
Examples
1-24
[Sysname-Gigabitethernet1/0/1] igmp-snooping static-router-port vlan 2
igmp-snooping version
Syntax
View
VLAN view
Default Level
2: System level
Parameters
Description
Use the igmp-snooping version command to configure the IGMP snooping version.
Use the undo igmp-snooping version command to restore the default setting.
By default, the IGMP snooping version is 2.
Note that: This command can take effect only if IGMP snooping is enabled in the VLAN.
Related commands: igmp-snooping enable.
Examples
# Enable IGMP snooping in VLAN 2, and set the IGMP snooping version to version 3.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 2
[Sysname-vlan2] igmp-snooping enable
[Sysname-vlan2] igmp-snooping version 3
Syntax
last-member-query-interval interval
undo last-member-query-interval
View
IGMP-Snooping view
Default Level
2: System level
1-25
Parameters
interval: Interval between IGMP last-member queries, in seconds. The effective range is 1 to 5.
Description
Use the last-member-query-interval command to configure the interval between IGMP last-member
queries globally.
Use the undo last-member-query-interval command to restore the default setting.
By default, the interval between IGMP last-member queries is 1 second.
This command works only on IGMP snooping–enabled VLANs.
Related commands: igmp-snooping last-member-query-interval.
Examples
Syntax
max-response-time interval
undo max-response-time
View
IGMP-Snooping view
Default Level
2: System level
Parameters
interval: Maximum response time to IGMP general queries, in seconds. The effective range is 1 to 25.
Description
Use the max-response-time command to configure the maximum response time to IGMP general
queries globally.
Use the undo max-response-time command to restore the default value.
This command works only on IGMP snooping–enabled VLANs.
Related commands: igmp-snooping max-response-time, igmp-snooping query-interval.
Examples
# Set the maximum response time to IGMP general queries globally to 5 seconds.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] max-response-time 5
1-26
overflow-replace (IGMP-Snooping view)
Syntax
View
IGMP-Snooping view
Default Level
2: System level
Parameters
vlan vlan-list: Defines one or multiple VLANs. You can provide up to 10 VLAN lists, by each of which
you can specify an individual VLAN in the form of vlan-id, or a VLAN range in the form of start-vlan-id to
end-vlan-id, where the end VLAN ID must be greater than the start VLAN ID. The effective range of a
VLAN ID is 1 to 4094.
Description
Use the overflow-replace command to enable the multicast group replacement function globally.
Use the undo overflow-replace command to disable the multicast group replacement function
globally.
By default, the multicast group replacement function is disabled.
Note that:
z This command works on IGMP snooping–enabled VLANs.
z If you do not specify any VLAN, the command will take effect for all VLANs; if you specify a VLAN or
multiple VLANs, the command will take effect for the specified VLAN(s) only.
Related commands: igmp-snooping overflow-replace.
Examples
Syntax
report-aggregation
undo report-aggregation
View
IGMP-Snooping view
1-27
Default Level
2: System level
Parameters
None
Description
Examples
Syntax
View
User view
Default Level
2: System level
Parameters
group-address: Specifies an IGMP snooping group. The value range of group-address is 224.0.1.0 to
239.255.255.255.
all: Specifies all IGMP snooping groups.
vlan vlan-id: Specifies a VLAN. The effective range of vlan-id is 1 to 4094.
Description
Use the reset igmp-snooping group command to clear IGMP snooping multicast group information.
Note that:
z This command works only on IGMP snooping–enabled VLANs.
z This command cannot remove the static group entries of IGMP snooping groups.
Examples
1-28
reset igmp-snooping statistics
Syntax
View
User view
Default Level
2: System level
Parameters
None
Description
Use the reset igmp-snooping statistics command to clear the statistics information of IGMP
messages learned by IGMP snooping.
Examples
# Clear the statistics information of all kinds of IGMP messages learned by IGMP snooping.
<Sysname> reset igmp-snooping statistics
Syntax
router-aging-time interval
undo router-aging-time
View
IGMP-Snooping view
Default Level
2: System level
Parameters
interval: Dynamic router port aging time, in seconds. The effective range is 1 to 1,000.
Description
Use the router-aging-time command to configure the aging time of dynamic router ports globally.
Use the undo router-aging-time command to restore the default setting.
By default, the aging time of dynamic router ports is 105 seconds.
This command works only on IGMP snooping–enabled VLANs.
Related commands: igmp-snooping router-aging-time.
1-29
Examples
# Set the aging time of dynamic router ports globally to 100 seconds.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] router-aging-time 100
1-30
2 Multicast VLAN Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
vlan-id: VLAN ID of a multicast VLAN, in the range of 1 to 4094. If this argument is not provided, the
information about all multicast VLANs will be displayed.
Description
Use the display multicast-vlan command to view the information about the specified multicast VLAN.
Examples
Multicast vlan 1
port list:
GE1/0/1
Field Description
Total 1 multicast-vlan(s) Total number of multicast VLANs
Multicast vlan A multicast VLAN
2-1
multicast-vlan
Syntax
multicast-vlan vlan-id
undo multicast-vlan { all | vlan-id }
View
System view
Default Level
2: System level
Parameters
Description
Use the multicast-vlan command to configure the specified VLAN as a multicast VLAN and enter
multicast VLAN view.
Use the undo multicast-vlan command to remove the specified VLAN as a multicast VLAN.
The VLAN to be configured is not a multicast VLAN by default.
Note that:
z The specified VLAN to be configured as a multicast VLAN must exist.
z For a port-based multicast VLAN, you need to enable IGMP Snooping in both the multicast VLAN
and all the user VLANs.
Related commands: igmp-snooping enable.
Examples
# Enable IGMP Snooping in VLAN 100. Configure it as a multicast VLAN and enter multicast VLAN
view.
<Sysname> system-view
[Sysname] igmp-snooping
[Sysname-igmp-snooping] quit
[Sysname] vlan 100
[Sysname-vlan100] igmp-snooping enable
[Sysname-vlan100] quit
[Sysname] multicast-vlan 100
[Sysname-mvlan-100]
Syntax
port interface-list
undo port { all | interface-list }
2-2
View
Default Level
2: System level
Parameters
interface-list: Specifies a port in the form of interface-type interface-number, or a port range in the form
of interface-type start-interface-number to interface-type end-interface-number, where the end
interface number must be greater than the start interface number.
all: Deletes all the ports in the current multicast VLAN.
Description
Use the port command to assign the specified port(s) to the current multicast VLAN.
Use the undo port command to delete the specified port(s) or all ports from the current multicast VLAN.
By default, a multicast VLAN has no ports.
Note that:
z A port can belong to only one multicast VLAN.
z Only the following types of interfaces can be configured as multicast VLAN ports: Ethernet, or
Layer 2 aggregate interfaces.
Examples
# Assign ports GigabitEthernet 1/0/1 through GigabitEthernet 1/0/5 to multicast VLAN 100.
<Sysname> system-view
[Sysname] multicast-vlan 100
[Sysname-mvlan-100] port gigabitethernet 1/0/1 to gigabitethernet 1/0/5
port multicast-vlan
Syntax
View
Ethernet interface view, Layer 2 aggregate interface view, port group view.
Default Level
2: System level
Parameters
vlan-id: VLAN ID of the multicast VLAN you want to assign the current port(s) to, in the range of 1 to
4094.
Description
Use the port multicast-vlan command to assign the current port(s) to the specified multicast VLAN.
2-3
Use the undo port multicast-vlan command to restore the system default.
By default, a port does not belong to any multicast VLAN.
Note that a port can belong to only one multicast VLAN.
Examples
2-4
Table of Contents
i
1 QoS Policy Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display traffic classifier command to display information about classes.
If no class name is specified, information about all user-defined classes is displayed.
Examples
Classifier: database
Operator: AND
Rule(s) : if-match acl 3131
Field Description
User Defined Classifier Information User-defined class information
Classifier Class name and its match criteria
Operator Logical relationship between match criteria
1-1
Field Description
Rule(s) Match criteria
if-match
Syntax
if-match match-criteria
undo if-match match-criteria
undo if-match acl { acl-number | name acl-name } [ update acl { acl-number | name acl-name } ]
View
Class view
Default Level
2: System level
Parameters
Form Description
Specifies to match an IPv4 ACL specified by its number or name.
The access-list-number argument specifies an ACL by its
number, which ranges from 2000 to 4999; the name acl-name
acl { access-list-number | name keyword-argument combination specifies an ACL by its name.
acl-name }
In a class configured with the operator and, the logical
relationship between rules defined in the referenced IPv4 ACL is
or.
1-2
Form Description
Specifies to match packets by IP precedence. The
ip-precedence
ip-precedence-list argument is a list of IP precedence values in
ip-precedence-list
the range of 0 to 7.
Specifies to match the packets of a specified protocol. The
protocol protocol-name
protocol-name argument can be IP.
To successfully execute the traffic behavior associated with a traffic class that uses the AND operator,
define only one if-match clause for any of the following match criteria and input only one value for any
of the following list arguments, for example, the 8021p-list argument:
z customer-dot1p 8021p-list
z customer-vlan-id vlan-id-list
z destination-mac mac-address
z dscp dscp-list
z ip-precedence ip-precedence-list
z service-vlan-id vlan-id-list
z source-mac mac-address
To create multiple if-match clauses for these match criteria or specify multiple values for the list
arguments, ensure that the operator of the class is OR.
Description
1-3
z You can configure up to eight DSCP values in one command line. If multiple identical DSCP values
are specified, the system considers them as one. If a packet matches one of the defined DSCP
values, it is considered matching the if-match clause.
z To delete a criterion matching DSCP values, the specified DSCP values must be identical with
those defined in the rule (sequence may be different).
4) Define a criterion to match the 802.1p precedence values of the customer network
z You can configure multiple 802.1p precedence match criteria in a class. All the defined 802.1p
values are arranged in ascending order automatically.
z You can configure up to eight 802.1p precedence values in one command line. If the same 802.1p
precedence value is specified multiple times, the system considers them as one. If a packet
matches one of the defined 802.1p precedence values, it is considered matching the if-match
clause.
z To delete a criterion matching 802.1p precedence values, the specified 802.1p precedence values
in the command must be identical with those defined in the criterion (sequence may be different).
5) Define a criterion to match IP precedence values
z You can configure multiple IP precedence match criteria in a class. The defined IP precedence
values are arranged automatically in ascending order.
z You can configure up to eight IP precedence values in one command line. If the same IP
precedence is specified multiple times, the system considers them as one. If a packet matches one
of the defined IP precedence values, it is considered matching the if-match clause.
z To delete a criterion matching IP precedence values, the specified IP precedence values in the
command must be identical with those defined in the criterion (sequence may be different).
6) Define a criterion to match customer network VLAN IDs or service provider network VLAN IDs
z You can configure multiple VLAN ID match criteria in a class. The defined VLAN IDs are
automatically arranged in ascending order.
z You can configure multiple VLAN IDs in one command line. If the same VLAN ID is specified
multiple times, the system considers them as one. If a packet matches one of the defined VLAN IDs,
it is considered matching the if-match clause.
z To delete a criterion matching VLAN IDs, the specified VLAN IDs in the command must be identical
with those defined in the criterion (sequence may be different).
Related commands: traffic classifier.
Examples
# Define a match criterion for class class1 to match the packets with the destination MAC address
0050-ba27-bed3.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match destination-mac 0050-ba27-bed3
# Define a match criterion for class class2 to match the packets with the source MAC address
0050-ba27-bed2.
<Sysname> system-view
[Sysname] traffic classifier class2
1-4
[Sysname-classifier-class2] if-match source-mac 0050-ba27-bed2
# Define a match criterion for class class1 to match the ACL named flow.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match acl name flow
# Define a match criterion for class class1 to match the packets with DSCP values 1, 6 or 9.
<Sysname> system-view
[Sysname] traffic classifier class1 operator or
[Sysname-classifier-class1] if-match dscp 1
[Sysname-classifier-class1] if-match dscp 6
[Sysname-classifier-class1] if-match dscp 9
# Define a match criterion for class class1 to match the packets with an IP precedence of 1 or 6.
<Sysname> system-view
[Sysname] traffic classifier class1 operator or
[Sysname-classifier-class1] if-match ip-precedence 1
[Sysname-classifier-class1] if-match ip-precedence 6
# Define a match criterion for class class1 to match the packets with customer network VLAN ID 1, 6, or
9.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] if-match customer-vlan-id 1 6 9
# Change the match criterion of class class1 from ACL 2008 to ACL 2009.
<Sysname> system-view
[Sysname] traffic classifier class1
[Sysname-classifier-class1] undo if-match acl 2008 update acl 2009
traffic classifier
Syntax
View
System view
1-5
Default Level
2: System level
Parameters
Description
Use the traffic classifier command to define a class and enter class view.
Use the undo traffic classifier command to remove a class.
By default, the relationship between match criteria is and.
Related commands: qos policy, qos apply policy, classifier behavior.
Examples
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display traffic behavior command to display traffic behavior information.
Examples
1-6
User Defined Behavior Information:
Behavior: 2
Redirect enable:
Redirect type: interface
Redirect destination: GigabitEthernet1/0/4
Behavior: 1
Filter enable: deny
Field Description
User Defined Behavior Information User-defined behavior information.
Behavior Name of a behavior.
Redirect enable Traffic redirecting configuration information.
Traffic redirecting type, which can be redirecting
Redirect type
to an interface.
Redirect destination Traffic redirecting destination port .
Filter enable Traffic filtering option: permit or deny.
filter
Syntax
View
Default Level
2: System level
Parameters
Description
Use the filter command to configure a traffic filtering action for the traffic behavior.
Use the undo filter command to remove the traffic filtering action.
1-7
Examples
# Configure the traffic filtering action as deny for traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] filter deny
redirect
Syntax
View
Default Level
2: System level
Parameters
Description
Use the redirect command to configure a traffic redirect action for the traffic behavior.
Use the undo redirect command to remove the traffic redirect action.
Examples
# Configure the action of redirecting traffic to GigabitEthernet 1/0/1 for traffic behavior database.
<Sysname> system-view
[Sysname] traffic behavior database
[Sysname-behavior-database] redirect interface gigabitethernet1/0/1
traffic behavior
Syntax
1-8
View
System view
Default Level
2: System level
Parameters
Description
Use the traffic behavior command to create a traffic behavior and enter traffic behavior view.
Use the undo traffic classifier command to remove a traffic behavior.
Related commands: qos policy, qos apply policy, classifier behavior.
Examples
Syntax
View
Policy view
Default Level
2: System level
Parameters
Description
Use the classifier behavior command to specify a behavior for a class in the policy.
Use the undo classifier command to remove a class from the policy.
Note that:
z Each class in the policy can be associated with only one behavior.
z If the class and traffic behavior specified for the command do not exist, the system creates a null
class and a null traffic behavior.
1-9
Related commands: qos policy.
Examples
# Associate traffic class database with traffic behavior test in QoS policy user1.
<Sysname> system-view
[Sysname] qos policy user1
[Sysname-qospolicy-user1] classifier database behavior test
[Sysname-qospolicy-user1]
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display qos policy command to display user-defined QoS policy configuration information.
Examples
Field Description
Policy Policy name
1-10
Field Description
Class name
A policy can contain multiple classes, and each
Classifier class is associated with a traffic behavior. A
class can be configured with multiple match
criteria. Refer to the traffic classifier command
for related information.
Behavior associated with the class. A behavior is
associated with a class. It can be configured with
Behavior
multiple actions. Refer to the traffic behavior
command for related information.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display qos policy interface command to display QoS policy configuration and operational
information on an interface or all interfaces.
Examples
1-11
Table 1-5 display qos policy interface command output description
Field Description
Interface Interface type and interface number
The direction in which the policy is applied to the
Direction
interface
Policy Name of the policy applied to the interface
Class name and corresponding configuration
Classifier
information
Logical relationship between match criteria in the
Operator
class
Rule(s) Match criteria in the class
Behavior name and corresponding configuration
Behavior
information
Syntax
View
Default Level
2: System level
Parameters
Description
Examples
1-12
qos policy
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the qos policy command to create a policy and enter policy view.
Use the undo qos policy command to remove a policy.
A policy applied to an interface cannot be deleted directly. You need to cancel application of the policy
on the interface before deleting the policy with the undo qos policy command.
Related commands: classifier behavior, qos apply policy.
Examples
1-13
2 Priority Mapping Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display qos map-table command to display the configuration of a priority mapping table.
If no priority mapping table is specified, the configuration information of all priority mapping tables is
displayed.
Related commands: qos map-table.
Examples
2-1
7 : 7
Field Description
MAP-TABLE NAME Name of the mapping table
TYPE Type of the mapping table
IMPORT Input values of the mapping table
import
Syntax
View
Default Level
2: System level
Parameters
Description
Use the import command to configure a mapping from one or multiple input values to an output value.
Use the undo import command to restore the specified or all mappings to the default mappings.
Related commands: display qos map-table.
Examples
qos map-table
Syntax
2-2
View
System view
Default Level
2: System level
Parameters
Description
Use the qos map-table command to enter the specified priority mapping table view.
Related commands: display qos map-table.
Examples
Syntax
View
Default Level
2: System level
Parameters
Description
Use the qos priority command to configure a priority for the current port.
Use the undo qos priority command to restore the default value.
2-3
The default port priority is 0.
Examples
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display qos trust interface command to display the trusted precedence type and priority of an
interface.
If no interface is specified, the trusted precedence types on all interfaces are displayed.
Examples
Field Description
Interface Interface type and interface number
Port priority Port priority
Trusted precedence type, which can be dot1p,
Port priority trust type
dscp, or untrust
2-4
qos trust
Syntax
View
Default Level
2: System level
Parameters
dot1p: Trusts the 802.1p precedence and uses this priority for priority mapping.
dscp: Trusts the DSCP values and uses DSCP values for priority mapping.
Description
Use the qos trust command to configure the trusted precedence type on an interface.
Use the undo qos trust command to restore the default.
By default, the port priority is trusted.
Examples
2-5
3 Line Rate Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display qos lr interface command to view the line rate configuration information and
operational statistics on a specified interface or all the interfaces.
If no interface is specified, the line rate configuration information and operational statistics on all the
interfaces are displayed.
Examples
# Display the line rate configuration information and operational statistics on all the interfaces.
<Sysname> display qos lr interface
Interface: GigabitEthernet1/0/2
Direction: Inbound
CIR 1280 (kbps)
Direction: Outbound
CIR 2560 (kbps)
Interface: GigabitEthernet1/0/4
Direction: Inbound
CIR 1280 (kbps)
Direction: Outbound
CIR 2560 (kbps)
Field Description
Interface Interface type and interface number
3-1
Field Description
The direction in which the line rate configuration
Direction
is applied: inbound or outbound
CIR Committed information rate (CIR) in kbps
qos lr
Syntax
View
Default Level
2: System level
Parameters
Description
Use the qos lr command to limit the rate of incoming packets or outgoing packets on the interface.
Use the undo qos lr command to remove the rate limit.
Settings in interface view are effective on the current interface; settings in port group view are effective
on all ports in the port group.
Examples
# Limit the rate of outgoing packets on GigabitEthernet 1/0/1, with CIR 1280 kbps.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos lr outbound cir 1280
3-2
4 Congestion Management Configuration
Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display qos wrr interface command to display the queuing configuration on an interface.
If no interface is specified, the queuing configuration of all the interfaces is displayed.
Related commands: qos wrr.
Examples
Field Description
Interface Interface type and interface number
Output queue Pattern of the current output queue
4-1
Field Description
Queue ID ID of a queue
Number of the group a queue is assigned to. By
Group
default, all queues belong to group SP.
Queue weight based on which queues are
Weight scheduled. N/A indicates that the queue adopts
the SP queue scheduling algorithm.
qos wrr
Syntax
View
Default Level
2: System level
Parameters
Description
Examples
# Enable the SP+WRR queue scheduling algorithm on GigabitEthernet1/0/1. Add queue 0 to the SP
queue scheduling group; add queue 1 to WRR queue scheduling group 1, with the weight being 20; add
queue 2 and queue 3 to WRR queue scheduling group 2, with the weight being 10 and 50 respectively.
4-2
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] qos wrr 0 group sp
[Sysname-GigabitEthernet1/0/1] qos wrr 1 group 1 weight 20
[Sysname-GigabitEthernet1/0/1] qos wrr 2 group 2 weight 10
[Sysname-GigabitEthernet1/0/1] qos wrr 3 group 2 weight 50
4-3
Table of Contents
i
1 802.1X Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Examples
1-1
Reauth Period 3600 s
The maximal retransmitting times 3
GigabitGigabitEthernet1/0/0/1 is link-up
802.1X protocol is enabled
Handshake is disabled
Periodic reauthentication is disabled
The port is an authenticator
Authenticate Mode is Auto
Port Control Type is Mac-based
802.1X Multicast-trigger is enabled
Mandatory authentication domain: NOT configured
Guest VLAN: 4
Auth-fail VLAN: NOT configured
Max number of on-line users is 256
Field Description
Equipment 802.1X protocol is enabled Indicates whether 802.1X is enabled globally
Indicates whether CHAP authentication is
CHAP authentication is enabled
enabled
Transmit Period Setting of the username request timeout timer
Handshake Period Setting of the handshake timer
1-2
Field Description
Maximum number of attempts for the device to
The maximal retransmitting times
send authentication requests to the client
The maximum 802.1X user resource number per
Maximum number of clients supported per board
slot
Total current used 802.1X resource number Total number of online users
GigabitEthernet1/0/1 is link-up Status of port GigabitEthernet1/0/1
802.1X protocol is disabled Indicates whether 802.1X is enabled on the port
Indicates whether handshake is enabled on the
Handshake is disabled
port
Indicates whether periodic re-authentication is
Periodic reauthentication is disabled
enabled on the port
The port is an authenticator Role of the port
Authenticate Mode is Auto Authorization mode for the port
Indicates whether the 802.1X multicast-trigger
802.1X Multicast-trigger is enabled
function is enabled
Mandatory authentication domain for users
Mandatory authentication domain
accessing the port
Port Control Type is Mac-based Access control method for the port
Guest VLAN configured for the port. NOT
Guest VLAN configured will be displayed if no guest VLAN is
configured.
Auth-Fail VLAN configured for the port. NOT
Auth-fail VLAN configured means no Auth-Fail VLAN is
configured.
Max number of on-line users Maximum number of users supported on the port
Counts of EAPOL packets sent (Tx) and
EAPOL Packet
received (Rx)
Sent EAP Request/Identity Packets Number of EAP Request/Identity packets sent
EAP Request/Challenge Packets Number of EAP Request/Challenge packets sent
EAP Success Packets Number of EAP Success packets sent
Received EAPOL Start Packets Number of EAPOL Start packets received
EAPOL LogOff Packets Number of EAPOL LogOff packets received
Number of EAP Response/Identity packets
EAP Response/Identity Packets
received
Number of EAP Response/Challenge packets
EAP Response/Challenge Packets
received
Error Packets Number of erroneous packets received
Authenticated user User that has passed the authentication
Controlled User(s) amount Number of controlled users on the port
1-3
dot1x
Syntax
In system view:
dot1x [ interface interface-list ]
undo dot1x [ interface interface-list ]
In Ethernet interface view:
dot1x
undo dot1x
View
Default Level
2: System level
Parameters
interface interface-list: Specifies a port list, which can contain multiple ports. The interface-list
argument is in the format of interface-list = { interface-type interface-number [ to interface-type
interface-number ] } & <1-10>, where interface-type represents the port type, interface-number
represents the port number, and & <1-10> means that you can provide up to 10 port indexes/port index
lists for this argument. The start port number must be smaller than the end number and the two ports
must be of the same type.
Description
Examples
# Enable 802.1X for ports GigabitEthernet 1/0/1, and GigabitEthernet 1/0/5 to GigabitEthernet 1/0/7.
<Sysname> system-view
[Sysname] dot1x interface gigabitethernet 1/0/1 gigabitethernet 1/0/5 to gigabitethernet
1/0/7
Or
1-4
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dot1x
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] interface gigabitethernet 1/0/5
[Sysname-GigabitEthernet1/0/5] dot1x
[Sysname-GigabitEthernet1/0/5] quit
[Sysname] interface gigabitethernet 1/0/6
[Sysname-GigabitEthernet1/0/6] dot1x
[Sysname-GigabitEthernet1/0/6] quit
[Sysname] interface gigabitethernet 1/0/7
[Sysname-GigabitEthernet1/0/7] dot1x
Syntax
View
Default Level
2: System level
Parameters
authfail-vlan-id: ID of the Auth-Fail VLAN for the port, in the range of 1 to 4094. The VLAN must already
exist.
Descriptions
Use the dot1x auth-fail vlan command to configure the Auth-Fail VLAN for a port, that is, the VLAN for
users failing authentication.
Use the undo dot1x auth-fail vlan command to restore the default.
By default, no Auth-Fail VLAN is configured on a port.
An Auth-Fail VLAN can be a port-based Auth-Fail VLAN (PAFV) or a MAC-based Auth-Fail VLAN
(MAFV), depending on the port access control method.
Currently, on the switch, An Auth-Fail VLAN can be only a port-based Auth-Fail VLAN (PAFV).
Note that:
z Note that failing authentication means being denied by the authentication server due to reasons
such as wrong password. Authentication failures caused by authentication timeout or network
connection problems do not fall into this category.
1-5
z After a PAFV takes effect, if you change the port access method from portbased to macbased,
the port will leave the Auth-Fail VLAN.
z It is not allowed to delete a VLAN that is configured as an Auth-Fail VLAN directly. To delete such a
VLAN, you need to remove the Auth-Fail VLAN configuration first by using the undo dot1x
auth-fail vlan command.
z You can configure both an Auth-Fail VLAN and a guest VLAN for a port, but they cannot both take
effect at a time.
Related commands: dot1x, dot1x port-method.
Examples
dot1x authentication-method
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the dot1x authentication-method command to set the 802.1X authentication method.
Use the undo dot1x authentication-method command to restore the default.
By default, CHAP is used.
z The Password Authentication Protocol (PAP) transports passwords in clear text.
z The Challenge Handshake Authentication Protocol (CHAP) transports only usernames over the
network. Compared with PAP, CHAP provides better security.
z With EAP relay authentication, the device encapsulates 802.1X user information in the EAP
attributes of RADIUS packets and sends the packets to the RADIUS server for authentication; it
does not need to repackage the EAP packets into standard RADIUS packets for authentication. In
this case, you can configure the user-name-format command but it does not take effect. For
information about the user-name-format command, refer to AAA Commands.
Note that:
1-6
z Local authentication supports PAP and CHAP.
z For RADIUS authentication, the RADIUS server must be configured accordingly to support PAP,
CHAP, or EAP authentication.
Related commands: display dot1x.
Examples
dot1x guest-vlan
Syntax
In system view:
dot1x guest-vlan guest-vlan-id [ interface interface-list ]
undo dot1x guest-vlan [ interface interface-list ]
In interface view:
dot1x guest-vlan guest-vlan-id
undo dot1x guest-vlan
View
Default Level
2: System level
Parameters
guest-vlan-id: ID of the VLAN to be specified as the guest VLAN, in the range 1 to 4094. It must already
exist.
interface interface-list: Specifies a port list. The interface-list argument is in the format of interface-list =
{ interface-type interface-number [ to interface-type interface-number ] } & <1-10>, where interface-type
represents the port type, interface-number represents the port number, and & <1-10> means that you
can provide up to 10 port indexes/port index lists for this argument. The start port number must be
smaller than the end number and the two ports must be of the same type.
Description
Use the dot1x guest-vlan command to configure the guest VLAN for specified or all ports.
Use the undo dot1x guest-vlan command to remove the guest VLAN(s) configured for specified or all
ports.
By default, a port is configured with no guest VLAN.
A guest VLAN can be a port-based guest VLAN (PGV) or a MAC-based guest VLAN (MGV), depending
on the port access control method.
Currently, on the switch, a guest VLAN can be only a port-based guest VLAN (PGV).
Note that:
1-7
z In system view, this command configures a guest VLAN for all Layer 2 Ethernet ports if you do not
specify the interface-list argument, and configures a guest VLAN for specified ports if you specify
the interface-list argument.
z In interface view, you cannot specify the interface-list argument and can only configure guest VLAN
for the current port.
z You must enable 802.1X for a guest VLAN to take effect.
z You must enable the 802.1X multicast trigger function for a PGV to take effect.
z If you change the port access method from portbased to macbased, the port will leave the guest
VLAN.
z It is not allowed to delete a VLAN that is configured as a guest VLAN. To delete such a VLAN, you
need to remove the guest VLAN configuration first.
z You can configure both an Auth-Fail VLAN and a guest VLAN for a port, but they cannot both take
effect at a time.
Related commands: dot1x; dot1x port-method; dot1x multicast-trigge.
Examples
dot1x handshake
Syntax
dot1x handshake
undo dot1x handshake
View
Default Level
2: System level
Parameters
None
Description
Use the dot1x handshake command to enable the online user handshake function so that the device
can periodically send handshake messages to the client to check whether a user is online.
Use the undo dot1x handshake command to disable the function.
By default, the function is enabled.
Note that: To ensure that the online user handshake function can work normally, you are recommended
to use the iNode client software.
1-8
Examples
dot1x mandatory-domain
Syntax
View
Default Level
2: System level
Parameters
Description
Use the dot1x mandatory-domain command to specify the mandatory authentication domain for
users accessing the port.
Use the undo dot1x mandatory-domain command to remove the mandatory authentication domain.
By default, no mandatory authentication domain is specified.
Note that:
z When authenticating an 802.1X user trying to access the port, the system selects an authentication
domain in the following order: the mandatory domain, the ISP domain specified in the username,
and the default ISP domain.
z The specified mandatory authentication domain must exist.
z On a port configured with a mandatory authentication domain, the user domain name displayed by
the display connection command is the name of the mandatory authentication domain. For
detailed information about the display connection command, refer to AAA Commands.
Related commands: display dot1x.
Examples
# Configure the mandatory authentication domain my-domain for 802.1X users on GigabitEthernet
1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dot1x mandatory-domain my-domain
# After 802.1X user usera passes the authentication, execute the display connection command to
display the user connection information on GigabitEthernet 1/0/1.
1-9
[Sysname-GigabitEthernet1/0/1] display connection interface gigabitethernet 1/0/1
Index=68 ,Username=usera@my-domian
MAC=0015-e9a6-7cfe ,IP=3.3.3.3
Total 1 connection(s) matched.
dot1x max-user
Syntax
In system view:
dot1x max-user user-number [ interface interface-list ]
undo dot1x max-user [ interface interface-list ]
In Ethernet interface view:
dot1x max-user user-number
undo dot1x max-user
View
Default Level
2: System level
Parameters
Description
Use the dot1x max-user command to set the maximum number of users an Ethernet port can support
simultaneously.
Use the undo dot1x max-user command to restore the default.
In system view:
z If you do not specify the interface-list argument, execution of the command applies to all ports.
z If you specify the interface-list argument, execution of the command applies to the specified ports.
In Ethernet port view, the interface-list argument is not available and the command applies to only the
current port.
Related commands: display dot1x.
Examples
# Set the maximum number of users for port GigabitEthernet 1/0/1 to support simultaneously as 32.
1-10
<Sysname> system-view
[Sysname] dot1x max-user 32 interface gigabitethernet 1/0/1
Or
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dot1x max-user 32
dot1x multicast-trigger
Syntax
dot1x multicast-trigger
undo dot1x multicast-trigger
View
Default Level
2: System level
Parameters
None
Description
Use the dot1x multicast-trigger command to enable the multicast trigger function of 802.1X to send
multicast trigger messages to the clients periodically.
Use the undo dot1x multicast-trigger command to disable this function.
By default, the multicast trigger function is enabled.
Related commands: display dot1x.
Examples
dot1x port-control
Syntax
In system view:
dot1x port-control { authorized-force | auto | unauthorized-force } [ interface interface-list ]
undo dot1x port-control [ interface interface-list ]
In Ethernet interface view:
dot1x port-control { authorized-force | auto | unauthorized-force }
undo dot1x port-control
1-11
View
Default Level
2: System level
Parameters
authorized-force: Places the specified or all ports in the authorized state, allowing users of the ports to
access the network without authentication.
auto: Places the specified or all ports in the unauthorized state initially to allow only EAPOL packets to
pass, and turns the ports into the authorized state to allow access to the network after the users pass
authentication. This is the most common choice.
unauthorized-force: Places the specified or all ports in the unauthorized state, denying any access
requests from users of the ports.
interface interface-list: Specifies an Ethernet port list, which can contain multiple Ethernet ports. The
interface-list argument is in the format of interface-list = { interface-type interface-number [ to
interface-type interface-number ] } & <1-10>, where interface-type represents the port type,
interface-number represents the port number, and & <1-10> means that you can provide up to 10 port
indexes/port index lists for this argument. The start port number must be smaller than the end number
and the two ports must be of the same type.
Description
Use the dot1x port-control command to set the authorization mode for specified or all ports.
Use the undo dot1x port-control command to restore the default.
Note that: In system view, if no interface-list argument is specified, this command sets the authorization
mode for all ports.
The default port authorization mode is auto.
Related commands: display dot1x.
Examples
Or
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dot1x port-control unauthorized-force
dot1x port-method
Syntax
In system view:
dot1x port-method { macbased | portbased } [ interface interface-list ]
undo dot1x port-method [ interface interface-list ]
1-12
In Ethernet interface view:
dot1x port-method { macbased | portbased }
undo dot1x port-method
View
Default Level
2: System level
Parameters
macbased: Specifies to use the macbased authentication method. With this method, each user of a
port must be authenticated separately, and when an authenticated user goes offline, no other users are
affected.
portbased: Specifies to use the portbased authentication method. With this method, after the first user
of a port passes authentication, all other users of the port can access the network without authentication,
and when the first user goes offline, all other users get offline at the same time.
interface interface-list: Specifies an Ethernet port list, which can contain multiple Ethernet ports. The
interface-list argument is in the format of interface-list = { interface-type interface-number [ to
interface-type interface-number ] } & <1-10>, where interface-type represents the port type,
interface-number represents the port number, and & <1-10> means that you can provide up to 10 port
indexes/port index lists for this argument. The start port number must be smaller than the end number
and the two ports must be of the same type.
Description
Use the dot1x port-method command to set the access control method for specified or all ports.
Use the undo dot1x port-method command to restore the default.
The default access control method is macbased.
Note that: In system view, if no interface-list argument is specified, this command sets the authorization
mode for all ports.
Related commands: display dot1x.
Examples
# Set the access control method to portbased for port GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] dot1x port-method portbased interface gigabitethernet 1/0/1
Or
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dot1x port-method portbased
dot1x quiet-period
Syntax
dot1x quiet-period
1-13
undo dot1x quiet-period
View
System view
Default Level
2: System level
Parameters
None
Description
Examples
dot1x re-authenticate
Syntax
dot1x re-authenticate
undo dot1x re-authenticate
View
Default Level
2: System level
Parameters
None
Description
Use the dot1x re-authenticate command to enable the periodic re-authentication function.
Use the undo dot1x re-authenticate command to disable the function.
By default, this function is disabled.
After periodic re-authentication is enabled on a port, the device will perform 802.1X authentication for
online users on the port at the interval specified by the periodic re-authentication timer (which is
1-14
configured by the dot1x timer reauth-period command). This is intended to track the connection
status of online users and update the authorization attributes assigned by the server, such as the ACL,
VLAN, and QoS Profile, ensuring that the users are in normal online state.
Related commands: dot1x timer reauth-period.
Examples
# Enable the 802.1X re-authentication function on GigabitEthernet 1/0/1 and configure the periodic
re-authentication interval as 1800 seconds.
<Sysname> system-view
[Sysname] dot1x timer reauth-period 1800
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] dot1x re-authenticate
dot1x retry
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the dot1x retry command to set the maximum number of attempts to send an authentication
request to a client.
Use the undo dot1x retry command to restore the default.
By default, the device can send an authentication request to a client twice at most.
Note that after sending an authentication request to a client, the device may retransmit the request if it
does not receive any response at an interval specified by the username request timeout timer or client
timeout timer. The number of retransmission attempts is one less than the value set by this command.
Related commands: display dot1x.
Examples
1-15
dot1x timer
Syntax
View
System view
Default Level
2: System level
Parameters
handshake-period-value: Setting for the handshake timer in seconds. It ranges from 5 to 1024.
quiet-period-value: Setting for the quiet timer in seconds. It ranges from 10 to 120.
reauth-period-value: Setting for the periodic re-authentication timer in seconds. It ranges from 60 to
7200.
server-timeout-value: Setting for the server timeout timer in seconds. It ranges from 100 to 300.
supp-timeout-value: Setting for the client timeout timer in seconds. It ranges from 1 to 120.
tx-period-value: Setting for the username request timeout timer in seconds. It ranges from 10 to 120.
Description
Examples
Syntax
View
User view
Default Level
2: System level
Parameters
interface interface-list: Specifies an Ethernet port list, which can contain multiple Ethernet ports. The
interface-list argument is in the format of interface-list = { interface-type interface-number [ to
interface-type interface-number ] } & <1-10>, where interface-type represents the port type,
interface-number represents the port number, and & <1-10> means that you can provide up to 10 port
indexes/port index lists for this argument. The start port number must be smaller than the end number
and the two ports must be of the same type.
Description
1-17
Examples
1-18
Table of Contents
i
display radius scheme ·····················································································································2-4
display radius statistics····················································································································2-6
display stop-accounting-buffer ········································································································2-9
key (RADIUS scheme view) ··········································································································2-10
nas-ip (RADIUS scheme view)······································································································2-11
primary accounting (RADIUS scheme view) ·················································································2-11
primary authentication (RADIUS scheme view) ············································································2-12
radius client ···································································································································2-13
radius nas-ip ··································································································································2-14
radius scheme ·······························································································································2-15
radius trap······································································································································2-16
reset radius statistics ·····················································································································2-16
reset stop-accounting-buffer··········································································································2-17
retry················································································································································2-18
retry realtime-accounting ···············································································································2-19
retry stop-accounting (RADIUS scheme view) ··············································································2-20
secondary accounting (RADIUS scheme view) ············································································2-20
secondary authentication (RADIUS scheme view) ·······································································2-21
server-type·····································································································································2-22
state ···············································································································································2-23
stop-accounting-buffer enable (RADIUS scheme view)································································2-24
timer quiet (RADIUS scheme view)·······························································································2-25
timer realtime-accounting (RADIUS scheme view) ·······································································2-26
timer response-timeout (RADIUS scheme view)···········································································2-27
user-name-format (RADIUS scheme view) ···················································································2-27
ii
1 AAA Configuration Commands
View
System view
Default Level
2: System level
Parameters
Description
Use the aaa nas-id profile command to create a NAS ID profile and enter its view.
Use the undo aaa nas-id profile command to remove a NAS ID profile.
Related commands: nas-id bind vlan.
Examples
access-limit
Syntax
access-limit max-user-number
undo access-limit
View
Default Level
3: Manage level
1-1
Parameters
max-user-number: Maximum number of users using the current username, in the range 1 to 1024.
Description
Use the access-limit command to enable the limit on the number of user s using the current username
and set the allowed maximum number.
Use the undo access-limit command to remove the limitation.
By default, there is no limit to the number of users using the same username.
Note that:
z The access-limit command takes effect only when local accounting is configured.
z This limit is not effective for FTP users because accounting is not available for FTP users
Related commands: display local-user.
Examples
# Enable the limit on the number of users using the username abc and set the allowed maximum
number to 5.
<Sysname> system-view
[Sysname] local-user abc
[Sysname-luser-abc] access-limit 5
access-limit enable
Syntax
View
Default Level
2: System level
Parameters
Description
Use the access-limit enable command to enable the limit on the number of users in an ISP domain and
set the allowed maximum number. After the number of users reaches the maximum number allowed, no
more users will be accepted.
Use the undo access-limit enable command to restore the default.
By default, there is no limit to the number of users in an ISP domain.
As user connections may compete for network resources, setting a proper limit to the number of users
helps provide a reliable system performance.
1-2
Examples
accounting default
Syntax
View
Default Level
2: System level
Parameters
Description
Use the accounting default command to configure the default accounting method for all types of
users.
Use the undo accounting default command to restore the default.
By default, the accounting method is local.
Note that:
z The RADIUS scheme specified for the current ISP domain must have been configured.
z The accounting method configured with the accounting default command is for all types of users
and has a priority lower than that for a specific access mode.
z Local accounting is only for managing the local user connection number; it does not provide the
statistics function. The local user connection number management is only for local accounting; it
does not affect local authentication and authorization.
Related commands: authentication default, authorization default, radius scheme.
Examples
# Configure the default ISP domain system to use the local accounting method for all types of users.
<Sysname> system-view
[Sysname] domain system
[Sysname-isp-system] accounting default local
1-3
# Configure ISP domain test to use RADIUS accounting scheme rd for all types of users and use local
accounting as the backup.
<Sysname> system-view
[Sysname] domain test
[Sysname-isp-test] accounting default radius-scheme rd local
accounting lan-access
Syntax
View
Default Level
2: System level
Parameters
Description
Use the accounting lan-access command to configure the accounting method for LAN access users.
Use the undo accounting lan-access command to restore the default.
By default, the default accounting method that the accounting default command prescribes is used for
LAN access users.
Note that the RADIUS scheme specified for the current ISP domain must have been configured.
Related commands: accounting default, radius scheme.
Examples
# Configure the default ISP domain system to use the local accounting method for LAN access users.
<Sysname> system-view
[Sysname] domain system
[Sysname-isp-system] accounting lan-access local
# Configure ISP domain test to use RADIUS accounting scheme rd for LAN access users and use local
accounting as the backup.
<Sysname> system-view
[Sysname] domain test
[Sysname-isp-test] accounting lan-access radius-scheme rd local
1-4
accounting login
Syntax
View
Default Level
2: System level
Parameters
local: Performs local accounting. It is not used for charging purposes, but for collecting statistics on and
limiting the number of local user connections.
none: Does not perform any accounting.
radius-scheme radius-scheme-name: Specifies a RADIUS scheme by its name, which is a string of 1
to 32 characters.
Description
Use the accounting login command to configure the accounting method for login users.
Use the undo accounting login command to restore the default.
By default, the default accounting method is used for login users.
Note that:
z The RADIUS scheme specified for the current ISP domain must have been configured.
z Accounting is not supported for login users’ FTP services.
Related commands: accounting default, radius scheme.
Examples
# Configure the default ISP domain system to use the local accounting method for login users.
<Sysname> system-view
[Sysname] domain system
[Sysname-isp-system] accounting login local
# Configure ISP domain test to use RADIUS accounting scheme rd for login users and use local
accounting as the backup.
<Sysname> system-view
[Sysname] domain test
[Sysname-isp-test] accounting login radius-scheme rd local
accounting optional
Syntax
accounting optional
undo accounting optional
1-5
View
Default Level
2: System level
Parameters
None
Description
Use the accounting optional command to enable the accounting optional feature.
Use the undo accounting optional command to disable the feature.
By default, the feature is disabled.
Note that with the accounting optional command configured for a domain:
z A user that will be disconnected otherwise can use the network resources even when there is no
accounting server available or communication with the current accounting server fails. This
command applies to scenarios where authentication is required but accounting is not.
z If accounting for a user in the domain fails, the device will not send real-time accounting updates for
the user any more.
z The limit on the number of local user connections configured by using the access-limit command
in local user view is not effective.
Examples
authentication default
Syntax
View
Default Level
2: System level
Parameters
1-6
Description
Use the authentication default command to configure the default authentication method for all types of
users.
Use the undo authentication default command to restore the default.
By default, the authentication method is local.
Note that:
z The RADIUS scheme specified for the current ISP domain must have been configured.
z The authentication method specified with the authentication default command is for all types of
users and has a priority lower than that for a specific access mode.
Related commands: authorization default, accounting default, radius scheme.
Examples
# Configure the default ISP domain system to use local authentication for all types of users.
<Sysname> system-view
[Sysname] domain system
[Sysname-isp-system] authentication default local
# Configure ISP domain test to use RADIUS authentication scheme rd for all types of users and use
local authentication as the backup.
<Sysname> system-view
[Sysname] domain test
[Sysname-isp-test] authentication default radius-scheme rd local
authentication lan-access
Syntax
View
Default Level
2: System level
Parameters
Description
Use the authentication lan-access command to configure the authentication method for LAN access
users.
Use the undo authentication login command to restore the default.
1-7
By default, the default authentication method is used for LAN access users.
Note that the RADIUS scheme specified for the current ISP domain must have been configured.
Related commands: authentication default, radius scheme.
Examples
# Configure the default ISP domain system to use local authentication for LAN access users.
<Sysname> system-view
[Sysname] domain system
[Sysname-isp-system] authentication lan-access local
# Configure ISP domain test to use RADIUS authentication scheme rd for LAN access users and use
local authentication as the backup.
<Sysname> system-view
[Sysname] domain test
[Sysname-isp-test] authentication lan-access radius-scheme rd local
authentication login
Syntax
View
Default Level
2: System level
Parameters
Description
Use the authentication login command to configure the authentication method for login users.
Use the undo authentication login command to restore the default.
By default, the default authentication method is used for login users.
Note that the RADIUS scheme specified for the current ISP domain must have been configured.
Related commands: authentication default, radius scheme.
Examples
# Configure the default ISP domain system to use local authentication for login users.
<Sysname> system-view
[Sysname] domain system
1-8
[Sysname-isp-system] authentication login local
# Configure ISP domain test to use RADIUS authentication scheme rd for login users and use local
authentication as the backup.
<Sysname> system-view
[Sysname] domain test
[Sysname-isp-test] authentication login radius-scheme rd local
authorization command
Syntax
View
Default Level
2: System level
Parameters
Description
Use the authorization command command to configure the authorization method for command line
users.
Use the undo authorization command command to restore the default.
By default, the default authorization method is used for command line users.
Note that: For local authorization, the local users must have been configured for the command line
users on the device, and the level of the commands authorized to a local user must be lower than or
equal to that of the local user. Otherwise, local authorization will fail.
Related commands: authorization default.
Examples
# Configure the default ISP domain system to use local authorization for command line users.
<Sysname> system-view
[Sysname] domain system
[Sysname-isp-system] authorization command local
authorization default
Syntax
1-9
View
Default Level
2: System level
Parameters
Description
Use the authorization default command to configure the authorization method for all types of users.
Use the undo authorization default command to restore the default.
By default, the authorization method for all types of users is local.
Note that:
z The RADIUS scheme specified for the current ISP domain must have been configured.
z The authorization method specified with the authorization default command is for all types of
users and has a priority lower than that for a specific access mode.
z RADIUS authorization is special in that it takes effect only when the RADIUS authorization scheme
is the same as the RADIUS authentication scheme. If the RADIUS authorization scheme is
different from the RADIUS authentication scheme, RADIUS authorization will fail. In addition, if a
RADIUS authorization fails, the error message returned to the NAS says that the server is not
responding.
Related commands: authentication default, accounting default, radius scheme.
Examples
# Configure the default ISP domain system to use local authorization for all types of users.
<Sysname> system-view
[Sysname] domain system
[Sysname-isp-system] authorization default local
# Configure ISP domain test to use RADIUS authorization scheme rd for all types of users and use
local authorization as the backup.
<Sysname> system-view
[Sysname] domain test
[Sysname-isp-test] authorization default radius-scheme rd local
authorization lan-access
Syntax
1-10
View
Default Level
2: System level
Parameters
Description
Use the authorization lan-access command to configure the authorization method for LAN access
users.
Use the undo authorization lan-access command to restore the default.
By default, the default authorization method is used for LAN access users.
Note that:
z The RADIUS scheme specified for the current ISP domain must have been configured.
z RADIUS authorization is special in that it takes effect only when the RADIUS authorization scheme
is the same as the RADIUS authentication scheme. If the RADIUS authorization scheme is
different from the RADIUS authentication scheme, RADIUS authorization will fail.
Related commands: authorization default, radius scheme.
Examples
# Configure the default ISP domain system to use local authorization for LAN access users.
<Sysname> system-view
[Sysname] domain system
[Sysname-isp-system] authorization lan-access local
# Configure ISP domain test to use RADIUS authorization scheme rd for LAN access users and use
local authorization as the backup.
<Sysname> system-view
[Sysname] domain test
[Sysname-isp-test] authorization lan-access radius-scheme rd local
authorization login
Syntax
View
1-11
Default Level
2: System level
Parameters
Description
Use the authorization login command to configure the authorization method for login users.
Use the undo authorization login command to restore the default.
By default, the default authorization method is used for login users.
Note that:
z The RADIUS scheme specified for the current ISP domain must have been configured.
z RADIUS authorization is special in that it takes effect only when the RADIUS authorization scheme
is the same as the RADIUS authentication scheme. If the RADIUS authorization scheme is
different from the RADIUS authentication scheme, RADIUS authorization will fail.
Related commands: authorization default, radius scheme.
Examples
# Configure the default ISP domain system to use local authorization for login users.
<Sysname> system-view
[Sysname] domain system
[Sysname-isp-system] authorization login local
# Configure ISP domain test to use RADIUS authorization scheme rd for login users and use local
authorization as the backup.
<Sysname> system-view
[Sysname] domain test
[Sysname-isp-test] authorization login radius-scheme rd local
authorization-attribute
Syntax
View
1-12
Default Level
3: Manage level
Parameters
Description
Use the authorization-attribute command to configure authorization attributes for the local user or
user group. After the local user or a local user of the user group passes authentication, the device will
assign these attributes to the user.
Use the undo authorization-attribute command to remove authorization attributes.
By default, no authorization attribute is configured for a local user or user group.
Note that:
z Every configurable authorization attribute has its definite application environments and purposes.
However, the assignment of local user authorization attributes does not take the service type into
account. Therefore, when configuring authorization attributes for a local user, consider what
attributes are needed.
z Authorization attributes configured for a user group are effective on all local users of the group.
z An authorization attribute configured in local user view takes precedence over the same attribute
configured in user group view.
z If you specify to perform no authentication or perform password authentication, the levels of
commands that a user can access after login depends on the level of the user interface. For
information about user interface login authentication method, refer to the authentication-mode
1-13
command in Login Commands. If the authentication method requires users to provide usernames
and passwords, the levels of commands that a user can access after login depends on the level of
the user. For an SSH user authenticated with an RSA public key, which commands are available
depends on the level specified on the user interface.
z If you remove the specified work directory from the file system, the FTP/SFTP user(s) will not be
able to access the directory.
Examples
bind-attribute
Syntax
View
Default Level
3: Manage level
Parameters
call-number call-number: Specifies a calling number for ISDN user authentication. The call-number
argument is a string of 1 to 64 characters.
subcall-number: Specifies the sub-calling number. The total length of the calling number and the
sub-calling number cannot be more than 62 characters.
ip ip-address: Specifies the IP address of the user.
location: Specifies the port binding attribute of the user.
port slot-number subslot-number port-number: Specifies the port to which the user is bound. The
slot-number argument is in the range 0 to 1024, the subslot-number argument is in the range 0 to 15,
and the port-number argument is in the range 0 to 255. Only the numbers make sense here; port types
are not taken into account.
mac mac-address: Specifies the MAC address of the user in the format of H-H-H.
vlan vlan-id: Specifies the VLAN to which the user belongs. The vlan-id argument is in the range 1 to
4094.
Description
Use the bind-attribute command to configure binding attributes for a local user.
Use the undo bind-attribute command to remove binding attributes of a local user.
By default, no binding attribute is configured for a local user.
1-14
Note that:
z Binding attributes are checked upon authentication of a local user. If the binding attributes of a local
user do not match the configured ones, the checking will fail and the user will fail the authentication
as a result. In addition, such binding attribute checking does not take the service types of the users
into account. That is, a configured binding attribute is effective on all types of users. Therefore, be
cautious when deciding which binding attributes should be configured for which type of local users.
z The bind-attribute ip command applies only when the authentication method (802.1X, for
example) supports IP address upload. If you configure the command when the authentication
method (MAC address authentication, for example) does not support IP address upload, local
authentication will fail.
Examples
cut connection
Syntax
View
System view
Default Level
2: System level
Parameters
access-type dot1x: Specifies the user connections of 802.1X authentication access type.
all: Specifies all user connections.
domain isp-name: Specifies all user connections of an ISP domain. The isp-name argument refers to
the name of an existing ISP domain and is a string of 1 to 24 characters.
interface interface-type interface-number: Specifies user connections on an interface by the interface
type and number.
ip ip-address: Specifies the user connections of an IP address.
mac mac-address: Specifies the user connections of a MAC address, with mac-address in the format of
H-H-H.
ucibindex ucib-index: Specifies a user connection by connection index. The value ranges from 0 to
4294967295.
user-name user-name: Specifies a user connection by username. The user-name argument is a
case-sensitive string of 1 to 80 characters and must contain the domain name. If you enter a username
without any domain name, the system assumes that the default domain name is used for the username.
1-15
vlan vlan-id: Specifies user connections of a VLAN, with vlan-id ranging from 1 to 4094.
Description
Use the cut connection command to tear down the specified connections forcibly.
At present, this command applies to only LAN access user connections.
Related commands: display connection, service-type.
Examples
display connection
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
access-type dot1x: Specifies the user connections of 802.1X authentication access type.
domain isp-name: Specifies all user connections of an ISP domain. The isp-name argument refers to
the name of an existing ISP domain and is a case-insensitive string of 1 to 24 characters.
interface interface-type interface-number: Specifies user connections on an interface by the interface
type and number.
ip ip-address: Specifies the user connections of an IP address.
mac mac-address: Specifies the user connections of a MAC address, with mac-address in the format of
H-H-H.
ucibindex ucib-index: Specifies all user connections using the specified connection index. The value
ranges from 0 to 4294967295.
user-name user-name: Specifies all user connections using the specified username. The user-name
argument is a case-sensitive string of 1 to 80 characters and must contain the domain name. If you
enter a username without any domain name, the system assumes that the default domain name is used
for the username.
vlan vlan-id: Specifies user connections of a VLAN, with vlan-id ranging from 1 to 4094.
Description
Use the display connection command to display information about specified or all AAA user
connections.
1-16
Note that:
z With no parameter specified, the command displays brief information about all AAA user
connections.
z If you specify the ucibindex ucib-index combination, the command displays detailed information;
otherwise, the command displays brief information.
z This command does not apply to FTP user connections.
Related commands: cut connection.
Examples
Index=1 ,Username=telnet@system
IP=10.0.0.1
Total 1 connection(s) matched.
Field Description
Index Index number
Username Username of the connection, in the format username@domain
IP IP address of the user
display domain
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display domain command to display the configuration information of a specified ISP domain or
all ISP domains.
Related commands: access-limit enable, domain, state.
Examples
1-17
<Sysname> display domain
0 Domain = system
State = Active
Access-limit = Disable
Accounting method = Required
Default authentication scheme : local
Default authorization scheme : local
Default accounting scheme : local
Domain User Template:
Idle-cut = Disabled
Self-service = Disabled
1 Domain = test
State = Active
Access-limit = Disable
Accounting method = Required
Default authentication scheme : local
Default authorization scheme : local
Default accounting scheme : local
Lan-access authentication scheme : radius=test, local
Lan-access authorization scheme : radius=test, local
Lan-access accounting scheme : radius=test, local
Domain User Template:
Idle-cut = Disabled
Self-service = Disabled
Field Description
Domain Domain name
State Status of the domain (active or block)
Access-limit Limit on the number of user connections
Accounting method Accounting method (either required or optional)
Default authentication scheme Default authentication method
Default authorization scheme Default authorization method
Default accounting scheme Default accounting method
Lan-access authentication scheme Authentication method for LAN users
Lan-access authorization scheme Authentication method for LAN users
Lan-access accounting scheme Accounting method for LAN users
Domain User Template Template for users in the domain
Idle-cut Whether idle cut is enabled
Self-service Whether self service is enabled
1-18
Field Description
Default Domain Name Default ISP domain name
Total 2 domain(s). 2 ISP domains in total
display local-user
Syntax
display local-user [ idle-cut { disable | enable } | service-type { ftp | lan-access | ssh | telnet |
terminal } | state { active | block } | user-name user-name | vlan vlan-id ]
View
Any view
Default Level
1: Monitor level
Parameters
idle-cut { disable | enable }: Specifies local users with the idle cut function disabled or enabled.
service-type: Specifies the local users of a type.
z ftp refers to users using FTP.
z lan-access refers to users accessing the network through an Ethernet, such as 802.1X users.
z ssh refers to users using SSH.
z telnet refers to users using Telnet.
z terminal refers to users logging in through the console port, AUX port, or Asyn port. Supported port
types vary by the device model.
state { active | block }: Specifies all local users in the state of active or block. A local user in the state of
active can access network services, while a local user in the state of blocked cannot.
user-name user-name: Specifies all local users using the specified username. The username is a
case-sensitive string of 1 to 55 characters and does not contain the domain name.
vlan vlan-id: Specifies all local users in a VLAN. The VLAN ID ranges from 1 to 4094.
Description
Use the display local-user command to display information about specified or all local users.
Related commands: local-user.
Examples
1-19
Bind attributes:
IP address: 1.2.3.4
Bind location: 0/4/1 (SLOT/SUBSLOT/PORT)
MAC address: 0001-0002-0003
Vlan ID: 100
Authorization attributes:
Idle TimeOut: 10(min)
Work Directory: flash:/
User Privilege: 3
Acl ID: 2000
Vlan ID: 100
User Profile: prof1
Expiration date: 12:12:12-2018/09/16
Total 1 local user(s) matched.
Field Description
State Status of the local user, Active or Block
Service types that the local user can use, including FTP, LAN,
ServiceType
SSH, Telnet, and terminal.
Limit on the number of user connections using the current
Access-limit
username
Current AccessNum Current number of user connections using the current username
Maximum number of user connections using the current
Max AccessNum
username
VLAN ID VLAN to which the user is bound
Calling Number Calling number of the ISDN user
Authorization attributes Authorization attributes of the local user
Idle TimeOut Idle threshold of the user, in minutes.
Callback-number Authorized PPP callback number of the local user
Work Directory Directory accessible to the FTP user
VLAN ID Authorized VLAN of the local user
Expiration date Expiration time of the local user
display user-group
Syntax
View
Any view
1-20
Default Level
2: System level
Parameters
Description
Use the display user-group command to display configuration information about one or all user
groups.
Related commands: user-group.
Examples
domain
Syntax
domain isp-name
undo domain isp-name
View
System view
Default Level
3: Manage level
Parameters
isp-name: ISP domain name, a case-insensitive string of 1 to 24 characters that cannot contain any
forward slash (/), colon (:), asterisk (*), question mark (?), less-than sign (<), greater-than sign (>), or @.
Description
Use the domain isp-name command to create an ISP domain and/or enter ISP domain view.
Use the undo domain command to remove an ISP domain.
By default, a default ISP domain named system exists in the system.
1-21
Note that:
z If the specified ISP domain does not exist, the system will create a new ISP domain. All the ISP
domains are in the active state when they are created.
z The default domain cannot be deleted and can only be changed.
Related commands: state, display domain.
Examples
Syntax
View
System view
Default Level
3: Manage level
Parameters
Description
Use the domain default enable command to specify the system default ISP domain. Users without any
domain name carried in the usernames are considered to be in the default domain.
Use the undo domain default enable command to restore the default.
By default, there is a default ISP domain named system.
Note that:
z There must be only one default ISP domain.
z The specified domain must have existed; otherwise, users without any domain name carried in the
user name will fail to be authenticated.
z The default ISP domain configured cannot be deleted unless you configure it as a non-default
domain again.
Related commands: state, display domain.
Examples
# Create a new ISP domain named test, and configure it as the default ISP domain.
<Sysname> system-view
[Sysname] domain test
[Sysname-isp-test] quit
1-22
[Sysname] domain default enable test
expiration-date
Syntax
expiration-date time
undo expiration-date
View
Default Level
3: Manage level
Parameters
Description
Use the expiration-date command to configure the expiration time of a local user.
Use the undo expiration-date command to remove the configuration.
By default, a local user has no expiration time and no time validity checking is performed.
When some users need to access the network temporarily, you can create a guest account and specify
an expiration time for the account. When a user uses the guest account for local authentication and
passes the authentication, the access device checks whether the current system time is within the
expiration time. If so, it permits the user to access the network. Otherwise, it denies the access request
of the user.
Note that if you change the system time manually or the system time is changed in any other way, the
access device uses the new system time for time validity checking.
Examples
# Configure the expiration time of user abc to be 12:10:20 on May 31, 2008.
<Sysname> system-view
[Sysname] local-user abc
[Sysname-luser-abc] expiration-date 12:10:20-2008/05/31
group
Syntax
group group-name
undo group
1-23
View
Default Level
3: Manage level
Parameters
Description
Examples
idle-cut enable
Syntax
View
Default Level
2: System level
Parameters
Description
Use the idle-cut enable command to enable the idle cut function and set the relevant parameters. With
the idle cut function enabled for a domain, the system will log out any user in the domain whose traffic is
less than the specified user idle threshold during the maximum idle duration.
Use the undo idle-cut enable command to restore the default.
By default, the function is disabled.
Note that:
z You can also set the maximum idle duration parameter on the server. In this case, if you enable the
idle cut function and set the relevant parameters on the device, the settings on the device will take
1-24
effect; if you disable the function on the device, the setting of the maximum idle duration parameter
on the server will take effect.
z The user idle threshold parameter can only be set on the device. The server always assigns a user
idle threshold of 10240 bytes to a user. If you set the parameter on the device, the device uses your
setting; otherwise, the device uses that assigned by the server.
Related commands: domain.
Examples
# Enable the idle cut function and set the idle duration threshold to 50 minutes and the traffic threshold
to 1024 bytes for ISP domain test.
<Sysname> system-view
[Sysname] domain test
[Sysname-isp-test] idle-cut enable 50 1024
local-user
Syntax
local-user user-name
undo local-user { user-name | all [ service-type { ftp | lan-access | ssh | telnet | terminal } ] }
View
System view
Default Level
3: Manage level
Parameters
user-name: Name for the local user, a case-sensitive string of 1 to 55 characters that does not contain
the domain name. It cannot contain any backward slash (\), forward slash (/), vertical line (|), colon (:),
asterisk (*), question mark (?), less-than sign (<), greater-than sign (>) and the @ sign and cannot be a,
al, or all.
all: Specifies all users.
service-type: Specifies the users of a type.
z ftp refers to users using FTP.
z lan-access refers to users accessing the network through an Ethernet, such as 802.1X users.
z ssh refers to users using SSH.
z telnet refers to users using Telnet.
z terminal refers to users logging in through the console port, or AUX port.
Description
Use the local-user command to add a local user and enter local user view.
Use the undo local-user command to remove the specified local users.
By default, no local user is configured.
Related commands: display local-user, service-type.
1-25
Examples
local-user password-display-mode
Syntax
View
System view
Default Level
2: System level
Parameters
auto: Displays the password of a user based on the configuration of the user by using the password
command.
cipher-force: Displays the passwords of all users in cipher text.
Description
Use the local-user password-display-mode command to set the password display mode for all local
users.
Use the undo local-user password-display-mode command to restore the default.
The default mode is auto.
With the cipher-force mode configured:
z A local user password is always displayed in cipher text, regardless of the configuration of the
password command.
z If you use the save command to save the configuration, all existing local user passwords will still be
displayed in cipher text after the device restarts, even if you restore the display mode to auto.
Related commands: display local-user, password.
Examples
1-26
View
Default Level
2: System level
Parameters
Description
Use the nas-id bind vlan command to bind a NAS ID with a VLAN.
Use the undo nas-id bind vlan command to remove a NAS ID-VLAN binding.
By default, no NAS ID-VLAN binding exists.
Note that:
z In a NAS ID profile view, you can bind the NAS ID with more than one VLAN.
z A NAS ID can be bound with more than one VLAN, but one VLAN can be bound with only one NAS
ID. If you bind a VLAN with different NAS IDs, only the last binding takes effect.
Related commands: aaa nas-id profile.
Examples
password
Syntax
View
Default Level
2: System level
Parameters
1-27
z In cipher text, it must be a string of 24 or 88 characters, for example, _(TT8F]Y\5SQ=^Q`MAF4<1!!.
z With the simple keyword, you must specify the password in simple text. With the cipher keyword,
you can specify the password in either simple or cipher text.
Description
Examples
# Set the password of user1 to 123456 and specify to display the password in plain text.
<Sysname> system-view
[Sysname] local-user user1
[Sysname-luser-user1] password simple 123456
self-service-url enable
Syntax
View
Default Level
2: System level
Parameters
url-string: URL of the self-service server for changing user password, a string of 1 to 64 characters. It
must start with http:// and contain no question mark.
Description
Use the self-service-url enable command to enable the self-service server location function and
specify the URL of the self-service server for changing user password.
Use the undo self-service-url enable command to restore the default.
By default, the function is disabled.
Note that:
1-28
z A self-service RADIUS server, for example, iMC, is required for the self-service server location
function. With the self-service function, a user can manage and control his or her accounting
information or card number. A server with self-service software is a self-service server.
z After you configure the self-service-url enable command, a user can locate the self-service server
by selecting [Service/Change Password] from the 802.1X client. The client software automatically
launches the default browser, IE or Netscape, and opens the URL page of the self-service server
for changing the user password. A user can change his or her password through the page.
z Only authenticated users can select [Service/Change Password] from the 802.1X client. The option
is gray and unavailable for unauthenticated users.
Examples
# Enable the self-service server location function and specify the URL of the self-service server for
changing user password to http://10.153.89.94/selfservice/modPasswd1x.jsp|userName for the default
ISP domain system.
<Sysname> system-view
[Sysname] domain system
[Sysname-isp-system] self-service-url enable
http://10.153.89.94/selfservice/modPasswd1x.jsp|userName
service-type
Syntax
View
Default Level
3: Manage level
Parameters
ftp: Authorizes the user to use the FTP service. The user can use the root directory of the FTP server by
default.
lan-access: Authorizes the user to use the LAN access service. Such users are mainly Ethernet users,
for example, 802.1X users.
ssh: Authorizes the user to use the SSH service.
telnet: Authorizes the user to use the Telnet service.
terminal: Authorizes the user to use the terminal service, allowing the user to login from the console, or
AUX port.
Description
Use the service-type command to specify the service types that a user can use.
Use the undo service-type command to delete one or all service types configured for a user.
By default, a user is authorized with no service.
1-29
Examples
state
Syntax
View
Default Level
2: System level
Parameters
active: Places the current ISP domain or local user in the active state, allowing the users in the current
ISP domain or the current local user to request network services.
block: Places the current ISP domain or local user in the blocked state, preventing users in the current
ISP domain or the current local user from requesting network services.
Description
Use the state command to configure the status of the current ISP domain or local user.
Use the undo state command to restore the default.
By default, an ISP domain is active when created. So is a local user.
By blocking an ISP domain, you disable users of the domain that are offline from requesting network
services. Note that the online users are not affected.
By blocking a user, you disable the user from requesting network services. No other users are affected.
Related commands: domain.
Examples
1-30
user-group
Syntax
user-group group-name
undo user-group group-name
View
System view
Default Level
3: Manage level
Parameters
Description
Use the user-group command to create a user group and enter its view.
Use the undo user-group command to remove a user group.
A user group consists of a group of local users and has a set of local user attributes. You can configure
local user attributes for a user group to implement centralized management of user attributes for the
local users in the group. Currently, you can configure authorization attributes for a user group.
Note that:
z A user group with one or more local users cannot be removed.
z The default system user group system cannot be removed but you can change its configurations.
Related commands: display user-group.
Examples
1-31
2 RADIUS Configuration Commands
Syntax
accounting-on enable
undo accounting-on enable
View
Default Level
2: System level
Parameters
None
Description
Use the accounting-on enable command to enable the accounting-on feature. After doing so, when
the device reboots, an accounting-on message will be sent to the RADIUS server to log out the online
users of the device.
Use the undo accounting-on enable command to disable the accounting-on feature.
By default, the accounting-on feature is disabled.
Note that:
z Execution of this command does not affect the results of other accounting-on related commands
such as accounting-on enable send.
z When you execute the accounting-on enable command, if the system has another authentication
scheme already enabled with the accounting-on feature, the command takes effect immediately.
Otherwise, you need to save the configuration by using the save command, so that the command
takes effect after the device reboots. For information about the save command, refer to File System
Management Commands.
Related commands: radius scheme.
Examples
2-1
accounting-on enable interval
Syntax
View
Default Level
2: System level
Parameters
seconds: Time interval to retransmit accounting-on packet in seconds, ranging from 1 to 15.
Description
Use the accounting-on enable interval command to configure the retransmission interval of
accounting-on packets.
Use the undo accounting-on enable interval command to restore the default.
By default, the retransmission interval of accounting-on packets is 3 seconds.
Note that:
z Execution of this command does not affect the results of other accounting-on related commands
such as accounting-on enable. That is, execution of the undo accounting-on enable interval
command will not disable the accounting-on feature.
z The retransmission interval configured with this command takes effect immediately.
Related commands: radius scheme, accounting-on enable.
Examples
# In RADIUS scheme rd, set the retransmission interval of accounting-on packet to 5 seconds.
<Sysname> system-view
[Sysname] radius scheme rd
[Sysname-radius-rd] accounting-on enable interval 5
Syntax
View
Default Level
2: System level
2-2
Parameters
send-times: Maximum number of accounting-on packet transmission attempts, ranging from 1 to 255.
Description
Use the accounting-on enable send command to set the maximum number of accounting-on packet
transmission attempts.
Use the undo accounting-on enable send command to restore the default.
By default, the maximum number of accounting-on packet transmission attempts is 5.
Note that:
z Execution of this command does not affect the results of other accounting-on related commands
such as accounting-on enable. That is, execution of the undo accounting-on enable interval
command will not disable the accounting-on feature.
z The maximum number of accounting-on packet transmission attempts configured with this
command takes effect immediately.
Related commands: radius scheme, accounting-on enable.
Examples
# In RADIUS scheme rd, set the maximum number of accounting-on packet transmission attempts to
10.
<Sysname> system-view
[Sysname] radius scheme rd
[Sysname-radius-rd] accounting-on enable send 10
Syntax
View
Default Level
2: System level
Parameters
data: Specifies the unit for data flows, which can be byte, kilobyte, megabyte, or gigabyte.
packet: Specifies the unit for data packets, which can be one-packet, kilo-packet, mega-packet, or
giga-packet.
Description
Use the data-flow-format command to specify the unit for data flows or packets to be sent to a RADIUS
server.
2-3
Use the undo data-flow-format command to restore the default.
By default, the unit for data flows is byte and that for data packets is one-packet.
Note that:
z The specified unit of data flows sent to the RADIUS server must be consistent with the traffic
statistics unit of the RADIUS server. Otherwise, accounting cannot be performed correctly.
z You can use these commands to change the settings only when no user is using the RADIUS
scheme.
Related commands: display radius scheme.
Examples
# Define RADIUS scheme radius1 to send data flows and packets destined for the RADIUS server in
kilobytes and kilo-packets.
<Sysname> system-view
[Sysname] radius scheme radius1
[Sysname-radius-radius1] data-flow-format data kilo-byte packet kilo-packet
Syntax
View
Any view
Default Level
2: System level
Parameters
Description
Use the display radius scheme command to display the configuration information of a specified
RADIUS scheme or all RADIUS schemes.
Note that: If no RADIUS scheme is specified, the command will display the configuration information of
all RADIUS schemes.
Related commands: radius scheme.
Examples
2-4
Primary Acct Server:
IP: 1.1.1.1 Port: 1813 State: block
Second Auth Server:
IP: N/A Port: 1812 State: block
Second Acct Server:
IP: N/A Port: 1813 State: block
Auth Server Encryption Key : 123
Acct Server Encryption Key : Not configured
Accounting-On packet disable, send times : 5 , interval : 3s
Interval for timeout(second) : 3
Retransmission times for timeout : 3
Interval for realtime accounting(minute) : 12
Retransmission times of realtime-accounting packet : 5
Retransmission times of stop-accounting packet : 500
Quiet-interval(min) : 5
Username format : without-domain
Data flow unit : Byte
Packet unit : one
nas-ip address : 1.1.1.1
------------------------------------------------------------------
Total 1 RADIUS scheme(s).
Field Description
SchemeName Name of the RADIUS scheme
Index Index number of the RADIUS scheme
Type Type of the RADIUS server
Primary Auth Server Primary authentication server
Primary Acct Server Primary accounting server
Second Auth Server Secondary authentication server
Second Acct Server Secondary accounting server
IP address of the server. N/A means not
IP
configured.
Service port of the server. If no port configuration
Port is performed, the default port number is
displayed.
State Status of the server, active or block.
Auth Server Encryption Key Shared key of the authentication server
Acct Server Encryption Key Shared key of the accounting server
Accounting-On packet disable The accounting-on feature is disabled
send times Retransmission times of accounting-on packets
interval Interval to retransmit accounting-on packets
Interval for timeout(second) Timeout time in seconds
2-5
Field Description
Retransmission times for timeout Times of retransmission in case of timeout
Interval for realtime accounting(minute) Interval for realtime accounting in minutes
Retransmission times of realtime-accounting Retransmission times of realtime-accounting
packet packet
Retransmission times of stop-accounting packet Retransmission times of stop-accounting packet
Quiet-interval(min) Quiet interval for the primary server
Username format Format of the username
Data flow unit Unit of data flows
Packet unit Unit of packets
Source IP address for RADIUS packets to be
nas-ip address
sent
Syntax
View
Any view
Default Level
2: System level
Parameters
None
Description
Use the display radius statistics command to display statistics about RADIUS packets.
Related commands: radius scheme.
Examples
2-6
Total 1016
RADIUS received packets statistic:
Code = 2 Num = 15 Err = 0
Code = 3 Num = 4 Err = 0
Code = 5 Num = 4 Err = 0
Code = 11 Num = 0 Err = 0
Running statistic:
RADIUS received messages statistic:
Normal auth request Num = 24 Err = 0 Succ = 24
EAP auth request Num = 0 Err = 0 Succ = 0
Account request Num = 4 Err = 0 Succ = 4
Account off request Num = 503 Err = 0 Succ = 503
PKT auth timeout Num = 15 Err = 5 Succ = 10
PKT acct_timeout Num = 1509 Err = 503 Succ = 1006
Realtime Account timer Num = 0 Err = 0 Succ = 0
PKT response Num = 23 Err = 0 Succ = 23
Session ctrl pkt Num = 0 Err = 0 Succ = 0
Normal author request Num = 0 Err = 0 Succ = 0
Set policy result Num = 0 Err = 0 Succ = 0
RADIUS sent messages statistic:
Auth accept Num = 10
Auth reject Num = 14
EAP auth replying Num = 0
Account success Num = 4
Account failure Num = 3
Server ctrl req Num = 0
RecError_MSG_sum = 0
SndMSG_Fail_sum = 0
Timer_Err = 0
Alloc_Mem_Err = 0
State Mismatch = 0
Other_Error = 0
No-response-acct-stop packet = 1
Discarded No-response-acct-stop packet for buffer overflow = 0
Field Description
state statistic state statistics
DEAD Number of idle users
AuthProc Number of users waiting for authentication
Number of users who have passed
AuthSucc
authentication
Number of users for whom accounting has been
AcctStart
started
Number of users for whom the system sends
RLTSend
real-time accounting packets
2-7
Field Description
RLTWait Number of users waiting for real-time accounting
Number of users in the state of accounting
AcctStop
waiting stopped
OnLine Number of online users
Stop Number of users in the state of stop
Received and Sent packets statistic Statistics of packets received and sent
Sent PKT total Number of packets sent
Received PKT total Number of packets received
Resend Times Number of retransmission attempts
Resend total Number of packets retransmitted
RADIUS received packets statistic Statistics of packets received by RADIUS
Code Packet type
Num Total number of packets
2-8
Field Description
RecError_MSG_sum Number of received packets in error
SndMSG_Fail_sum Number of packets that failed to be sent out
Timer_Err Number of timer errors
Alloc_Mem_Err Number of memory errors
State Mismatch Number of errors for mismatching status
Other_Error Number of errors of other types
Number of times that no response was received
No-response-acct-stop packet
for stop-accounting packets
Discarded No-response-acct-stop packet for Number of stop-accounting packets that were
buffer overflow buffered but then discarded due to full memory
display stop-accounting-buffer
Syntax
View
Any view
Default Level
2: System level
Parameters
Description
Use the display stop-accounting-buffer command to display information about the stop-accounting
requests buffered in the device by scheme, session ID, time range, username, or slot.
Note that if receiving no response after sending a stop-accounting request to a RADIUS server, the
device buffers the request and retransmits it. You can use the retry stop-accounting command to set
the number of allowed transmission attempts.
Related commands: reset stop-accounting-buffer, stop-accounting-buffer enable,
user-name-format, retry stop-accounting.
2-9
Examples
# Display information about the buffered stop-accounting requests from 0:0:0 to 23:59:59 on August 31,
2006.
<Sysname> display stop-accounting-buffer time-range 0:0:0-08/31/2006 23:59:59-08/31/2006
Total find 0 record (0)
Syntax
View
Default Level
2: System level
Parameters
Description
Use the key command to set the shared key for RADIUS authentication/authorization or accounting
packets.
Use the undo key command to restore the default.
By default, no shared key is configured.
Note that:
z You must ensure that the same shared key is set on the device and the RADIUS server.
z You can use the commands to change the settings only when no user is using the RADIUS
scheme.
Related commands: display radius scheme.
Examples
# Set the shared key for authentication/authorization packets to hello for RADIUS scheme radius1.
<Sysname> system-view
[Sysname] radius scheme radius1
[Sysname-radius-radius1] key authentication hello
# Set the shared key for accounting packets to ok for RADIUS scheme radius1.
<Sysname> system-view
[Sysname] radius scheme radius1
[Sysname-radius-radius1] key accounting ok
2-10
nas-ip (RADIUS scheme view)
Syntax
nas-ip ip-address
undo nas-ip
View
Default Level
2: System level
Parameters
ip-address: IPv4 address in dotted decimal notation. It must be an address of the device and cannot be
0.0.0.0, 255.255.255.255, a class D address, a class E address, or a loopback address.
Description
Use the nas-ip command to specify the IP address for the device to use as the source address of the
RADIUS packets to be sent to the server.
Use the undo nas-ip command to restore the default.
By default, the source IP address of a packet sent to the server is that configured by the radius nas-ip
command in system view.
Note that:
z Specifying a source address for the RADIUS packets to be sent to the server can avoid the
situation where the packets sent back by the RADIUS server cannot reach the device as the result
of a physical interface failure. The address of a loopback interface is recommended.
z The nas-ip command in RADIUS scheme view is only for the current RADIUS scheme, while the
radius nas-ip command in system view is for all RADIUS schemes. However, the nas-ip
command in RADIUS scheme view overwrites the configuration of the radius nas-ip command.
z You can use the commands to change the setting only when no user is using the RADIUS scheme.
Related commands: radius nas-ip.
Examples
# Set the IP address for the device to use as the source address of the RADIUS packets to 10.1.1.1.
<Sysname> system-view
[Sysname] radius scheme test1
[Sysname-radius-test1] nas-ip 10.1.1.1
Syntax
2-11
View
Default Level
2: System level
Parameters
Description
Use the primary accounting command to specify the primary RADIUS accounting server.
Use the undo primary accounting command to remove the configuration.
By default, no primary RADIUS accounting server is specified.
Note that:
z The IP addresses of the primary and secondary accounting servers cannot be the same. Otherwise,
the configuration fails.
z The RADIUS service port configured on the device and that of the RADIUS server must be
consistent.
z You can use the commands to change the settings only when no user is using the RADIUS
scheme.
Related commands: key, radius scheme, state.
Examples
# Specify the IP address of the primary accounting server for RADIUS scheme radius1 as 10.110.1.2
and the UDP port of the server as 1813.
<Sysname> system-view
[Sysname] radius scheme radius1
[Sysname-radius-radius1] primary accounting 10.110.1.2 1813
Syntax
View
Default Level
2: System level
Parameters
Description
Use the primary authentication command to specify the primary RADIUS authentication/authorization
server.
Use the undo primary authentication command to remove the configuration.
By default, no primary RADIUS authentication/authorization server is specified.
Note that:
z After creating a RADIUS scheme, you are supposed to configure the IP address and UDP port of
each RADIUS server (primary/secondary authentication/authorization or accounting server).
Ensure that at least one authentication/authorization server and one accounting server are
configured, and that the RADIUS service port settings on the device are consistent with the port
settings on the RADIUS servers.
z The IP addresses of the primary and secondary authentication/authorization servers cannot be the
same. Otherwise, the configuration fails.
z You can use the commands to change the settings only when no user is using the RADIUS
scheme.
Related commands: key, radius scheme, state.
Examples
radius client
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Use the radius client enable command to enable the listening port of the RADIUS client.
Use the undo radius client command to disable the listening port of the RADIUS client.
By default, the listening port is enabled.
2-13
Note that when the listening port of the RADIUS client is disabled:
z The RADIUS client can either accept authentication, authorization or accounting requests or
process timer messages. However, it fails to transmit and receive packets to and from the RADIUS
server.
z The end account packets of online users cannot be sent out and buffered. This may cause a
problem that the RADIUS server still has the user record after a user goes offline for a period of
time.
z The authentication, authorization and accounting turn to the local scheme after the RADIUS
request fails if the RADIUS scheme and the local authentication, authorization and accounting
scheme are configured.
z The buffered accounting packets cannot be sent out and will be deleted from the buffer when the
configured maximum number of attempts is reached.
Examples
<Sysname> system-view
[Sysname] radius client enable
radius nas-ip
Syntax
View
System view
Default Level
2: System level
Parameters
ip-address: IPv4 address in dotted decimal notation. It must be an address of the device and cannot be
0.0.0.0, 255.255.255.255, a class D address, a class E address, or a loopback address.
Description
Use the radius nas-ip command to specify the IP address for the device to use as the source address
of the RADIUS packets to be sent to the server.
Use the undo radius nas-ip command to remove the configuration.
By default, the source IP address of a packet sent to the server is the IP address of the outbound port.
Note that:
z Specifying a source address for the RADIUS packets to be sent to the server can avoid the
situation where the packets sent back by the RADIUS server cannot reach the device as the result
of a physical interface failure.
z If you configure the command for more than one time, the last configuration takes effect.
2-14
z The nas-ip command in RADIUS scheme view is only for the current RADIUS scheme, while the
radius nas-ip command in system view is for all RADIUS schemes. However, the nas-ip
command in RADIUS scheme view overwrites the configuration of the radius nas-ip command.
Related commands: nas-ip.
Examples
# Set the IP address for the device to use as the source address of the RADIUS packets to 129.10.10.1.
<Sysname> system-view
[Sysname] radius nas-ip 129.10.10.1
radius scheme
Syntax
View
System view
Default Level
3: Manage level
Parameters
Description
Use the radius scheme command to create a RADIUS scheme and enter RADIUS scheme view.
Use the undo radius scheme command to delete a RADIUS scheme.
By default, no RADIUS scheme is defined.
Note that:
z The RADIUS protocol is configured scheme by scheme. Every RADIUS scheme must at least
specify the IP addresses and UDP ports of the RADIUS authentication/authorization/accounting
servers and the parameters necessary for a RADIUS client to interact with the servers.
z A RADIUS scheme can be referenced by more than one ISP domain at the same time.
z You cannot remove the RADIUS scheme being used by online users with the undo radius
scheme command.
Related commands: key, retry realtime-accounting, timer realtime-accounting,
stop-accounting-buffer enable, retry stop-accounting, server-type, state, user-name-format,
retry, display radius scheme, display radius statistics.
Examples
# Create a RADIUS scheme named radius1 and enter RADIUS scheme view.
<Sysname> system-view
[Sysname] radius scheme radius1
[Sysname-radius-radius1]
2-15
radius trap
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the radius trap command to enable the RADIUS trap function.
Use the undo radius trap command to disable the function.
By default, the RADIUS trap function is disabled.
Note that:
z If a NAS sends an accounting or authentication request to the RADIUS server but gets no response,
the NAS retransmits the request. With the RADIUS trap function enabled, when the NAS transmits
the request for half of the specified maximum number of transmission attempts, it sends a trap
message; when the NAS transmits the request for the specified maximum number, it sends another
trap message.
z If the specified maximum number of transmission attempts is odd, the half of the number refers to
the smallest integer greater than the half of the number.
Examples
Syntax
View
User view
Default Level
2: System level
2-16
Parameters
None
Description
Examples
reset stop-accounting-buffer
Syntax
View
User view
Default Level
2: System level
Parameters
Description
Use the reset stop-accounting-buffer command to clear the buffered stop-accounting requests,
which get no responses.
Related commands: stop-accounting-buffer enable, retry stop-accounting, user-name-format,
display stop-accounting-buffer.
Examples
# Clear the buffered stop-accounting requests in the time range from 0:0:0 to 23:59:59 on August 31,
2006.
2-17
<Sysname> reset stop-accounting-buffer time-range 0:0:0-08/31/2006 23:59:59-08/31/2006
retry
Syntax
retry retry-times
undo retry
View
Default Level
2: System level
Parameters
Description
Use the retry command to set the maximum number of RADIUS transmission attempts.
Use the undo retry command to restore the default.
The default value for the retry-times argument is 3.
Note that:
z As RADIUS uses UDP packets to transmit data, the communication is not reliable. If the device
does not receive a response to its request from the RADIUS server within the response timeout
time, it will retransmit the RADIUS request. If the number of transmission attempts exceeds the limit
but the device still receives no response from the RADIUS server, the device regards that the
authentication fails.
z The maximum number of transmission attempts defined by this command refers to the sum of all
transmission attempts sent by the device to the primary server and the secondary server. For
example, assume that the maximum number of transmission attempts is N and both the primary
server and secondary RADIUS server are specified and exist, the device will send a request to the
other server if the current server does not respond after the sum of transmission attempts reaches
N/2 (if N is an even number) or (N+1)/2 (if N is an odd number).
z The maximum number of transmission attempts multiplied by the RADIUS server response timeout
period cannot be greater than 75.
Related commands: radius scheme, timer response-timeout.
Examples
# Set the maximum number of RADIUS request transmission attempts to 5 for RADIUS scheme
radius1.
<Sysname> system-view
[Sysname] radius scheme radius1
[Sysname-radius-radius1] retry 5
2-18
retry realtime-accounting
Syntax
View
Default Level
2: System level
Parameters
retry-times: Maximum number of accounting request transmission attempts. It ranges from 1 to 255 and
defaults to 5.
Description
Use the retry realtime-accounting command to set the maximum number of accounting request
transmission attempts.
Use the undo retry realtime-accounting command to restore the default.
Note that:
z A RADIUS server usually checks whether a user is online by a timeout timer. If it receives from the
NAS no real-time accounting packet for a user in the timeout period, it considers that there may be
line or device failure and stops accounting for the user. This may happen when some unexpected
failure occurs. In this case, the NAS is required to disconnect the user in accordance. This is done
by the maximum number of accounting request transmission attempts. Once the limit is reached
but the NAS still receives no response, the NAS disconnects the user.
z Suppose that the RADIUS server response timeout period is 3 seconds (set with the timer
response-timeout command), the timeout retransmission attempts is 3 (set with the retry
command), and the real-time accounting interval is 12 minutes (set with the timer
realtime-accounting command), and the maximum number of accounting request transmission
attempts is 5 (set with the retry realtime-accounting command). In such a case, the device
generates an accounting request every 12 minutes, and retransmits the request when receiving no
response within 3 seconds. The accounting is deemed unsuccessful if no response is received
within 3 requests. Then the device sends a request every 12 minutes, and if for 5 times it still
receives no response, the device will cut the user connection.
Related commands: radius scheme, timer realtime-accounting.
Examples
# Set the maximum number of accounting request transmission attempts to 10 for RADIUS scheme
radius1.
<Sysname> system-view
[Sysname] radius scheme radius1
[Sysname-radius-radius1] retry realtime-accounting 10
2-19
retry stop-accounting (RADIUS scheme view)
Syntax
View
Default Level
2: System level
Parameters
Description
Use the retry stop-accounting command to set the maximum number of stop-accounting request
transmission attempts.
Use the undo retry stop-accounting command to restore the default.
Suppose that the RADIUS server response timeout period is 3 seconds (set with the timer
response-timeout command), the timeout retransmission attempts is 5 (set with the retry command),
and the maximum number of stop-accounting request transmission attempts is 20 (set with the retry
stop-accounting command). This means that for each stop-accounting request, if the device receives
no response within 3 seconds, it will initiate a new request. If still no responses are received within 5
renewed requests, the stop-accounting request is deemed unsuccessful. Then the device will
temporarily store the request in the device and resend a request and repeat the whole process
described above. Only when 20 consecutive attempts fail will the device discard the request.
Related commands: reset stop-accounting-buffer, radius scheme, display
stop-accounting-buffer.
Examples
# Set the maximum number of stop-accounting request transmission attempts to 1,000 for RADIUS
scheme radius1.
<Sysname> system-view
[Sysname] radius scheme radius1
[Sysname-radius-radius1] retry stop-accounting 1000
Syntax
2-20
View
Default Level
2: System level
Parameters
ip-address: IPv4 address of the secondary accounting server, in dotted decimal notation. The default is
0.0.0.0.
port-number: UDP port number of the secondary accounting server, which ranges from 1 to 65535 and
defaults to 1813.
Description
Use the secondary accounting command to specify the secondary RADIUS accounting server.
Use the undo secondary accounting command to remove the configuration.
By default, no secondary RADIUS accounting server is specified.
Note that:
z The IP addresses of the primary and secondary accounting servers cannot be the same. Otherwise,
the configuration fails.
z The RADIUS service port configured on the device and that of the RADIUS server must be
consistent.
z You can use the commands to change the settings only when no user is using the RADIUS
scheme.
Related commands: key, radius scheme, state.
Examples
Syntax
View
Default Level
2: System level
2-21
Parameters
Description
Examples
server-type
Syntax
View
Default Level
2: System level
Parameters
extended: Specifies the extended RADIUS server (generally iMC), which requires the RADIUS client
and RADIUS server to interact according to the procedures and packet formats provisioned by the
private RADIUS protocol.
2-22
standard: Specifies the standard RADIUS server, which requires the RADIUS client end and RADIUS
server to interact according to the regulation and packet format of the standard RADIUS protocol (RFC
2865/2866 or newer).
Description
Use the server-type command to specify the RADIUS server type supported by the device.
Use the undo server-type command to restore the default.
By default, the supported RADIUS server type is standard.
Note that you can use the commands to change the setting only when no user is using the RADIUS
scheme.
Related commands: radius scheme.
Examples
state
Syntax
View
Default Level
2: System level
Parameters
Description
2-23
z Once the primary server fails, the primary server turns into the blocked state, and the device turns
to the secondary server. In this case, if the secondary server is available, the device triggers the
primary server quiet timer. After the quiet timer times out, the status of the primary server is active
again and the status of the secondary server remains the same. If the secondary server fails, the
device restores the status of the primary server to active immediately. If the primary server has
resumed, the device turns to use the primary server and stops communicating with the secondary
server. After accounting starts, the communication between the client and the secondary server
remains unchanged.
z When both the primary server and the secondary server are in the state of blocked, you need to set
the status of the secondary server to active to use the secondary server for authentication.
Otherwise, the switchover will not occur.
z If one server is in the active state while the other is blocked, the switchover will not take place even
if the active server is not reachable.
z You can use this command to change the settings only when no user is using the RADIUS scheme.
Related commands: radius scheme, primary authentication, secondary authentication, primary
accounting, secondary accounting.
Examples
# Set the status of the secondary server in RADIUS scheme radius1 to active.
<Sysname> system-view
[Sysname] radius scheme radius1
[Sysname-radius-radius1] state secondary authentication active
Syntax
stop-accounting-buffer enable
undo stop-accounting-buffer enable
View
Default Level
2: System level
Parameters
None
Description
Use the stop-accounting-buffer enable command to enable the device to buffer stop-accounting
requests getting no responses.
Use the undo stop-accounting-buffer enable command to disable the device from buffering
stop-accounting requests getting no responses.
By default, the device is enabled to buffer stop-accounting requests getting no responses.
Since stop-accounting requests affect the charge to users, a NAS must make its best effort to send
every stop-accounting request to the RADIUS accounting servers. For each stop-accounting request
2-24
getting no response in the specified period of time, the NAS buffers and resends the packet until it
receives a response or the number of transmission retries reaches the configured limit. In the latter case,
the NAS discards the packet.
Note that you can use the commands to change the setting only when no user is using the RADIUS
scheme.
Related commands: reset stop-accounting-buffer, radius scheme, display
stop-accounting-buffer.
Examples
# In RADIUS scheme radius1, enable the device to buffer the stop-accounting requests getting no
responses.
<Sysname> system-view
[Sysname] radius scheme radius1
[Sysname-radius-radius1] stop-accounting-buffer enable
Syntax
View
Default Level
2: System level
Parameters
minutes: Primary server quiet period, in minutes. It ranges from 1 to 255 and defaults to 5.
Description
Use the timer quiet command to set the quiet timer for the primary server, that is, the duration that the
status of the primary server stays blocked before resuming the active state.
Use the undo timer quiet command to restore the default.
Related commands: display radius scheme.
Examples
2-25
timer realtime-accounting (RADIUS scheme view)
Syntax
View
Default Level
2: System level
Parameters
minutes: Real-time accounting interval in minutes, zero or a multiple of 3 in the range 3 to 60. The
default is 12.
Description
Use the timer realtime-accounting command to set the real-time accounting interval.
Use the undo timer realtime-accounting command to restore the default.
Note that:
z For real-time accounting, a NAS must transmit the accounting information of online users to the
RADIUS accounting server periodically. This command is for setting the interval.
z When the real-time accounting interval on the device is zero, the device will send online user
accounting information to the RADIUS accounting server at the real-time accounting interval
configured on the server (if any) or will not send online user accounting information.
z The setting of the real-time accounting interval somewhat depends on the performance of the NAS
and the RADIUS server: a shorter interval means higher accounting precision but requires higher
performance. You are therefore recommended to adopt a longer interval when there are a large
number of users (1000 or more). The following table lists the recommended ratios of the interval to
the number of users.
Table 2-3 Recommended ratios of the accounting interval to the number of users
Examples
# Set the real-time accounting interval to 51 minutes for RADIUS scheme radius1.
<Sysname> system-view
[Sysname] radius scheme radius1
2-26
[Sysname-radius-radius1] timer realtime-accounting 51
Syntax
View
Default Level
2: System level
Parameters
seconds: RADIUS server response timeout period in seconds. It ranges from 1 to 10 and defaults to 3.
Description
Use the timer response-timeout command to set the RADIUS server response timeout timer.
Use the undo timer command to restore the default.
Note that:
z If a NAS receives no response from the RADIUS server in a period of time after sending a RADIUS
request (authentication/authorization or accounting request), it has to resend the request so that
the user has more opportunity to obtain the RADIUS service. The NAS uses the RADIUS server
response timeout timer to control the transmission interval.
z A proper value for the RADIUS server response timeout timer can help improve the system
performance. Set the timer based on the network conditions.
z The maximum total number of all types of retransmission attempts multiplied by the RADIUS server
response timeout period cannot be greater than 75.
Related commands: radius scheme, retry.
Examples
# Set the RADIUS server response timeout timer to 5 seconds for RADIUS scheme radius1.
<Sysname> system-view
[Sysname] radius scheme radius1
[Sysname-radius-radius1] timer response-timeout 5
Syntax
View
2-27
Default Level
2: System level
Parameters
Description
Use the user-name-format command to specify the format of the username to be sent to a RADIUS
server.
By default, the ISP domain name is included in the username.
Note that:
z A username is generally in the format of userid@isp-name, of which isp-name is used by the device
to determine the ISP domain to which a user belongs. Some earlier RADIUS servers, however,
cannot recognize a username including an ISP domain name. Before sending a username
including a domain name to such a RADIUS server, the device must remove the domain name.
This command is thus provided for you to decide whether to include a domain name in a username
to be sent to a RADIUS server.
z If a RADIUS scheme defines that the username is sent without the ISP domain name, do not apply
the RADIUS scheme to more than one ISP domain, thus avoiding the confused situation where the
RADIUS server regards two users in different ISP domains but with the same user ID as one.
z For 802.1X users using EAP authentication, the user-name-format command configured for a
RADIUS scheme does not take effect and the device does not change the usernames from clients
before forwarding them to the RADIUS server.
z You can use this command to change the setting only when no user is using the RADIUS scheme.
Related commands: radius scheme.
Examples
# Specify the device to remove the domain name in the username sent to the RADIUS servers for the
RADIUS scheme radius1.
<Sysname> system-view
[Sysname] radius scheme radius1
[Sysname-radius-radius1] user-name-format without-domain
2-28
Table of Contents
i
1 PKI Configuration Commands
Syntax
View
Default Level
2: System level
Parameters
id: Sequence number of the certificate attribute rule, in the range 1 to 16.
alt-subject-name: Specifies the name of the alternative certificate subject.
fqdn: Specifies the FQDN of the entity.
ip: Specifies the IP address of the entity.
issuer-name: Specifies the name of the certificate issuer.
subject-name: Specifies the name of the certificate subject.
dn: Specifies the distinguished name of the entity.
ctn: Specifies the contain operation.
equ: Specifies the equal operation.
nctn: Specifies the not-contain operation.
nequ: Specifies the not-equal operation.
attribute-value: Value of the certificate attribute, a case-insensitive string of 1 to 128 characters.
all: Specifies all certificate attributes.
Description
Use the attribute command to configure the attribute rules of the certificate issuer name, certificate
subject name and alternative certificate subject name.
Use the undo attribute command to delete the attribute rules of one or all certificates.
By default, there is no restriction on the issuer name, subject name, and alternative subject name of a
certificate.
1-1
Note that the attribute of the alternative certificate subject name does not appear as a distinguished
name, and therefore the dn keyword is not available for the attribute.
Examples
# Create a certificate attribute rule, specifying that the DN in the subject name includes the string of abc.
<Sysname> system-view
[Sysname] pki certificate attribute-group mygroup
[Sysname-pki-cert-attribute-group-mygroup] attribute 1 subject-name dn ctn abc
# Create a certificate attribute rule, specifying that the FQDN in the issuer name cannot be the string of
abc.
[Sysname-pki-cert-attribute-group-mygroup] attribute 2 issuer-name fqdn nequ abc
# Create a certificate attribute rule, specifying that the IP address in the alternative subject name cannot
be 10.0.0.1.
[Sysname-pki-cert-attribute-group-mygroup] attribute 3 alt-subject-name ip nequ 10.0.0.1
ca identifier
Syntax
ca identifier name
undo ca identifier
View
Default Level
2: System level
Parameters
Description
Use the ca identifier command to specify the trusted CA and bind the device with the CA.
Use the undo ca identifier command to remove the configuration.
By default, no trusted CA is specified for a PKI domain.
Certificate request, retrieval, revocation, and query all depend on the trusted CA.
Examples
1-2
certificate request entity
Syntax
View
Default Level
2: System level
Parameters
entity-name: Name of the entity for certificate request, a case-insensitive string of 1 to 15 characters.
Description
Use the certificate request entity command to specify the entity for certificate request.
Use the undo certificate request entity command to remove the configuration.
By default, no entity is specified for certificate request.
Related commands: pki entity.
Examples
Syntax
View
Default Level
2: System level
Parameters
Description
Use the certificate request from command to specify the authority for certificate request.
1-3
Use the undo certificate request from command to remove the configuration.
By default, no authority is specified for certificate request..
Examples
Syntax
certificate request mode { auto [ key-length key-length | password { cipher | simple } password ]* |
manual }
undo certificate request mode
View
Default Level
2: System level
Parameters
Description
Use the certificate request mode command to set the certificate request mode.
Use the undo certificate request mode command to restore the default.
By default, manual mode is used.
In auto mode, an entity automatically requests a certificate from an RA or CA when it has no certificate.
However, if the certificate is to expire or has expired, the entity does not initiate a re-request
automatically. To have a new local certificate, you need to request one manually. In manual mode, all
operations associated with certificate request are carried out manually.
Related commands: pki request-certificate.
Examples
1-4
[Sysname-pki-domain-1] certificate request mode auto
Syntax
View
Default Level
2: System level
Parameters
count count: Specifies the maximum number of attempts to poll the status of the certificate request, in
the range 1 to 100.
interval minutes: Specifies the polling interval in minutes, in the range 5 to 168.
Description
Use the certificate request polling command to specify the certificate request polling interval and
attempt limit.
Use the undo certificate request polling command to restore the defaults.
By default, the polling is executed every 20 minutes for up to 50 times.
After an applicant makes a certificate request, the CA may need a long period of time if it verifies the
certificate request manually. During this period, the applicant needs to query the status of the request
periodically to get the certificate as soon as possible after the certificate is signed.
Related commands: display pki certificate.
Examples
# Specify the polling interval as 15 minutes and the maximum number of attempts as 40.
<Sysname> system-view
[Sysname] pki domain 1
[Sysname-pki-domain-1] certificate request polling interval 15
[Sysname-pki-domain-1] certificate request polling count 40
Syntax
View
1-5
Default Level
2: System level
Parameters
url-string: URL of the server for certificate request, a case-insensitive string of 1 to 127 characters. It
comprises the location of the server and the location of CGI command interface script in the format of
http: //server_location/ca_script_location, where server_location must be an IP address and does not
support domain name resolution currently.
Description
Use the certificate request url command to specify the URL of the server for certificate request
through SCEP.
Use the undo certificate request url command to remove the configuration.
By default, no URL is specified for a PKI domain.
Examples
common-name
Syntax
common-name name
undo common-name
View
Default Level
2: System level
Parameters
Description
Use the common-name command to configure the common name of an entity, which can be, for
example, the user name.
Use the undo common-name command to remove the configuration.
By default, no common name is specified.
1-6
Examples
country
Syntax
country country-code-str
undo country
View
Default Level
2: System level
Parameters
Description
Use the country command to specify the code of the country to which an entity belongs. It is a standard
2-character code, for example, CN for China.
Use the undo country command to remove the configuration.
By default, no country code is specified.
Examples
crl check
Syntax
View
Default Level
2: System level
1-7
Parameters
Description
Examples
crl update-period
Syntax
View
Default Level
2: System level
Parameters
Description
Use the crl update-period command to set the CRL update period, that is, the interval at which a PKI
entity with a certificate downloads the latest CRL from the LDAP server.
Use the undo crl update-period command to restore the default.
By default, the CRL update period depends on the next update field in the CRL file.
Examples
1-8
crl url
Syntax
View
Default Level
2: System level
Parameters
url-string: URL of the CRL distribution point, a case-insensitive string of 1 to 127 characters in the format
of ldap://server_location or http://server_location, where server_location must be an IP address and
does not support domain name resolution currently.
Description
Use the crl url command to specify the URL of the CRL distribution point.
Use the undo crl url command to remove the configuration.
By default, no CRL distribution point URL is specified.
Note that when the URL of the CRL distribution point is not set, you should acquire the CA certificate
and a local certificate, and then acquire a CRL through SCEP.
Examples
Syntax
View
Any view
Default Level
2: System level
Parameters
1-9
request-status: Displays the status of a certificate request.
Description
Use the display pki certificate command to display the contents or request status of a certificate.
Related commands: pki retrieval-certificate, pki domain and certificate request polling.
Examples
1-10
Table 1-1 display pki certificate command output description
Field Description
Version Version of the certificate
Serial Number Serial number of the certificate
Signature Algorithm Signature algorithm
Issuer Issuer of the certificate
Validity Validity period of the certificate
Subject Entity holding the certificate
Subject Public Key Info Public key information of the entity
X509v3 extensions Extensions of the X.509 (version 3) certificate
X509v3 CRL Distribution Points Distribution points of X.509 (version 3) CRLs
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
policy-name: Name of the certificate attribute-based access control policy, a string of 1 to 16 characters.
all: Specifies all certificate attribute-based access control policies.
Description
Use the display pki certificate access-control-policy command to display information about a
specified or all certificate attribute-based access control policies.
Examples
# Display information about the certificate attribute-based access control policy named mypolicy.
<Sysname> display pki certificate access-control-policy mypolicy
access-control-policy name: mypolicy
rule 1 deny mygroup1
rule 2 permit mygroup2
Field Description
Name of the certificate attribute-based access
access-control-policy
control policy
1-11
Field Description
rule number Number of the access control rule
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display pki certificate attribute-group command to display information about a specified or
all certificate attribute groups.
Examples
Field Description
attribute group name Name of the certificate attribute group
attribute number Number of the attribute rule
subject-name Name of the certificate subject
dn DN of the entity
ctn Indicates the contain operations
abc Value of attribute 1
issuer-name Name of the certificate issuer
fqdn FQDN of the entity
nctn Indicates the not-contain operations
app Value of attribute 2
1-12
display pki crl domain
Syntax
View
Any view
Default Level
2: System level
Parameters
Description
Use the display pki crl domain command to display the locally saved CRLs.
Related commands: pki retrieval-crl, pki domain.
Examples
Field Description
Version Version of the CRL
Signature Algorithm Signature algorithm used by the CRLs
1-13
Field Description
Issuer CA issuing the CRLs
Last Update Last update time
Next Update Next update time
fqdn
Syntax
fqdn name-str
undo fqdn
View
Default Level
2: System level
Parameters
name-str: Fully qualified domain name (FQDN) of an entity, a case-insensitive string of 1 to 127
characters.
Description
Examples
1-14
ip (PKI entity view)
Syntax
ip ip-address
undo ip
View
Default Level
2: System level
Parameters
Description
Examples
ldap-server
Syntax
View
Default Level
2: System level
Parameters
Description
Use the ldap-server command to specify an LDAP server for a PKI domain.
1-15
Use the undo ldap-server command to remove the configuration.
By default, no LDP server is specified for a PKI domain.
Examples
locality
Syntax
locality locality-name
undo locality
View
Default Level
2: System level
Parameters
Description
Use the locality command to configure the geographical locality of an entity, which can be, for example,
a city name.
Use the undo locality command to remove the configuration.
By default, no geographical locality is specified for an entity.
Examples
organization
Syntax
organization org-name
undo organization
View
1-16
Default Level
2: System level
Parameters
Description
Use the organization command to configure the name of the organization to which the entity belongs.
Use the undo organization command to remove the configuration.
By default, no organization name is specified for an entity.
Examples
organization-unit
Syntax
organization-unit org-unit-name
undo organization-unit
View
Default Level
2: System level
Parameters
Description
Use the organization-unit command to specify the name of the organization unit to which this entity
belongs.
Use the undo organization-unit command to remove the configuration.
By default, no organization unit name is specified for an entity.
Examples
# Configure the name of the organization unit to which an entity belongs as unit-name.
<Sysname> system-view
[Sysname] pki entity 1
[Sysname-pki-entity-1] organization-unit unit-name
1-17
pki certificate access-control-policy
Syntax
View
System view
Default Level
2: System level
Parameters
policy-name: Name of the certificate attribute-based access control policy, a case-insensitive string of 1
to 16 characters. It cannot be “a”, “al” or “all”.
all: Specifies all certificate attribute-based access control policies.
Description
Use the pki certificate access-control-policy command to create a certificate attribute-based access
control policy and enter its view.
Use the undo pki certificate access-control-policy command to remove a specified or all certificate
attribute-based access control policies.
No access control policy exists by default.
Examples
# Configure an access control policy named mypolicy and enter its view.
<Sysname> system-view
[Sysname] pki certificate access-control-policy mypolicy
[Sysname-pki-cert-acp-mypolicy]
Syntax
View
System view
Default Level
2: System level
Parameters
group-name: Name for the certificate attribute group, a case-insensitive string of 1 to 16 characters. It
cannot be “a”, “al” or “all”.
1-18
all: Specifies all certificate attribute groups.
Description
Use the pki certificate attribute-group command to create a certificate attribute group and enter its
view.
Use the undo pki certificate attribute-group command to delete one or all certificate attribute groups.
By default, no certificate attribute group exists.
Examples
# Create a certificate attribute group named mygroup and enter its view.
<Sysname> system-view
[Sysname] pki certificate attribute-group mygroup
[Sysname-pki-cert-attribute-group-mygroup]
pki delete-certificate
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the pki delete-certificate command to delete the certificate locally stored for a PKI domain.
Examples
pki domain
Syntax
1-19
View
System view
Default Level
2: System level
Parameters
Description
Use the pki domain command to create a PKI domain and enter PKI domain view or enter the view of
an existing PKI domain.
Use the undo pki domain command to remove a PKI domain.
By default, no PKI domain exists.
Examples
pki entity
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the pki entity command to create a PKI entity and enter its view.
Use the undo pki entity command to remove a PKI entity.
By default, no entity exists.
You can configure a variety of attributes for an entity in PKI entity view. An entity is intended only for
convenience of reference by other commands.
Examples
1-20
<Sysname> system-view
[Sysname] pki entity en
[Sysname-pki-entity-en]
pki import-certificate
Syntax
pki import-certificate { ca | local } domain domain-name { der | p12 | pem } [ filename filename ]
View
System view
Default Level
2: System level
Parameters
Description
Use the pki import-certificate command to import a CA certificate or local certificate from a file and
save it locally.
Related commands: pki domain.
Examples
# Import the CA certificate for PKI domain cer in the format of PEM.
<Sysname> system-view
[Sysname] pki import-certificate ca domain cer pem
Syntax
View
System view
1-21
Default Level
2: System level
Parameters
Description
Use the pki request-certificate domain command to request a local certificate from a CA through
SCEP. If SCEP fails, you can use the pkcs10 keyword to print the request information in BASE64
format, or use the pkcs10 filename filename keyword and argument combination to save the request
information to a local file and send the file to the CA by an out-of-band means.
This operation will not be saved in the configuration file.
Related commands: pki domain.
Examples
pki retrieval-certificate
Syntax
View
System view
Default Level
2: System level
1-22
Parameters
Description
Use the pki retrieval-certificate command to retrieve a certificate from the server for certificate
distribution.
Related commands: pki domain.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the pki retrieval-crl command to retrieve the latest CRLs from the server for CRL distribution.
CRLs are used to verify the validity of certificates.
Related commands: pki domain.
Examples
# Retrieve CRLs.
<Sysname> system-view
[Sysname] pki retrieval-crl domain 1
pki validate-certificate
Syntax
1-23
View
System view
Default Level
2: System level
Parameters
Description
Examples
root-certificate fingerprint
Syntax
View
Default Level
2: System level
Parameters
Description
Use the root-certificate fingerprint command to configure the fingerprint to be used for verifying the
validity of the CA root certificate.
1-24
Use the undo root-certificate fingerprint command to remove the configuration.
By default, no fingerprint is configured for verifying the validity of the CA root certificate.
Examples
# Configure an MD5 fingerprint for verifying the validity of the CA root certificate.
<Sysname> system-view
[Sysname] pki domain 1
[Sysname-pki-domain-1] root-certificate fingerprint md5 12EF53FA355CD23E12EF53FA355CD23E
# Configure a SHA1 fingerprint for verifying the validity of the CA root certificate.
[Sysname-pki-domain-1] root-certificate fingerprint sha1
D1526110AAD7527FB093ED7FC037B0B3CDDDAD93
Syntax
View
Default Level
2: System level
Parameters
id: Number of the certificate attribute access control rule, in the range 1 to 16. The default is the smallest
unused number in this range.
deny: Indicates that a certificate whose attributes match an attribute rule in the specified attribute group
is considered invalid and denied.
permit: Indicates that a certificate whose attributes match an attribute rule in the specified attribute
group is considered valid and permitted.
group-name: Name of the certificate attribute group to be associated with the rule, a case-insensitive
string of 1 to 16 characters. It cannot be “a”, “al” or “all”.
all: Specifies all access control rules.
Description
Use the rule command to create a certificate attribute access control rule.
Use the undo rule command to delete a specified or all access control rules.
By default, no access control rule exists.
Note that a certificate attribute group must exist to be associated with a rule.
Examples
# Create an access control rule, specifying that a certificate is considered valid when it matches an
attribute rule in certificate attribute group mygroup.
1-25
<Sysname> system-view
[Sysname] pki certificate access-control-policy mypolicy
[Sysname-pki-cert-acp-mypolicy] rule 1 permit mygroup
state
Syntax
state state-name
undo state
View
Default Level
2: System level
Parameters
Description
Use the state command to specify the name of the state or province where an entity resides.
Use the undo state command to remove the configuration.
By default, no state or province is specified.
Examples
1-26
Table of Contents
i
1 SSL Configuration Commands
Syntax
View
Default Level
2: System level
Parameters
rsa_aes_128_cbc_sha: Specifies the key exchange algorithm of RSA, the data encryption algorithm of
128-bit AES_CBC, and the MAC algorithm of SHA.
rsa_des_cbc_sha: Specifies the key exchange algorithm of RSA, the data encryption algorithm of
DES_CBC, and the MAC algorithm of SHA.
rsa_rc4_128_md5: Specifies the key exchange algorithm of RSA, the data encryption algorithm of
128-bit RC4, and the MAC algorithm of MD5.
rsa_rc4_128_sha: Specifies the key exchange algorithm of RSA, the data encryption algorithm of
128-bit RC4, and the MAC algorithm of SHA.
Description
Use the ciphersuite command to specify the cipher suite(s) for an SSL server policy to support.
By default, an SSL server policy supports all cipher suites.
Note that:
z With no keyword specified, the command configures an SSL server policy to support all cipher
suites.
z If you execute the command repeatedly, the last one takes effect.
Related commands: display ssl server-policy.
Examples
# Configure SSL server policy policy1 to support cipher suites rsa_rc4_128_md5 and
rsa_rc4_128_sha.
<Sysname> system-view
[Sysname] ssl server-policy policy1
[Sysname-ssl-server-policy-policy1] ciphersuite rsa_rc4_128_md5 rsa_rc4_128_sha
1-1
client-verify enable
Syntax
client-verify enable
undo client-verify enable
View
Default Level
2: System level
Parameters
None
Description
Use the client-verify enable command to enable certificate-based SSL client authentication, that is, to
enable the SSL server to authenticate the client by the client’s certificate during the SSL handshake
process.
Use the undo client-verify enable command to restore the default.
By default, certificate-based SSL client authentication is disabled.
Related commands: display ssl server-policy.
Examples
close-mode wait
Syntax
close-mode wait
undo close-mode wait
View
Default Level
2: System level
Parameters
None
1-2
Description
Use the close-mode wait command to set the SSL connection close mode to wait mode. In this mode,
after sending a close-notify alert message to a client, the server does not close the connection until it
receives a close-notify alert message from the client.
Use the undo close-mode wait command to restore the default.
By default, an SSL server sends a close-notify alert message to the client and close the connection
without waiting for the close-notify alert message from the client.
Related commands: display ssl server-policy.
Examples
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display ssl client-policy command to view information about a specified or all SSL client
policies.
Examples
1-3
Table 1-1 display ssl client-policy command output description
Field Description
SSL Client Policy SSL client policy name
SSL Version Version of the protocol used by the SSL client policy, SSL 3.0 or TLS 1.0.
PKI Domain PKI domain of the SSL client policy
Prefer Ciphersuite Preferred cipher suite of the SSL client policy
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display ssl server-policy command to view information about a specified or all SSL server
policies.
Examples
1-4
Table 1-2 display ssl server-policy command output description
Field Description
SSL Server Policy SSL server policy name
PKI Domain PKI domain used by the SSL server policy
Ciphersuite Cipher suites supported by the SSL server policy
Handshake Timeout Handshake timeout time of the SSL server policy, in seconds
Close mode of the SSL server policy, which can be:
z wait disabled: In this mode, the server sends a close-notify alert
message to the client and then closes the connection immediately
Close-mode without waiting for the close-notify alert message of the client.
z wait enabled: In this mode, the server sends a close-notify alert
message to the client and then waits for the close-notify alert message
of the client. Only after receiving the expected message, does the
server close the connection.
Session Timeout Session timeout time of the SSL server policy, in seconds
Session Cachesize Maximum number of buffered sessions of the SSL server policy
Client-verify Whether client authentication is enabled for the SSL server policy
handshake timeout
Syntax
View
Default Level
2: System level
Parameters
Description
Use the handshake timeout command to set the handshake timeout time for an SSL server policy.
Use the undo handshake timeout command to restore the default.
By default, the handshake timeout time is 3600 seconds.
If the SSL server does not receive any packet from the SSL client before the handshake timeout time
expires, the SSL server will terminate the handshake process.
Related commands: display ssl server-policy.
Examples
# Set the handshake timeout time of SSL server policy policy1 to 3000 seconds.
<Sysname> system-view
1-5
[Sysname] ssl server-policy policy1
[Sysname-ssl-server-policy-policy1] handshake timeout 3000
pki-domain
Syntax
pki-domain domain-name
undo pki-domain
View
Default Level
2: System level
Parameters
Description
Use the pki-domain command to specify a PKI domain for an SSL server policy or SSL client policy.
Use the undo pki-domain command to restore the default.
By default, no PKI domain is configured for an SSL server policy or SSL client policy.
Related commands: display ssl server-policy and display ssl client-policy.
Examples
prefer-cipher
Syntax
View
Default Level
2: System level
1-6
Parameters
rsa_aes_128_cbc_sha: Specifies the key exchange algorithm of RSA, the data encryption algorithm of
128-bit AES_CBC, and the MAC algorithm of SHA.
rsa_des_cbc_sha: Specifies the key exchange algorithm of RSA, the data encryption algorithm of
DES_CBC, and the MAC algorithm of SHA.
rsa_rc4_128_md5: Specifies the key exchange algorithm of RSA, the data encryption algorithm of
128-bit RC4, and the MAC algorithm of MD5.
rsa_rc4_128_sha: Specifies the key exchange algorithm of RSA, the data encryption algorithm of
128-bit RC4, and the MAC algorithm of SHA.
Description
Use the prefer-cipher command to specify the preferred cipher suite for an SSL client policy.
Use the undo prefer-cipher command to restore the default.
By default, the preferred cipher suite for an SSL client policy is rsa_rc4_128_md5.
Related commands: display ssl client-policy.
Examples
# Set the preferred cipher suite for SSL client policy policy1 to rsa_aes_128_cbc_sha.
<Sysname> system-view
[Sysname] ssl client-policy policy1
[Sysname-ssl-client-policy-policy1] prefer-cipher rsa_aes_128_cbc_sha
session
Syntax
View
Default Level
2: System level
Parameters
cachesize size: Specifies the maximum number of cached sessions, in the range 100 to 1000.
timeout time: Specifies the caching timeout time in seconds, in the range 1800 to 72000.
Description
Use the session command to set the maximum number of cached sessions and the caching timeout
time.
Use the undo session command to restore the default.
By default, the maximum number of cached sessions is 500 and the caching timeout time is 3,600
seconds.
1-7
The process of the session parameters negotiation and session establishment by using the SSL
handshake protocol is quite complicated. SSL allows reusing the negotiated session parameters to
establish sessions. Therefore, the SSL server needs to maintain information about existing sessions.
Note that the number of cached sessions and the session information caching time are limited:
z If the number of sessions in the cache reaches the maximum, SSL rejects to cache new sessions.
z If a session has been cached for a period equal to the caching timeout time, SSL will remove the
information of the session.
Related commands: display ssl server-policy.
Examples
# Set the caching timeout time to 4000 seconds and the maximum number of cached sessions to 600.
<Sysname> system-view
[Sysname] ssl server-policy policy1
[Sysname-ssl-server-policy-policy1] session timeout 4000 cachesize 600
ssl client-policy
Syntax
View
System view
Default Level
2: System level
Parameters
policy-name: SSL client policy name, a case-insensitive string of 1 to 16 characters, which cannot be “a”,
“al” and “all”.
all: Specifies all SSL client policies.
Description
Use the ssl client-policy command to create an SSL policy and enter its view.
Use the undo ssl client-policy command to delete a specified or all SSL client policies.
Related commands: display ssl client-policy.
Examples
1-8
ssl server-policy
Syntax
View
System view
Default Level
2: System level
Parameters
policy-name: SSL server policy name, a case-insensitive string of 1 to 16 characters, which cannot be
“a”, “al” and “all”.
all: Specifies all SSL server policies.
Description
Use the ssl server-policy command to create an SSL server policy and enter its view.
Use the undo ssl server-policy command to delete a specified or all SSL server policies.
Note that you cannot delete an SSL server policy that has been associated with one or more application
layer protocols.
Related commands: display ssl server-policy.
Examples
version
Syntax
View
Default Level
2: System level
Parameters
1-9
Description
Use the version command to specify the SSL protocol version for an SSL client policy.
Use the undo version command to restore the default.
By default, the SSL protocol version for an SSL client policy is TLS 1.0.
Related commands: display ssl client-policy.
Examples
# Specify the SSL protocol version for SSL client policy policy1 as SSL 3.0.
<Sysname> system-view
[Sysname] ssl client-policy policy1
[Sysname-ssl-client-policy-policy1] version ssl3.0
1-10
Table of Contents
i
1 SSH2.0 Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display ssh server command on an SSH server to display SSH server status information or
session information.
Related commands: ssh server authentication-retries, ssh server rekey-interval, ssh server
authentication-timeout, ssh server enable, ssh server compatible-ssh1x enable.
Examples
1-1
SFTP Server: Disable
SFTP Server Idle-Timeout: 10 minute(s)
Field Description
SSH Server Whether the SSH server function is enabled
SSH protocol version
SSH version When the SSH supports SSH1, the protocol version is 1.99.
Otherwise, the protocol version is 2.0.
SSH authentication-timeout Authentication timeout period
SSH server key generating interval SSH server key pair update interval
SSH Authentication retries Maximum number of SSH authentication attempts
SFTP Server Whether the SFTP server function is enabled
SFTP Server Idle-Timeout SFTP connection idle timeout period
Field Description
Conn Connected VTY channel
Ver SSH server protocol version
Syntax
View
Any view
Default Level
1: Monitor level
1-2
Parameters
Description
Use the display ssh user-information command on an SSH server to display information about one or
all SSH users.
Note that:
z This command displays only information about SSH users configured through the ssh user
command on the SSH server.
z With the username argument not specified, the command displays information about all SSH
users.
Related commands: ssh user.
Examples
Field Description
Username Name of the user
Authentication method. If this field has a value of password, the next
Authentication-type
field will have a value of null.
User-public-key-name Public key of the user
Syntax
1-3
View
System view
Default Level
2: System level
Parameters
Description
Use the ssh server authentication-retries command to set the maximum number of SSH connection
authentication attempts.
Use the undo ssh server authentication-retries command to restore the default.
By default, the maximum number of SSH connection authentication attempts is 3.
Note that:
z This configuration takes effect only for users trying to log in after the configuration.
z Authentication will fail if the number of authentication attempts (including both publickey and
password authentication) exceeds that specified in the ssh server authentication-retries
command.
z If the authentication method of SSH users is password-publickey, the maximum number of SSH
connection authentication attempts must be at least 2. This is because SSH2.0 users must pass
both password and publickey authentication.
Related commands: display ssh server.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
1-4
Description
Use the ssh server authentication-timeout command to set the SSH user authentication timeout
period on the SSH server.
Use the undo ssh server authentication-timeout command to restore the default.
By default, the authentication timeout period is 60 seconds.
Related commands: display ssh server.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Use the ssh server compatible-ssh1x command to enable the SSH server to support SSH1 clients.
Use the undo ssh server compatible-ssh1x command to disable the SSH server from supporting
SSH1 clients.
By default, the SSH server supports SSH1 clients.
This configuration takes effect only for users logging in after the configuration.
Related commands: display ssh server.
Examples
1-5
ssh server enable
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Use the ssh server enable command to enable the SSH server function.
Use the undo ssh server enable command to disable the SSH server function.
By default, SSH server is disabled.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
hours: Server key pair update interval in hours, in the range 1 to 24.
Description
Use the ssh server rekey-interval command to set the interval for updating the RSA server key.
Use the undo ssh server rekey-interval command to restore the default.
By default, the update interval of the RSA server key is 0, that is, the RSA server key is not updated.
1-6
Related commands: display ssh server.
z This command is only available to SSH users using SSH1 client software.
z The system does not update any DSA key pair periodically.
Examples
ssh user
Syntax
View
System view
Default Level
2: System level
Parameters
1-7
assign publickey keyname: Assigns an existing public key to an SSH user. keyname indicates the
name of the client public key and is a string of 1 to 64 characters.
work-directory directory-name: Specifies the working directory for an SFTP user. directory-name
indicates the name of the working directory and is a string of 1 to 135 characters.
Description
Use the ssh user command to create an SSH user and specify the service type and authentication
method.
Use the undo ssh user command to delete an SSH user.
Note that:
z For a publickey authentication user, you must configure the username and the public key on the
device. For a password authentication user, you can configure the account information on either
the device or the remote authentication server such as a RADIUS server.
z If you use the ssh user command to configure a public key for a user who has already had a public
key, the new one overwrites the old one.
z You can change the authentication method and public key of an SSH user when the user is
communicating with the SSH server. However, your changes take effect only after the user logs out
and logs in again.
z If an SFTP user has been assigned a public key, it is necessary to set a working folder for the user.
z The working folder of an SFTP user is subject to the user authentication method. For a user using
only password authentication, the working folder is the AAA authorized one. For a user using only
publickey authentication or using both publickey authentication and password authentication, the
working folder is the one set by using the ssh user command.
Related commands: display ssh user-information.
Examples
# Create an SSH user named user1, setting the service type as sftp, the authentication method as
publickey, the working directory of the SFTP server as flash, and assigning a public key named key1
to the user.
<Sysname> system-view
[Sysname] ssh user user1 service-type sftp authentication-type publickey assign publickey
key1 work-directory flash:
Syntax
View
Any view
Default Level
1: Monitor level
1-8
Parameters
None
Description
Use the display ssh client source command to display the source IP address or source interface
currently set for the SSH client.
If neither source IP address nor source interface is specified for the SSH client, the system will display
such a message “Neither source IP address nor source interface was specified for the STelnet client.”
Related commands: ssh client source.
Examples
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display ssh server-info command on a client to display mappings between SSH servers and
their host public keys saved on the client.
When an SSH client needs to authenticate the SSH server, it uses the locally saved public key of the
server for the authentication. If the authentication fails, you can use this command to check the public
key of the server saved on the client.
Related commands: ssh client authentication server.
1-9
Examples
# Display the mappings between host public keys and SSH servers saved on the client.
<Sysname> display ssh server-info
Server Name(IP) Server public key name
______________________________________________________
192.168.0.1 abc_key01
192.168.0.2 abc_key02
Field Description
Server Name(IP) Name or IP address of the server
Server public key name Name of the host public key of the server
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the ssh client authentication server command on a client to configure the host public key of a
specified server so that the client can determine whether the server is trustworthy.
Use the undo ssh authentication server command to remove the configuration.
By default, the host public key of the server is not configured, and when logging into the server, the
client uses the IP address or host name used for login as the public key name.
If the client does not support first-time authentication, it will reject unauthenticated servers. In this case,
you need to configure the public keys of the servers and specify the mappings between public keys and
servers on the client, so that the client uses the correct public key of a server to authenticate the server.
Note that the specified host public key of the server must already exist.
Related commands: ssh client first-time enable.
1-10
Examples
# Configure the public key of the server with the IP address of 192.168.0.1 to be key1.
<Sysname> system-view
[Sysname] ssh client authentication server 192.168.0.1 assign publickey key1
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Use the ssh client first-time enable command to enable the first-time authentication function.
Use the undo ssh client first-time command to disable the function.
By default, the function is enabled.
With first-time authentication, when an SSH client not configured with the server host public key
accesses the server for the first time, the user can continue accessing the server, and save the host
public key on the client. When accessing the server again, the client will use the saved server host
public key to authenticate the server.
Without first-time authentication, a client not configured with the server host public key will deny to
access the server. To access the server, a user must configure in advance the server host public key
locally and specify the public key name for authentication.
Note that as the server may update its key pairs periodically, clients must obtain the most recent public
keys of the server for successful authentication of the server.
Examples
Syntax
1-11
View
System view
Default Level
3: Manage level
Parameters
Description
Use the ssh client source command to specify the source IPv4 address or source interface of the SSH
client.
Use the undo ssh client source command to remove the configuration.
By default, an SSH client uses the IP address of the interface specified by the route to access the SSH
server.
Related commands: display ssh client source.
Examples
ssh2
Syntax
ssh2 server [ port-number ] [ identity-key { dsa | rsa } | prefer-ctos-cipher { 3des | aes128 | des } |
prefer-ctos-hmac { md5 | md5-96 | sha1 | sha1-96 } | prefer-kex { dh-group-exchange | dh-group1
| dh-group14 } | prefer-stoc-cipher { 3des | aes128 | des } | prefer-stoc-hmac { md5 | md5-96 | sha1
| sha1-96 } ] *
View
User view
Default Level
0: Visit level
Parameters
server: IPv4 address or host name of the server, a case-insensitive string of 1 to 20 characters.
port-number: Port number of the server, in the range 0 to 65535. The default is 22.
identity-key: Specifies the algorithm for publickey authentication, either dsa or rsa. The default is dsa.
prefer-ctos-cipher: Preferred encryption algorithm from client to server, defaulted to aes128.
z 3des: Encryption algorithm 3des-cbc.
1-12
z aes128: Encryption algorithm aes128-cbc
z des: Encryption algorithm des-cbc.
prefer-ctos-hmac: Preferred HMAC algorithm from client to server, defaulted to sha1-96.
z md5: HMAC algorithm hmac-md5.
z md5-96: HMAC algorithm hmac-md5-96.
z sha1: HMAC algorithm hmac-sha1.
z sha1-96: HMAC algorithm hmac-sha1-96.
prefer-kex: Preferred key exchange algorithm, defaulted to dh-group-exchange.
z dh-group-exchange: Key exchange algorithm diffie-hellman-group-exchange-sha1.
z dh-group1: Key exchange algorithm diffie-hellman-group1-sha1.
z dh-group14: Key exchange algorithm diffie-hellman-group14-sha1.
prefer-stoc-cipher: Preferred encryption algorithm from server to client, defaulted to aes128.
prefer-stoc-hmac: Preferred HMAC algorithm from server to client, defaulted to sha1-96.
Description
Use the ssh2 command to establish a connection to an IPv4 SSH server and specify the public key
algorithm, the preferred key exchange algorithm, and the preferred encryption algorithms and preferred
HMAC algorithm between the client and server.
Note that when the client’s authentication method is publickey, the client needs to get the local private
key for validation. As the publickey authentication includes RSA and DSA algorithms, you must specify
an algorithm (by using the identity-key keyword) in order to get the correct data for the local private key.
By default, the encryption algorithm is DSA.
Examples
Syntax
View
System view
1-13
Default Level
2: System level
Parameters
None
Description
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the sftp server idle-timeout command to set the idle timeout period for SFTP user connections.
Use the undo sftp server idle-timeout command to restore the default.
By default, the idle timeout period is 10 minutes.
Related commands: display ssh server.
Examples
# Set the idle timeout period for SFTP user connections to 500 minutes.
<Sysname> system-view
[Sysname] sftp server idle-timeout 500
1-14
SFTP Client Configuration Commands
bye
Syntax
bye
View
Default Level
3: Manage level
Parameters
None
Description
Use the bye command to terminate the connection with a remote SFTP server and return to user view.
This command functions as the exit and quit commands.
Examples
cd
Syntax
cd [ remote-path ]
View
Default Level
3: Manage level
Parameters
Description
Use the cd command to change the working path on a remote SFTP server. With the argument not
specified, the command displays the current working path.
1-15
z You can use the cd .. command to return to the upper-level directory.
z You can use the cd / command to return to the root directory of the system.
Examples
cdup
Syntax
cdup
View
Default Level
3: Manage level
Parameters
None
Description
Examples
# From the current working directory /new1, return to the upper-level directory.
sftp-client> cdup
Current Directory is:
/
delete
Syntax
delete remote-file&<1-10>
View
1-16
Default Level
3: Manage level
Parameters
remote-file&<1-10>: Names of files on the server. &<1-10> means that you can provide up to 10
filenames, which are separated by space.
Description
Use the delete command to delete the specified file(s) from a server.
This command functions as the remove command.
Examples
dir
Syntax
dir [ -a | -l ] [ remote-path ]
View
Default Level
3: Manage level
Parameters
-a: Displays the names of the files and sub-directories under the specified directory.
-l: Displays the detailed information of the files and sub-directories under the specified directory in the
form of a list.
remote-path: Name of the directory to be queried.
Description
Use the dir command to display information about the files and sub-directories under a specified
directory.
With the –a and –l keyword not specified, the command displays detailed information of the files and
sub-directories under the specified directory in the form of a list.
1-17
With the remote-path not specified, the command displays information about the files and
sub-directories of the current working directory.
This command functions as the ls command.
Examples
# Display detailed information about the files and sub-directories under the current working directory in
the form of a list.
sftp-client> dir
-rwxrwxrwx 1 noone nogroup 1759 Aug 23 06:52 config.cfg
-rwxrwxrwx 1 noone nogroup 225 Aug 24 08:01 pubkey2
-rwxrwxrwx 1 noone nogroup 283 Aug 24 07:39 pubkey1
-rwxrwxrwx 1 noone nogroup 225 Sep 28 08:28 pub1
drwxrwxrwx 1 noone nogroup 0 Sep 28 08:24 new1
drwxrwxrwx 1 noone nogroup 0 Sep 28 08:18 new2
-rwxrwxrwx 1 noone nogroup 225 Sep 28 08:30 pub2
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display sftp client source command to display the source IP address or source interface
currently set for the SFTP client.
If neither source IP address nor source interface is specified for the SFTP client, the system will display
such a message “Neither source IP address nor source interface was specified for the SFTP client.”
Related commands: sftp client source.
Examples
1-18
exit
Syntax
exit
View
Default Level
3: Manage level
Parameters
None
Description
Use the exit command to terminate the connection with a remote SFTP server and return to user view.
This command functions as the bye and quit commands.
Examples
get
Syntax
View
Default Level
3: Manage level
Parameters
Description
Use the get command to download a file from a remote SFTP server and save it locally.
If you do not specify the local-file argument, the file will be saved locally with the same name as that on
the remote SFTP server.
1-19
Examples
help
Syntax
View
Default Level
3: Manage level
Parameters
Description
Use the help command to display a list of all commands or the help information of an SFTP client
command.
With neither the argument nor the keyword specified, the command displays a list of all commands.
Examples
ls
Syntax
ls [ -a | -l ] [ remote-path ]
View
Default Level
3: Manage level
Parameters
-a: Displays the filenames and the folder names of the specified directory.
1-20
-l: Displays in a list form detailed information of the files and folders of the specified directory
remote-path: Name of the directory to be queried.
Description
Use the ls command to display file and folder information under a specified directory.
With the –a and –l keyword not specified, the command displays detailed information of files and folders
under the specified directory in a list form.
With the remote-path not specified, the command displays the file and folder information of the current
working directory.
This command functions as the dir command.
Examples
# Display in a list form detailed file and folder information under the current working directory.
sftp-client> ls
-rwxrwxrwx 1 noone nogroup 1759 Aug 23 06:52 config.cfg
-rwxrwxrwx 1 noone nogroup 225 Aug 24 08:01 pubkey2
-rwxrwxrwx 1 noone nogroup 283 Aug 24 07:39 pubkey1
-rwxrwxrwx 1 noone nogroup 225 Sep 28 08:28 pub1
drwxrwxrwx 1 noone nogroup 0 Sep 28 08:24 new1
drwxrwxrwx 1 noone nogroup 0 Sep 28 08:18 new2
-rwxrwxrwx 1 noone nogroup 225 Sep 28 08:30 pub2
mkdir
Syntax
mkdir remote-path
View
Default Level
3: Manage level
Parameters
Description
Examples
1-21
put
Syntax
View
Default Level
3: Manage level
Parameters
Description
Use the put command to upload a local file to a remote SFTP server.
If you do not specify the remote-file argument, the file will be saved remotely with the same name as the
local one.
Examples
# Upload local file temp.c to the remote SFTP server and save it as temp1.c.
sftp-client> put temp.c temp1.c
Local file:temp.c ---> Remote file: /temp1.c
Uploading file successfully ended
pwd
Syntax
pwd
View
Default Level
3: Manage level
Parameters
None
Description
Use the pwd command to display the current working directory of a remote SFTP server.
Examples
1-22
sftp-client> pwd
/
quit
Syntax
quit
View
Default Level
3: Manage level
Parameters
None
Description
Use the quit command to terminate the connection with a remote SFTP server and return to user view.
This command functions as the bye and exit commands.
Examples
remove
Syntax
remove remote-file&<1-10>
View
Default Level
3: Manage level
Parameters
remote-file&<1-10>: Names of files on an SFTP server. &<1-10> means that you can provide up to 10
filenames, which are separated by space.
Description
Use the remove command to delete the specified file(s) from a remote server.
This command functions as the delete command.
1-23
Examples
rename
Syntax
View
Default Level
3: Manage level
Parameters
Description
Use the rename command to change the name of a specified file or directory on an SFTP server.
Examples
# Change the name of a file on the SFTP server from temp1.c to temp2.c.
sftp-client> rename temp1.c temp2.c
File successfully renamed
rmdir
Syntax
rmdir remote-path&<1-10>
View
Default Level
3: Manage level
1-24
Parameters
remote-path&<1-10>: Names of the directoris on the remote SFTP server. &<1-10> means that you can
provide up to 10 directory names that are separated by space.
Description
Use the rmdir command to delete the specified directories from an SFTP server.
Examples
sftp
Syntax
sftp server [ port-number ] [ identity-key { dsa | rsa } | prefer-ctos-cipher { 3des | aes128 | des } |
prefer-ctos-hmac { md5 | md5-96 | sha1 | sha1-96 } | prefer-kex { dh-group-exchange | dh-group1
| dh-group14 } | prefer-stoc-cipher { 3des | aes128 | des } | prefer-stoc-hmac { md5 | md5-96 | sha1
| sha1-96 } ] *
View
User view
Default Level
3: Manage level
Parameters
server: IPv4 address or host name of the server, a case-insensitive string of 1 to 20 characters.
port-number: Port number of the server, in the range 0 to 65535. The default is 22.
identity-key: Specifies the algorithm for publickey authentication, either dsa or rsa. The default is dsa.
prefer-ctos-cipher: Preferred encryption algorithm from client to server, defaulted to aes128.
z 3des: Encryption algorithm 3des-cbc.
z aes128: Encryption algorithm aes128-cbc.
z des: Encryption algorithm des-cbc.
prefer-ctos-hmac: Preferred HMAC algorithm from client to server, defaulted to sha1-96.
z md5: HMAC algorithm hmac-md5.
z md5-96: HMAC algorithm hmac-md5-96.
z sha1: HMAC algorithm hmac-sha1.
z sha1-96: HMAC algorithm hmac-sha1-96.
prefer-kex: Preferred key exchange algorithm, defaulted to dh-group-exchange.
z dh-group-exchange: Key exchange algorithm diffie-hellman-group-exchange-sha1.
z dh-group1: Key exchange algorithm diffie-hellman-group1-sha1.
z dh-group14: Key exchange algorithm diffie-hellman-group14-sha1.
1-25
prefer-stoc-cipher: Preferred encryption algorithm from server to client, defaulted to aes128.
prefer-stoc-hmac: Preferred HMAC algorithm from server to client, defaulted to sha1-96.
Description
Use the sftp command to establish a connection to a remote IPv4 SFTP server and enter SFTP client
view.
Note that when the client’s authentication method is publickey, the client needs to get the local private
key for validation. As the publickey authentication includes RSA and DSA algorithms, you must specify
an algorithm (by using the identity-key keyword) in order to get the correct data for the local private key.
By default, the encryption algorithm is DSA.
Examples
Syntax
View
System view
Default Level
3: Manage level
Parameters
Description
Use the sftp client source command to specify the source IPv4 address or interface of an SFTP client.
Use the undo sftp source-interface command to remove the configuration.
By default, an SFTP client uses the IP address of the interface specified by the route of the device to
access the SFTP server.
Related commands: display sftp client source.
1-26
Examples
1-27
Table of Contents
i
1 Public Key Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display public-key local public command to display the public key information of the local key
pairs.
Related commands: public-key local create.
Examples
# Display the public key information of the local RSA key pairs.
<Sysname> display public-key local rsa public
=====================================================
Time of Key pair created: 19:59:16 2007/10/25
Key name: HOST_KEY
Key type: RSA Encryption Key
=====================================================
Key code:
30819F300D06092A864886F70D010101050003818D0030818902818100BC4C392A97734A633BA0F1DB01F84E
B51228EC86ADE1DBA597E0D9066FDC4F04776CEA3610D2578341F5D049143656F1287502C06D39D39F28F0F5
CBA630DA8CD1C16ECE8A7A65282F2407E8757E7937DCCDB5DB620CD1F471401B7117139702348444A2D89004
97A87B8D5F13D61C4DEFA3D14A7DC07624791FC1D226F62DF3020301
0001
=====================================================
Time of Key pair created: 19:59:17 2007/10/25
1-1
Key name: SERVER_KEY
Key type: RSA Encryption Key
=====================================================
Key code:
307C300D06092A864886F70D0101010500036B003068026100C51AF7CA926962284A4654B2AACC7B2AE12B2B
1EABFAC1CDA97E42C3C10D7A70D1012BF23ADE5AC4E7AAB132CFB6453B27E054BFAA0A85E113FBDE751EE0EC
EF659529E857CF8C211E2A03FD8F10C5BEC162B2989ABB5D299D1E4E27A13C7DD10203010001
# Display the public key information of the local DSA key pair.
<Sysname> display public-key local dsa public
=====================================================
Time of Key pair created: 20:00:16 2007/10/25
Key name: HOST_KEY
Key type: DSA Encryption Key
=====================================================
Key code:
308201B83082012C06072A8648CE3804013082011F02818100D757262C4584C44C211F18BD96E5F061C4F0A4
23F7FE6B6B85B34CEF72CE14A0D3A5222FE08CECE65BE6C265854889DC1EDBD13EC8B274DA9F75BA26CCB987
723602787E922BA84421F22C3C89CB9B06FD60FE01941DDD77FE6B12893DA76EEBC1D128D97F0678D7722B53
41C8506F358214B16A2FAC4B368950387811C7DA33021500C773218C737EC8EE993B4F2DED30F48EDACE915F
0281810082269009E14EC474BAF2932E69D3B1F18517AD9594184CCDFCEAE96EC4D5EF93133E84B47093C52B
20CD35D02492B3959EC6499625BC4FA5082E22C5B374E16DD00132CE71B020217091AC717B612391C76C1FB2
E88317C1BD8171D41ECB83E210C03CC9B32E810561C21621C73D6DAAC028F4B1585DA7F42519718CC9B09EEF
0381850002818100CCF1F78E0860BE937FD3CA07D2F2A1B66E74E5D1E16693EB374D677A7A6124EBABD59FE4
8796C56F3FF919F999AEB97D1F2B83D9B98AC09BC1F72E80DBE337CB29989A23378EB21C38EE083F11ED6DC8
D4DBE001BA85450CEA071C2A471C83761E4CF32C174B418612CDD597B441F0CAA05DC01CB93A0ABB247C06FB
A4C79054
Field Description
Time of Key pair created Time at which the local key pair is created
Key name, which can be:
Key name z HOST_KEY: Host public key.
z SERVER_KEY: Server public key. This value is available only for
RSA key pairs.
Key type, which can be:
Key type z RSA Encryption Key: RSA key pair.
z DSA Encryption Key: DSA key pair.
Key code Key data
Syntax
1-2
View
Any view
Default Level
1: Monitor level
Parameters
brief: Displays brief information about all the host public keys of peers.
name publickey-name: Displays information about a peer's host public key. publickey-name specifies a
host public key by its name, which is a case-sensitive string of 1 to 64 characters.
Description
Use the display public-key peer command to display information about the specified or all locally
saved public keys of peers.
With neither the brief keyword nor the name publickey-name combination specified, the command
displays detailed information about all locally saved public keys of peers.
You can use the public-key peer command or the public-key peer import sshkey command to get a
local copy of the public keys of a peer.
Related commands: public-key peer, public-key peer import sshkey.
Examples
# Display detailed information about the peer host public key named idrsa.
<Sysname> display public-key peer name idrsa
=====================================
Key name : idrsa
Key type : RSA
Key module: 1024
=====================================
Key Code:
30819D300D06092A864886F70D010101050003818B00308187028181009C46A8710216CEC0C01C7CE136BA76
C79AA6040E79F9E305E453998C7ADE8276069410803D5974F708496947AB39B3F39C5CE56C95B6AB7442D563
93BF241F99A639DD02D9E29B1F5C1FD05CC1C44FBD6CFFB58BE6F035FAA2C596B27D1231D159846B7CB9A775
7C5800FADA9FD72F65672F4A549EE99F63095E11BD37789955020123
# Display brief information about all locally saved public keys of the peers.
<Sysname> display public-key peer brief
Type Module Name
---------------------------
RSA 1024 idrsa
DSA 1024 10.1.1.1
peer-public-key end
Syntax
peer-public-key end
1-3
View
Default Level
2: System level
Parameters
None
Description
Use the peer-public-key end command to return from public key view to system view.
Related commands: public-key peer.
Examples
public-key-code begin
Syntax
public-key-code begin
View
Default Level
2: System level
Parameters
None
Description
Use the public-key-code begin command to enter public key code view.
After entering public key code view, input the key data in the correct format. Spaces and carriage returns
are allowed between characters.
You can input the key data displayed with the display public-key local public command to make sure
the format requirements are met.
You can configure the RSA server public key of the peer. However, the public key configured cannot be
used for identity authentication in SSH applications, which use the RSA host public key. For more
information about SSH, see SSH2.0 Configuration.
1-4
Examples
public-key-code end
Syntax
public-key-code end
View
Default Level
2: System level
Parameters
None
Description
Use the public-key-code end command to return from public key code view to public key view and to
save the configured public key.
The system verifies the key before saving it. If the key is not in the correct format, the system discards
the key and displays an error message. If the key is valid, the system saves the key.
Related commands: public-key peer, public-key-code begin.
Examples
# Exit public key code view and save the configured public key.
<Sysname> system-view
[Sysname] public-key peer key1
[Sysname-pkey-public-key] public-key-code begin
[Sysname-pkey-key-code]30819F300D06092A864886F70D010101050003818D0030818902818100C0EC801
4F82515F6335A0A
[Sysname-pkey-key-code]EF8F999C01EC94E5760A079BD73E4F4D97F3500EDB308C29481B77E719D164313
5877E13B1C531B4
1-5
[Sysname-pkey-key-code]FF1877A5E2E7B1FA4710DB0744F66F6600EEFE166F1B854E2371D5B952ADF6B80
EB5F52698FCF3D6
[Sysname-pkey-key-code]1F0C2EAAD9813ECB16C5C7DC09812D4EE3E9A0B074276FFD4AF2050BD4A9B1DDE
675AC30CB020301
[Sysname-pkey-key-code]0001
[Sysname-pkey-key-code] public-key-code end
[Sysname-pkey-public-key]
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the public-key local create command to create local key pair(s).
Note that:
z When using this command to create DSA or RSA key pairs, you will be prompted to provide the
length of the key modulus. The modulus length is in the range 512 to 2048 bits, and defaults to
1024 bits. If the type of key pair already exists, the system will ask you whether you want to
overwrite it.
z The local key pairs created with the public-key local create command are saved automatically
and can survive a reboot.
Related commands: public-key local destroy, display public-key local public.
Examples
1-6
++++++++
++++++++
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the public-key local destroy command to destroy the local key pair(s).
Related commands: public-key local create.
Examples
1-7
public-key local export dsa
Syntax
View
System view
Default Level
1: Monitor level
Parameters
Description
Use the public-key local export dsa command to display the local DSA public key on the screen or
export it to a specified file.
If you do not specify the filename argument, the command displays the local DSA public key on the
screen; otherwise, the command exports the local DSA public key to the specified file and saves the file.
SSH2.0 and OpenSSH are two different public key formats for different requirements.
Related commands: public-key local create, public-key local destroy.
Examples
# Export the local DSA public key in OpenSSH format to a file named key.pub.
<Sysname> system-view
[Sysname] public-key local export dsa openssh key.pub
1-8
ssh-dss
AAAAB3NzaC1kc3MAAACBANdXJixFhMRMIR8YvZbl8GHE8KQj9/5ra4WzTO9yzhSg06UiL+CM7OZb5sJlhUiJ3B7b
0T7IsnTan3W6Jsy5h3I2Anh+kiuoRCHyLDyJy5sG/WD+AZQd3Xf+axKJPadu68HRKNl/BnjXcitTQchQbzWCFLFq
L6xLNolQOHgRx9ozAAAAFQDHcyGMc37I7pk7Ty3tMPSO2s6RXwAAAIEAgiaQCeFOxHS68pMuadOx8YUXrZWUGEzN
/OrpbsTV75MTPoS0cJPFKyDNNdAkkrOVnsZJliW8T6UILiLFs3ThbdABMs5xsCAhcJGscXthI5HHbB+y6IMXwb2B
cdQey4PiEMA8ybMugQVhwhYhxz1tqsAo9LFYXaf0JRlxjMmwnu8AAACBANVcLNEKdDt6xcatpRjxsSrhXFVIdRjx
w59qZnKhl87GsbgP4ccUp3KmcRzuqpz1qNtfgoZOLzHnG1YGxPp7Q2k/uRuuHN0bJfBkOLo2/RyGqDJIqB4FQwmr
kwJuauYGqQy+mgE6dmHn0VG4gAkx9MQxDIBjzbZRX0bvxMdNKR22 dsa-key
Syntax
View
System view
Default Level
1: Monitor level
Parameters
Description
Use the public-key local export rsa command to display the local RSA public key on the screen or
export them to a specified file.
If you do not specify the filename argument, the command displays the local RSA public key on the
screen; otherwise, the command exports the local RSA public key to the specified file and saves the file.
SSH1, SSH2.0 and OpenSSH are three different public key formats for different requirements.
Related commands: public-key local create, public-key local destroy.
Examples
# Export the local RSA public key in OpenSSH format to a file named key.pub.
<Sysname> system-view
[Sysname] public-key local export rsa openssh key.pub
1-9
AAAAB3NzaC1yc2EAAAADAQABAAAAgQDAo0dVYR1S5f30eLKGNKuqb5HU3M0TTSaGlER2GmcRI2sgSegbo1x6ut5N
Ic5+jJxuRCU4+gMc76iS8d+2d50FqIweEkHHkSG/ddgXt/iAZ6cY81bdu/CKxGiQlkUpbw4vSv+X5KeE7j+o0MpO
pzh3W768/+u1riz+1LcwVTs51Q==
---- END SSH2 PUBLIC KEY ----
public-key peer
Syntax
View
System view
Default Level
2: System level
Parameters
keyname: Host public key name of the peer, a case-sensitive string of 1 to 64 characters.
Description
Use the public-key peer command to specify a name for a peer's host public key and enter public key
view.
Use the undo public-key peer command to remove a peer’s host public key.
After entering public key view, you can configure the public key of the peer with the public-key-code
begin and public-key-code end commands. This operation requires that you obtain the hexadecimal
public key from the peer beforehand.
Related commands: public-key-code begin, public-key-code end, display public-key peer.
Examples
# Specify the name for the peer's host public key as key1 and enter public key view.
<Sysname> system-view
[Sysname] public-key peer key1
[Sysname-pkey-public-key]
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the public-key peer import sshkey command to import the public key of a peer from the public
key file.
Use the undo public-key peer command to remove a configured peer public key.
After execution of this command, the system automatically transforms the public key in SSH1, SSH2.0
or OpenSSH format to PKCS format, and imports the peer public key. This operation requires that you
get a copy of the public key file from the peer through FTP or TFTP in advance.
Related commands: display public-key peer.
Examples
# Import the peer host public key named key2 from the public key file key.pub.
<Sysname> system-view
[Sysname] public-key peer key2 import sshkey key.pub
1-11
Table of Contents
i
1 HABP Configuration Commands
Syntax
display habp
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Examples
Field Description
HABP Mode HABP mode of the current device, server or client
Sending HABP request packets every 20 The HABP server sends HABP request packets at an
seconds interval of 20 seconds.
ID of the VLAN in which HABP packets are
Bypass VLAN
transmitted
1-1
display habp table
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display habp table command to display HABP MAC address table entries.
Note that this command is only applicable on an HABP server to display the MAC address entries
collected by the HABP server.
Examples
Field Description
MAC MAC address
Lifetime of an entry in seconds. The initial value is three times of the interval to
Holdtime send HABP request packets. An entry will age out if it is not updated during the
period.
Receive Port Port that learned the MAC address
Syntax
View
Any view
Default Level
1: Monitor level
1-2
Parameters
None
Description
Use the display habp traffic command to display HABP packet statistics.
Examples
Field Description
Packets output Number of HABP packets sent
Input Number of HABP packets received
ID error Number of packets with an incorrect ID
habp enable
Syntax
habp enable
undo habp enable
View
System view
Default Level
2: System level
Parameters
None
Description
1-3
Examples
# Enable HABP.
<Sysname> system-view
[Sysname] habp enable
Syntax
View
System view
Default Level
2: System level
Parameters
vlan-id: ID of the VLAN in which HABP packets are to be transmitted, in the range 1 to 4094.
Description
Use the habp server vlan command to configure HABP to work in server mode and specify the VLAN
in which HABP packets are to be transmitted.
Use the undo habp server command to configure HABP to work in the default mode.
By default, HABP works in client mode.
Note that in a cluster, if a member device with 802.1X authentication or MAC authentication enabled is
attached with some other member devices of the cluster, you also need to configure HABP server on
this device. Otherwise, the cluster management device will not be able to manage the devices attached
to this member device. For information about the cluster function, see Cluster Management
Configuration.
Examples
# Configure HABP to work in server mode and specify the VLAN for HABP packets as VLAN 2.
<Sysname> system-view
[Sysname] habp server vlan 2
habp timer
Syntax
View
System view
1-4
Default Level
2: System level
Parameters
interval: Interval (in seconds) at which the switch sends HABP request packets, in the range 5 to 600.
Description
Use the habp timer command to set the interval at which the switch sends HABP request packets.
Use the undo habp timer command to restore the default.
The default interval is 20 seconds.
This command is required only on the HABP server.
Examples
# Set the interval at which the switch sends HABP request packets to 50 seconds.
<Sysname> system-view
[Sysname] habp timer 50
1-5
Table of Contents
i
1 ACL Configuration Commands
acl
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the acl command to create an ACL and enter its view. If the ACL has been created, you enter its
view directly.
Use the undo acl command to delete the specified or all ACLs.
By default, no ACL exists.
Note that:
z You can assign a name for an ACL only when you create it. After creating an ACL, you can neither
rename it nor remove its name, if any.
1-1
z The name of an ACL must be unique among ACLs.
z If you specify both an ACL number and an ACL name in one command to enter the view of an
existing ACL, be sure that the ACL number and ACL name identify the same ACL.
z You can change match order only for ACLs that do not contain any rules.
Examples
# Create basic ACL 2001, named flow, and enter its view.
<Sysname> system-view
[Sysname] acl number 2001 name flow
[Sysname-acl-basic-2001-flow]
acl copy
Syntax
View
System view
Default Level
2: System level
Parameters
1-2
Description
Use the acl copy command to create an IPv4 ACL by copying an IPv4 ACL that already exists. Except
the number and name (if any), the new ACL has the same configuration as the source ACL.
You can assign a name for an IPv4 ACL only when you create it. After it is created, you can neither
rename it nor remove its name, if any.
Examples
acl name
Syntax
View
System view
Default Level
2: System level
Parameters
acl-name: Specifies the name of an existing ACL, which is a case insensitive string of 1 to 32 characters.
It must start with an English letter.
Description
Use the acl name command to enter the view of an existing ACL by specifying its name.
Related commands: acl.
Examples
description
Syntax
description text
undo description
View
Basic ACL view, advanced ACL view, Ethernet frame header ACL view
1-3
Default Level
2: System level
Parameters
Description
Examples
display acl
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display acl command to display configuration and match statistics for the specified or all ACLs.
This command displays ACL rules in the config or depth-first order, whichever is configured.
Examples
1-4
Basic ACL 2001, named flow, 1 rule,
ACL's step is 5
rule 5 permit source 1.1.1.1 0 (5 times matched)
rule 5 comment This rule is used on GE1/0/1
Field Description
Category and number of the ACL. The following
Basic ACL 2001
field information is about basic ACL 2001.
The name of the ACL is flow. "–none-" means
named flow
the ACL is not named.
1 rule The ACL contains one rule.
ACL's step is 5 The rule numbering step is 5.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display acl resource command to display the usage of ACL resources on a device.
Examples
1-5
----------------------------------------------------
ACL 1024 370 0 654
Meter 256 0 0 256
----------------------------------------------------
GE1/0/25..GE1/0/48
GE1/0/51 GE1/0/52
----------------------------------------------------
Type Total Reserved Configured Remaining
----------------------------------------------------
ACL 1024 374 0 650
Meter 256 0 0 256
Field Description
Resource type. Possible values are as follows:
Type z METER for traffic policing resources,
z ACL for rule resources,
Total Total number of ACL rules supported
Reserved Number of reserved ACL rules
Configured Number of configured ACL rules
Remaining Number of remaining ACL rules
display time-range
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
time-range-name: Time range name, a case insensitive string of 1 to 32 characters. It must start with an
English letter.
all: Displays the configuration and status of all existing time ranges.
Description
Use the display time-range command to display the configuration and status of a specified time range
or all time ranges.
A time range is active if the system time falls into its range.
Examples
Field Description
Current time Current system time
Configuration and status of the time range, including the
Time-range name of the time range, its status (active or inactive), and
its start time and end time.
packet-filter
Syntax
View
Default Level
2: System level
Parameters
Description
Use the packet-filter command to apply an ACL to an interface to filter IPv4 packets or Ethernet
frames.
Use the undo packet-filter command to restore the default.
By default, an interface does not filter IPv4 packets or Ethernet frames.
If you execute the command repeatedly, the last configuration takes effect.
Examples
# Apply basic ACL 2001 to the inbound direction of interface GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
1-7
[Sysname-GigabitEtherhet1/0/1] packet-filter 2001 inbound
# Apply Ethernet frame header ACL 4001 to the inbound direction of interface GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEtherhet1/0/1] packet-filter 4001 inbound
Syntax
View
User view
Default Level
2: System level
Parameters
Description
Use the reset acl counter command to clear statistics for the specified or all ACLs.
Related commands: display acl.
Examples
Syntax
rule [ rule-id ] { deny | permit } protocol [ { established | { ack ack-value | fin fin-value | psh psh-value
| rst rst-value | syn syn-value | urg urg-value } * } | destination { dest-addr dest-wildcard | any } |
destination-port operator port1 [ port2 ] | dscp dscp | fragment | icmp-type { icmp-type icmp-code |
icmp-message } | logging | precedence precedence | reflective | source { sour-addr sour-wildcard |
any } | source-port operator port1 [ port2 ] | time-range time-range-name | tos tos ] *
1-8
undo rule rule-id [ { established | { ack | fin | psh | rst | syn | urg } * } | destination | destination-port
| dscp | fragment | icmp-type | logging | precedence | reflective | source | source-port |
time-range | tos ] *
View
Default Level
2: System level
Parameters
rule-id: Specifies a rule ID, which ranges from 0 to 65534. If no rule ID is not provided when you create
an ACL rule, the system automatically assigns it a rule ID. This rule ID takes the nearest higher multiple
of the numbering step to the current highest rule ID, starting from 0. For example, if the rule numbering
step is 5 and the current highest rule ID is 28, the rule is numbered 30.
deny: Drops matching packets.
permit: Allows matching packets to pass.
protocol: Protocol carried by IPv4. It can be a number in the range 0 to 255, or in words, gre (47), icmp
(1), igmp (2), ip, ipinip (4), ospf (89), tcp (6), or udp (17). Table 1-4 describes the parameters that can
be specified after the protocol argument.
Table 1-4 Match criteria and other rule information for advanced ACL rules
1-9
Parameters Function Description
Specifies to log matched This function requires that the module
logging
packets. using the ACL support logging.
Specifies that the rule be
reflective Not supported.
reflective.
Indicates that the rule
Without this keyword, the rule applies to all
fragment applies to only non-first
fragments and non-fragments.
fragments.
The time-range-name argument takes a
time-range Specifies a time range for case insensitive string of 1 to 32
time-range-name the rule. characters. It must start with an English
letter.
If you provide the precedence or tos keyword in addition to the dscp keyword, the dscp keyword takes
effect.
Setting the protocol argument to tcp or udp, you may define the parameters shown in Table 1-5.
1-10
Parameters Function Description
{ ack ack-value | fin
fin-value | psh Parameters specific to TCP.
psh-value | rst Specifies one or more
The value for each argument can be 0 or 1.
rst-value | syn TCP flags
syn-value | urg The TCP flags in one rule are ANDed.
urg-value } *
Specifies the TCP flags
established Parameter specific to TCP.
ACK and RST
Setting the protocol argument to icmp, you may define the parameters shown in Table 1-6.
echo-reply 0 0
fragmentneed-DFset 3 4
host-redirect 5 1
host-tos-redirect 5 3
host-unreachable 3 1
information-reply 16 0
information-request 15 0
net-redirect 5 0
net-tos-redirect 5 2
net-unreachable 3 0
parameter-problem 12 0
port-unreachable 3 3
protocol-unreachable 3 2
reassembly-timeout 11 1
source-quench 4 0
1-11
ICMP message name Type Code
source-route-failed 3 5
timestamp-reply 14 0
timestamp-request 13 0
ttl-exceeded 11 0
Description
For a basic ACL rule to be referenced by a QoS policy for traffic classification, the logging keyword is
not supported.
Examples
# Create a rule to permit TCP packets with the destination port of 80 from 129.9.0.0 to 202.38.160.0.
<Sysname> system-view
[Sysname] acl number 3101
[Sysname-acl-adv-3101] rule permit tcp source 129.9.0.0 0.0.255.255 destination 202.38.160.0
0.0.0.255 destination-port eq 80
1-12
rule (basic ACL view)
Syntax
rule [ rule-id ] { deny | permit } [ fragment | logging | source { sour-addr sour-wildcard | any } |
time-range time-range-name ] *
undo rule rule-id [ fragment | logging | source | time-range ] *
View
Default Level
2: System level
Parameters
rule-id: Specifies a rule ID, which ranges from 0 to 65534. If no rule ID is specified when you create an
ACL rule, assigns it a rule ID. This rule ID takes the nearest higher multiple of the numbering step to the
current highest rule ID, starting from 0. For example, if the rule numbering step is 5 and the current
highest rule ID is 28, the rule is numbered 30.
deny: Drops matching packets.
permit: Allows matching packets to pass.
fragment: Indicates that the rule applies to only non-first fragments. A rule without this keyword applies
to all fragments and non-fragments.
logging: Generates log entries for matched packets.
source { sour-addr sour-wildcard | any }: Matches a source address. The sour-addr sour-wildcard
arguments represent a source IP address in dotted decimal notation. A wildcard mask of zeros specifies
a host address. The any keyword represents any source IP address.
time-range time-range-name: Specifies a time range for the rule. The time-range-name argument is a
case insensitive string of 1 to 32 characters. It must start with an English letter.
Description
1-13
You can only modify the existing rules of an ACL that uses the match order of config. When modifying a
rule of such an ACL, you may choose to change just some of the settings, in which case the other
settings remain the same.
When the ACL match order is auto, a newly created rule will be inserted among the existing rules in the
depth-first match order. Note that the IDs of the rules still remain the same.
For a basic ACL rule to be referenced by a QoS policy for traffic classification, the logging keyword is
not supported.
Examples
Syntax
rule [ rule-id ] { deny | permit } [ cos vlan-pri | dest-mac dest-addr dest-mask | { lsap lsap-type
lsap-type-mask | type protocol-type protocol-type-mask } | source-mac sour-addr source-mask |
time-range time-range-name ] *
undo rule rule-id [ time-range ]
View
Default Level
2: System level
Parameters
rule-id: Specifies a rule ID, which ranges from 0 to 65534. If no rule ID is not provided when you create
an ACL rule, the system automatically assigns it a rule ID. This rule ID takes the nearest higher multiple
of the numbering step to the current highest rule ID, starting from 0. For example, if the rule numbering
step is 5 and the current highest rule ID is 28, the rule is numbered 30.
deny: Drops matching packets.
permit: Allows matching packets to pass.
cos vlan-pri: Defines an 802.1p priority. The vlan-pri argument can be a number in the range 0 to 7 or in
words, best-effort (0), background (1), spare (2), excellent-effort (3), controlled-load (4), video (5),
voice (6), or network-management (7).
1-14
dest-mac dest-addr dest-mask: Matches a destination MAC address range. The dest-addr and
dest-mask arguments represent a destination MAC address and mask in H-H-H format.
lsap lsap-type lsap-type-mask: Matches the DSAP and SSAP fields in LLC encapsulation. The
lsap-type argument is a 16-bit hexadecimal number that represents the encapsulation format. The
lsap-type-mask argument is a 16-bit hexadecimal number that represents the LSAP mask.
source-mac sour-addr source-mask: Matches a source MAC address range. The sour-addr argument
represents a source MAC address, and the sour-mask argument represents a mask in H-H-H format.
time-range time-range-name: Specifies a time range for the rule. The time-range-name argument is a
case insensitive string of 1 to 32 characters. It must start with an English letter.
Description
Use the rule command to create or edit an Ethernet frame header ACL rule.
Use the undo rule command to delete an Ethernet frame header ACL rule or some attributes in the rule.
By default, an Ethernet frame header ACL does not contain any rule.
When defining ACL rules, you do not need to assign them IDs; the system can automatically assign rule
IDs starting with 0 and increasing in certain rule numbering steps. A rule ID thus assigned is the smallest
multiple of the step that is bigger than the current biggest number. For example, if the rule numbering
step is 5 and the current highest rule ID is 28, the next rule will be numbered 30.
Before performing the undo rule command to remove an Ethernet frame header ACL rule, you may use
the display acl command to view the ID of the rule.
You cannot create a rule with, or modify a rule to have, the same permit/deny statement as an existing
rule in the ACL.
You can only modify the existing rules of an ACL that uses the match order of config. When modifying a
rule of such an ACL, you may choose to change just some of the settings, in which case the other
settings remain the same.
When the ACL match order is auto, a newly created rule will be inserted among the existing rules in the
depth-first match order. Note that the IDs of the rules still remain the same.
If the ACL match order is auto, rules are displayed in the depth-first match order rather than by rule
number.
For an Ethernet frame header ACL to be referenced by a QoS policy for traffic classification, the lsap
keyword is not supported.
Examples
# Create a rule in ACL 4000 to deny packets with the 802.1p priority of 3.
<Sysname> system-view
[Sysname] acl number 4000
[Sysname-acl-ethernetframe-4000] rule deny cos 3
1-15
rule comment
Syntax
View
Basic ACL view, advanced ACL view, Ethernet frame header ACL view
Default Level
2: System level
Parameters
rule-id: Specifies the ID of an existing ACL rule. The ID ranges from 0 to 65534.
text: Provides a description for the ACL rule, a case sensitive string of 1 to 127 characters.
Description
Use the rule comment command to configure a description for an existing ACL rule or edit its
description for the ease of identification.
Use the undo rule comment command to delete the ACL rule description.
By default, an ACL rule has no rule description.
Related commands: display acl.
Examples
# Create a rule in basic ACL 2000 and configure a description for this rule.
<Sysname> system-view
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule 0 deny source 1.1.1.1 0
[Sysname-acl-basic-2000] rule 0 comment This rule is used on GE1/0/1
step
Syntax
step step-value
undo step
View
Basic ACL view, advanced ACL view, Ethernet frame header ACL view
Default Level
2: System level
Parameters
1-16
Description
Use the step command to set a rule numbering step for an ACL.
Use the undo step command to restore the default.
By default, the rule numbering step is 5.
Related commands: display acl.
Examples
# Set the rule numbering step to 2 for Ethernet frame header ACL 4000.
<Sysname> system-view
[Sysname] acl number 4000
[Sysname-acl-ethernetframe-4000] step 2
time-range
Syntax
time-range time-range-name { start-time to end-time days [ from time1 date1 ] [ to time2 date2 ] | from
time1 date1 [ to time2 date2 ] | to time2 date2 }
undo time-range time-range-name [ start-time to end-time days [ from time1 date1 ] [ to time2 date2 ]
| from time1 date1 [ to time2 date2 ] | to time2 date2 ]
View
System view
Default Level
2: System level
Parameters
time-range-name: Assign a name for a time range. The name is a case insensitive string of 1 to 32
characters. It must start with an English letter and, to avoid confusion, cannot be all.
start-time to end-time: Specifies a periodic time range. Both start-time and end-time are in hh:mm
format (24-hour clock), and each value ranges from 00:00 to 23:59. The end time must be greater than
the start time.
days: Specifies the day or days of the week on which the periodic time range is valid. You may specify
multiple values, in words or in digits, separated by spaces, but make sure that they do not overlap. The
values are ANDed. These values can take one of the following forms:
1-17
z A digit in the range 0 to 6, respectively for Sunday, Monday, Tuesday, Wednesday, Thursday,
Friday, and Saturday.
z A day of a week in words, sun, mon, tue, wed, thu, fri, and sat.
z working-day for Monday through Friday.
z off-day for Saturday and Sunday.
z daily for the whole week.
from time1 date1: Specifies the start time and date of an absolute time range. The time1 argument
specifies the time of the day in hh:mm format (24-hour clock). Its value ranges from 00:00 to 23:59. The
date1 argument specifies a date in MM/DD/YYYY or YYYY/MM/DD format, where MM is the month of
the year in the range 1 to 12, DD is the day of the month with the range depending on MM, and YYYY is
the year in the usual Gregorian calendar in the range 1970 to 2100. If not specified, the start time is the
earliest time available in the system, 01/01/1970 00:00:00 AM.
to time2 date2: Specifies the end time and date of the absolute time range. The time2 argument is in the
same format as that of the time1 argument, but its value ranges from 00:00 to 24:00. The format and
value range of the date2 argument are the same as those of the date1 argument. The end time must be
greater than the start time. If not specified, the end time is the maximum time available in the system,
12/31/2100 24:00:00 PM.
Description
Examples
# Create a periodic time range 11, setting it to be active between 8:00 to 18:00 during working days.
<Sysname> system-view
[Sysname] time-range test 8:00 to 18:00 working-day
1-18
# Create an absolute time range t2, setting it to be active in the whole year of 2010.
<Sysname> system-view
[Sysname] time-range t1 from 0:0 1/1/2010 to 23:59 12/31/2010
# Create a compound time range t3, setting it to be active from 08:00 to 12:00 on Saturdays and
Sundays of the year 2010.
<Sysname> system-view
[Sysname] time-range t3 8:0 to 12:0 off-day from 0:0 1/1/2010 to 23:59 12/31/2010
# Create a compound time range t4, setting it to be active from 10:00 to 12:00 on Mondays and from
14:00 to 16:00 on Wednesdays in the period of January through June of the year 2010.
<Sysname> system-view
[Sysname] time-range t4 10:0 to 12:0 1 from 0:0 1/1/2010 to 23:59 1/31/2010
[Sysname] time-range t4 14:0 to 16:0 3 from 0:0 6/1/2010 to 23:59 6/30/2010
1-19
Table of Contents
i
1 Device Management Commands
Syntax
View
User view
Default Level
2: System level
Parameters
file file-url: Specifies a file name, a string of 1 to 63 characters, If you enter a relative path here, the
system automatically converts it to an absolute path. The absolute path should contain no more than 63
characters; otherwise, the command cannot be successfully executed. The file name is in the format of
[drive:/]file-name, where
z The items in square brackets [ ] are optional.
z drive specifies the storage medium of the file. The value is the name of the storage medium. If a
device has only one storage medium, you can execute this command without providing this
argument.
z file-name specifies the filename, which is usually suffixed by .bin. Suffixes vary with devices.
main: Specifies a file as a main boot file. A main boot file is used to boot a device.
backup: Specifies a file as a backup boot file. A backup boot file is used to boot a device only when a
main boot file is unavailable.
Description
Use the boot-loader command to specify a boot file for the next boot.
Related commands: display boot-loader.
Examples
# Specify the main boot file for the next device boot as test.bin. (The output of this command varies with
devices.)
<Sysname> boot-loader file test.bin main
This command will set the boot file. Continue? [Y/N]:y
The specified file will be used as the main boot file at the next reboot on sl
ot 1!
1-1
bootrom
Syntax
View
User view
Default Level
2: System level
Parameters
update file file-url: Upgrades Boot ROM, where file-url is a string of 1 to 63 characters and represents
name of the file to be upgraded. See boot-loader.
Description
Use the bootrom command to upgrade the Boot ROM program on a device(s).
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Use the bootrom-update security-check enable command to enable the validity check function.
Use the undo bootrom-update security-check enable command to disable the validity check
function.
By default, the validity check function is enabled at the time of upgrading Boot ROM.
1-2
After the validity check function is enabled, the device will strictly check whether the Boot ROM upgrade
files are valid and can match the hardware.
Examples
display boot-loader
Syntax
display boot-loader
View
Any view
Default Level
2: System level
Parameters
None
Description
Use the display boot-loader command to display information of the boot file.
Related commands: boot-loader.
Examples
# Display the file adopted for the current and next boot of the device. (The output of this command
varies with devices.)
<Sysname> display boot-loader
The current boot app is: flash:/test.bin
The main boot app is: flash:/test.bin
The backup boot app is: flash:/test.bin
Field Description
The current boot app is Boot file used for the device for the current device boot
The main boot app is Main boot file used for the next device boot of the device
The backup boot app is Backup boot file used for the next device boot of the device
display cpu-usage
Syntax
1-3
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display cpu-usage command to display the CPU usage statistics.
The system takes statistics of CPU usage at intervals (usually every 60 seconds) and saves the
statistical results in the history record area. The maximum number of records that can be saved
depends on the device model. display cpu-usage entry-number indicates the system displays
entry-number records from the newest (last) record. display cpu-usage entry-number offset indicates
the system displays number records from the last but offset record.
Equivalent to the display cpu-usage 1 0 verbose command, the display cpu-usage command
displays detailed information of the last CPU usage statistics record.
Examples
# Display the last fifth and sixth records of the CPU usage statistics history.
<Sysname> display cpu-usage 2 4
===== CPU usage info (no: 0 idx: 58) =====
CPU Usage Stat. Cycle: 60 (Second)
CPU Usage : 3%
CPU Usage Stat. Time : 2006-07-10 10:56:55
CPU Usage Stat. Tick : 0x1d9d(CPU Tick High) 0x3a659a70(CPU Tick Low)
1-4
Actual Stat. Cycle : 0x0(CPU Tick High) 0x95030517(CPU Tick Low)
Field Description
Unit CPU usage CPU usage statistics
After the device boots, the system calculates and records the average
1% in last 5 seconds CPU usage in every five seconds.
This field displays the average CPU usage in the last five seconds.
After the device boots, the system calculates and records the average
1% in last 1 minute CPU usage in every one minute.
This field displays the average CPU usage in the last minute.
After the device boots, the system calculates and records the average
1% in last 5 minutes CPU usage in every five minutes.
This field displays the average CPU usage in the last five minutes.
Information of CPU usage records (no: The (no+1)th record is currently
displayed. no numbers from 0, a smaller number equals a newer
CPU usage info (no: idx:) record. idx: index of the current record in the history record table). If
only the information of the current record is displayed, no and idx are
not displayed.
CPU usage measurement interval, in seconds. For example, if the
CPU Usage Stat. Cycle value is 41, it indicates that the average CPU usage during the last 41
seconds is calculated. The value range of this field is 1 to 60.
CPU Usage Average CPU usage in a measurement interval, in percentage
CPU usage statistics time in seconds, that is, the system time when the
CPU Usage Stat. Time
command is executed
System runtime in ticks, represented by a 64-bit hexadecimal. CPU
CPU Usage Stat. Tick Tick High represents the most significant 32 bits and the CPU Tick Low
the least significant 32 bits.
Syntax
View
Any view
1-5
Default Level
1: Monitor level
Parameters
task task-id: Displays the history statistics of the CPU usage of the specified task, where task-id
represents the task number. If the task-id argument is not provided, the system displays the history
statistics of the CPU usage of the entire system (the CPU usage of the entire system is the sum of CPU
usages of all tasks).
Description
Use the display cpu-usage history command to display the history statistics of the CPU usage in a
chart.
If no argument is provided, the system displays the CPU usage of the whole system.
The system takes statistics of the CPU usage at an interval and saves the statistical results in the
history record area. You can use the display cpu-usage history command to display the CPU usage
statistics records in the last 60 minutes. The statistical results are displayed through geographical
coordinates. In the output information:
z Latitude indicates the CPU usage, which is displayed based on the step. For example, if the step of
the CPU usage is 5%, then the actual statistics value 53% is displayed as 55%, and actual
statistics value 52% is displayed as 50%.
z Longitude indicates the time.
z Consecutive pond marks (#) indicate the CPU usage at a certain moment. The value of the latitude
corresponding to the # mark on the top of a moment is the CPU usage at this moment.
Examples
1-6
5%| ########
------------------------------------------------------------
10 20 30 40 50 60 (minutes)
cpu-usage last 60 minutes(SYSTEM)
The above output information indicates the CPU usage of the whole system in the last 60 minutes: 5%
in the twelfth minute, 10% in the thirteenth minute, 15% in the fourteenth minute, 10% in the fifteenth
minute, 5% in the sixteenth and seventeenth minute, 10% in the eighteenth minute, 5% in the
nineteenth minute, and 2% or lower than 2% at other times.
# Display the CPU usage statistics of task 6.
<Sysname> display cpu-usage history task 6
100%|
95%|
90%|
85%|
80%|
75%|
70%|
65%|
60%|
55%|
50%|
45%|
40%|
35%|
30%|
25%|
20%|
15%|
10%|
5%| #
------------------------------------------------------------
10 20 30 40 50 60 (minutes)
The above output information indicates the CPU usage of task 6 (with the task name T03M) in the last
60 minutes: 5% in the twentieth minute, and 2% or lower than 2% at other times.
display device
Syntax
1-7
View
Any view
Default Level
2: System level
Parameters
Description
Use the display device command to display information about the device.
Examples
# Display information of the device. (The output of this command varies with devices.)
<Sysname> display device
SubSNo PortNum PCBVer FPGAVer CPLDVer BootRomVer AddrLM Type State
0 52 Ver.B NULL 001 119 IVL LS51LTSS Normal
Field Description
SubSNo Number of the slot in which the subcard resides
PortNum Maximum number of ports that a subcard supports
AddrLM Address learning mode
Card status, which can be the following values:
z Absent: No card is in the slot.
Brd Status z Fault: Error occurred, and the card cannot start normally.
z Normal: The card is an interface card and functions
normally.
Syntax
View
Any view
Default Level
3: Manage level
Parameters
None
Description
Use the display device manuinfo command to display electrical label information about the device.
1-8
Electrical label information is also called permanent configuration data or archive information, which is
written to the storage medium of the device during debugging or test of a device. The information
includes name of the device serial number, and vendor name. This command displays part of the
electrical label information of the device.
Examples
# Display electrical label information. (The output of this command varies with devices.)
DEVICE_NAME : S5120-28P-SI
DEVICE_SERIAL_NUMBER : DPPMWWB123456
MAC_ADDRESS : 000F-E26A-58EA
MANUFACTURING_DATE : 2007-11-10
VENDOR_NAME : H3C
Field Description
DEVICE_NAME Device name
DEVICE_SERIAL_NUMBER Device serial number
display environment
Syntax
display environment
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display environment command to display the temperature information, including the current
temperature and temperature thresholds.
Examples
1-9
Sensor Temperature LowerLimit WarningLimit AlarmLimit ShutdownLimit
hotspot 1 45 NA 85 95 NA
display fan
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
fan-id: Displays the operating state of the specified fan, where fan-id represents the built-in fan number.
Description
Use the display fan command to display the operating state of built-in fans.
Examples
display memory
Syntax
display memory
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display memory command to display the usage of the memory of a device.
Examples
1-10
Used Rate: 16%
Field Description
System Total Memory(bytes) Total size of the system memory (in bytes)
Total Used Memory(bytes) Size of the memory used (in bytes)
Used Rate Percentage of the memory used to the total memory
display power
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display power command to display the PSU information of a device.
Examples
Field Description
Power PSU number
PSU state:
State z Normal
z Absent
z Fault
display reboot-type
Syntax
display reboot-type
1-11
View
Any view
Default Level
2: System level
Parameters
None
Description
Use the display reboot-type command to display the reboot mode of the device.
Examples
The above information indicates that the last reboot mode of the device is Cold boot (cold boot is to
restart a device by powering it on). (The display of Warm represents a warm boot, which means to
restart a device by using the commands like reboot).
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display schedule job command to display the detailed configurations of the scheduled
automatic execution function.
Examples
# Display the detailed configurations of the current scheduled automatic execution function.
<Sysname> display schedule job
Specified command: execute 1.bat
Specified view: system view
Executed time: at 12:00 10/31/2007 (in 0 hours and 16 minutes)
1-12
If you modify the system time within 16 minutes, the configurations of scheduled automatic execution of
the batch file will become invalid, and then when you execute the display schedule job command
again, the system displays nothing.
Syntax
View
Any view
Default Level
3: Manage level
Parameters
None
Description
Use the display schedule reboot command to display the device reboot time set by the user.
Related commands: schedule reboot at and schedule reboot delay.
Examples
The above information indicates the system will reboot at 16:00:00 on March 10, 2006 (in two hours and
five minutes).
display system-failure
Syntax
display system-failure
View
Any view
Default Level
3: Manage level
Parameters
None
Description
Use the display system-failure command to display the exception handling method.
Related commands: system-failure.
1-13
Examples
Syntax
View
Any view
Default Level
2: System level
Parameters
interface [ interface-type interface-number ]: Displays the current alarm information of the pluggable
transceiver plugged in the specified interface. interface-type interface-number represents interface type
and interface number. If it is not specified, the command displays the current alarm information of the
pluggable transceiver in all the interfaces.
Description
Use the display transceiver alarm command to display the current alarm information of a single or all
transceivers.
If no error occurs, None is displayed.
Table 1-7 shows the alarm information that may occur for the four types of commonly used transceivers.
Field Remarks
GBIC/SFP
RX loss of signal Incoming (RX) signal is lost.
RX power high Incoming (RX) power level is high.
RX power low Incoming (RX) power level is low.
TX fault Transmit (TX) fault
1-14
Field Remarks
Voltage low Voltage is low.
Transceiver info I/O error Transceiver information read and write error
Transceiver info checksum error Transceiver information checksum error
1-15
Field Remarks
PMA/PMD (Physical Medium Attachment/Physical
PMA/PMD receiver local fault
Medium Dependent) receiver local fault
PCS receive local fault PCS (Physical Coding Sublayer) receiver local fault
PHY XS receive local fault PHY XS (PHY Extended Sublayer) receive local fault
RX power high RX power is high.
Examples
# Display the alarm information of the pluggable transceiver plugged in interface GigabitEthernet1/0/25.
(The output of this command varies with devices.)
<Sysname> display transceiver alarm interface GigabitEthernet1/0/25
GigabitEthernet1/0/25 transceiver current alarm information:
RX loss of signal
RX power low
Field Description
transceiver current alarm information Current alarm information of the transceiver
RX loss of signal Incoming (RX) signal is lost.
1-16
Field Description
RX power low Incoming (RX) power level is low.
Syntax
View
Any view
Default Level
2: System level
Parameters
interface [ interface-type interface-number ]: Displays the currently measured value of digital diagnosis
parameters of the H3C customized anti-spoofing pluggable optical transceiver plugged in the specified
interface. interface-type interface-number represents interface type and interface number. If it is not
specified, the command displays the currently measured value of digital diagnosis parameters of H3C
customized anti-spoofing pluggable optical transceivers in all the interfaces.
Description
Use the display transceiver diagnosis command to display the currently measured value of digital
diagnosis parameters of H3C customized anti-spoofing pluggable optical transceivers.
Examples
# Display the currently measured value of the digital diagnosis parameters of the H3C customized
anti-spoofing pluggable optical transceiver plugged in interface GigabitEthernet1/0/25. (The output of
this command varies with devices.)
<Sysname> display transceiver diagnosis interface GigabitEthernet1/0/25
GigabitEthernet1/0/25 transceiver diagnostic information:
Current diagnostic parameters:
Temp(°C) Voltage(V) Bias(mA) RX power(dBM) TX power(dBM)
36 3.31 6.13 -35.64 -5.19
Field Description
Digital diagnosis information of the transceiver
transceiver diagnostic information
plugged in the interface
Current diagnostic parameters Current diagnostic parameters
Digital diagnosis parameter-temperature, in °C, with
Temp.(°C)
the precision to 1°C.
Digital diagnosis parameter-voltage, in V, with the
Voltage(V)
precision to 0.01 V.
1-17
Field Description
Digital diagnosis parameter-bias current, in mA, with
Bias(mA)
the precision to 0.01 mA.
Digital diagnosis parameter-RX power, in dBM, with
RX power(dBM)
the precision to 0.01 dBM.
Digital diagnosis parameter-TX power, in dBM, with
TX power(dBM)
the precision to 0.01 dBM.
display transceiver
Syntax
View
Any view
Default Level
2: System level
Parameters
Description
Use the display transceiver command to display main parameters of a single or all pluggable
transceivers.
Examples
Field Description
transceiver information Pluggable transceiver information
1-18
Field Description
Transceiver Type Pluggable transceiver type
Type of the connectors of the transceiver:
z Optical connectors, including SC (SC connector,
Connector Type developed by NTT) and LC (LC connector, 1.25
mm/RJ-45 optical connector developed by Lucent).
z Other connectors, including RJ-45 and CX 4.
z Optical transceiver: central wavelength of the laser
sent, in nm. If the transceiver supports multiple
Wavelength(nm) wavelengths, every two wavelength values are
separated by a comma.
z Electrical transceiver: displayed as N/A.
Transfer distance, with xx representing km for single-mode
transceivers and m for other transceivers. If the transceiver
supports multiple transfer medium, every two values of the
transfer distance are separated by a comma. The
corresponding transfer medium is included in the bracket
following the transfer distance value. The following are the
Transfer distance(xx) transfer media:
z 9 um: 9/125 um single-mode fiber
z 50 um: 50/125 um multi-mode fiber
z 62.5 um: 62.5/125 um multi-mode fiber
z TP: Twisted pair
z CX4: CX4 cable
Whether the digital diagnosis function is supported, where:
Digital Diagnostic Monitoring z YES: supported
z NO: not supported
Vendor name or name of the vendor who customizes the
transceiver:
Vendor Name z H3C customized anti-spoofing transceiver: H3C is
displayed.
z Other transceivers: The vendor name is displayed.
Ordering Name Pluggable transceiver model
Syntax
View
Any view
Default Level
2: System level
Parameters
interface [ interface-type interface-number ]: Displays part of the electrical label information of the H3C
customized anti-spoofing pluggable transceiver plugged in the specified interface. interface-type
interface-number represents interface type and interface number. If it is not specified, the command
1-19
displays part of the electrical label information of the H3C customized anti-spoofing pluggable
transceiver(s) in all the interfaces.
Description
Use the display transceiver manuinfo command to display part of the electrical label information of a
single or all H3C customized anti-spoofing pluggable transceivers.
Examples
# Display the electrical label information of the H3C customized anti-spoofing pluggable transceiver
plugged in interface GigabitEthernet1/0/25. (The output of this command varies with devices.)
<Sysname> display transceiver manuinfo interface GigabitEthernet1/0/25
GigabitEthernet1/0/25 transceiver manufacture information:
Manu. Serial Number : 213410A0000054000251
Manufacturing Date : 2006-09-01
Vendor Name : H3C
Field Description
Serial number generated during debugging and testing of
Manu. Serial Number
the customized transceivers
Debugging and testing date. The date takes the value of
Manufacturing Date the system clock of the computer that performs debugging
and testing.
Name of the vendor who customizes the transceiver, that
Vendor Name
is, H3C.
reboot
Syntax
reboot
View
User view
Default Level
2: System level
Parameters
None
Description
1-20
z Device reboot may result in the interruption of the ongoing services. Use these commands with
caution.
z If a main boot file fails or does not exist, the device cannot be rebooted with the reboot command.
In this case, you can re-specify a main boot file to reboot the device, or you can power off the
device, then power it on and the system automatically uses the backup boot file to restart the
device.
z If you are performing file operations when the device is to be rebooted, the system does not
execute the command for the sake of security.
Examples
Syntax
View
User view
Default Level
1: Monitor level
Parameters
None
Description
Use the reset unused porttag command to clear the 16-bit index saved but not used in the current
system.
Examples
# Clear the 16-bit index saved but not used in the current system.
1-21
<Sysname> reset unused porttag
Current operation will delete all unused port tag(s). Continue? [Y/N]:y
<Sysname>
schedule job
Syntax
View
User view
Default Level
3: Manage level
Parameters
Description
Use the schedule job command to automatically execute a specified command at the scheduled time.
Use the undo schedule job command to remove the configuration.
Note the following:
z If you provide both the time1 and date arguments, the execution time must be a future time.
z If you only provide the time1 argument, when time1 is earlier than the current system time, the
specified command is executed at time1 of the next day; when time1 is later than the current
system time, the specified command is executed at time1 of the current day.
z No matter whether you use the at or delay keyword, the difference between the execution time of a
command and the current system time cannot exceed 720 hours (namely, 30 days).
1-22
z At present, you can specify only user view and system view. To automatically execute the specified
commands in other views or automatically execute multiple commands at a time, you can configure
the system to automatically execute a batch file at a specified time (note that you must provide a
complete file path for the system to execute the batch file.).
z The system does not check the view and command arguments. Therefore, ensure the correctness
of the command argument (including the correct format of command and the correct relationship
between the command and view arguments.).
z After the specified automatic execution time is reached, the system executes the specified
commands without displaying any information except system information such as log, trap and
debug.
z When the system is executing the specified command, you do not need to input any information. If
there is information for you to confirm, the system automatically inputs Y or Yes; if certain
characters need to be input, the system automatically inputs a default character string, and inputs
an empty character string when there is no default character string.
z For the commands used to switch user interfaces, such as telnet, ftp, and ssh2, the commands
used to switch views, such as system-view, quit and interface ethernet, and the commands used
to modify status of the user that is executing commands, such as super, the operation interface,
command view and status of the current user are not changed after the automatic execution
function is performed.
z If you modify the system time after the automatic execution function is configured, the scheduled
automatic execution configuration turns invalid automatically.
z Only the latest configuration takes effect if you execute the schedule job command repeatedly.
Examples
# Configure that the device will execute the batch file 1.bat in system view in 60 minutes (supposing that
the current time is 11:43).
<Sysname> schedule job delay 60 view system execute 1.bat
Info: Command execute 1.bat in system view will be executed at 12:43 10/31/2007 (in 1 hours
and 0 minutes).
# Configure that the device will execute the batch file 1.bat in system view at 12:00 in the current day
(supposing that the current time is 11:43).
<Sysname> schedule job at 12:00 view system execute 1.bat
Info: Command execute 1.bat in system view will be executed at 12:00 10/31/2007 (in 0 hours
and 16 minutes).
schedule reboot at
Syntax
View
User view
Default Level
3: Manage level
1-23
Parameters
hh:mm: Reboot time of a device, in the format of hh:mm (hours:minutes). The value of the hh argument
ranges from 0 to 23, and the value of the mm argument ranges from 0 to 59.
date: Reboot date of a device, in the format mm/dd/yyyy (month/day/year) or in the format yyyy/mm/dd
(year/month/day) The yyyy value ranges from 2000 to 2035, the mm value ranges from 1 to 12, and the
dd value depends on a specific month.
Description
Use the schedule reboot at command to enable the scheduled reboot function and specify a specific
reboot time and date.
By default, the scheduled reboot function is disabled.
There are two cases if no specific reboot date is specified:
z When the specified reboot time is later than the current time, the device will be rebooted at the
reboot time of the current day.
z When the specified reboot time is earlier than the current time, the device will be rebooted at the
reboot time the next day.
z If you are performing file operations when the device is to be rebooted, the system does not
execute the command for the sake of security.
Note that:
z The precision of the device timer is 1 minute. One minute before the reboot time, the device will
prompt “REBOOT IN ONE MINUTE” and will be rebooted in one minute.
z The difference between the reboot date and the current date cannot exceed 30 x 24 hours (namely,
30 days).
z After you execute the above command, the device will prompt you to confirm the configuration. You
must enter Y or y to make the configuration take effect. The original configuration will be
overwritten at the same time.
z If a date (month/day/year or year/month/day) later than the current date is specified for the
schedule reboot at command, the device will be rebooted at the reboot time.
z If you use the clock command after the schedule reboot at command to adjust the system time,
the reboot time set by the schedule reboot at command will become invalid.
This command reboots the device in a future time, thus resulting in service interruption. Please use it
with caution.
Examples
# Configure the device to reboot at 12:00 AM (supposing that the current time is 11:43).
<Sysname> schedule reboot at 12:00
Reboot system at 12:00 06/06/2006(in 0 hour(s) and 16 minute(s))
confirm? [Y/N]:
1-24
# If you have used the terminal logging command to enable the log display function on the terminal
before setting a reboot time, the system will automatically display related log information after you enter
<y>. By default, the log display function is enabled.
<Sysname>
%Jun 6 11:43:11:629 2006 Sysname CMD/4/REBOOT:
vty0(192.168.1.54): Set schedule reboot parameters at 11:43:11 06/06/2006, and system will
reboot at 12:00 06/06/2006.
Syntax
View
User view
Default Level
3: Manage level
Parameters
hh:mm: Device reboot wait time, in the format of hh:mm (hours:minutes). The value of the hh argument
ranges from 0 to 720, and the value of the mm argument ranges from 0 to 59, and the value of the
hh:mm argument cannot exceed 720:00.
mm: Device reboot wait time in minutes, in the range of 0 to 43,200.
Description
Use the schedule reboot delay command to enable the scheduled reboot function and set a reboot
wait time.
By default, the scheduled reboot function is disabled.
Note that:
z The reboot wait time can be in the format of hh:mm (hours:minutes) or mm (absolute minutes). The
absolute minutes cannot exceed 30 x 24 x 60 minutes, namely, 30 days.
z The precision of the device timer is 1 minute. One minute before the reboot time, the device will
prompt “REBOOT IN ONE MINUTE” and will be rebooted in one minute.
z After you execute the above command, the device will prompt you to confirm the configuration. You
must enter <Y> or <y> to make the configuration take effect. The original configuration will be
overwritten at the same time.
z If you use the clock command after the schedule reboot delay command to adjust the system
time, the reboot wait time set by the schedule reboot delay command will become invalid.
z If you are performing file operations when the device is to be rebooted, the system does not
execute the command for the sake of security.
1-25
This command reboots the device after the specified delay time, thus resulting in service interruption.
Please use it with caution.
Examples
# Configure the device to reboot in 88 minutes (supposing the current time is 11:48).
<Sysname> schedule reboot delay 88
Reboot system at 13:16 06/06/2006(in 1 hour(s) and 28 minute(s)). confirm? [Y/N]:
# If you have used the terminal logging command to enable the log display function on the terminal
before setting a reboot time, the system will automatically display related log information after you enter
y. By default, the log display function is enabled on the terminal.
<Sysname>
%Jun 6 11:48:44:860 2006 Sysname CMD/4/REBOOT:
vty0(192.168.1.54): Set schedule reboot parameters at 11:48:44 06/06/2006, and system will
reboot at 13:16 06/06/2006.
system-failure
Syntax
View
System view
Default Level
3: Manage level
Parameters
maintain: Specifies that when the system detects any software abnormality, it maintains the current
situation, and does not take any measure to recover itself.
reboot: Specifies that when the system detects any software abnormality, it recovers itself through
automatic reboot.
Description
Examples
1-26
1-27
Table of Contents
i
1 NTP Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
verbose: Displays the detailed information of all NTP sessions. If you do not specify this keyword, only
the brief information of the NTP sessions will be displayed.
Description
Use the display ntp-service sessions command to view the information of all NTP sessions.
Examples
1-1
Table 1-1 display ntp-service sessions command output description
Field Description
source IP address of the clock source
Reference clock ID of the clock source
1) If the reference clock is the local clock, the value of this
field is related to the value of the stra field:
z When the value of the stra field is 0 or 1, this field will be
reference “LOCL”;
z When the stra field has another value, this filed will be the
IP address of the local clock.
2) If the reference clock is the clock of another device on
the network, the value of this field will be the IP address
of that device.
Stratum level of the clock source, which determines the clock
precision. The value range is 1 to 16. The clock precision
stra decreases from stratum 1 to stratum 16. A stratum 1 clock
has the highest precision, and a stratum 16 clock is not
synchronized.
Reachability count of the clock source. 0 indicates that the
reach
clock source in unreachable.
Poll interval in seconds, namely, the maximum interval
poll
between successive NTP messages.
The length of time from when the last NTP message was
received or when the local clock was last updated to the
current time
now
The time is in second by default. If the time length is greater
than 2048 seconds, it is displayed in minute; if greater than
300 minutes, in hour; if greater than 96 hours, in day.
The offset of the system clock relative to the reference clock,
offset
in milliseconds
the roundtrip delay from the local device to the clock source,
delay
in milliseconds
The maximum error of the system clock relative to the
disper
reference source.
1-2
local mode: client, local poll: 6
peer mode: server, peer poll: 6
offset: 0.0000 ms,delay: 0.00 ms, disper: 0.02 ms
root delay: 0.00 ms, root disper: 10.00 ms
reach: 1, sync dist: 0.010, sync state: 2
precision: 2^18, version: 3, peer interface: InLoopBack0
reftime: 10:56:22.442 UTC Aug 7 2009(CE2686D6.71484513)
orgtime: 10:56:22.442 UTC Aug 7 2009(CE2686D6.71484513)
rcvtime: 10:56:22.442 UTC Aug 7 2009(CE2686D6.7149E881)
xmttime: 10:56:22.442 UTC Aug 7 2009(CE2686D6.71464DC2)
filter delay : 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
filter offset: 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
filter disper: 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Total associations : 1
Field Description
clock source IP address of the clock source
Stratum level of the clock source, which determines the clock
precision. The value range is 1 to 16. The clock precision
clock stratum decreases from stratum 1 to stratum 16. A stratum 1 clock
has the highest precision, and a stratum 16 clock is not
synchronized.
Status of the clock source corresponding to this session,
including
z configured: The session was created by a configuration
command.
z dynamic: This session is established dynamically.
z master: The clock source is the primary reference source
of the current system.
z selected: The clock source has survived the clock
selection algorithm.
z candidate: The clock source is the candidate reference
source.
clock status z sane: The clock source has passed the sane
authentication.
z insane: The clock source has failed the sane
authentication.
z valid: The clock source is valid, which means the clock
source meet the following requirements: it has passed the
authentication and is being synchronized; its stratum level
is valid; its root delay and root dispersion values are within
their ranges.
z invalid: The clock source is invalid.
z unsynced: The clock source has not been synchronized
or the value of the stratum level is invalid.
1-3
Field Description
Reference clock ID of the clock source
1) If the reference clock is the local clock, the value of this
field is related to the stratum level of the clock source:
z When the stratum level of the clock source is 0 or 1, this
reference clock ID field will be “LOCL”;
z When the stratum level of the clock source has another
value, this field will be the IP address of the local clock.
2) If the reference clock is the clock of another device on
the network, the value of this field will be the IP address
of that device.
Operation mode of the local device, including
z unspec: The mode is unspecified.
z active: Active mode.
z passive: Passive mode.
local mode z client: Client mode.
z server: Server mode.
z bdcast: Broadcast server mode.
z control: Control query mode.
z private: Private message mode.
Poll interval of the local device, in seconds. The value
displayed is a power of 2, for example, if the displayed value
local poll 6
is 6, it indicates that the poll interval of the local device is 2 ,
that is, 64 seconds.
Operation mode of the peer device, including
z unspec: The mode is unspecified.
z active: Active mode.
z passive: Passive mode.
peer mode z client: Client mode.
z server: Server mode.
z bdcast: Broadcast server mode.
z control: Control query mode.
z private: Private message mode.
Poll interval of the peer device, in seconds. The value
displayed is a power of 2, for example, if the displayed value
peer poll 6
is 6, it indicates that the poll interval of the local device is 2 ,
that is, 64 seconds.
The offset of the system clock relative to the reference clock,
offset
in milliseconds
The roundtrip delay from the local device to the clock source,
delay
in milliseconds
The maximum error of the system clock relative to the
disper
reference clock
The roundtrip delay from the local device to the primary
root delay
reference source, in milliseconds
The maximum error of the system clock relative to the
root disper
primary reference clock, in milliseconds
Reachability count of the clock source. 0 indicates that the
reach
clock source is unreachable.
The synchronization distance relative to the upper-level
sync dist clock, in seconds, and calculated from dispersion and
roundtrip delay values.
1-4
Field Description
State of the state machine
sync state
The displayed value is an integral that ranges from 0 to 5.
precision Precision of the system clock
NTP version
version
The displayed value is an integral that ranges from 1 to 3.
Source interface
peer interface If the source interface is not specified, this field will be
wildcard.
reftime Reference timestamp in the NTP message
orgtime Originate timestamp in the NTP message
rcvtime Receive timestamp in the NTP message
xmttime Transmit timestamp in the NTP message
filter delay Delay information
filter offset Offset information
When a device is working in the NTP broadcast/multicast server mode, the display ntp-service
sessions command executed on the device will not display the NTP session information corresponding
to the broadcast/multicast server, but the sessions will be counted in the total number of associations.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display ntp-service status command to view the NTP service status information.
1-5
Examples
Field Description
Status of the system clock, including
z Synchronized: The system clock has been
Clock status synchronized.
z Unsynchronized: The system clock has not been
synchronized.
Clock stratum Stratum level of the system clock
After the system clock is synchronized to a remote time
server, this field indicates the address of the remote time
server; after the system clock is synchronized to a local
reference source, this field indicates the address of the
Reference clock ID local clock source:
z When the local clock has a stratum level of 1, the value
of this field is “LOCL”;
z When the stratum of the local clock has another value,
the value of this filed is the IP address of the local clock.
The nominal frequency of the local system hardware clock,
Nominal frequency
in Hz
The actual frequency of the local system hardware clock,
Actual frequency
in Hz
Clock precision The precision of the system clock
The offset of the system clock relative to the reference
Clock offset
source, in milliseconds
The roundtrip delay from the local device to the primary
Root delay
reference source, in milliseconds
The maximum error of the system clock relative to the
Root dispersion
primary reference source, in milliseconds
The maximum error of the system clock relative to the
Peer dispersion
reference source, in milliseconds
Reference time Reference timestamp
1-6
display ntp-service trace
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display ntp-service trace command view the brief information of each NTP server along the
NTP server chain from the local device back to the primary reference source.
The display ntp-service trace command takes effect only if routes are available between the local
device and all the devices on the NTP server chain; otherwise, this command will fail to display all the
NTP servers on the NTP chain due to timeout.
Examples
# View the brief information of each NTP server from the local device back to the primary reference
source.
<Sysname> display ntp-service trace
server 127.0.0.1,stratum 2, offset -0.013500, synch distance 0.03154
server 133.1.1.1,stratum 1, offset -0.506500, synch distance 0.03429
refid LOCL
The information above shows an NTP server chain for the server 127.0.0.1: The server 127.0.0.1 is
synchronized to the server 133.1.1.1, and the server 133.1.1.1 is synchronized to the local clock
source.
Field Description
server IP address of the NTP server
1-7
ntp-service access
Syntax
View
System view
Default Level
2: System level
Parameters
peer: Specifies to permit full access. This level of right permits the peer devices to perform
synchronization and control query to the local device and also permits the local device to synchronize
its clock to that of a peer device. Control query refers to query of NTP status information, such as alarm
information, authentication status, and clock source information.
query: Specifies to permit control query. This level of right permits the peer devices to perform control
query to the NTP service on the local device but does not permit a peer device to synchronize its clock
to that of the local device.
server: Specifies to permit server access and query. This level of right permits the peer devices to
perform synchronization and control query to the local device but does not permit the local device to
synchronize its clock to that of a peer device.
synchronization: Specifies to permit server access only. This level of right permits a peer device to
synchronize its clock to that of the local device but does not permit the peer devices to perform control
query.
acl-number: Basic ACL number, in the range of 2000 to 2999
Description
Use the ntp-service access command to configure the access-control right for the peer devices to
access the NTP services of the local device.
Use the undo ntp-service access command to remove the configured NTP service access-control
right to the local device.
By default, the access-control right for the peer devices to access the NTP services of the local device is
set to peer.
From the highest NTP service access-control right to the lowest one are peer, server,
synchronization, and query. When a device receives an NTP request, it will match against the
access-control right in this order and will use the first matched right.
Note that:
z The ntp-service access command provides only a minimum degree of security protection. A more
secure method is identity authentication. The related command is ntp-service authentication
enable.
z Before specifying an ACL number in the ntp-service access command, make sure you have
already created and configured this ACL.
1-8
Examples
# Configure the peer devices on subnet 10.10.0.0/16 to have the full access right to the local device.
<Sysname> system-view
[Sysname] acl number 2001
[Sysname-acl-basic-2001] rule permit source 10.10.0.0 0.0.255.255
[Sysname-acl-basic-2001] quit
[Sysname] ntp-service access peer 2001
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Examples
ntp-service authentication-keyid
Syntax
View
System view
Default Level
2: System level
1-9
Parameters
Description
Use the ntp-service authentication-keyid command to set the NTP authentication key.
Use the undo ntp-service authentication-keyid command to remove the set NTP authentication key.
By default, no NTP authentication key is set.
In a network where there is a high security demand, the NTP authentication feature should be enabled
for a system running NTP. This feature enhances the network security by means of the client-server key
authentication, which prohibits a client from synchronizing with a device that has failed authentication.
After the NTP authentication key is configured, you need to configure the key as a trusted key by using
the ntp-service reliable authentication-keyid command.
z Presently the system supports only the MD5 algorithm for key authentication.
z You can set a maximum of 1,024 keys for each device.
z If an NTP authentication key is specified as a trusted key, the key automatically changes to
untrusted after you delete the key. In this case, you do not need to execute the undo ntp-service
reliable authentication-keyid command.
Examples
# Set an MD5 authentication key, with the key ID of 10 and key value of BetterKey.
<Sysname> system-view
[Sysname] ntp-service authentication enable
[Sysname] ntp-service authentication-keyid 10 authentication-mode md5 BetterKey
ntp-service broadcast-client
Syntax
ntp-service broadcast-client
undo ntp-service broadcast-client
View
Interface view
Default Level
2: System level
1-10
Parameters
None
Description
Use the ntp-service broadcast-client command to configure the device to work in the NTP broadcast
client mode and use the current interface to receive NTP broadcast packets.
Use the undo ntp-service broadcast-client command to remove the configuration.
By default, the device does not work in any NTP operation mode.
Examples
# Configure the device to work in the broadcast client mode and receive NTP broadcast messages on
VLAN-interface 1.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ntp-service broadcast-client
ntp-service broadcast-server
Syntax
View
Interface view
Default Level
2: System level
Parameters
authentication-keyid keyid: Specifies the key ID to be used for sending broadcast messages to
broadcast clients, where keyid is in the range of 1 to 4294967295. This parameter is not meaningful if
authentication is not required.
version number: Specifies the NTP version, where number is in the range of 1 to 3 and defaults to 3.
Description
Use the ntp-service broadcast-server command to configure the device to work in the NTP broadcast
server mode and use the current interface to send NTP broadcast packets.
Use the undo ntp-service broadcast-server command to remove the configuration.
By default, the device does not work in any NTP operation mode.
Examples
# Configure the device to work in the broadcast server mode and send NTP broadcast messages on
VLAN-interface 1, using key 4 for encryption, and set the NTP version to 3.
<Sysname> system-view
[Sysname] interface vlan-interface 1
1-11
[Sysname-Vlan-interface1] ntp-service broadcast-server authentication-keyid 4 version 3
Syntax
View
Interface view
Default Level
2: System level
Parameters
None
Description
Use the ntp-service in-interface disable command to disable an interface from receiving NTP
messages.
Use the undo ntp-service in-interface disable command to restore the default.
By default, all interfaces are enabled to receive NTP messages.
Examples
ntp-service max-dynamic-sessions
Syntax
View
System view
Default Level
2: System level
Parameters
number: Maximum number of dynamic NTP sessions that are allowed to be established, in the range of
0 to 100.
1-12
Description
Use the ntp-service max-dynamic-sessions command to set the maximum number of dynamic NTP
sessions that are allowed to be established locally.
Use the undo ntp-service max-dynamic-sessions command to restore the maximum number of
dynamic NTP sessions to the system default.
By default, the number is 100.
A single device can have a maximum of 128 associations at the same time, including static associations
and dynamic associations. A static association refers to an association that a user has manually created
by using an NTP command, while a dynamic association is a temporary association created by the
system during operation. A dynamic association will be removed if the system fails to receive messages
from it over a specific long time. In the client/server mode, for example, when you carry out a command
to synchronize the time to a server, the system will create a static association, and the server will just
respond passively upon the receipt of a message, rather than creating an association (static or
dynamic). In the symmetric mode, static associations will be created at the symmetric-active peer side,
and dynamic associations will be created at the symmetric-passive peer side; in the broadcast or
multicast mode, static associations will be created at the server side, and dynamic associations will be
created at the client side.
Examples
# Set the maximum number of dynamic NTP sessions allowed to be established to 50.
<Sysname> system-view
[Sysname] ntp-service max-dynamic-sessions 50
ntp-service multicast-client
Syntax
View
Interface view
Default Level
2: System level
Parameters
Description
Use the ntp-service multicast-client command to configure the device to work in the NTP multicast
client mode and use the current interface to receive NTP multicast packets.
Use the undo ntp-service multicast-client command to remove the configuration.
By default, the device does not work in any NTP operation mode.
1-13
Examples
# Configure the device to work in the multicast client mode and receive NTP multicast messages on
VLAN-interface 1, and set the multicast address to 224.0.1.1.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ntp-service multicast-client 224.0.1.1
ntp-service multicast-server
Syntax
View
Interface view
Default Level
2: System level
Parameters
Description
Use the ntp-service multicast-server command to configure the device to work in the NTP multicast
server mode and use the current interface to send NTP multicast packets.
Use the undo ntp-service multicast-server command to remove the configuration.
By default, the device does not work in any NTP operation mode.
Examples
# Configure the device to work in the multicast server mode and send NTP multicast messages on
VLAN-interface 1 to the multicast address 224.0.1.1, using key 4 for encryption, and set the NTP
version to 3.
<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] ntp-service multicast-server 224.0.1.1 version 3
authentication-keyid 4
1-14
ntp-service reliable authentication-keyid
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the ntp-service reliable authentication-keyid command to specify that the created
authentication key is a trusted key. When NTP authentication is enabled, a client can be synchronized
only to a server that can provide a trusted authentication key.
Use the undo ntp-service reliable authentication-keyid command to remove the configuration.
No authentication key is configured to be trusted by default.
Examples
# Enable NTP authentication, specify to use MD5 encryption algorithm, with the key ID of 37 and key
value of BetterKey.
<Sysname> system-view
[Sysname] ntp-service authentication enable
[Sysname] ntp-service authentication-keyid 37 authentication-mode md5 BetterKey
ntp-service source-interface
Syntax
View
System view
Default Level
2: System level
Parameters
interface-type interface-number: Specifies an interface by its interface type and interface number.
1-15
Description
Use the ntp-service source-interface command to specify the source interface for NTP messages.
Use the undo ntp-service source-interface command to restore the default.
By default, no source interface is specified for NTP messages, and the system uses the IP address of
the interface determined by the matched route as the source IP address of NTP messages.
If you do not wish the IP address of a certain interface on the local device to become the destination
address of response messages, you can use this command to specify the source interface for NTP
messages, so that the source IP address in NTP messages is the primary IP address of this interface.
Examples
ntp-service unicast-peer
Syntax
View
System view
Default Level
2: System level
Parameters
ip-address: IP address of the symmetric-passive peer. It must be a unicast address, rather than a
broadcast address, a multicast address or the IP address of the local clock.
peer-name: Host name of the symmetric-passive peer, a string of 1 to 20 characters.
authentication-keyid keyid: Specifies the key ID to be used for sending NTP messages to the peer,
where keyid is in the range of 1 to 4294967295.
priority: Specifies the peer designated by ip-address or peer-name as the first choice under the same
condition.
source-interface interface-type interface-number: Specifies the source interface for NTP messages. In
an NTP message the local device sends to its peer, the source IP address is the primary IP address of
this interface. interface-type interface-number represents the interface type and number.
version number: Specifies the NTP version, where number is in the range of 1 to 3 and defaults to 3.
Description
Use the ntp-service unicast-peer command to designate a symmetric-passive peer for the device.
Use the undo ntp-service unicast-peer command to remove the symmetric-passive peer designated
for the device.
1-16
No symmetric-passive peer is designated for the device by default.
Examples
# Designate the device with the IP address of 10.1.1.1 as the symmetric-passive peer of the device,
configure the device to run NTP version 3, and specify the source interface of NTP messages as
VLAN-interface 1.
<Sysname> system-view
[Sysname] ntp-service unicast-peer 10.1.1.1 version 3 source-interface vlan-interface 1
ntp-service unicast-server
Syntax
View
System view
Default Level
2: System level
Parameters
ip-address: IP address of the NTP server. It must be a unicast address, rather than a broadcast address,
a multicast address or the IP address of the local clock.
server-name: Host name of the NTP server, a string of 1 to 20 characters.
authentication-keyid keyid: Specifies the key ID to be used for sending NTP messages to the NTP
server, where keyid is in the range of 1 to 4294967295.
priority: Specifies this NTP server as the first choice under the same condition.
source-interface interface-type interface-number: Specifies the source interface for NTP messages. In
an NTP message the local device sends to the NTP server, the source IP address is the primary IP
address of this interface. interface-type interface-number represents the interface type and number.
version number: Specifies the NTP version, where number is in the range of 1 to 3 and defaults to 3.
Description
Use the ntp-service unicast-server command to designate an NTP server for the device.
Use the undo ntp-service unicast-server command to remove an NTP server designated for the
device.
No NTP server is designated for the device by default.
Examples
# Designate NTP server 10.1.1.1 for the device, and configure the device to run NTP version 3.
<Sysname> system-view
[Sysname] ntp-service unicast-server 10.1.1.1 version 3
1-17
Table of Contents
i
1 SNMP Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display snmp-agent community command to display community information for SNMPv1 or
SNMPv2c.
Examples
# Display the information of all the communities that have been configured.
<Sysname> display snmp-agent community
Community name: aa
Group name: aa
Acl:2001
Storage-type: nonVolatile
Community name: bb
Group name: bb
Storage-type: nonVolatile
1-1
Table 1-1 display snmp-agent community command output description
Field Description
Community name.
z If a community name is created by using the snmp-agent
community command, the community name will be
Community name displayed.
z If a community name is created by using the snmp-agent
usm-user { v1 | v2c } command, the user name will be
displayed.
SNMP group name.
z If a community name is created by using the snmp-agent
community command, the group name and the community
Group name name are the same, which means the community name will
be displayed.
z If a community name is created by using the snmp-agent
usm-user { v1 | v2c } command, the name of the group to
which the user belongs will be displayed.
The number of the ACL in use.
Acl After an ACL is configured, only the Network Management
Station (NMS) with the IP address that matches the ACL rule
can access the device.
Storage type, which could be:
z volatile: Information will be lost if the system is rebooted
z nonVolatile: Information will not be lost if the system is
rebooted
Storage-type z permanent: Information will not be lost if the system is
rebooted. Modification is permitted, but deletion is forbidden
z readOnly: Information will not be lost if the system is
rebooted. Read only, that is, no modification, no deletion
z other: Other storage types
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
group-name: Specifies the SNMP group name, a string of 1 to 32 characters, case sensitive.
Description
Use the display snmp-agent group command to display information for the SNMPv3 agent group,
including group name, security model, MIB view, storage type, and so on. Absence of the group-name
parameter indicates that information for all groups will be displayed.
1-2
Examples
Field Description
Group name SNMP group name
Security model of the SNMP group, which can be: authPriv
(authentication with privacy), authNoPriv (authentication
Security model
without privacy), or noAuthNoPriv (no authentication no
privacy).
Readview The read only MIB view associated with the SNMP group
Writeview The writable MIB view associated with the SNMP group
The notify MIB view associated with the SNMP group, the
Notifyview
view with entries that can generate traps
Storage type, which includes: volatile, nonVolatile,
Storage-type permanent, readOnly, and other. For detailed information,
refer to Table 1-1.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display snmp-agent local-engineid command to display the local SNMP agent engine ID.
SNMP engine ID identifies an SNMP entity uniquely within an SNMP domain. SNMP engine is an
indispensable part of an SNMP entity. It provides the SNMP message allocation, message handling,
authentication, and access control.
1-3
Examples
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display snmp-agent mib-view command to display MIB view information. Absence of
parameters indicates that information for all MIB views will be displayed.
Examples
View name:ViewDefault
MIB Subtree:snmpUsmMIB
Subtree mask:
Storage-type: nonVolatile
View Type:excluded
View status:active
View name:ViewDefault
MIB Subtree:snmpVacmMIB
Subtree mask:
1-4
Storage-type: nonVolatile
View Type:excluded
View status:active
View name:ViewDefault
MIB Subtree:snmpModules.18
Subtree mask:
Storage-type: nonVolatile
View Type:excluded
View status:active
ViewDefault is the default view of the device. When you access the device through the ViewDefault view,
you can access all the MIB objects of the iso subtree except for the MIB objects under the
snmpUsmMIB, snmpVacmMIB, and snmpModules.18 subtrees.
Field Description
View name MIB view name
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
1-5
Examples
Field Description
Messages delivered to the SNMP entity Number of packets delivered to the SNMP agent
Number of packets from a device with an SNMP
Messages which were for an unsupported
version that is not supported by the current
version
SNMP agent
Messages which used a SNMP community Number of packets that use an unknown
name not known community name
Messages which represented an illegal Number of packets carrying an operation that the
operation for the community supplied community has no right to perform
Number of packets with ASN.1 or BER errors in
ASN.1 or BER errors in the process of decoding
the process of decoding
Messages passed from the SNMP entity Number of packets sent by the SNMP agent
SNMP PDUs which had badValue error-status Number of SNMP PDUs with a badValue error
SNMP PDUs which had genErr error-status Number of SNMP PDUs with a genErr error
1-6
Field Description
Number of MIB objects that have been
MIB objects altered successfully
successfully modified
Number of get requests that have been received
GetRequest-PDU accepted and processed
and processed
Number of getNext requests that have been
GetNextRequest-PDU accepted and processed
received and processed
Number of getBulk requests that have been
GetBulkRequest-PDU accepted and processed
received and processed
Number of get responses that have been
GetResponse-PDU accepted and processed
received and processed
Number of set requests that have been received
SetRequest-PDU accepted and processed
and processed
Number of traps that have been received and
Trap PDUs accepted and processed
processed
Alternate Response Class PDUs dropped
Number of dropped response packets
silently
Forwarded Confirmed Class PDUs dropped Number of forwarded packets that have been
silently dropped
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display snmp-agent sys-info command to display the current SNMP system information.
If no keyword is specified, all SNMP agent system information will be displayed.
Examples
1-7
The physical location of this node:
Hangzhou, China
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display snmp-agent trap queue command to display basic information of the trap queue,
including trap queue name, queue length and the number of traps in the queue currently.
Related commands: snmp-agent trap life, snmp-agent trap queue-size.
Examples
Field Description
Queue name Trap queue name
Queue size Trap queue size
Message number Number of traps in the current trap queue
Syntax
1-8
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display snmp-agent trap-list command to display the modules that can generate traps and
whether their trap function is enabled or not. If a module comprises multiple sub-modules, then as long
as one sub-module has the trap function enabled, the whole module will be displayed as being enabled
with the trap function.
Related commands: snmp-agent trap enable.
Examples
# Display the modules that can generate traps and whether their trap function is enabled or not.
<Sysname> display snmp-agent trap-list
configuration trap enable
flash trap enable
standard trap enable
system trap enable
Enable traps: 4; Disable traps: 0
In the above output, enable indicates that the module is allowed to generate traps whereas disable
indicates the module is not allowed to generate traps. You can configure the trap function (enable or
disable) of each module through command lines.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
engineid engineid: Displays SNMPv3 user information for a specified engine ID, where engineid
indicates the SNMP engine ID. When an SNMPv3 user is created, the system records the current local
SNMP entity engine ID of the device. If the engine ID is modified, the user becomes invalid and will
become valid again if the engine ID is restored.
username user-name: Displays SNMPv3 user information for a specified user name. It is case
sensitive.
1-9
group group-name: Displays SNMPv3 user information for a specified SNMP group name. It is case
sensitive.
Description
Use the display snmp-agent usm-user command to display SNMPv3 user information.
Examples
Field Description
User name SNMP user name
Group name SNMP group name
Syntax
View
Interface view
1-10
Default Level
2: System level
Parameters
None
Description
Use the enable snmp trap updown command to enable the trap function for interface state changes.
Use the undo enable snmp trap updown command to disable the trap function for interface state
changes.
By default, the trap function for interface state changes is enabled.
Note that:
To enable an interface to generate linkUp/linkDown traps when its state changes, you need to enable
the linkUp/linkDown trap function on the interface and globally. Use the enable snmp trap updown
command to enable this function on an interface, and use the snmp-agent trap enable [ standard
[ linkdown | linkup ] * ] command to enable this function globally.
Related commands: snmp-agent target-host, snmp-agent trap enable.
Examples
# Enable the sending of linkUp/linkDown SNMP traps on port GigabitEthernet 1/0/1 and use the
community name public.
<Sysname> system-view
[Sysname] snmp-agent trap enable
[Sysname] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname public
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] enable snmp trap updown
snmp-agent
Syntax
snmp-agent
undo snmp-agent
View
System view
Default Level
3: Manage level
Parameters
None
Description
1-11
By default, SNMP agent is disabled.
You can enable SNMP agent through any commands that begin with snmp-agent.
Examples
snmp-agent calculate-password
Syntax
View
System view
Default Level
3: Manage level
Parameters
1-12
specified-engineid: Uses user-defined engine ID to calculate cipher text password.
engineid: The engine ID string, an even number of hexadecimal characters, in the range 10 to 64. Its
length must not be an odd number, and the all-zero and all-F strings are invalid.
Description
Use the snmp-agent calculate-password command to convert the user-defined plain text password to
a cipher text password.
Note that:
z The cipher text password converted with the sha keyword specified in this command is a string of
40 hexadecimal characters. For an authentication password, all of the 40 hexadecimal characters
are valid; while for a privacy password, only the first 32 hexadecimal characters are valid.
z Enable SNMP on the device before executing the command.
When creating an SNMPv3 user, if you specify to use the cipher text authentication/encryption
password, you can use this command to generate a cipher text password.
The converted password is associated with the engine ID, namely, the password is valid only under the
specified engine ID based on which the password was configured.
Related commands: snmp-agent usm-user v3.
Examples
# Use local engine ID and MD5 authentication protocol to convert the plain text password authkey.
<Sysname> system-view
[Sysname] snmp-agent calculate-password authkey mode md5 local-engineid
The secret key is: 09659EC5A9AE91BA189E5845E1DDE0CC
snmp-agent community
Syntax
View
System view
Default Level
3: Manage level
Parameters
read: Indicates that the community has read only access right to the MIB objects; that is, the NMS can
perform read-only operations when it uses this community name to access the agent.
write: Indicates that the community has read and write access right to the MIB objects; that is, the NMS
can perform read and write operations when it uses this community name to access the agent.
community-name: Community name, a string of 1 to 32 characters.
acl acl-number: Associates a basic ACL with the community name. acl-number is in the range 2,000 to
2,999. By using an ACL, you can configure to allow or prohibit the access to the agent from the NMS
with the specified source IP address.
1-13
mib-view view-name: S Specifies MIB objects that the NMS can access, view-name represents the
MIB view name, a string of 1 to 32 characters. If no keyword is specified, the default view is ViewDefault
(The view created by the system after SNMP agent is enabled).
Description
Use the snmp-agent community command to create a new SNMP community. Parameters to be
configured include access right, community name, ACL, and accessible MIB views.
Use the undo snmp-agent community command to delete a specified community.
This command can be applied in SNMPv1 and v2c networking environments.
A community is composed of NMSs and SNMP agents, and is identified by the community name, which
functions as a password. In a community, when devices communicate with each other, they use
community name for authentication. The NMS and the SNMP agent can access each other only when
they are configured with the same community name. Typically, public is used as the read-only
community name, and private is used as the read and write community name. For security purposes,
you are recommended to configure a community name other than public and private.
z The keyword acl specifies that only the NMS with a qualified IP address can access the agent.
z The argument community-name specifies the community name used by the NMS when it accesses
the agent.
z The keyword mib-view specifies the MIB objects which the NMS can access.
z The keywords read and write specify the access type.
Related commands: snmp-agent mib-view.
Examples
# Create a community with the name of readaccess, allowing read-only access right using this
community name.
<Sysname> system-view
[Sysname] snmp-agent sys-info version v1 v2c
[Sysname] snmp-agent community read readaccess
1-14
z Fill in the write community name writeaccess; namely, the NMS can perform read-only operations
to the MIB objects in the ViewDefault view on the device
# Create a community with the name of wr-sys-acc. The NMS can perform the read and write
operations to the MIB objects of the system subtree (with the OID of 1.3.6.1.2.1.1).
<Sysname> system-view
[Sysname] snmp-agent sys-info version v1 v2c
[Sysname] snmp-agent mib-view included test system
[Sysname] snmp-agent community write wr-sys-acc mib-view system
snmp-agent group
Syntax
View
System view
Default Level
3: Manage level
Parameters
v1: SNMPv1.
v2c: SNMPv2c.
v3: SNMPv3.
group-name: Group name, a string of 1 to 32 characters.
authentication: Specifies the security model of the SNMP group to be authentication only (without
privacy).
privacy: Specifies the security model of the SNMP group to be authentication and privacy.
read-view read-view: Read view, a string of 1 to 32 characters. The default read view is ViewDefault.
write-view write-view: Write view, a string of 1 to 32 characters. By default, no write view is configured,
namely, the NMS cannot perform the write operations to all MIB objects on the device.
notify-view notify-view: Notify view, for sending traps, a string of 1 to 32 characters. By default, no
notify view is configured, namely, the agent does not send traps to the NMS.
1-15
acl acl-number: Associates a basic ACL with the group. acl-number is in the range 2000 to 2999. By
using a basic ACL, you can restrict the source IP address of SNMP packets, that is, you can configure to
allow or prohibit SNMP packets with a specific source IP address, so as to restrict the
intercommunication between the NMS and the agent.
Description
Use the snmp-agent group command to configure a new SNMP group and specify its access right.
Use the undo snmp-agent group command to delete a specified SNMP group.
By default, SNMP groups configured by the snmp-agent group v3 command use a
no-authentication-no-privacy security model.
An SNMP group defines security model, access right, and so on. A user in this SNMP group has all
these public properties.
Related commands: snmp-agent mib-view, snmp-agent usm-user.
Examples
snmp-agent local-engineid
Syntax
View
System view
Default Level
3: Manage level
Parameters
engineid: Engine ID, an even number of hexadecimal characters, in the range 10 to 64. Its length must
not be an odd number, and the all-zero and all-F strings are invalid.
Description
Use the snmp-agent local-engineid command to configure a local engine ID for an SNMP entity.
Use the undo snmp-agent local-engineid command to restore the default local engine ID.
By default, the engine ID of a device is the combination of company ID and device ID. Device ID varies
by product; it could be an IP address, a MAC address, or a self-defined string of hexadecimal numbers.
An engine ID has two functions:
z For all devices managed by one NMS, each device needs a unique engine ID to identify the SNMP
agent. By default, each device has an engine ID. The network administrator has to ensure that
there is no repeated engine ID within an SNMP domain.
1-16
z In SNMPv3, the user name and cipher text password are associated with the engine ID. Therefore,
if the engine ID changes, the user name and cipher text password configured under the engine ID
become invalid.
Typically, the device uses its default engine ID. For ease of remembrance, you can set engine IDs for
the devices according to the network planning. For example, if both device 1 and device 2 are on the
first floor of building A, you can set the engine ID of device 1 to 000Af0010001, and that of device 2 to
000Af0010002.
Related commands: snmp-agent usm-user.
Examples
snmp-agent log
Syntax
View
System view
Default Level
3: Manage level
Parameters
Description
Examples
snmp-agent mib-view
Syntax
View
System view
Default Level
3: Manage level
Parameters
excluded: Indicates that no nodes of the MIB tree are included in current view, which means the access
to all nodes of this MIB subtree is forbidden.
included: Indicates that all nodes of the MIB tree are included in current view, which means the access
to all nodes of this MIB subtree is permitted.
view-name: View name, a string of 1 to 32 characters.
oid-tree: MIB subtree, identified by the OID of the subtree root node, such as 1.4.5.3.1, or the name of
the subtree root node, such as “system”. OID is made up of a series of integers, which marks the
position of the node in the MIB tree and uniquely identifies a MIB object.
mask mask-value: Mask for a MIB subtree, in the range 1 to 32 hexadecimal digits. It must be an even
digit.
Description
Use the snmp-agent mib-view command to create or update MIB view information so that MIB objects
can be specified.
Use the undo snmp-agent mib-view command to delete the current configuration.
By default, MIB view name is ViewDefault.
MIB view is a subset of MIB, and it may include all nodes of a MIB subtree (that is, the access to all
nodes of this MIB subtree is permitted), or may exclude all nodes of a MIB subtree (that is, the access to
all nodes of this MIB subtree is forbidden).
You can use the display snmp-agent mib-view command to view the access right of the default view.
Also, you can use the undo snmp-agent mib-view command to remove the default view, after that,
however, you may not be able to read or write all MIB nodes on the agent.
Related commands: snmp-agent group.
Examples
# Create a MIB view mibtest, which includes all objects of the subtree mib-2, and excludes all objects
of the subtree ip.
<Sysname> system-view
[Sysname] snmp-agent mib-view included mibtest 1.3.6.1
1-18
[Sysname] snmp-agent mib-view excluded mibtest ip
[Sysname] snmp-agent community read public mib-view mibtest
If the SNMP version on the NMS is set to SNMPv1, when the NMS uses the community name public to
access the device, it cannot access all objects of the ip subtree (such as the ipForwarding node, the
ipDefaultTTL node, and so on), but it can access all objects of the mib-2 subtree.
Syntax
View
System view
Default Level
3: Manage level
Parameters
byte-count: Maximum size of the SNMP packets that can be received or sent by the agent, in the range
484 to 17,940.
Description
Use the snmp-agent packet max-size command to configure the maximum size of the SNMP packets
that can be received or sent by the agent.
Use the undo snmp-agent packet max-size command to restore the default packet size.
By default, the maximum size of the SNMP packets that can be received or sent by the agent is 1,500
bytes.
If devices not supporting fragmentation exist on the routing path between the NMS and the agent, you
can use the command to configure the maximum SNMP packet size, and thus to prevent giant packets
from being discarded.
Typically, you are recommended to apply the default value.
Examples
# Configure the maximum size of the SNMP packets that can be received or sent by the SNMP agent as
1,042 bytes.
<Sysname> system-view
[Sysname] snmp-agent packet max-size 1042
snmp-agent sys-info
Syntax
1-19
View
System view
Default Level
3: Manage level
Parameters
contact sys-contact: A string of 1 to 200 characters that describes the contact information for system
maintenance.
location sys-location: A string of 1 to 200 characters that describes the location of the device.
version: The SNMP version in use.
z all: Specifies SNMPv1, SNMPv2c, and SNMPv3.
z v1: SNMPv1.
z v2c: SNMPv2c.
z v3: SNMPv3.
Description
Use the snmp-agent sys-info command to configure system information, including the contact
information, the location, and the SNMP version in use.
Use the undo snmp-agent sys-info contact and undo snmp-agent sys-info location command to
restore the default.
Use the undo snmp-agent sys-info version command to disable use of the SNMP function of the
specified version.
By default, the location information is Hangzhou China, version is SNMPv3, and the contact is
Hangzhou H3C Technologies Co., Ltd.
Successful interaction between an NMS and the agents requires consistency of SNMP versions
configured on them.
Related commands: display snmp-agent sys-info.
Network maintenance engineers can use the system contact information to get in touch with the
manufacturer in case of network failures. The system location information is a management variable
under the system branch as defined in RFC1213-MIB, identifying the location of the managed object.
Examples
1-20
snmp-agent target-host
Syntax
View
System view
Default Level
3: Manage level
Parameters
trap: Specifies the host to be the target host which will receive traps and notifications from the device.
address: Specifies the destination IP address in the SNMP messages sent from the device.
udp-domain: Indicates that the trap is transmitted using UDP.
ip-address: The IPv4 address of the trap target host.
udp-port port-number: Specifies the number of the port on the target host to receive traps.
params securityname security-string: Specifies the authentication related parameter, which is an
SNMPv1 or SNMPv2c community name or an SNMPv3 user name, a string of 1 to 32 characters.
v1: SNMPv1. This keyword must be the same with the SNMP version on the NMS; otherwise, the NMS
cannot receive any trap.
v2c: SNMPv2c. This keyword must be the same with the SNMP version on the NMS; otherwise, the
NMS cannot receive any trap.
v3: SNMPv3. This keyword must be the same with the SNMP version on the NMS; otherwise, the NMS
cannot receive any trap.
z authentication: Specifies the security model to be authentication without privacy. Authentication is
a process to check whether the packet is integral and whether it has been tampered. You need to
configure the authentication password when creating an SNMPv3 user.
z privacy: Specifies the security model to be authentication with privacy. Privacy is to encrypt the
data part of a packet to prevent it from being intercepted. You need to configure the authentication
password and privacy password when creating an SNMPv3 user.
Description
Use the snmp-agent target-host command to configure the related settings for a trap target host.
Use the undo snmp-agent target-host command to remove the current settings. According to the
networking requirements, you can use this command for multiple times to configure different settings for
a target host, enabling the device to send trap messages to different NMSs. Up to 20 target hosts that
can be configured.
z If udp-port port-number is not specified, port number 162 is used.
z If the key words v1, v2 and v3 are not specified, v1 is used.
1-21
z If the key words authentication and privacy are not specified, the authentication mode is no
authentication, no privacy.
Related commands: enable snmp trap updown, snmp-agent trap enable, snmp-agent trap source,
snmp-agent trap life.
Examples
# Enable the device to send SNMPv1 traps to 10.1.1.1, using the community name of public.
<Sysname> system-view
[Sysname] snmp-agent trap enable standard
[Sysname] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname public
Syntax
View
System view
Default Level
3: Manage level
Parameters
Description
Use the snmp-agent trap enable command to enable the trap function globally.
Use the undo snmp-agent trap enable command to disable the trap function globally.
By default, the trap function is enabled.
Only after the trap function is enabled can each module generate corresponding traps.
Note that:
1-22
To enable an interface to generate Linkup/Linkdown traps when its state changes, you need to enable
the linkUp/linkDown trap function on the interface and globally. Use the enable snmp trap updown
command to enable this function on an interface, and use the snmp-agent trap enable [ standard
[ linkdown | linkup ] * ] command to enable this function globally.
Related commands: snmp-agent target-host, enable snmp trap updown.
Examples
# Enable the device to send SNMP authentication failure packets to 10.1.1.1, using the community
name public.
<Sysname> system-view
[Sysname] snmp-agent target-host trap address udp-domain 10.1.1.1 params securityname public
[Sysname] snmp-agent trap enable standard authentication
Syntax
View
System view
Default Level
3: Manage level
Parameters
None
Description
Use the snmp-agent trap if-mib link extended command to extend the standard linkUp/linkDown
traps defined in RFC. An extended linkUp/linkDown trap is the standard linkUp/linkDown trap defined in
RFC appended with the interface description and interface type information.
Use the undo snmp-agent trap if-mib link extended command to restore the default.
By default, standard linkUp/linkDown traps defined in RFC are used.
z A standard linkUp trap is in the following format:
#Apr 24 11:48:04:896 2008 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.4<linkUp>: Interface 983555 is Up, ifAdminStatus is 1, ifOperStatus
is 1
1-23
z An extended linkDown trap is in the following format:
#Apr 24 11:42:54:314 2008 AR29.46 IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.3<linkDown>: Interface 983555 is Down, ifAdminStatus is 2,
ifOperStatus is 2, ifDescr is GigabitEthernet1/0/1, ifType is 6
The format of an extended linkup/ linkDown trap is the standard format followed with the ifDescr and
ifType information, facilitating problem location.
Note that after this command is configured, the device sends extended linkUp/linkDown traps. If the
extended messages are not supported on NMS, the device may not be able to resolve the messages.
Examples
Syntax
View
System view
Default Level
3: Manage level
Parameters
Description
Use the snmp-agent trap life command to configure the holding time of the traps in the queue. Traps
will be discarded when the holding time expires.
Use the undo snmp-agent trap life command to restore the default holding time of traps in the queue.
By default, the holding time of SNMP traps in the queue is 120 seconds.
The SNMP module sends traps in queues. As soon as the traps are saved in the trap queue, a timer is
started. If traps are not sent out until the timer times out (namely, the holding time configured by using
this command expires), the system removes the traps from the trap sending queue.
Related commands: snmp-agent trap enable, snmp-agent target-host.
Examples
1-24
snmp-agent trap queue-size
Syntax
View
System view
Default Level
3: Manage level
Parameters
size: Number of traps that can be stored in the trap sending queue, in the range 1 to 1,000.
Description
Use the snmp-agent trap queue-size command to set the size of the trap sending queue.
Use the undo snmp-agent trap queue-size command to restore the default queue size.
By default, up to 100 traps can be stored in the trap sending queue.
After traps are generated, they will be saved into the trap sending queue. The size of the queue
determines the maximum number of the traps that can be stored in the queue. When the size of the trap
sending queue reaches the configured value, the newly generated traps are saved into the queue, and
the earliest ones are discarded.
Related commands: snmp-agent trap enable, snmp-agent target-host, snmp-agent trap life.
Examples
# Set the maximum number of traps that can be stored in the trap sending queue to 200.
<Sysname> system-view
[Sysname] snmp-agent trap queue-size 200
Syntax
View
System view
Default Level
3: Manage level
Parameters
1-25
Description
Use the snmp-agent trap source command to specify the source IP address contained in the trap.
Use the undo snmp-agent trap source command to restore the default.
By default, SNMP chooses the IP address of an interface to be the source IP address of the trap.
Upon the execution of this command, the system uses the primary IP address of the specified interface
as the source IP address of the traps, and the NMS will use this IP address to uniquely identify the agent.
Even if the agent sends out traps through different interfaces, the NMS uses this IP address to filter all
traps sent from the agent.
Use this command to trace a specific event by the source IP address of a trap.
Note that:
Before you can configure the IP address of a particular interface as the source IP address of the trap,
ensure that the interface already exists and that it has a legal IP address. Otherwise, if the configured
interface does not exist, the configurations will fail; if the specified IP address is illegal, the configuration
will be invalid. After a legal IP address is configured for the interface, the configuration becomes valid
automatically.
Related commands: snmp-agent trap enable, snmp-agent target-host.
Examples
# Configure the IP address for the Vlan-interface 1 as the source address for traps.
<Sysname> system-view
[Sysname] snmp-agent trap source Vlan-interface 1
Syntax
View
System view
Default Level
3: Manage level
Parameters
v1: The configured user name should be applied in the SNMPv1 networking environment. If the agent
and the NMS use SNMPv1 packets to communicate with each other, this keyword is needed.
v2c: The configured user name should be applied in the SNMPv2c networking environment. If the agent
and the NMS use SNMPv2c packets to communicate with each other, this keyword is needed.
user-name: User name, a string of 1 to 32 characters. It is case sensitive.
group-name: Group name, a string of 1 to 32 characters. It is case sensitive.
acl acl-number: Associates a basic ACL with the user. acl-number is in the range 2000 to 2999. By
using a basic ACL, you can restrict the source IP address of SNMP packets, that is, you can configure to
1-26
allow or prohibit SNMP packets with a specific source IP address, so as to allow or prohibit the specified
NMS to access the agent by using this user name.
Description
Use the snmp-agent usm-user { v1 | v2c } command to add a user to an SNMP group.
Use the undo snmp-agent usm-user { v1 | v2c } command to delete a user from an SNMP group.
As defined in the SNMP protocol, in SNMPv1 and SNMPv2c networking applications, the NMS and the
agent use community name to authenticate each other; in SNMPv3 networking applications, they use
user name to authenticate each other. If you prefer using the user name in the authentication, the
device supports configuration of SNMPv1 and SNMPv2c users. Creating an SNMPv1 or SNMPv2c user
equals adding of a new read-only community name. After you add the user name into the read-only
community name field of the NMS, the NMS can establish SNMP connection with the device.
To make the configured user take effect, create an SNMP group first.
Related commands: snmp-agent group, snmp-agent community, snmp-agent usm-user v3.
Examples
snmp-agent usm-user v3
Syntax
1-27
View
System view
Default Level
3: Manage level
Parameters
Description
1-28
The user name configured by using this command is applicable to the SNMPv3 networking
environments, If the agent and the NMS use SNMPv3 packets to communicate with each other, you
need to create an SNMPv3 user.
To make the configured user valid, create an SNMP group first. Configure the authentication and
encryption modes when you create a group, and configure the authentication and encryption
passwords when you create a user.
z If you specify the cipher keyword, the system considers the arguments auth-password and
priv-password as cipher text passwords. In this case, the command supports copy and paste,
meaning if the engine IDs of the two devices are the same, you can copy and paste the SNMPv3
configuration commands in the configuration file on device A to device B and execute the
commands on device B. The cipher text password and plain text password on the two devices are
the same.
z If you do not specify the cipher keyword, the system considers the arguments auth-password and
priv-password as plain text passwords. In this case, if you perform the copy and paste operation,
the system will encrypt these two passwords, resulting in inconsistency of the cipher text and plain
text passwords of the two devices.
Note that:
z If you use the snmp-agent usm-user v3 cipher command, the pri-password argument in this
command can be obtained by the snmp-agent calculate-password command. To make the
calculated cipher text password applicable to the snmp-agent usm-user v3 cipher command and
have the same effect as that in the snmp-agent usm-user v3 cipher command, ensure that the
same privacy protocol is specified for the two commands and the local engine ID specified in the
snmp-agent usm-user v3 cipher command is consistent with the SNMP entity engine ID
specified in the snmp-agent calculate-password command.
z If you execute this command repeatedly to configure the same user (namely, the user names are
the same, no limitation to other keywords and arguments), the last configuration takes effect.
z A plain text password is required when the NMS accesses the device; therefore, please remember
the user name and the plain text password when you create a user.
Related commands: snmp-agent calculate-password, snmp-agent group, snmp-agent usm-user
{ v1 | v2c }.
Examples
# Add a user testUser to the SNMPv3 group testGroup. Configure the security model as
authentication without privacy, the authentication protocol as MD5, the plain-text authentication
password as authkey.
<Sysname> system-view
[Sysname] snmp-agent group v3 testGroup authentication
[Sysname] snmp-agent usm-user v3 testUser testGroup authentication-mode md5 authkey
1-29
# Add a user testUser to the SNMPv3 group testGroup. Configure the security model as
authentication and privacy, the authentication protocol as MD5, the privacy protocol as DES56, the
plain-text authentication password as authkey, and the plain-text privacy password as prikey.
<Sysname> system-view
[Sysname] snmp-agent group v3 testGroup privacy
[Sysname] snmp-agent usm-user v3 testUser testGroup authentication-mode md5 authkey
privacy-mode des56 prikey
1-30
2 MIB Configuration Commands
Syntax
display mib-style
View
Any view
Default Level
3: Manage level
Parameters
None
Description
Use the display mib-style command to display the MIB style of the device.
Two MIB styles are available on the device: new and compatible. After obtaining the MIB style, you can
select matched H3C network management software based on the MIB style.
Related commands: mib-style.
Examples
# After getting the device ID from node sysObjectID, you find that it is an H3C device, and hope to
know the current MIB style or the MIB style after next boot of the device.
<Sysname> display mib-style
Current MIB style: new
Next reboot MIB style: new
The above output information indicates that the current MIB style of the device is new, and the MIB style
after next boot is still new.
mib-style
Syntax
View
System view
2-1
Default Level
3: Manage level
Parameters
new: Specifies the MIB style of the device as H3C new; that is, both sysOID and private MIB of the
device are located under the H3C enterprise ID 25506.
compatible: Specifies the MIB style of the device as H3C compatible; that is, sysOID of the device is
located under the H3C enterprise ID 25506, and private MIB is located under the enterprise ID 2011.
Description
Use the mib-style command to set the MIB style of the device.
By default, the MIB style of the device is new.
Note that the configuration takes effect only after the device reboots.
Examples
2-2
Table of Contents
i
1 RMON Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
entry-number: Index of an RMON alarm entry, in the range 1 to 65535. If no entry is specified, the
configuration of all alarm entries is displayed.
Description
Use the display rmon alarm command to display the configuration of the specified or all RMON alarm
entries.
Related commands: rmon alarm.
Examples
Field Description
The status of the alarm entry entry-number created by
the owner is status.
AlarmEntry entry-number owned by
owner is status z entry-number: Alarm entry, corresponding to the
management information base (MIB) node
alarmIndex.
1-1
Field Description
z owner: Owner of the entry, corresponding to the MIB
node alarmOwner.
z Status: Status of the entry identified by the index
(VALID means the entry is valid, and
UNDERCREATION means invalid. You can use the
display rmon command to view the invalid entry,
while with the display current-configuration and
display this commands you cannot view the
corresponding rmon commands.), corresponding to
the MIB node alarmStatus.
The sampling type (the value can be absolute or delta),
Samples type
corresponding to the MIB node alarmSampleType.
Alarm variable, namely, the monitored MIB node,
Variable formula
corresponding to the MIB node alarmVariable.
Sampling interval, in seconds, corresponding to the MIB
Sampling interval
node alarmInterval.
Alarm rising threshold (When the sampling value is
bigger than or equal to this threshold, a rising alarm is
Rising threshold
triggered.), corresponding to the MIB node
alarmRisingThreshold.
Alarm falling threshold (When the sampling value is
smaller than or equal to this threshold, a falling alarm is
Falling threshold
triggered.), corresponding to the MIB node
alarmFallingThreshold.
How an alarm can be triggered, corresponding to the
When startup enables
MIB node alarmStartupAlarm.
The last sampled value, corresponding to the MIB node
Latest value
alarmValue.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
entry-number: Index of an RMON event entry, in the range 1 to 65535. If no entry is specified, the
configuration of all event entries is displayed.
Description
Use the display rmon event command to display the configuration of the specified or all RMON event
entries.
1-2
Displayed information includes event index, event owner, event description, action triggered by the
event (such as sending log or trap messages), and last time the event occurred (the elapsed time since
system initialization/startup) in seconds.
Related commands: rmon event.
Examples
Field Description
EventEntry Event entry, corresponding to the MIB node eventIndex.
Owner of the entry, corresponding to the MIB node
owned by
eventOwner.
Status of the entry identified by the index (VALID means
the entry is valid, and UNDERCREATION means invalid.
You can use the display rmon command to view the
VALID invalid entry; while with the display
current-configuration and display this commands you
cannot view the corresponding rmon commands.),
corresponding to the MIB node eventStatus.
Description for the event, corresponding to the MIB node
Description
eventDescription.
The actions that the system will take when the event is
triggered:
z none: The system will take no action
z log: The system will log the event
cause log-trap when triggered
z snmp-trap: The system will send a trap to the NMS
z log-and-trap: The system will log the event and send a
trap to the NMS
This field corresponds to the MIB node eventType.
Time when the last event was triggered, corresponding to
last triggered at
the MIB node eventLastTimeSent.
Syntax
View
Any view
Default Level
1: Monitor level
1-3
Parameters
Description
Use the display rmon eventlog command to display log information for the specified or all event
entries.
If entry-number is not specified, the log information for all event entries is displayed.
If you use the rmon event command to configure the system to log an event when the event is triggered,
the event is recorded into the RMON log. You can use this command to display the details of the log
table: event index, current event state, time the event was logged (the elapsed time in seconds since
system initialization/startup), and event description.
Examples
Field Description
LogEntry Event log entry, corresponding to the MIB node logIndex.
owned by Owner of the entry, corresponding to the MIB node eventOwner.
Status of the entry identified by the index (VALID means the entry
is valid, and UNDERCREATION means invalid. You can use the
display rmon command to view the invalid entry; while with the
VALID
display current-configuration and display this commands you
cannot view the corresponding rmon commands.), corresponding
to the MIB node eventStatus.
Time when the log was created (Time passed since the device
Generates eventLog at
was booted), corresponding to the MIB node logTime.
Description Log description, corresponding to the MIB node logDescription.
The above example shows that event 1 has generated two logs:
z eventLog 1.1, generated by private alarm entry 1, which is triggered because the alarm value (85)
exceeds the rising threshold (80). The sampling type is absolute.
z eventLog 1.2, generated by private alarm entry 2, which is triggered because the alarm value (0) is
lower than the falling threshold (5). The sampling type is delta.
1-4
display rmon history
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display rmon history command to display RMON history control entry and history sampling
information.
After you have created history control entry on an interface, the system calculates the information of the
interface periodically and saves this information to the etherHistoryEntry table. You can use this
command to display the entries in this table.
You can configure the number of history sampling records that can be displayed and the history
sampling interval through the rmon history command.
Related commands: rmon history.
Examples
# Display RMON history control entry and history sampling information for interface GigabitEthernet
1/0/1.
<Sysname> display rmon history GigabitEthernet 1/0/1
HistoryControlEntry 1 owned by null is VALID
Samples interface : GigabitEthernet1/0/1<ifIndex.1>
Sampling interval : 10(sec) with 5 buckets max
Sampled values of record 1 :
dropevents : 0 , octets : 0
packets : 0 , broadcast packets : 0
multicast packets : 0 , CRC alignment errors : 0
undersize packets : 0 , oversize packets : 0
fragments : 0 , jabbers : 0
collisions : 0 , utilization : 0
Sampled values of record 2 :
dropevents : 0 , octets : 0
packets : 0 , broadcast packets : 0
multicast packets : 0 , CRC alignment errors : 0
undersize packets : 0 , oversize packets : 0
fragments : 0 , jabbers : 0
collisions : 0 , utilization : 0
Sampled values of record 3 :
1-5
dropevents : 0 , octets : 0
packets : 0 , broadcast packets : 0
multicast packets : 0 , CRC alignment errors : 0
undersize packets : 0 , oversize packets : 0
fragments : 0 , jabbers : 0
collisions : 0 , utilization : 0
Sampled values of record 4 :
dropevents : 0 , octets : 0
packets : 0 , broadcast packets : 0
multicast packets : 0 , CRC alignment errors : 0
undersize packets : 0 , oversize packets : 0
fragments : 0 , jabbers : 0
collisions : 0 , utilization : 0
Sampled values of record 5 :
dropevents : 0 , octets : 0
packets : 0 , broadcast packets : 0
multicast packets : 0 , CRC alignment errors : 0
undersize packets : 0 , oversize packets : 0
fragments : 0 , jabbers : 0
collisions : 0 , utilization : 0
Field Description
History control entry, corresponding to the MIB node
HistoryControlEntry
etherHistoryIndex.
Owner of the entry, corresponding to the MIB node
owned by
historyControlOwner.
Status of the entry identified by the index (VALID means
the entry is valid, and UNDERCREATION means
invalid. You can use the display rmon command to
VALID view the invalid entry; while with the display
current-configuration and display this commands
you cannot view the corresponding rmon commands.),
corresponding to the MIB node historyControlStatus.
Samples Interface The sampled interface
Sampling period, in seconds, corresponding to the MIB
Sampling interval node historyControlInterval. The system samples the
information of an interface periodically.
The maximum number of history table entries that can
be saved, corresponding to the MIB node
historyControlBucketsGranted.
If the specified value of the buckets argument exceeds
buckets max the history table size supported by the device, the
supported history table size is displayed.
If the current number of the entries in the table has
reached the maximum number, the system will delete
the earliest entry to save the latest one.
The (number)th statistics recorded in the system cache.
Sampled values of record number Statistics records are numbered according to the order
of time they are saved into the cache.
1-6
Field Description
Dropped packets during the sampling period,
dropevents corresponding to the MIB node
etherHistoryDropEvents.
Number of octets received during the sampling period,
octets
corresponding to the MIB node etherHistoryOctets.
Number of packets received during the sampling period,
packets
corresponding to the MIB node etherHistoryPkts.
Number of broadcasts received during the sampling
broadcastpackets period, corresponding to the MIB node
etherHistoryBroadcastPkts.
Number of multicasts received during the sampling
multicastpackets period, corresponding to the MIB node
etherHistoryMulticastPkts.
Number of packets received with CRC alignment errors
CRC alignment errors during the sampling period, corresponding to the MIB
node etherHistoryCRCAlignErrors.
Number of undersize packets received during the
undersize packets sampling period, corresponding to the MIB node
etherHistoryUndersizePkts.
Number of oversize packets received during the
oversize packets sampling period, corresponding to the MIB node
etherHistoryOversizePkts.
Number of fragments received during the sampling
fragments period, corresponding to the MIB node
etherHistoryFragments.
Number of jabbers received during the sampling period,
jabbers
corresponding to the MIB node etherHistoryJabbers.
Number of colliding packets received during the
collisions sampling period, corresponding to the MIB node
etherHistoryCollisions.
Bandwidth utilization during the sampling period,
utilization
corresponding to the MIB node etherHistoryUtilization.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
entry-number: Private alarm entry index, in the range 1 to 65535. If no entry is specified, the
configuration of all private alarm entries is displayed.
1-7
Description
Use the display rmon prialarm command to display the configuration of the specified or all private
alarm entries.
Related commands: rmon prialarm.
Examples
Field Description
PrialarmEntry The entry of the private alarm table
owned by Owner of the entry, user1 in this example
1-8
display rmon statistics
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Examples
Field Description
The entry of the statistics table, corresponding to the MIB node
EtherStatsEntry
etherStatsIndex.
1-9
Field Description
Number of octets received by the interface during the statistical
etherStatsOctets
period, corresponding to the MIB node etherStatsOctets.
Number of packets received by the interface during the
etherStatsPkts statistical period, corresponding to the MIB node
etherStatsPkts.
Number of broadcast packets received by the interface during
etherStatsBroadcastPkts the statistical period, corresponding to the MIB node
etherStatsBroadcastPkts.
Number of multicast packets received by the interface during
etherStatsMulticastPkts the statistical period, corresponding to the MIB node
etherStatsMulticastPkts.
Number of undersize packets received by the interface during
etherStatsUndersizePkts the statistical period, corresponding to the MIB node
etherStatsUndersizePkts.
Number of oversize packets received by the interface during
etherStatsOversizePkts the statistical period, corresponding to the MIB node
etherStatsOversizePkts.
Number of undersize packets with CRC errors received by the
etherStatsFragments interface during the statistical period, corresponding to the MIB
node etherStatsFragments.
Number of oversize packets with CRC errors received by the
etherStatsJabbers interface during the statistical period, corresponding to the MIB
node etherStatsJabbers.
Number of packets with CRC errors received on the interface
etherStatsCRCAlignErrors during the statistical period, corresponding to the MIB node
etherStatsCRCAlignErrors.
Number of collisions received on the interface during the
etherStatsCollisions statistical period, corresponding to the MIB node
etherStatsCollisions.
Total number of drop events received on the interface during
etherStatsDropEvents the statistical period, corresponding to the MIB node
etherStatsDropEvents.
Statistics of packets received according to length during the
statistical period (Hardware support is needed for the statistics.
If the hardware does not support the function, all statistics are
displayed as 0.), in which:
z Information of the field 64 corresponds to the MIB node
Packets received according to etherStatsPkts64Octets
length: z Information of the field 65-127 corresponds to the MIB node
64 : 0 , 65-127 : 0 , etherStatsPkts65to127Octets
128-255 : 0 z Information of the field 128-255 corresponds to the MIB
256-511: 0 , 512-1023: node etherStatsPkts128to255Octets
0 , 1024-1518: 0 z Information of the field 256-511 corresponds to the MIB
node etherStatsPkts256to511Octets
z Information of the field 512-1023 corresponds to the MIB
node etherStatsPkts512to1023Octets
z Information of the field 1024-1518 corresponds to the MIB
node etherStatsPkts1024to1518Octets
1-10
rmon alarm
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the rmon alarm command to create an entry in the RMON alarm table.
Use the undo rmon alarm command to remove a specified entry from the RMON alarm table.
This command defines an alarm entry, so as to trigger the specified event when abnormity occurs. The
event defines how to deal with the abnormity. After you define an alarm entry, the system will obtain the
1-11
value of the monitored alarm variable at specified interval, and compares the sampled values with the
predefined threshold and does the following:
z If the rising threshold is reached, triggers the event specified by the event-entry1 argument.
z If the falling threshold is reached, triggers the event specified by the event-entry2 argument.
Note the following:
z Before creating an alarm entry, define the events to be referenced in the event table with the rmon
event command; otherwise, although the alarm entry can be created, no alarm event is triggered.
z If the alarm variable is an instance of the leaf node of the Ethernet statistics table etherStatsEntry
with the OID of 1.3.6.1.2.1.16.1.1.1, you must create a statistics entry on the monitored Ethernet
interface with the rmon statistics command; if the alarm variable is an instance of the leaf node of
the history record table etherHistoryEntry with the OID of 1.3.6.1.2.1.16.2.2.1, you must create a
history entry on the monitored Ethernet interface with the rmon history command. Otherwise,
although the alarm entry can be created, no alarm event is triggered.
z An entry cannot be created if the values of the specified alarm variable (alarm-variable), sampling
interval (sampling-interval), sampling type (absolute or delta), rising threshold (threshold-value1)
and falling threshold (threshold-value2) are identical to those of the existing alarm entry in the
system.
z You can create up to 60 alarm entries.
Related commands: display rmon alarm, rmon event, rmon history, rmon statistics.
Examples
# Add entry 1 in the alarm table and sample the node 1.3.6.1.2.1.16.1.1.1.4.1 at a sampling interval of
10 seconds in absolute sampling type. Trigger event 1 when the sampled value is greater than or equal
to the rising threshold of 5000, and event 2 when the sampled value is less than or equal to the falling
threshold of 5. Set the owner of the entry to be user1.
<Sysname> system-view
[Sysname] rmon event 1 log
[Sysname] rmon event 2 none
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] rmon statistics 1
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] rmon alarm 1 1.3.6.1.2.1.16.1.1.1.4.1 10 absolute rising-threshold 5000 1
falling-threshold 5 2 owner user1
1.3.6.1.2.1.16.1.1.1.4 is the OID of the leaf node etherStatsOctets. It represents the statistics of the
received packets on the interface, in bytes. In the above example, you can use etherStatsOctets.1 to
replace the parameter 1.3.6.1.2.1.16.1.1.1.4.1, where 1 indicates the serial number of the interface
statistics entry. Therefore, if you execute the rmon statistics 5 command, you can use
etherStatsOctets.5 to replace the parameter.
The above configuration implements the following:
z Sampling and monitoring interface GigabitEthernet 1/0/1
z Obtaining the absolute value of the number of received packets. If the total bytes of the received
packets reach 5,000, the system will log the event; if the total bytes of the received packets are no
more than 5, the system will take no action.
1-12
rmon event
Syntax
rmon event entry-number [ description string ] { log | log-trap log-trapcommunity | none | trap
trap-community } [ owner text ]
undo rmon event entry-number
View
System view
Default Level
2: System level
Parameters
Description
Use the rmon event command to create an entry in the RMON event table.
Use the undo rmon event command to remove a specified entry from the RMON event table.
When create an event entry, you can define the actions that the system will take when the event is
triggered by its associated alarm in the alarm table. According to your configuration, the system can log
the event, send a trap, do both, or do neither at all.
Related commands: display rmon event, rmon alarm, rmon prialarm.
z An entry cannot be created if the values of the specified event description (description string),
event type (log, trap, logtrap or none), and community name (trap-community or
log-trapcommunity) are identical to those of the existing event entry in the system.
z You can create up to 60 event entries.
1-13
Examples
rmon history
Syntax
View
Default Level
2: System level
Parameters
Description
Use the rmon history command to create an entry in the RMON history control table.
Use the undo rmon history command to remove a specified entry from the RMON history control
table.
After an entry is created, the system periodically samples the number of packets received/sent on the
current interface, and saves the statistics as an instance under the leaf node of the etherHistoryEntry
table. The maximum number of history entries can be saved in the table is specified by buckets number.
If the number of the entries in the table has reached the maximum number, the system will delete the
earliest entry to save the latest one. The statistics include total number of received packets on the
current interface, total number of broadcast packets, total number of multicast packets in a sampling
period, and so on.
When you create an entry in the history table, if the specified history table size exceeds that supported
by the device, the entry will be created. However, the validated value of the history table size
corresponding to the entry is that supported by the device. You can use the display rmon history
command to view the configuration result.
1-14
z An entry cannot be created if the value of the specified sampling interval (interval
sampling-interval) is identical to that of the existing history entry in the system.
z You can create up to 100 history entries.
Examples
rmon prialarm
Syntax
View
System view
Default Level
2: System level
Parameters
1-15
from 0 to 65,535, with 0 meaning no corresponding event is triggered and no event action is taken when
an alarm is triggered.
falling-threshold threshold-value2 event-entry2: Sets the falling threshold, where threshold-value2
represents the falling threshold, in the range –2,147,483,648 to +2,147,483,647 and event-entry2
represents the index of the event triggered when the falling threshold is reached. event-entry2 ranges
from 1 to 65,535.
forever: Indicates that the lifetime of the private alarm entry is infinite.
cycle cycle-period: Sets the lifetime period of the private alarm entry, in the range 0 to 2,147,483,647
seconds.
owner text: Owner of the entry, a string of 1 to 127 characters. It is case sensitive and space is
supported.
Description
Use the rmon prialarm command to create an entry in the private alarm table of RMON.
Use the undo rmon prialarm command to remove a private alarm entry from the private alarm table of
RMON.
The following is how the system handles private alarm entries:
1) Samples the private alarm variables in the private alarm formula at the specified sampling interval.
2) Performs calculation on the sampled values with the formula.
3) Compares the calculation result with the predefined thresholds and does the following:
z If the result is equal to or greater than the rising threshold, triggers the event specified by the
event-entry1 argument.
z If the result is equal to or smaller than the falling threshold, triggers the event specified by the
event-entry2 argument.
z Before creating an alarm entry, define the events to be referenced in the event table with the rmon
event command.
z An entry cannot be created if the values of the specified alarm variable formula (prialarm-formula),
sampling type (absolute changeratio or delta), rising threshold (threshold-value1) and falling
threshold (threshold-value2) are identical to those of the existing alarm entry in the system.
z You can create up to 50 pri-alarm entries.
Related commands: display rmon prialarm, rmon event, rmon history, rmon statistics.
Examples
# Monitor the ratio of the broadcast packets received on the interface by using the private alarm.
Create entry 5 in the private alarm table. Calculate the private alarm variables with the
(1.3.6.1.2.1.16.1.1.1.6.1*100/.1.3.6.1.2.1.16.1.1.1.5.1) formula and sample the corresponding
variables at intervals of 10 seconds. Rising threshold of 80 corresponds to event 1 (and record the
event into the log table); falling threshold of 5 corresponds to event 2 (but neither log it nor send a trap).
Set the lifetime of the entry to forever and owner to user1. (Broadcast packet ratio= total number of
1-16
broadcast packets received on the interface/total number of packets received on the interface; the
formula is customized by users.)
<Sysname> system-view
[Sysname] rmon event 1 log
[Sysname] rmon event 2 none
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] rmon statistics 1
[Sysname-GigabitEthernet1/0/1] quit
[Sysname] rmon prialarm 1 (.1.3.6.1.2.1.16.1.1.1.6.1*100/.1.3.6.1.2.1.16.1.1.1.5.1)
BroadcastPktsRatioOfEth1/1 10 absolute rising-threshold 80 1 falling-threshold 5 2 entrytype
forever owner user1
rmon statistics
Syntax
View
Default Level
2: System level
Parameters
Description
Use the rmon statistics command to create an entry in the RMON statistics table.
Use the undo rmon statistics command to remove a specified entry from the RMON statistics table.
After an entry is created, the system continuously calculates the information of the interface. Statistics
include number of collisions, CRC alignment errors, number of undersize or oversize packets, number
of broadcasts, number of multicasts, number of bytes received, number of packets received. The
statistics are cleared after the device reboots.
1-17
To display information for the RMON statistics table, use the display rmon statistics command.
Examples
# Create an entry in the RMON statistics table for interface GigabitEthernet 1/0/1. The index of the entry
is 20, and the owner of the entry is user1.
<Sysname> system-view
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] rmon statistics 20 owner user1
1-18
Table of Contents
i
1 File System Management Commands
z The current working directory is the root directory of the storage medium on the device in the
examples in this manual.
z For the qualified filename formats, refer to File System Management Configuration.
Syntax
cd { directory | .. | / }
View
User view
Default Level
3: Manage level
Parameters
directory: Name of the target directory, in the format of [drive:/]path. For the detailed introduction to the
drive and path arguments, refer to File System Management Configuration. If no drive information is
provided, the argument represents a folder or subfolder under the current directory.
..: Returns to an upper directory. If the current working directory is the root directory, or no upper
directory exists, the current working directory does not change when the cd .. command is executed.
This argument does not support command online help.
/: Returns to the root directory of the storage medium. The keyword does not support command line
online help.
Description
Examples
# Return to the upper directory (Remember to enter a space after the keyword cd).
1-1
<Sysname> cd ..
After you change the current directory using the cd command, you can use the pwd command to view
the path of the current working directory.
copy
Syntax
View
User view
Default Level
3: Manage level
Parameters
Description
Examples
# Copy file testcfg.cfg under the current folder and save it as testbackup.cfg.
<Sysname> copy testcfg.cfg testbackup.cfg
Copy flash:/test.cfg to flash:/testbackup.cfg?[Y/N]:y
....
%Copy file flash:/test.cfg to flash:/testbackup.cfg...Done.
delete
Syntax
View
User view
Default Level
3: Manage level
Parameters
/unreserved: Permanently deletes the specified file, and the deleted file can never be restored.
1-2
file-url: Name of the file to be deleted. Asterisks (*) are acceptable as wildcards. For example, to remove
files with the extension of .txt in the current directory, you may use the delete *.txt command.
Description
Use the delete file-url command to temporarily delete a file. The deleted file is saved in the recycle bin.
To restore it, use the undelete command.
The dir /all command displays the files deleted from the current directory and moved to the recycle bin.
These files are enclosed in pairs of square brackets. To remove the files from the recycle bin, use the
reset recycle-bin command.
The delete /unreserved file-url command permanently deletes a file, and the deleted file cannot be
restored. Use it with caution.
If you delete two files in different directories but with the same filename, only the last one is retained in
the recycle bin.
Examples
dir
Syntax
View
User view
Default Level
3: Manage level
Parameters
Description
Use the dir command to display information about all visible files and folders in the current directory.
1-3
Use the dir /all command to display information about all files and folders in the current directory,
including hidden files, hidden sub-folders and the files in the recycle bin that originally belong to the
current directory. The names of these deleted files are enclosed in pairs of brackets [ ].
The dir file-url command displays information about a file or folder.
Examples
Field Description
Directory of The current working directory
d Indicates a directory; if this field does not exist, it indicates a file.
r Indicates that the file or directory is readable.
w Indicates that the file or directory is writable.
h Indicates that the file or directory is hidden.
[] Indicates that the file is in the recycle bin.
Syntax
View
Any view
Default Level
2: System level
Parameters
1-4
Description
Use the display nandflash file-location command to display the location of the specified file in the
NAND flash memory.
The displayed information includes all the physical pages corresponding to the logical pages of the
specified file.
Examples
# Display the location of the file test.cfg in the NAND flash memory.
<Sysname> display nandflash file-location test.cfg
Logical Chunk Physical Page
---------------------------
chunk(0) 1234
chunk(1) 1236
chunk(2) 1235
filename: test.cfg
Field Description
Logic Chunk Serial number of the logical pages
Syntax
View
Any view
Default Level
2: System level
Parameters
None
Description
Use the display nandflash badblock-location command to display the number and location of bad
blocks in the NAND flash memory.
Examples
# Display the number and location of bad blocks in the NAND flash memory.
<Sysname> display nandflash badblock-location
1-5
No Physical block
------------------------------
badblock(0) 1234
badblock(1) 1235
badblock(2) 1236
3200 block(s) total, 3 block(s) bad.
Field Description
No Serial number of the bad blocks
Serial number of the physical pages on which there are bad
Physical block
blocks
3200 block(s) total, 3 block(s)
Total number of blocks and bad blocks in the NAND flash memory
bad.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display nandflash page-data command to display the data on the specified physical page in
the NAND flash memory.
This command is always used in combination with the display nandflash file-location command to
check the correctness of the data in the NAND flash memory.
Examples
# Display the content of the file test.cfg which is saved in the NAND flash memory.
<Sysname> display nandflash file-location test.cfg
Logical Chunk Physical Page
---------------------------
chunk(0) 1234
chunk(1) 1236
chunk(2) 1235
filename: test.cfg
<Sysname> display nandflash page-data 1236
1-6
0000: 0D 0A 23 0D 0A 20 76 65 72 73 69 6F 6E 20 35 2E ..#.. version 5.
0010: 32 30 2C 20 41 6C 70 68 61 20 31 30 31 31 0D 0A 20, Alpha 1011..
0020: 23 0D 0A 20 73 79 73 6E 61 6D 65 20 48 33 43 0D #.. sysname H3C.
0030: 0A 23 0D 0A 20 70 61 73 73 77 6F 72 64 2D 63 6F .#.. password-co
...Omitted...
execute
Syntax
execute filename
View
System view
Default Level
2: System level
Parameters
filename: Name of a batch file with a .bat extension. You can use the rename command to change the
suffix of the configuration file to .bat to use it as a batch file.
Description
Examples
file prompt
Syntax
View
System view
1-7
Default Level
3: Manage level
Parameters
alert: Enables the system to warn you about operations that may bring undesirable results such as file
corruption or data loss.
quiet: Disables the system from warning you about any operation.
Description
Use the file prompt command to set a prompt mode for file operations.
By default, the prompt mode is alert.
Note that when the prompt mode is set to quiet, the system does not warn for any file operation. To
avoid undesirable consequences resulting from misoperation, you are recommended to use the alert
mode.
Examples
fixdisk
Syntax
fixdisk device
View
User view
Default Level
3: Manage level
Parameters
Description
Use the fixdisk command to restore the space of a storage medium when it becomes unavailable
because of some abnormal operation.
Examples
1-8
format
Syntax
format device
View
User view
Default Level
3: Manage level
Parameters
Description
Formatting a storage medium results in loss of all the files on the storage medium and these files cannot
be restored. In particular, if there is a startup configuration file on a storage medium, formatting the
storage medium results in loss of the startup configuration file.
Examples
mkdir
Syntax
mkdir directory
View
User view
Default Level
3: Manage level
Parameters
1-9
Description
Use the mkdir command to create a folder under a specified directory on the storage medium.
Note that:
z The name of the folder to be created must be unique under the specified directory. Otherwise, you
will fail to create the folder under the directory.
z To use this command to create a folder, the specified directory must exist. For instance, to create
folder flash:/test/mytest, the test folder must exist. Otherwise, you will fail to create folder mytest.
Examples
more
Syntax
more file-url
View
User view
Default Level
3: Manage level
Parameters
Description
Use the more command to display the contents of the specified file.
So far, this command is valid only for text files.
Examples
#
version 5.20, Beta 1201, Standard
1-10
#
sysname Sysname
#
vlan 2
#
return
<Sysname>
move
Syntax
View
User view
Default Level
3: Manage level
Parameters
Description
Examples
pwd
Syntax
pwd
1-11
View
User view
Default Level
3: Manage level
Parameters
None
Description
Examples
rename
Syntax
View
User view
Default Level
3: Manage level
Parameters
Description
Examples
1-12
reset recycle-bin
Syntax
View
User view
Default Level
3: Manage level
Parameters
/force: Deletes all files in the recycle bin, including files that cannot be deleted by the command without
the /force keyword.
Description
Use the reset recycle-bin command to permanently delete the files in the recycle bin in the current
directory.
If a file is corrupted, you may not be able to delete the file using the reset recycle-bin command. In this
case, you can use the reset recycle-bin /force command, which can delete all the files in the recycle
bin forcibly.
Note that:
z Unlike this command, the delete file-url command only moves a file to the recycle bin, and the file
still occupies the memory space. To delete the file in the recycle bin, you need to execute the reset
recycle-bin command in the original directory of the file.
z The reset recycle-bin command deletes files in the current directory and in the recycle bin. If the
original path of the file to be deleted is not the current directory, use the cd command to enter the
original directory of the file, and then execute the reset recycle-bin command.
Examples
# Delete file b.cfg under the current directory and in the recycle bin.
z Display all the files in the recycle bin and under the current directory.
<Sysname> dir /all
Directory of flash:/
1-13
//The above information indicates that the current directory is flash:, and there are two files a.cfg and
b.cfg in the recycle bin.
z Delete file b.cfg under the current directory and in the recycle bin.
<Sysname> reset recycle-bin
Clear flash:/~/a.cfg ?[Y/N]:n
Clear flash:/~/b.cfg ?[Y/N]:y
Clearing files from flash may take a long time. Please wait...
......
%Cleared file flash:/~/b.cfg...
z In directory flash:, check whether the file b.cfg in the recycle bin is deleted.
<Sysname> dir /all
Directory of flash:/
// The above information indicates only one file exists in the folder, and the file has been moved to the
recycle bin.
z Permanently delete file test/aa.cfg.
<Sysname> reset recycle-bin
Clear flash:/test/~/aa.cfg ?[Y/N]:y
Clearing files from flash may take a long time. Please wait...
..
%Cleared file flash:/test/~/aa.cfg...
1-14
rmdir
Syntax
rmdir directory
View
User view
Default Level
3: Manage level
Parameters
Description
Examples
undelete
Syntax
undelete file-url
View
User view
Default Level
3: Manage level
Parameters
Description
Use the undelete command to restore a file from the recycle bin.
If another file with the same name exists under the same path, the undelete operation will cause it to be
overwritten and the system will prompt you whether to continue.
1-15
Examples
Or, you can use the following steps to restore file flash:/test/b.cfg.
<Sysname> cd test
<Sysname> undelete b.cfg
Undelete flash:/test/b.cfg?[Y/N]:y
.....
%Undeleted file flash:/test/b.cfg.
1-16
2 Configuration File Management Commands
Syntax
archive configuration
View
User view
Default Level
3: Manage level
Parameters
None
Description
Use the archive configuration command to save the current running configuration manually.
After the execution of this command, the system saves the current running configuration with the
specified filename (filename prefix + serial number) to the specified path.
Note the following:
Before executing the archive configuration command, you must configure the filename prefix and
path of the saved configuration file by using the archive configuration location command.
Examples
Syntax
View
System view
2-1
Default Level
3: Manage level
Parameters
minutes: Specifies the interval for automatically saving the current running configuration, in minutes.
The value ranges from 10 to 525,600 (365 days).
Description
Use the archive configuration interval command to enable the automatic saving of the current
running configuration and set the interval.
Use the undo archive configuration interval command to restore the default.
By default, the system does not save the current running configuration automatically.
After the execution of this command, the system saves the current running configuration with the
specified filename to the specified path at a specified interval (the value of the minutes argument).
Configure an automatic saving interval according to the storage medium performance and the
frequency of configuration modification:
z If the configuration of the device does not change frequently, you are recommended to save the
current running configuration manually as needed
z If a low-speed storage medium (such as a flash) is used, you are recommended either to save the
current running configuration manually, or to configure automatic saving with an interval longer
than 1,440 minutes (24 hours).
Note the following:
Before executing the archive configuration interval command, you must configure the filename prefix
and path of the saved configuration file by using the archive configuration location command.
Examples
# Configure the system to save the current running configuration every 60 minutes.
<Sysname> system-view
[Sysname] archive configuraion interval 60
Info: Archive files will be saved every 60 minutes.
Syntax
View
System view
Default Level
3: Manage level
2-2
Parameters
directory: The path of the folder for saving the saved configuration file, a case insensitive string of 1 to
63 characters, in the format of storage medium name:/[folder name]/subfolder name. The folder must
be created before the configuration.
filename-prefix: The filename prefix of a saved configuration file, a case insensitive string of 1 to 30
characters (can include letters, numbers, _, and - only).
Description
Use the archive configuration location command to configure the path and filename prefix of a saved
configuration file.
Use the undo archive configuration location command to restore the default.
By default, the path and filename prefix of a saved configuration file are not configured, and the system
does not save the configuration file periodically.
Note the following:
z Before the current running configuration is saved either manually or automatically, the file path and
filename prefix must be configured.
z If the undo archive configuration location command is executed, the current running
configuration can neither be saved manually nor automatically, and the configuration by executing
the archive configuration interval and archive configuration max commands restores to the
default, meanwhile, the saved configuration files are cleared.
Examples
# Configure the path and the filename prefix of a saved configuration file as flash:/archive/ and
my_archive respectively.
<Sysname> mkdir archive
.
%Created dir flash:/archive.
<Sysname> system-view
[Sysname] archive configuration location flash:/archive filename-prefix my_archive
Syntax
View
System view
Default Level
3: Manage level
2-3
Parameters
file-number: The maximum number of configuration files that can be saved, in the range 1 to 10. The
value of the file-number argument is determined by the memory space. You are recommended to set a
comparatively small value for this argument if the available memory space is small.
Description
Use the archive configuration max command to set the maximum number of configuration files that
can be saved.
Use the undo archive configuration max command to restore the default.
By default, a maximum of 5 configuration files can be saved.
Since excessive configuration files occupy large memory space, you can use this command to control
the number of the files. After the maximum number of configuration files is saved, the system deletes
the oldest files when the next file is saved (either automatically or manually). When you change the
maximum number of configuration files that can be saved, the exceeded files are not deleted. If the
number of the existing configuration files is larger than or equal to the newly configured upper limit, the
system deletes the oldest n files when the next file is saved, where n = the current number - the newly
configured number + 1, for example: if the number of configuration files that have been saved is 7, and
the newly configured upper limit is 4, when there is a new configuration file to be saved, the system
deletes 4 oldest files, where 4 = 7-4+1.
Before executing this command, configure the path and filename prefix of a saved configuration file by
using the archive configuration location command; otherwise, the execution of this command fails.
Note that, if the undo archive configuration location command is executed, the maximum number of
configuration files that can be saved also restores to the default.
Examples
# Set the maximum number of configuration files that can be saved to 10.
<Sysname> system-view
[Sysname] archive configuration max 10
backup startup-configuration
Syntax
View
User view
Default Level
2: System level
Parameters
2-4
Description
Use the backup startup-configuration command to back up the startup configuration file (used at the
next system startup) to a specified TFTP server. If you do not specify this filename, the original filename
is used.
This command only backs up the main startup configuration file.
Presently, the device uses TFTP to back up configuration files.
Examples
# Back up the startup configuration file of the device to the TFTP server with IP address 2.2.2.2, using
filename 192-168-1-26.cfg.
<Sysname> display startup
Current startup saved-configuration file: flash:/config.cfg
Next startup saved-configuration file: flash:/test.cfg
<Sysname> backup startup-configuration to 2.2.2.2 192-168-1-26.cfg
Backup next startup-configuration file to 2.2.2.2, please wait…finished!
<Sysname>
After the above operation, the device backs up file test.cfg to TFTP server 2.2.2.2, where the file is
saved as 192-168-1-26.cfg.
Syntax
View
System view
Default Level
3: Manage level
Parameters
filename: Specifies the name of the replacement configuration file for configuration rollback.
Description
Examples
# Roll back from the current running configuration to a previous configuration state based on a saved
configuration file my_archive_1.cfg.
<Sysname> system-view
[Sysname] configuration replace file my_archive_1.cfg
Info: Now replacing the current configuration. Please wait...
Info: Succeeded in replacing current configuration with the file my_archive_1.cfg.
2-5
display archive configuration
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display archive configuration command to display the information about configuration
rollback.
Examples
Field Description
Location Absolute path of the saved configuration files
display saved-configuration
Syntax
2-6
View
Any view
Default Level
2: System level
Parameters
Description
Use the display saved-configuration command to display the contents of the configuration file saved
for the next startup of the device.
During device management and maintenance, you can use this command to check whether important
configurations are saved to the configuration file to be used for the next startup of the device.
For a device supporting main and backup configuration files, this command displays the main
configuration file to be used for the next system startup.
If the system is not specified with a configuration file for the next startup or the specified configuration
file does not exist, no information will be displayed when you execute the display saved-configuration
command.
Related commands: save, reset saved-configuration; display current-configuration in Basic
System Configuration Commands.
Examples
# Display the configuration file saved for the next startup of the device.
<Sysname> display saved-configuration
#
version 5.20, Test 5310
#
sysname Sysname
#
domain default enable system
#
telnet server enable
#
multicast routing-enable
#
vlan 1
#
vlan 999
#
domain system
access-limit disable
state active
idle-cut disable
self-service-url disable
#
2-7
interface NULL0
#
---- More ----
The configurations are displayed in the order of global, port, and user interface. “ ---- More ----” means
that all information on this screen has been displayed, and if you press the Space key, the next screen
will be displayed.
# Display the contents of the configuration file saved for the next startup of the device with a number
identifying each line.
<Sysname> display saved-configuration by-linenum
1: #
2: version 5.20, Test 5310
3: #
4: sysname Sysname
5: #
6: domain default enable system
7: #
8: telnet server enable
9: #
10: multicast routing-enable
11: #
12: vlan 1
13: #
14: vlan 999
15: #
16: domain system
17: access-limit disable
18: state active
19: idle-cut disable
20: self-service-url disable
21: #
22: interface NULL0
23: #
---- More ----
“ ---- More ----” means that all information on this screen has been displayed, and if you press the
Space key, the next screen will be displayed.
display startup
Syntax
display startup
View
Any view
Default Level
1: Monitor level
2-8
Parameters
None
Description
Use the display startup command to display the configuration files used at the current system startup.
Related commands: startup saved-configuration.
Examples
# Display the configuration file used at the current system startup and the one to be used at the next
system startup.
<Sysname> display startup
Current startup saved-configuration file: flash:/config.cfg
Next main startup saved-configuration file: flash:/config.cfg
Next backup startup saved-configuration file: NULL
Field Description
Current Startup saved-configuration file The configuration file used for the current startup
Next main startup saved-configuration file Main configuration file used for the next startup
Next backup startup saved-configuration file Backup configuration file used for the next startup
reset saved-configuration
Syntax
View
User view
Default Level
2: System level
Parameters
Description
Use the reset saved-configuration command to delete the startup configuration file saved on the
storage medium of the device.
Note that:
z This command will permanently delete the configuration file from the device. Use it with caution.
z On a device that has the main and backup startup configuration files, you can choose to delete
either the main or backup startup configuration file. However, in the case that the main and backup
startup configuration files are the same, if you perform the delete operation for once, the system will
2-9
not delete the configuration file but only set the corresponding startup configuration file (main or
backup, according to which one you specified in the command) to NULL.
z For a device that supports the main and backup keywords, the execution of the reset
saved-configuration command and that of the reset saved-configuration main command have
the same effect, that is, they will delete the main startup configuration file.
Related commands: save, display saved-configuration.
Examples
# Delete the configuration file for the next startup from the storage medium of the device.
<Sysname> reset saved-configuration
The saved configuration file will be erased. Are you sure? [Y/N]:y
Configuration file in flash is being cleared.
Please wait ...........
Configuration file is cleared.
restore startup-configuration
Syntax
View
User view
Default Level
2: System level
Parameters
Description
Use the restore startup-configuration command to download a configuration file from the specified
TFTP server to the device and specify the configuration file as the startup configuration file to be used at
the next startup of the device.
The file downloaded is set as the main startup configuration file to be used at the next system startup.
Examples
# Download configuration file test.cfg from the TFTP server whose IP address is 2.2.2.2, and the
configuration file is to be used at the next startup of the device.
<Sysname> restore startup-configuration from 2.2.2.2 test.cfg
Restore next startup-configuration file from 2.2.2.2. Please wait..............
finished!
2-10
save
Syntax
save file-url
save [ safely ] [ backup | main ]
View
Any view
Default Level
2: System level
Parameters
file-url: File path, where the extension of the file name must be .cfg.
safely: Sets the configuration saving mode to safe. If this argument is not specified, the configuration
file is saved in fast mode.
backup: Saves the current configuration to the startup configuration file specified in the interactive
mode, and specifies the file as the backup startup configuration file to be used at the next startup of the
device.
main: Saves the current configuration to the main startup configuration file specified in the interactive
mode, and specifies the file as the main startup configuration file to be used at the next startup of the
device.
Description
Use the save file-url command to save the current configuration to the specified configuration file, but
the system will not specify the file as the startup configuration file for the next system startup. If the file
specified by file-url does not exist, the system will create the file and then save the configuration to the
file.
Use the save [ safely ] [ backup | main ] command to save the current configuration to the root
directory of the storage medium, and specify the file as the startup configuration file for the next system
startup.
Related commands: reset saved-configuration, display current-configuration, display
saved-configuration.
Examples
# Save the current configuration file to the specified directory, but do not specify the configuration file as
the configuration file for the next startup.
<Sysname> save test.cfg
The current configuration will be saved to flash:/test.cfg. Continue? [Y/N]:y
Now saving current configuration to the device.
Saving configuration flash:/test.cfg. Please wait...
............
Configuration is saved to flash successfully.
# Save the current configuration file to the root directory of the storage medium, and specify the
configuration file as the configuration file for the next startup.
2-11
<Sysname> display startup
Current startup saved-configuration file: flash:/hmr.cfg
Next main startup saved-configuration file: flash:/aa.cfg
Next backup startup saved-configuration file: NULL
// The above information indicates that the main startup configuration file for the next system startup is
aa.cfg.
<Sysname> save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/aa.cfg]
(To leave the existing filename unchanged, press the enter key):startup.cfg
Validating file. Please wait............
Configuration is saved to device successfully.
<Sysname> display startup
Current startup saved-configuration file: flash:/hmr.cfg
Next main startup saved-configuration file: flash:/startup.cfg
Next backup startup saved-configuration file: NULL
// The above information indicates that the main startup configuration file for the next system startup is
changed to startup.cfg.
startup saved-configuration
Syntax
View
User view
Default Level
2: System level
Parameters
cfgfile: Configuration file name. The file must be a file with an extension .cfg stored in the root directory
of the storage medium.
backup: Sets the configuration file as the backup startup configuration file that will be used at the next
startup of the device.
main: Sets the configuration file as the main startup configuration file that will be used at the next
startup of the device.
Description
Use the startup saved-configuration command to specify a startup configuration file (the
configuration file to be used at the next system startup).
Use the undo startup saved-configuration command to configure the system to start up with the null
configuration, that is, the factory configuration.
2-12
z The startup saved-configuration and startup saved-configuration main commands have the
same effect: Both of them are used to specify the main startup configuration file.
z The main and backup startup configuration files can be specified as the same file. However, it is
recommended you use different files, or, save the same configuration as two files using different
file names, one specified as the main startup configuration file, and the other specified as the
backup.
z If you execute the undo startup saved-configuration command, the system will set the main and
backup startup configuration file as NULL, but will not delete the two configuration files.
Related commands: display startup.
Examples
2-13
Table of Contents
i
1 System Maintaining and Debugging Commands
Syntax
View
Any view
Default Level
0: Visit level
Parameters
ip: Supports IPv4 protocol. If this keyword is not provided, IPv4 is also supported.
-a source-ip: Specifies the source IP address of an ICMP echo request (ECHO-REQUEST). It must be
an IP address configured on the device. If this parameter is not provided, the source IP address of an
ICMP echo request is the primary IP address of the outbound interface of the request.
-c count: Specifies the number of times that an ICMP echo request is sent, in the range 1 to
4294967295. The default value is 5.
-f: Discards packets larger than the MTU of a given interface, that is, the ICMP echo request is not
allowed to be fragmented.
-h ttl: Specifies the TTL value for an ICMP echo request, in the range 1 to 255. The default value is 255.
-i interface-type interface-number: Specifies the ICMP echo request sending interface by its type and
number. If this parameter is not provided, the ICMP echo request sending interface is determined by
searching the routing table or forwarding table according to the destination IP address.
-m interval: Specifies the interval (in milliseconds) to send an ICMP echo response, in the range 1 to
65535. The default value is 200 ms.
z If a response from the destination is received within the timeout time, the interval to send the next
echo request equals the actual response period plus the value of interval.
z If no response from the destination is received within the timeout time, the interval to send the next
echo request equals the timeout value plus the value of interval.
-n: Specifies that the Domain Name System (DNS) is disabled for the host argument. When this
keyword is not provided, if the host argument represents the host name of the destination, the device
will translate host into an address.
-p pad: Specifies the value of the pad field in an ICMP echo request, in hexadecimal format, 1 to 8 bits,
in the range 0 to ffffffff. If the specified value is less than 8 bits, 0s will be added in front of the value to
1-1
extend it to 8 bits. For example, if pad is configured as 0x2f, then the packets will be padded with
0x0000002f repeatedly to make the total length of the packet meet the requirements of the device. By
default, the padded value starts from 0x01 up to 0xff, where another round starts again if necessary, like
0x010203…feff01….
-q: Presence of this keyword indicates that only statistics are displayed. Absence of this keyword
indicates that all information is displayed.
-r: Records routing information. If this keyword is not provided, routes are not recorded.
-s packet-size: Specifies length (in bytes) of an ICMP echo request, in the range 20 to 8100. The default
value is 56.
-t timeout: Specifies the timeout value (in milliseconds) of an ICMP echo reply (ECHO-REPLY). If the
source does not receive an ICMP echo reply within the timeout, it considers the ICMP echo reply timed
out. The value ranges from 0 to 65535 and defaults to 2000.
-tos tos: Specifies type of service (ToS) of an echo request, in the range 0 to 255. The default value is 0.
-v: Displays non ICMP echo reply received. If this keyword is not provided, the system does not display
non ICMP echo reply.
host: IP address or host name (a string of 1 to 20 characters) of the destination.
Description
Use the ping command to verify whether the destination in an IP network is reachable, and to display
the related statistics.
After you execute the ping command, the source will send an ICMP echo request to the destination:
z If the destination name is unrecognizable, the system outputs “Error: Ping: Unknown host
host-name”.
z If the source receives an ICMP echo reply from the destination within the timeout, the system
outputs the related information of the reply.
z If the source does not receive an ICMP echo reply from the destination within the timeout, the
system outputs “Request time out”.
z To use the name of the destination host to perform the ping operation, you must configure Domain
Name System (DNS) on the device first; otherwise, the ping operation fails. For the introduction
and configuration to DNS, refer to DNS Configuration. In addition, you must use the command in
the form of ping ip ip instead of ping ip if the destination name is a key word, such as ip.
During the execution of the command, you can press Ctrl+C to abort the ping operation.
Examples
1-2
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/41/205 ms
# Check whether the device with an IP address of 1.1.2.2 is reachable. The route information is required
to be displayed.
<Sysname> ping -r 1.1.2.2
PING 1.1.2.2: 56 data bytes, press CTRL_C to break
Reply from 1.1.2.2: bytes=56 Sequence=1 ttl=254 time=53 ms
Record Route:
1.1.2.1
1.1.2.2
1.1.1.2
1.1.1.1
Reply from 1.1.2.2: bytes=56 Sequence=2 ttl=254 time=1 ms
Record Route:
1.1.2.1
1.1.2.2
1.1.1.2
1.1.1.1
Reply from 1.1.2.2: bytes=56 Sequence=3 ttl=254 time=1 ms
Record Route:
1.1.2.1
1.1.2.2
1.1.1.2
1.1.1.1
Reply from 1.1.2.2: bytes=56 Sequence=4 ttl=254 time=1 ms
Record Route:
1.1.2.1
1.1.2.2
1.1.1.2
1.1.1.1
1-3
Reply from 1.1.2.2: bytes=56 Sequence=5 ttl=254 time=1 ms
Record Route:
1.1.2.1
1.1.2.2
1.1.1.2
1.1.1.1
Field Description
PING 1.1.2.2 Check whether the device with IP address 1.1.2.2 is reachable
56 data bytes Number of data bytes in each ICMP echo request
During the execution of the command, you can press Ctrl+C to
press CTRL_C to break
abort the ping operation.
0.00% packet loss Percentage of packets not responded to the total packets sent
Minimum/average/maximum response time, in ms. The field is
round-trip min/avg/max = 0/4/20
not available for failed ping attempts in an IPv4 network. In an
ms
IPv6 network, however, the field is available and set to 0/0/0 ms
tracert
Syntax
1-4
View
Any view
Default Level
0: Visit level
Parameters
-a source-ip: Specifies the source IP address of a tracert packet. It must be a legal IP address
configured on the device. If this parameter is not provided, the source IP address of an ICMP echo
request is the primary IP address of the outbound interface of the tracert packet.
-f first-ttl: Specifies the first TTL, that is, the allowed number of hops for the first packet, in the range 1 to
255. It defaults to 1 and must be less than the maximum TTL.
-m max-ttl: Specifies the maximum TTL, that is, the maximum allowed number of hops for a packet, in
the range 1 to 255. It defaults to 30, and must be greater than the first TTL.
-p port: Specifies the UDP port number of the destination, in the range 1 to 65535. The default value is
33434. You do not need to modify this parameter.
-q packet-number: Specifies the number of probe packets sent each time, in the range 1 to 65535. The
default value is 3.
-w timeout: Specifies the timeout time of the reply packet of a probe packet, in the range 1 to 65535, in
milliseconds. The default value is 5000 ms.
host: IP address or host name (a string of 1 to 20 characters) of the destination.
Description
Use the tracert command to trace the path the packets traverse from source to destination.
After having identified network failure with the ping command, you can use the tracert command to
determine the failed node(s).
Output information of the tracert command includes IP addresses of all the Layer 3 devices the packets
traverse from source to destination. If a device times out, "* * *" will be displayed.
During the execution of the command, you can press Ctrl+C to abort the tracert operation.
Examples
# Display the path the packets traverse from source to destination with an IP address of 1.1.2.2.
<Sysname> system-view
[Sysname] ip ttl-expires enable
[Sysname] ip unreachables enable
[Sysname] tracert 1.1.2.2
traceroute to 1.1.2.2(1.1.2.2) 30 hops max,40 bytes packet, press CTRL_C to break
1 1.1.1.2 673 ms 425 ms 30 ms
2 1.1.2.2 580 ms 470 ms 80 ms
Field Description
Display the route the IP packets traverse from the current
traceroute to 1.1.2.2(1.1.2.2)
device to the device whose IP address is 1.1.2.2.
1-5
Field Description
Maximum number of hops of the probe packets, which can be
hops max
set through the -m keyword
bytes packet Number of bytes of a probe packet
During the execution of the command, you can press Ctrl+C to
press CTRL_C to break
abort the tracert operation.
The probe result of the probe packets whose TTL is 1, including
the IP address of the first hop and the roundtrip time of three
1 1.1.1.2 673 ms 425 ms 30 ms probe packets.
The number of packets that can be sent in each probe can be
set through the -q keyword.
Syntax
View
User view
Default Level
1: Monitor level
Parameters
Description
1-6
z Output of the debugging information may degrade system efficiency, so you are recommended to
enable the debugging of the corresponding module for diagnosing network failure, and not to
enable the debugging of multiple modules at the same time.
z Default Level describes the default level of the debugging all command. Different debugging
commands may have different default levels.
z You must configure the debugging, terminal debugging and terminal monitor commands first
to display detailed debugging information on the terminal. For the detailed description on the
terminal debugging and terminal monitor commands, refer to Information Center Commands.
Related commands: display debugging.
Examples
display debugging
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
interface interface-type interface-number: Displays the debugging settings of the specified interface,
where interface-type interface-number represents the interface type and number.
module-name: Module name.
Description
Examples
1-7
Table of Contents
i
1 Basic Configuration Commands
Syntax
View
User view
Default Level
3: Manage level
Parameters
time: Configured time, in the format of HH:MM:SS, where HH is hours in the range 00 to 23, MM is
minutes in the range 00 to 59, and SS is seconds in the range 00 to 59. The first zero in the HH, MM, or
SS value can be omitted; if the value of SS is 00, the time argument can be represented in the format of
HH:MM; if both the values of MM and SS are 00s, the time argument can be represented in the format
of HH.
date: Configured date, in the format of MM/DD/YYYY or YYYY/MM/DD. MM is the month of the year in
the range 1 to 12, DD is the day of the month that varies with months, and YYYY is a year in the range
2000 to 2035.
Description
Use the clock datetime command to set the current time and date of the device.
The current time and date of the device must be set in an environment that requires the acquisition of
absolute time.
You may choose not to provide seconds when inputting the time parameters.
Related commands: clock summer-time one-off, clock summer-time repeating, clock timezone,
display clock.
Examples
1-1
clock summer-time one-off
Syntax
View
System view
Default Level
3: Manage level
Parameters
zone-name: Name of the daylight saving time, a string of 1 to 32 characters. It is case sensitive.
start-time: Start time, in the format of HH:MM:SS (hours/minutes/seconds). The zeros in the argument
can be omitted except for indicating 0 hours.
start-date: Start date, in the format of MM/DD/YYYY (months/days/years) or YYYY/MM/DD.
end-time: End time, in the format of HH:MM:SS (hours/minutes/seconds). The zeros in the argument
can be omitted except for indicating 0 hours.
end-date: End date, in the format of MM/DD/YYYY (months/days/years) or YYYY/MM/DD.
add-time: Time added to the standard time of the device, in the format of HH:MM:SS
(hours/minutes/seconds). The zeros in the argument can be omitted except for indicating 0 hours.
Description
Use the clock summer-time one-off command to adopt daylight saving time from the start-time of the
start-date to the end-time of the end-date. Daylight saving time adds the add-time to the current time of
the device.
Use the undo clock summer-time command to cancel the configuration of the daylight saving time.
By default, daylight saving time is configured on the device, and the universal time coordinated (UTC)
time zone is applied.
After the configuration takes effect, you can use the display clock command to view it. Besides, the
time of the log or debug information is the local time of which the time zone and daylight saving time
have been adjusted.
Note that:
z The time range from start-time in start-date to end-time in end-date must be longer than one day
and shorter than one year. Otherwise, the argument is considered as invalid and the configuration
fails.
z If the current system time is in the time range specified with this command, the system time
automatically adds “add-time” after the execution of this command.
Related commands: clock datetime, clock summer-time repeating, clock timezone, display clock.
Examples
# For daylight saving time in abc1 between 06:00:00 on 08/01/2006 and 06:00:00 on 09/01/2006, set
the system clock ahead one hour.
1-2
<Sysname> system-view
[Sysname] clock summer-time abc1 one-off 6 08/01/2006 6 09/01/2006 1
Syntax
View
System view
Default Level
3: Manage level
Parameters
Description
1-3
For example, when start-date and start-time are set to 2007/6/6 and 00:00:00, end-date and end-time to
2007/10/01 and 00:00:00, and add-time to 01:00:00, it specifies to adopt daylight saving time from
00:00:00 of June 6 until 00:00:00 of October 1 each year from 2007 (2007 inclusive). The daylight
saving time adds one hour to the current device time.
After the configuration takes effect, use the display clock command to view the result. The information
such as log file and debug adopts the local time modified by time-zone and daylight saving time.
Note that:
z The time range from “start-time” in “start-date” to “end-time” in “end-date” must be longer than one
day and shorter than one year. Otherwise, the argument is considered as invalid and the
configuration fails.
z If the current system time is in the time range specified with this command, the system time
automatically adds “add-time” after the execution of this command.
Related commands: clock datetime, clock summer-time one-off, clock timezone, display clock.
Examples
# For the daylight saving time in abc2 between 06:00:00 on 08/01/2007 and 06:00:00 on 09/01/2007
and from 06:00:00 08/01 to 06:00:00 on 09/01 each year after 2007, set the system clock ahead one
hour.
<Sysname> system-view
[Sysname] clock summer-time abc2 repeating 06:00:00 08/01/2007 06:00:00 09/01/2007 01:00:00
clock timezone
Syntax
View
System view
Default Level
3: Manage level
Parameters
Description
Use the clock timezone command to set the local time zone.
Use the undo clock timezone command to restore the local time zone to the default UTC time zone.
By default, the local time zone is UTC zone.
1-4
After the configuration takes effect, use the display clock command to view the result. The information
such as log file and debug adopts the local time modified by time-zone and daylight saving time.
Related commands: clock datetime, clock summer-time one-off, clock summer-time repeating,
display clock.
Examples
# Set the name of the local time zone to Z5, five hours ahead of UTC time.
<Sysname> system-view
[Sysname] clock timezone z5 add 5
command-privilege
Syntax
View
System view
Default Level
3: Manage level
Parameters
Description
Use the command-privilege command to assign a level for the specified command in the specified
view.
Use the undo command-privilege view command to restore the default.
By default, each command in a view has its specified level. For the details, refer to the related part of
Basic System Configuration in this manual. Command level falls into four levels: visit, monitor, system,
and manage, which are identified by 0 through 3. The administrator can assign a privilege level for a
user according to his need. When the user logs on a device, the commands available depend on the
user’s privilege. For example, if a user’s privilege is 3 and the command privilege of VTY 0 user
interface is 1, and the user logs on the system from VTY 0, he can use all the commands with privilege
smaller than three (inclusive).
Note that:
z You are recommended to use the default command level or modify the command level under the
guidance of professional staff; otherwise, the change of command level may bring inconvenience
to your maintenance and operation, or even potential security problem.
1-5
z When you configure the command-privilege command, the value of the command argument must
be a complete form of the specified command, that is, you must enter all needed keywords and
arguments of the command. The argument should be in the value range. 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); users with the
user privilege level of 0 cannot execute the command with the get, sget or source keyword, and
cannot specify the destination-filename argument.
z When you configure the undo command-privilege view command, the value of the command
argument can be an abbreviated form of the specified command, that is, you only need to enter the
keywords at the beginning of the command. 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) will be restored to the default level; if you have
modified the command 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.
z 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
corresponding command that is 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 users with the user privilege level of 1, you need to execute the following
three commands: command-privilege level 1 view shell system-view, command-privilege level
1 view system interface ethernet 1/1, and command-privilege level 1 view system quit, so that
the login users with the user privilege level of 1 can enter system view, execute the interface
ethernet command, and then return to user view.
Examples
# Set the command level of the system-view command in user view to 3. (By default, users with the
user privilege level of 2 or 3 can use the system-view command after login; after the following
configuration, only users with the user privilege level of 3 can use this command to enter system view
and configure the device. Therefore, the device security is improved.)
<Sysname> system-view
[Sysname] command-privilege level 3 view shell system-view
copyright-info enable
Syntax
copyright-info enable
undo copyright-info enable
View
System view
Default Level
3: Manage level
1-6
Parameters
None
Description
Use the copyright-info enable command to enable the display of copyright information.
Use the undo copyright-info enable command to disable the display of copyright information.
By default, the display of copyright information is enabled.
Examples
z If a user logs in to the device through Telnet, the following information is displayed:
****************************************************************************
* Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All rights reserved.*
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
****************************************************************************
<Sysname>
z If a user has already logged in through the console port, and then quits user view, the following
information is displayed:
**************************************************************************
* Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All rights reserved.*
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
****************************************************************************
display clipboard
Syntax
display clipboard
View
Any view
Default Level
1: Monitor level
1-7
Parameters
None
Description
Use the display clipboard command to view the contents of the clipboard.
To copy the specified content to the clipboard:
Move the cursor to the starting position of the content and press the <Esc+Shift+,> combination (“,” is
an English comma).
Move the cursor to the ending position of the content and press the <Esc+Shift+.> combination (“.” is an
English dot) to copy the specified content to the clipboard.
Examples
display clock
Syntax
display clock
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display clock command to view the current system time and date.
The current system time and date are decided by the clock datetime, clock summer-time one-off (or
clock summer-time repeating), clock timezone. Refer to Configuring the system clock in the
operation manual for the detailed rules.
Related commands: clock datetime, clock summer-time one-off, clock summer-time repeating,
clock timezone.
Examples
1-8
display current-configuration
Syntax
View
Any view
Default Level
2: System level
Parameters
Description
Use the display current-configuration command to display the current validated configuration of a
device.
You can use the display current-configuration command to view the currently validated configuration.
A parameter is not displayed if it has the default configuration. If the validated parameter is changed,
although you have configured it, the validated parameter is displayed. For example, ip address
11.11.11.11 24 has been configured on a Loopback interface. In this case, if you execute the display
current-configuration command, ip address 11.11.11.11 255.255.255.255 is displayed, meaning the
validated subnet mask is 32 bits.
Related commands: save, reset saved-configuration, display saved-configuration.
Examples
# Display the configuration from the line containing “user-interface” to the last line in the current
validated configuration (the output information depends on the device model and the current
configuration).
1-9
<Sysname> display current-configuration | begin user-interface
user-interface aux 0
user-interface vty 0 15
authentication-mode none
user privilege level 3
#
return
# Display the current valid SNMP configuration on the device (the output information depends on the
device model and the current configuration).
<Sysname> display current-configuration | include snmp
snmp-agent
snmp-agent local-engineid 800063A203000FE240A1A6
snmp-agent community read public
snmp-agent community write private
snmp-agent sys-info version all
display default-configuration
Syntax
display default-configuration
View
Any view
Default Level
2: System level
Parameters
None
Description
Use the display default-configuration command to display the factory defaults of a device. The
command displays all commands to be executed when the device boots with the factory defaults.
Related commands: display current-configuration, display saved-configuration.
Examples
# Display the factory defaults of the device (The factory defaults vary with device models. The detailed
displays are omitted here).
<Sysname> display default-configuration
display diagnostic-information
Syntax
display diagnostic-information
1-10
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display diagnostic-information command to display or save the statistics of the running
status of multiple modules in the system.
During daily maintenance or when the system is out of order, you need to display the running
information of each functional module to locate the problem. Generally, you need to execute the
corresponding display commands for each module, because each module has independent running
information. To collect more information at one time, you can execute the display
diagnostic-information command to display or save the statistics of the running status of multiple
modules in the system. Execution of the display diagnostic-information command equals execution
of the commands display clock, display version, display device, and display
current-configuration one by one.
Examples
You can view the content of the file aa.diag by executing the more.aa.diag command in user view, in
combination of the Page Up and Page Down keys.
# Display the statistics of each module's running status in the system.
<Sysname> display diagnostic-information
Save or display diagnostic information (Y=save, N=display)? [Y/N]:n
=================================================
===============display clock===============
=================================================
08:54:16 UTC Fri 11/15/2008
===================================================
===============display version===============
===================================================
……Omitted……
1-11
display hotkey
Syntax
display hotkey
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Examples
=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.
1-12
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.
display this
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display this command to display the validated configuration information under the current
view.
After finishing a set of configurations under a view, you can use the display this command to check
whether the configuration takes effect.
Note that:
z A parameter is not displayed if it has the default configuration.
z A parameter is not displayed if the configuration has not taken effect.
z Execution of this command in any user interface view displays the valid configuration in all the user
interfaces.
z Execution of this command in any VLAN view displays the configurations of all the created VLANs.
Examples
# Display the valid configuration information on interface GigabitEthernet1/0/1 (the output information
depends on the current configuration of the device).
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-gigabitethernet 1/0/1] display this
#
1-13
interface gigabitethernet 1/0/1
port link-mode bridge
port link-type hybrid
undo port hybrid vlan 1
port hybrid vlan 2 to 4 untagged
port hybrid pvid vlan 2
#
return
# Display the valid configuration information of all user interfaces (the output information depends on
the current configuration of the device).
<Sysname> system-view
[Sysname] user-interface vty 0
[Sysname-ui-vty0] display this
#
user-interface aux 0
user-interface vty 0
history-command max-size 256
user-interface vty 1 15
#
return
display version
Syntax
display version
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Examples
# Display system version information (The system version information varies with devices.).
<Sysname> display version
H3C Comware Platform Software
Comware Software, Version 5.20, Release 1101P09
Copyright (c) 2004-2010 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
1-14
H3C S5120-52P-SI uptime is 0 week, 0 day, 0 hour, 50 minutes
H3C S5120-52P-SI
128M bytes DRAM
128M bytes Nand Flash Memory
Config Register points to Nand Flash
header
Syntax
View
System view
Default Level
2: System level
Parameters
incoming: Sets the banner displayed when a Modem login user enters user view. If authentication is
needed, the incoming banner is displayed after the authentication is passed.
legal: Sets the authorization banner before a user logs onto the terminal interface. The legal banner is
displayed before the user inputs the username and password.
login: Sets the login banner at authentication.
motd: Banner displayed before login. If authentication is required, the banner is displayed before
authentication.
shell: Sets the banner displayed when a non Modem login user enters user view.
text: Banner message, which can be input in two formats. Refer to Basic System Configuration for the
detailed information.
Description
Examples
# Configure banners.
<Sysname> system-view
[Sysname] header incoming %
Please input banner content, and quit with the character '%'.
1-15
Welcome to incoming(header incoming)%
[Sysname] header legal %
Please input banner content, and quit with the character '%'.
Welcome to legal (header legal)%
[Sysname] header login %
Please input banner content, and quit with the character '%'.
Welcome to login(header login)%
[Sysname] header motd %
Please input banner content, and quit with the character '%'.
Welcome to motd(header motd)%
[Sysname] header shell %
Please input banner content, and quit with the character '%'.
Welcome to shell(header shell)%
The character % is the starting/ending character of text in this example. Entering % after the displayed
text quits the header command.
As the starting and ending character, % is not a part of a banner.
# Test the configuration remotely using Telnet. (only when login authentication is configured can the
login banner be displayed).
******************************************************************************
* Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
Login authentication
Password:
Welcome to shell(header shell)
<Sysname>
1-16
hotkey
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Examples
# Assign the hot key Ctrl+T to the display tcp status command.
<Sysname> system-view
[Sysname] hotkey ctrl_t display tcp status
=Defined hotkeys=
Hotkeys Command
CTRL_G display current-configuration
CTRL_L display ip routing-table
CTRL_O undo debug all
CTRL_T display tcp status
1-17
=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.
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.
super
Syntax
super [ level ]
View
User view
Default Level
0: Visit level
Parameters
1-18
Description
Use the super command to switch from the current user privilege level to a specified user privilege
level.
If you do not provide the level argument, the current user privilege level will be switched to 3.
Login users are classified into four levels that correspond to the four command levels. After users at
different levels log in, they can only use commands at their own, or lower, levels.
Note that:
Users can switch to a lower user privilege level unconditionally. However, no password is needed only
for AUX login user level switching; to switch to a higher user privilege level, and log in from VTY user
interfaces, users need to enter the password needed for the security’s sake. If the entered password is
incorrect or no password is configured, the switching fails. Therefore, before switching a user to a
higher user privilege level, you should configure the password needed.
Related commands: super password.
Examples
# Set the user privilege level to 2 (The current user privilege level is 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 the user privilege level back to 3 (Suppose password 123 has been set; otherwise, the user
privilege level cannot be switched to 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 password
Syntax
View
System view
Default Level
2: System level
Parameters
level user-level: User privilege level in the range 1 to 3, with the default as 3.
simple: Plain text password.
cipher: Cipher text password.
1-19
password: Password, a string of characters. It is case-sensitive.
z For simple password, it is a string of 1 to 16 characters.
z For cipher password, it is a string of 1 to 16 characters in plain text or 24 characters in cipher text.
For example, the simple text “1234567” corresponds to the cipher text
“(TT8F]Y\5SQ=^Q`MAF4<1!!”.
Description
Use the super password command to set the password needed to switch from a lower user privilege
level to a higher one.
Use the undo super password command to restore the default.
By default, no password is set to switch from a lower user privilege level to a higher one.
Note that:
z If simple is specified, the configuration file saves a simple password.
z If cipher is specified, the configuration file saves a cipher password.
z The user must always enter a simple password, no matter simple or cipher is specified.
z Cipher passwords are recommended, as simple ones are easily getting cracked.
Examples
sysname
Syntax
sysname sysname
undo sysname
View
System view
Default Level
2: System level
1-20
Parameters
Description
Examples
1-21
Table of Contents
i
1 Information Center Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
channel-number: Displays information of the channel with a specified number, where channel-number
represents the channel number, in the range 0 to 9.
channel-name: Displays information of the channel with a specified name, where channel-name
represents the channel name, which could be a default name or a self-defined name. The user needs to
specify a channel name first before using it as a self-defined channel name. For more information, refer
to the info-center channel name command.
Description
1-1
Examples
The above information indicates to output log information with the severity from 0 to 4, trap information
with the severity from 0 to 7 and debugging information with the severity from 0 to 7 to the console. The
information source modules are all modules (default).
Field Description
channel number A specified channel number, in the range 0 to 9.
A specified channel name, which varies with user’s configuration.
channel name For more information, refer to the info-center channel name
command.
The ID of the module to which the information permitted to pass
MODU_ID
through the current channel belongs
The name of the module to which the information permitted to pass
through the current channel belongs
NAME
Default means all modules are allowed to output system
information, but the module type varies with devices.
Indicates whether to enable or disable the output of log
ENABLE
information, which could be Y or N.
LOG_LEVEL The severity of log information, refer to Table 1-4 for details.
Indicates whether to enable or disable the output of trap
ENABLE
information, which could be Y or N.
TRAP_LEVEL The severity of trap information, refer to Table 1-4 for details.
Indicates whether to enable or disable the output of debugging
ENABLE
information, which could be Y or N.
The severity of debugging information, refer to Table 1-4 for
DEBUG_LEVEL
details.
display info-center
Syntax
display info-center
View
Any view
Default Level
1: Monitor level
1-2
Parameters
None
Description
Use the display info-center command to display the information of each output destination.
Examples
Field Description
The current state of the information center, which
Information Center
could be enabled or disabled.
Configurations on the log host destination (It can
Log host: be displayed only when the info-center loghost
command is configured), including IP address of
1.1.1.1, port number : 514, host facility :
the log host, number of the port that receives the
local2,
system information on the log host, logging
channel number : 8, channel name : channel8 facility used, and the channel number and
channel name used.)
1-3
Field Description
display logbuffer
Syntax
display logbuffer [ reverse ] [ level severity | size buffersize ] * [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default Level
1: Monitor level
1-4
Parameters
reverse: Displays log entries chronologically, with the most recent entry at the top. If this keyword is not
specified, the log entries will be displayed chronologically, with the oldest entry at the top.
level severity: Displays information of the log with specified level, where severity represents information
level, in the range 0 to 7.
size buffersize: Displays specified number of the latest log messages in the log buffer, where buffersize
represents the number of the latest log messages to be displayed in the log buffer, in the range 1 to
1,024.
|: Uses a regular expression to filter the output information. For detailed information about regular
expression, refer to section CLI Display in Basic System Configuration.
z begin: Displays the line that matches the regular expression and all the subsequent lines.
z exclude: Displays the lines that do not match the regular expression.
z include: Displays the lines that match the regular expression.
regular-expression: Regular expression, a string of 1 to 256 characters. Note that this argument is
case-sensitive and can have spaces included.
Description
Use the display logbuffer command to display the state of the log buffer and the log information
recorded. Absence of the size buffersize argument indicates that all log information recorded in the log
buffer is displayed.
Examples
# Display the state of the log buffer and the log information recorded.
<Sysname> display logbuffer
Logging buffer configuration and contents:enabled
Allowed max buffer size : 1024
Actual buffer size : 512
Channel number : 4 , Channel name : logbuffer
Dropped messages : 0
Overwritten messages : 718
1-5
Current messages : 512
Field Description
Indicates the current state of the log buffer and
Logging buffer configuration and contents
its contents, which could be enabled or disabled.
Allowed max buffer size The maximum buffer size allowed
Actual buffer size The actual buffer size
The channel number of the log buffer, defaults to
Channel number
4.
The channel name of the log buffer, defaults to
Channel name
logbuffer.
Dropped messages The number of dropped messages
The number of overwritten messages (when the
buffer size is not big enough to hold all
Overwritten messages
messages, the latest messages overwrite the old
ones).
Current messages The number of the current messages
Syntax
View
Any view
1-6
Default Level
1: Monitor level
Parameters
level severity: Displays the summary of the log buffer, where severity represents information level, in
the range 0 to 7.
Description
Use the display logbuffer summary command to display the summary of the log buffer.
Examples
Field Description
EMERG Represents emergency, refer to Table 1-4 for details
ALERT Represents alert, refer to Table 1-4 for details
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see CLI in the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays the lines that do not match the specified regular expression.
1-7
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, which is a case sensitive string of 1 to 256
characters.
Description
Use the display logfile buffer command to display contents of the log file buffer.
Note that all contents in the log file buffer will be cleared after they are successfully saved into the log file
automatically or manually.
Examples
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see CLI in the Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays the 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, which is a case sensitive string of 1 to 256
characters.
Description
Use the display logfile summary command to display the configuration of the log file.
Examples
1-8
Log file size quota : 5 MB
Log file directory : flash:/logfile
Writing frequency : 24 hour 0 min 10 sec
Field Description
The current state of a log file, which could be enabled or
Log file is
disabled.
Channel number The channel number of a log file, defaults to 9.
Log file size quota The maximum storage space reserved for a log file
Log file directory Log file directory
display trapbuffer
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
reverse: Displays trap entries chronologically, with the most recent entry at the top. If this keyword is
not specified, trap entries will be displayed chronologically, with the oldest entry at the top.
size buffersize: Displays specified number of the latest trap messages in a trap buffer, where buffersize
represents the number of the latest trap messages in a trap buffer, in the range 1 to 1,024.
Description
Use the display trapbuffer command to display the state and the trap information recorded.
Absence of the size buffersize argument indicates that all trap information is displayed.
Examples
# Display the state of the trap buffer and the trap information recorded.
<Sysname> display trapbuffer
Trapping buffer configuration and contents:enabled
Allowed max buffer size : 1024
Actual buffer size : 256
Channel number : 3 , channel name : trapbuffer
Dropped messages : 0
Overwritten messages : 0
Current messages : 2
1-9
#Aug 7 14:47:35:636 2008 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.3<linkDown>: Interface 983041 is Down, ifAdminStatus is 2,
ifOperStatus is 2
#Aug 7 14:47:47:724 2008 Sysname IFNET/4/INTERFACE UPDOWN:
Trap 1.3.6.1.6.3.1.1.5.4<linkUp>: Interface 983041 is Up, ifAdminStatus is 1, ifOperStatus
is 1
Field Description
Indicates the current state of the trap buffer and its
Trapping buffer configuration and contents
contents, which could be enabled or disabled.
Allowed max buffer size The maximum buffer size allowed
Actual buffer size The actual buffer size
Channel number The channel number of the trap buffer, defaults to 3.
The channel name of the trap buffer, defaults to
channel name
trapbuffer.
Dropped messages The number of dropped messages
The number of overwritten messages (when the
Overwritten messages buffer size is not big enough to hold all messages, the
latest messages overwrite the old ones).
Current messages The number of the current messages
Syntax
View
Interface view
Default Level
2: System level
Parameters
None
Description
Use the enable log updown command to allow a port to generate link up/down logging information
when the port state changes.
Use the undo enable log updown command to disable a port from generating link up/down logging
information when the port state changes.
1-10
By default, all the ports are allowed to generate port link up/down logging information when the port
state changes.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the info-center channel name command to name a channel with a specified channel number.
Use the undo info-center channel command to restore the default name for a channel with a specified
channel number.
Refer to Table 1-1 for details of default channel names and channel numbers.
Examples
Syntax
View
System view
1-11
Default Level
2: System level
Parameters
Description
Use the info-center console channel command to specify the channel to output system information to
the console.
Use the undo info-center console channel command to restore the default output channel to the
console.
By default, output of information to the console is enabled with channel 0 as the default channel (known
as console).
Note that the info-center console channel command takes effect only after the information center is
enabled first with the info-center enable command.
Examples
info-center enable
Syntax
info-center enable
undo info-center enable
View
System view
Default Level
2: System level
Parameters
None
Description
1-12
By default, the information center is enabled.
Examples
info-center logbuffer
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the info-center logbuffer command to enable information output to a log buffer and set the
corresponding parameters.
Use the undo info-center logbuffer command to disable information output to a log buffer.
By default, information is output to the log buffer with the default channel of channel 4 (logbuffer) and
the default buffer size of 512.
Note that the info-center logbuffer command takes effect only after the information center is enabled
with the info-center enable command.
Examples
# Configure the system to output information to the log buffer through channel 4, and set the log buffer
size to 50.
<Sysname> system-view
[Sysname] info-center logbuffer size 50
1-13
info-center logfile enable
Syntax
View
System view
Default Level
2: System level
Parameters
None
Description
Use the info-center logfile enable command to enable the output of system information to the log file.
Use the undo info-center logfile enable command to disable the output of system information to the
log file.
By default, the output of system information to the log file is enabled.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
freq-sec: Frequency with which the system saves the log file, which ranges from 1 to 86,400 seconds.
The default value is 86,400.
Description
Use the info-center logfile frequency command to configure the frequency with which the system
saves the log file.
1-14
Use the undo info-center logfile frequency command to restore the default frequency.
By default, the frequency with which the system saves the log file is 86,400.
Examples
# Configure the frequency with which the system saves the log file as 60,000 seconds.
<Sysname> system-view
[Sysname] info-center logfile frequency 60000
Syntax
View
System view
Default Level
2: System level
Parameters
size: The maximum storage space reserved for a log file, in MB. The default range form 1 to 10MB.
Description
Use the info-center logfile size-quota command to set the maximum storage space reserved for a log
file.
Use the undo info-center logfile size-quota command to restore the default maximum storage space
reserved for a log file.
By default, the storage space reserved for a log file is 5 MB
Examples
# Set the maximum storage space reserved for a log file to 6 MB.
<Sysname> system-view
[Sysname] info-center logfile size-quota 6
Syntax
View
System view
Default Level
2: System level
1-15
Parameters
dir-name: The name of the directory where a log file is saved, which is a string of 1 to 64 characters.
Description
Use the info-center logfile switch-directory command to configure the directory where a log file is
saved. Ensure that the directory is created first before saving a log file into it.
By default, the directory to save a log file is the log file directory under the logfile directory of the Flash.
Note that this command can be used to configure the directory to which a log file can be saved. The
configuration will lose after system restart.
Examples
info-center loghost
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the info-center loghost command to specify a log host and to configure the related parameters.
1-16
Use the undo info-center loghost command to restore the default configurations on a log host.
By default, output of system information to the log host is disabled. When it is enabled, the default
channel name will be loghost and the default channel number will be 2.
Note that:
z The info-center loghost command takes effect only after the information center is enabled with
the info-center enable command.
z Ensure to input a correct IP address while using the info-center loghost command to configure
the IP address for a log host. System will prompt an invalid address if the loopback address
(127.0.0.1) is input.
z A maximum number of 4 hosts (different) can be designated as the log host.
Examples
# Output log information to a Unix station with the IP address being 1.1.1.1/16.
<Sysname> system-view
[Sysname] info-center loghost 1.1.1.1
Syntax
View
System view
Default Level
2: System level
Parameters
interface-type interface-number: Specifies the egress interface for log information by the interface type
and interface number.
Description
Use the info-center loghost source command to specify the source IP address for log information.
Use the undo info-center loghost source command to restore the default.
By default, the interface for sending log information is determined by the matched route, and the
primary IP address of this interface is the source IP address of the log information.
After the source IP address of log information is specified, no matter the log information is actually
output through which physical interface, the source IP address of the log information is the primary IP
address of the specified interface. If you want to display the source IP address in the log information,
you can configure it by using this command.
Note that:
z The info-center loghost source command takes effect only after the information center is
enabled with the info-center enable command.
1-17
z The IP address of the specified source interface must be configured; otherwise, although the
info-center loghost source command can be configured successfully, the log host will not receive
any log information.
Examples
When the source IP address for log information is not specified, the status of interface GigabitEthernet
1/0/1 is up, and the log information in the following format is displayed on the log host:
<187>Jul 22 05:58:06 2008 Sysname %%10IFNET/3/LINK UPDOWN(l): GigabitEthernet1/0/1 link
status is UP.
# Specify the IP address of interface loopback 0 as the source IP address of log information.
<Sysname> system-view
[Sysname] interface loopback 0
[Sysname-LoopBack0] ip address 2.2.2.2 32
[Sysname-LoopBack0] quit
[Sysname] info-center loghost source loopback 0
After the above configuration, the status of interface GigabitEthernet 1/0/1 becomes up, and the log
information in the following format is displayed on the log host (compared with the format displayed
when the source IP address for log information is not specified, the following format has the
-DevIP=2.2.2.2 field which indicates the source IP address):
<187>Jul 22 06:11:31 2008 Sysname %%10IFNET/3/LINK UPDOWN(l):-DevIP=2.2.2.2;
GigabitEthernet1/0/1 link status is UP.
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the info-center monitor channel command to configure the channel to output system information
to the monitor.
Use the undo info-center monitor channel command to restore the default channel to output system
information to the monitor.
1-18
By default, output of system information to the monitor is enabled with a default channel name of
monitor and a default channel number of 1.
Note that the info-center monitor channel command takes effect only after the information center is
enabled with the info-center enable command.
Examples
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the info-center snmp channel command to configure the channel to output system information to
the SNMP module.
Use the undo info-center snmp channel command to restore the default channel to output system
information to the SNMP module.
By default, output of system information to the SNMP module is enabled with a default channel name of
snmpagent and a default channel number of 5.
For more information, refer to the display snmp-agent command in the SNMP Commands.
Examples
1-19
info-center source
Syntax
View
System view
Default Level
2: System level
Parameters
module-name: Specifies the output rules of the system information of the specified modules. For
instance, if information on ARP module is to be output, you can configure this argument as ARP. You
can use the info-center source ? command to view the modules supported by the device.
default: Specifies the output rules of the system information of all the modules allowed to output the
system information, including all the modules displayed by using the info-center source ? command.
debug: Debugging information.
log: Log information.
trap: Trap information.
level severity: Specifies the severity of system information, refer to Table 1-4 for details. With this
keyword, you can specify the severity level of the information allowed/denied to output.
state state: Configures whether to output the system information, which could be on (enabled) or off
(disabled). With this keyword, you can specify whether to output the specified system information.
channel-number: Specifies a channel number, in the range 0 to 9.
channel-name: Specifies a channel name, which could be a default name or a self-defined name. The
user needs to specify a channel name first before using it as a self-defined channel name. For more
information, refer to the info-center channel name command.
Description
Use the info-center source command to specify the output rules of the system information.
Use the undo info-center source command to remove the specified output rules.
By default, the output rules for the system information are listed in Table 1-9.
This command can be used to set the filter and redirection rules of log, trap and debugging information.
For example, the user can set to output log information with severity higher than warning to the log host,
and information with severity higher than informational to the log buffer. The user can also set to output
trap information of the IP module to a specified output destination.
Note that:
1-20
z If you do not use the module-name argument to set output rules for a module, the module uses the
default output rules or the output rules set by the default keyword; otherwise the module uses the
output rules separately set for it.
z If you use the default keyword to set the output rules for all the modules without specifying the
debug, log, and trap keywords, the default output rules for the modules are used. Refer to Table
1-9 for details.
z If you use the module-name argument to set the output rules for a module without specifying the
debug, log, and trap keywords, the default output rules for the module are as follows: the output of
log and trap information is enabled, with severity being informational; the output of debugging
information is disabled, with severity being debug. For example, if you execute the command
info-center source snmp channel 5, the command is actually equal to the command info-center
source snmp channel 5 debug level debugging state off log level informational state on trap
level informational state on.
z If you repeatedly use the command to set the output rules for a module or for all the modules with
the default keyword, the last configured output rules take effect
z After you separately set the output rules for a module, you must use the module-name argument to
modify or remove the rules. The new configuration by using the default keyword is invalid on the
module.
z You can configure to output the log, trap and debugging information to the trap buffer, but the trap
buffer only receives the trap information and discards the log and debugging information.
z You can configure to output the log, trap and debugging information to the log buffer, but the log
buffer only receives the log and debugging information and discards the trap information.
z You can configure to output the log, trap and debugging information to the SNMP module, but the
SNMP module only receives the trap information and discards the log and debugging information.
1-21
Examples
# Set the output channel for the log information of VLAN module to snmpagent and to output
information with severity being emergency. Log information of other modules cannot be output to this
channel; other types of information of this module may or may not be output to this channel.
<Sysname> system-view
[Sysname] info-center source default channel snmpagent log state off
[Sysname] info-center source vlan channel snmpagent log level emergencies state on
# Set the output channel for the log information of VLAN module to snmpagent and to output
information with severity being emergency. Log information of other modules and all the other system
information cannot be output to this channel.
<Sysname> system-view
[Sysname] info-center source default channel snmpagent debug state off log state off trap
state off
[Sysname] info-center source vlan channel snmpagent log level emergencies state on
info-center synchronous
Syntax
info-center synchronous
undo info-center synchronous
View
System view
Default Level
2: System level
Parameters
None
Description
1-22
z If system information, such as log information, is output before you input any information under a
current command line prompt, the system will not display the command line prompt after the
system information output.
z If system information is output when you are inputting some interactive information (non Y/N
confirmation information), then after the system information output, the system will not display the
command line prompt but your previous input in a new line.
Examples
# Enable the synchronous information output function, and then input the display interface gigabiethe
command to view Ethernet interface information.
<Sysname> system-view
[Sysname] info-center synchronous
% Info-center synchronous output is on
[Sysname] display interface ethe
At this time, the system receives log messages, and it then displays the log messages first. After the
system displays all the log messages, it displays the user’s previous input, which is display interface
ethe in this example.
%Apr 29 08:12:44:71 2007 Sysname IFNET/4/LINK UPDOWN:
GigabitEthernet1/0/1: link status is UP
[Sysname] display interface gigabitethe
After the above information is displayed, you can input rnet to complete your input of the display
interface gigabitethernet command, and then press the Enter key to execute the command.
# Enable the synchronous information output function, and then save the current configuration (input
interactive information).
<Sysname> system-view
[Sysname] info-center synchronous
% Info-center synchronous output is on
[Sysname] save
The current configuration will be written to the device. Are you sure? [Y/N]:
At this time, the system receives the log information, and it then displays the log information first. After
the system displays all the log information, it displays the user’s previous input, which is [Y/N] in this
example.
%May 21 14:33:19:425 2007 Sysname SHELL/4/LOGIN: VTY login from 192.168.1.44
[Y/N]:
After the above information is displayed, you can input Y or N to complete your input before the output
of the log information.
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the info-center syslog channel command to enable the output of system information to the Web
interface.
Use the undo info-center syslog channel command to restore the default.
By default, information is output to the Web interface with the default channel of channel 6.
Examples
# Configure the system to output information to the Web interface through channel 7.
<Sysname> system-view
[Sysname] info-center syslog channel 7
info-center timestamp
Syntax
View
System view
Default Level
2: System level
Parameters
1-24
z Mmm: The abbreviations of the months in English, which could be Jan, Feb, Mar, Apr, May, Jun,
Jul, Aug, Sep, Oct, Nov, or Dec.
z dd: The date, starting with a space if less than 10, for example “ 7”.
z hh:mm:ss:sss: The local time, with hh ranging from 00 to 23, mm and ss ranging from 00 to 59, and
sss ranging from 0 to 999.
z yyyy: Represents the year.
none: Indicates no time information is provided.
Description
Examples
At this time, if you execute the shutdown command on GigabitEthernet1/0/1 that is in the UP state, the
log information generated is as follows:
%0.1382605158 Sysname IFNET/4/LINK UPDOWN:
GigabitEthernet1/0/1: link status is DOWN
At this time, if you execute the shutdown command on GigabitEthernet1/0/1 that is in the UP state, the
log information generated is as follows:
%Sep 29 17:19:11:188 2007 Sysname IFNET/4/LINK UPDOWN:
GigabitEthernet1/0/1: link status is DOWN
At this time, if you execute the shutdown command on GigabitEthernet1/0/1 that is in the UP state, the
log information generated is as follows:
% Sysname IFNET/4/LINK UPDOWN:
GigabitEthernet1/0/1: link status is DOWN
Syntax
View
System view
1-25
Default Level
2: System level
Parameters
date: Indicates the current system date and time, in the format of "Mmm dd hh:mm:ss:ms yyyy".
However, the display format depends on the log host.
no-year-date: Indicates the current system date and time (year exclusive).
none: Indicates that no time stamp information is provided.
Description
Use the info-center timestamp loghost command to configure the time stamp format of the system
information sent to the log host.
Use the undo info-center timestamp loghost command to restore the default.
By default, the time stamp format for system information sent to the log host is date.
Examples
# Configure that the system information output to the log host does not include the year information.
<Sysname> system-view
[Sysname] info-center timestamp loghost no-year-date
info-center trapbuffer
Syntax
View
System view
Default Level
2: System level
Parameters
size buffersize: Specifies the maximum number of trap messages in a trap buffer, in the range 0 to
1,024 with 256 as the default value.
channel-number: Specifies a channel number, in the range 0 to 9.
channel-name: Specifies a channel name, which could be a default name or a self-defined name. The
user needs to specify a channel name first before using it as a self-defined channel name. For more
information, refer to the info-center channel name command.
Description
Use the info-center trapbuffer command to enable information output to the trap buffer and set the
corresponding parameters.
Use the undo info-center trapbuffer command to disable information output to the trap buffer.
1-26
By default, information output to the trap buffer is enabled with channel 3 (trapbuffer) as the default
channel and a maximum buffer size of 256.
Note that the info-center trapbuffer command takes effect only after the information center is enabled
with the info-center enable command.
Examples
# Configure the system to output information to the trap buffer through the default channel, and set the
trap buffer size to 30.
<Sysname> system-view
[Sysname] info-center trapbuffer size 30
logfile save
Syntax
logfile save
View
Any view
Default Level
2: System level
Parameters
None
Description
Use the logfile save command to save all the contents in the log file buffer into the log file.
By default, the system automatically saves the log file based on a frequency configured by the
info-center logfile frequency command into a directory configured by the info-center logfile
switch-directory command.
Note that all contents in the log file buffer will be cleared after they are successfully saved into the log file
automatically or manually.
Examples
# Save the contents in the log file buffer into the log file.
<Sysname> logfile save
reset logbuffer
Syntax
reset logbuffer
View
User view
1-27
Default Level
3: Manage level
Parameters
None
Description
Use the reset logbuffer command to reset the log buffer contents.
Examples
reset trapbuffer
Syntax
reset trapbuffer
View
User view
Default Level
3: Manage level
Parameters
None
Description
Use the reset trapbuffer command to reset the trap buffer contents.
Examples
terminal debugging
Syntax
terminal debugging
undo terminal debugging
View
User view
Default Level
1: Monitor level
1-28
Parameters
None
Description
Use the terminal debugging command to enable the display of debugging information on the current
terminal.
Use the undo terminal debugging command to disable the display of debugging information on the
current terminal.
By default, the display of debugging information on the current terminal is disabled.
Note that:
z The debugging information is displayed (using the terminal debugging command) only after the
monitoring of system information is enabled on the current terminal first (using the terminal
monitor command).
z The configuration of this command is valid for only the current connection between the terminal and
the device. If a new connection is established, the display of debugging information on the terminal
restores the default.
Examples
terminal logging
Syntax
terminal logging
undo terminal logging
View
User view
Default Level
1: Monitor level
Parameters
None
Description
Use the terminal logging command to enable the display of log information on the current terminal.
Use the undo terminal logging command to disable the display of log information on the current
terminal.
By default, the display of log information on the current terminal is disabled.
Note that:
1-29
z The log information is displayed (using the terminal logging command) only after the monitoring
of system information is enabled on the current terminal first (using the terminal monitor
command).
z The configuration of this command is valid for only the current connection between the terminal and
the device. If a new connection is established, the display of log information on the terminal
restores the default.
Examples
terminal monitor
Syntax
terminal monitor
undo terminal monitor
View
User view
Default Level
1: Monitor level
Parameters
None
Description
Use the terminal monitor command to enable the monitoring of system information on the current
terminal.
Use the undo terminal monitor command to disable the monitoring of system information on the
current terminal.
By default, monitoring of the system information on the console is enabled and that on the monitor
terminal is disabled.
Note that:
z You need to configure the terminal monitor command before you can display the log, trap, and
debugging information.
z Configuration of the undo terminal monitor command automatically disables the monitoring of log,
trap, and debugging information.
z The configuration of this command is valid for only the current connection between the terminal and
the device. If a new connection is established, the monitoring of system information on the terminal
restores the default.
Examples
1-30
Info: Current terminal monitor is on.
terminal trapping
Syntax
terminal trapping
undo terminal trapping
View
User view
Default Level
1: Monitor level
Parameters
None
Description
Use the terminal trapping command to enable the display of trap information on the current terminal.
Use the undo terminal trapping command to disable the display of trap information on the current
terminal.
By default, the display of trap information on the current terminal is enabled.
Note that:
z The trap information is displayed (using the terminal trapping command) only after the monitoring
of system information is enabled on the current terminal first (using the terminal monitor
command).
z The configuration of this command is valid for only the current connection between the terminal and
the device. If a new connection is established, the display of trap information on the terminal
restores the default.
Examples
1-31
Table of Contents
i
1 MAC Address Table Configuration Commands
Currently, interfaces involved in MAC address table configuration can only be Layer 2 Ethernet ports
and Layer 2 aggregate interfaces.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
blackhole: Destination blackhole MAC address entries. These entries do not age but you can add
or remove them. Packets whose destination MAC addresses match destination blackhole MAC
address entries are dropped.
vlan vlan-id: Displays MAC address entries of the specified VLAN, where vlan-id is in the range 1 to
4094.
count: Displays the number of MAC address entries specified by related parameters in the command.
When this keyword is used, the command displays only the number of specified MAC address entries,
rather than related information about these MAC address entries.
mac-address: Displays MAC address entries in a specified MAC address, in the format of H-H-H.
dynamic: Displays dynamic MAC address entries. Aging time is set for these entries.
static: Displays static MAC address entries. Similar to blackhole MAC address entries, these entries do
not age but you can add or remove them.
interface interface-type interface-number: Displays MAC address learning status of the specified
interface. interface-type interface-number specifies an interface by its type and number.
1-1
Description
Use the display mac-address command to display information about the MAC address table.
Note that:
z If you execute this command without specifying any parameters, this command displays
information of all MAC address entries on the device, including unicast MAC address entries and
static multicast MAC address entries.
z If you execute this command using only the vlan keyword or the count keyword, or only these two
keywords, the command output will include information of unicast MAC address entries as well as
that of static multicast MAC address entries.
Examples
# Display the MAC address table entry for MAC address 000f-e201-0101.
<Sysname> display mac-address 000f-e201-0101
MAC ADDR VLAN ID STATE PORT INDEX AGING TIME(s)
000f-e201-0101 1 Learned GigabitEthernet1/0/1 AGING
Field Description
Syntax
View
Any view
1-2
Default Level
1: Monitor level
Parameters
None
Description
Use the display mac-address aging-time command to display the aging time of dynamic entries in the
MAC address table.
Related commands: mac-address (system view), mac-address (Ethernet interface view),
mac-address timer, display mac-address.
Examples
# Display the aging time of dynamic entries in the MAC address table.
<Sysname> display mac-address aging-time
Mac address aging time: 300s
The above information indicates that the aging time of dynamic entries in the MAC address table is 300
seconds.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display mac-address statistics command to display the statistics of the MAC address table.
Examples
1-3
Table 1-2 display mac-address statistics command output description
Field Description
Syntax
View
Default Level
2: System level
Parameters
dynamic: Dynamic MAC address entries. Aging time is set for these entries.
static: Static MAC address entries. They do not age but you can add or remove them.
mac-address: Specifies a MAC address in the format of H-H-H, where 0s at the beginning of each H
(16-bit hexadecimal digit) can be omitted; for example, inputting “f-e2-1” indicates that the MAC address
is “000f-00e2-0001”.
vlan vlan-id: Specifies an existing VLAN to which the Ethernet interface belongs, where vlan-id is the
specified VLAN ID, in the range 1 to 4094.
Description
Use the mac-address command to add or modify a MAC address entry on a specified interface.
Use the undo mac-address command to remove a MAC address entry on the interface.
Note that, as your MAC address entries configuration cannot survive a reboot, save it after completing
the configuration. The dynamic MAC address table entries however will be lost whether you save the
configuration or not.
1-4
Related commands: display mac-address.
Examples
# Add a static entry for MAC address 000f-e201-0101 on port GigabitEthernet1/0/1 that belongs to
VLAN 2.
<Sysname> system-view
[Sysname] interface GigabitEthernet1/0/1
[Sysname- GigabitEthernet1/0/1] mac-address static 000f-e201-0101 vlan 2
# Add a static entry for MAC address 000f-e201-0102 on port Bridge-Aggregation 1 that belongs to
VLAN 1.
<Sysname> system-view
[Sysname] interface bridge-Aggregation 1
[Sysname-Bridge-Aggregation1] mac-address static 000f-e201-0102 vlan 1
Syntax
View
System view
Default Level
2: System level
Parameters
blackhole: Destination blackhole MAC address entries. These entries do not age but you can add
or remove them. The packets whose destination MAC addresses match destination blackhole MAC
address entries are dropped.
mac-address: Specifies a MAC address in the format of H-H-H, where 0s at the beginning of each H
(16-bit hexadecimal digit) can be omitted; for example, inputting “f-e2-1” indicates that the MAC address
is “000f-00e2-0001”.
vlan vlan-id: Specifies an existing VLAN to which the Ethernet interface belongs, where vlan-id is the
specified VLAN ID, in the range 1 to 4094.
dynamic: Dynamic MAC address entries. Aging time is set for these entries.
static: Static MAC address entries. These entries do not age but you can add or remove them.
1-5
interface interface-type interface-number: Outbound interface, with interface-type interface-number
representing the interface type and number.
Description
Examples
# Add a static entry for MAC address 000f-e201-0101. All frames destined to this MAC address are sent
out of port GigabitEthernet1/0/1 which belongs to VLAN 2.
<Sysname> system-view
[Sysname] mac-address static 000f-e201-0101 interface gigabitethernet1/0/1 vlan 2
Syntax
View
Ethernet interface view, port group view, Layer 2 aggregate interface view
Default Level
2: System level
Parameters
count: Maximum number of MAC addresses that can be learned on a port. When the argument takes 0,
the VLAN is not allowed to learn MAC addresses. The value range is 0 to 8192.
disable-forwarding: Disables forwarding of frames with unknown source MAC addresses after the
number of learned MAC addresses reaches the upper limit. Frames with the source MAC addresses
listed in the MAC address table will be forwarded normally.
1-6
Description
Use the mac-address max-mac-count count command to configure the maximum number of MAC
addresses that can be learned on a port.
Use the mac-address max-mac-count disable-forwarding command to configure not to forward
frames with unknown source MAC addresses after the number of learned MAC addresses reaches the
upper limit.
Use the undo mac-address max-mac-count command to restore the default maximum number of
MAC addresses that can be learned on an Ethernet port.
Use the undo mac-address max-mac-count disable-forwarding command to allow forwarding
frames received on an Ethernet port with unknown source MAC addresses after the number of learned
MAC addresses reaches the upper limit.
The default maximum number of MAC addresses that can be learned is not configured. When the upper
limit is reached, frames received are forwarded by default.
If the command is executed in interface view, the configuration takes effect on the current interface; if
the command is executed in port group view, the configuration takes effect on all ports belonging to the
port group.
Related commands: mac-address, mac-address timer.
Examples
# Set the maximum number of MAC addresses that can be learned on port GigabitEthernet1/0/1 to 600.
After this upper limit is reached, frames received with unknown source MAC addresses on the port will
not be forwarded.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] mac-address max-mac-count 600
[Sysname-GigabitEthernet1/0/1] mac-address max-mac-count disable-forwarding
mac-address timer
Syntax
View
System view
Default Level
2: System level
Parameters
aging seconds: Sets an aging timer (in seconds) for dynamic MAC address entries. The value range for
the seconds argument is 10~630.
no-aging: Sets dynamic MAC address entries not to age.
1-7
Description
Use the mac-address timer command to configure the aging timer for dynamic MAC address entries.
Use the undo mac-address timer command to restore the default.
The default of this command is 300 seconds.
Set the aging timer appropriately: a long aging interval may cause the MAC address table to retain
outdated entries and fail to accommodate the latest network changes; a short interval may result in
removal of valid entries and hence unnecessary broadcasts which may affect device performance.
Examples
# Set the aging timer for dynamic MAC address entries to 500 seconds.
<Sysname> system-view
[Sysname] mac-address timer aging 500
1-8
Table of Contents
1-1
ip-pool ············································································································································1-40
logging-host ···································································································································1-40
management-vlan··························································································································1-41
management-vlan synchronization enable····················································································1-42
nm-interface vlan-interface ············································································································1-43
reboot member ······························································································································1-43
snmp-host······································································································································1-44
tftp-server ······································································································································1-45
timer···············································································································································1-45
topology accept ·····························································································································1-46
topology restore-from ····················································································································1-47
topology save-to ····························································································································1-48
1-2
1 Cluster Management Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
interface interface-list: Specifies an Ethernet port list, which can contain multiple Ethernet ports. The
interface-list argument is in the format of interface-list = { interface-type interface-number [ to
interface-type interface-number ] } & <1-10>,where, interface-type is port type and interface-number is
port number, and &<1-10> means that you can provide up to 10 port indexes/port index lists for this
argument.
Description
Use the display ndp command to display NDP configuration information, which includes the interval to
send NDP packets, the time for the receiving device to hold NDP information and the information about
the neighbors of all ports.
Examples
Interface: GigabitEthernet1/0/2
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/3
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/4
Status: Enabled, Pkts Snd: 28440, Pkts Rvd: 27347, Pkts Err: 0
1-1
Neighbor 1: Aging Time: 122(s)
MAC Address : 00e0-fc00-2579
Host Name : Sysname
Port Name : GigabitEthernet1/0/4
Software Ver: ESS 11011101
Device Name : S5120
Port Duplex : AUTO
Product Ver : ESS 1101
BootROM Ver : 105BootROM Ver : 107
Interface: GigabitEthernet1/0/5
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/6
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/7
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/8
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/9
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/10
Status: Enabled, Pkts Snd: 28450, Pkts Rvd: 26520, Pkts Err: 0
Neighbor 1: Aging Time: 134(s)
MAC Address : 00e0-fc00-3133
Host Name : Sysname
Port Name : GigabitEthernet1/0/11
Software Ver: ESS 1101
Device Name : S5120
Port Duplex : AUTO
Product Ver : 105
Interface: GigabitEthernet1/0/11
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/12
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/13
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/14
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
1-2
Interface: GigabitEthernet1/0/15
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/16
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/17
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/18
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/19
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Interface: GigabitEthernet1/0/20
Status: Enabled, Pkts Snd: 0, Pkts Rvd: 0, Pkts Err: 0
Field Description
Neighbor Discovery Protocol is enabled NDP is enabled globally on the current device.
Neighbor Discovery Protocol Ver Version of NDP
1-3
ndp enable
Syntax
View
Default Level
2: System level
Parameters
interface interface-list: Specifies an Ethernet port list, which can contain multiple Ethernet ports. The
interface-list argument is in the format of interface-list = { interface-type interface-number [ to
interface-type interface-number ] } & <1-10>, where interface-type represents the port type,
interface-number represents the port number, and & <1-10> means that you can provide up to 10 port
indexes/port index lists for this argument.
Description
Examples
1-4
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] ndp enable
Syntax
View
System view
Default Level
2: System level
Parameters
aging-time: Time for a device to keep the NDP packets it receives, in the range 5 to 255 seconds.
Description
Use the ndp timer aging command to specify the time that a device should keep the NDP packets it
received from the adjacent device.
Use the undo timer aging command to restore the default.
By default, the time that a receiving device should keep the NDP packets is 180 seconds.
Note that the time for the receiving device to hold NDP packets cannot be shorter than the interval to
send NDP packets; otherwise, the NDP table may become instable.
Related commands: ndp timer hello.
Examples
# Configure the time that a receiving device should keep the NDP packets as 100 seconds.
<Sysname> system-view
[Sysname] ndp timer aging 100
Syntax
View
System view
Default Level
2: System level
1-5
Parameters
Description
Use the ndp timer hello command to set the interval to send NDP packets.
Use the undo ndp timer hello command to restore the default.
By default, the interval to send NDP packets is 60 seconds.
Note that the interval for sending NDP packets cannot be longer than the time for the receiving device to
hold NDP packets; otherwise, the NDP table may become instable.
Related commands: ndp timer aging.
Examples
Syntax
View
User view
Default Level
2: System level
Parameters
interface interface-list: Specifies an Ethernet port list, which can contain multiple Ethernet ports. The
interface-list argument is in the format of interface-list = { interface-type interface-number [ to
interface-type interface-number ] } & <1-10>, where interface-type represents the port type,
interface-number represents the port number, and & <1-10> means that you can provide up to 10 port
indexes/port index lists for this argument. If you provide this keyword, NDP statistics of the specified
port will be cleared; otherwise, NDP statistics of all ports will be cleared.
Description
Examples
1-6
NTDP Configuration Commands
display ntdp
Syntax
display ntdp
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Examples
Field Description
NTDP is running NTDP is enabled globally on the local device.
Hops Hop count for topology collection
Interval to collect topology information (after the cluster is
Timer
created)
Indicates the device is not a management device and unable to
disable
perform periodical topology collection
Delay time for the device to forward topology collection
Hop Delay
requests
Delay time for a topology-collection request to be forwarded
Port Delay
through a port
Last collection total time Time cost during the last collection
1-7
display ntdp device-list
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display ntdp device-list command to display the device information collected through NTDP.
Note that the information displayed may not be that of the latest device if you do not execute the ntdp
explore command before using this command.
Related commands: ntdp explore.
Examples
Field Description
MAC MAC address of a device
HOP Hops to the collecting device
IP address and mask length of the management VLAN interface
IP
on the device
Device Device model
Hostname : aaa_0.Sysname
MAC : 00e0-fc00-1400
Hop : 0
1-8
Device : H3C S5120
IP : 192.168.1.5/24
Version :
H3C Comware Platform Software
Comware Software, Version 5.20, Alpha 1101
Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
H3C S5120
Field Description
Hostname System name of the device
MAC MAC address of the device
Hops from the current device to the device that collect topology
Hop
information
Device Device model
IP address and subnet mask length of the management VLAN
IP
interface on the device
Version Version information
Role of the device in the cluster:
z Member switch of cluster aaa: The device is a member
device of the cluster aaa.
z Administrator switch of cluster aaa: The device is the
Cluster management device of the cluster aaa.
z Candidate switch: The device is a candidate device of
cluster aaa.
z Independent switch: The device is connected to the cluster,
but it has not joined the cluster. This may be because the
cluster function is not enabled on the device.
Administrator MAC MAC address of the management device
Peer MAC MAC address of a neighbor device
Peer Port ID Name of the peer port connected to the local port
Native Port ID Name of the local port to which a neighbor device is connected
Speed Speed of the local port to which a neighbor device is connected
Duplex mode of the local port to which a neighbor device is
Duplex
connected
Syntax
1-9
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display ntdp single-device mac-address command to view the detailed NTDP information of
a specified device.
Examples
# Display the detailed NTDP information of the device with a MAC address of 00E0-FC00-5111.
<Sysname> display ntdp single-device mac-address 00e0-fc00-5111
Hostname : aaa_1.42-com2
MAC : 00e0-fc00-5111
Hop : 1
Device : S5120
IP : 16.168.1.2/24
Version :
H3C Comware Platform Software
Comware Software, Version 5.20, Alpha 1101
Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
H3C S5120
Field Description
Hostname System name of the device
1-10
Field Description
Role of the device in the cluster:
z Member switch of cluster aaa: The device is a member
device of the cluster aaa.
z Administrator switch of cluster aaa: The device is the
Cluster management device of the cluster aaa.
z Candidate switch: The device is a candidate device of
cluster aaa.
z Independent switch: The device is connected to the cluster,
but it has not joined the cluster. This may be because the
cluster function is not enabled on the device.
Administrator MAC MAC address of the management device
Peer Port ID Name of the peer port connected to the local port
Native Port ID Name of the local port to which a neighbor device is connected
Speed Speed of the local port to which a neighbor device is connected
Duplex mode of the local port to which a neighbor device is
Duplex
connected
ntdp enable
Syntax
ntdp enable
undo ntdp enable
View
Default Level
2: System level
Parameters
None
Description
1-11
quit the aggregation group. For description of aggregation configurations, refer to Link Aggregation
Configuration.
Examples
ntdp explore
Syntax
ntdp explore
View
User view
Default Level
2: System level
Parameters
None
Description
Use the ntdp explore command to start topology information collection manually.
Examples
ntdp hop
Syntax
View
System view
Default Level
2: System level
1-12
Parameters
hop-value: Maximum hop for collecting topology information, in the range 1 to 16.
Description
Use the ntdp hop command to set maximum hop for collecting topology information.
Use the undo ntdp hop command to restore the default.
By default, the value is 3.
Note that this command is only applicable to the topology-collecting device. A bigger number of hops
requires more memory of the topology-collecting device.
Examples
ntdp timer
Syntax
View
System view
Default Level
2: System level
Parameters
interval: Interval (in minutes) to collect topology information, in the range 0 to 65,535. The value 0
means not to collect topology information.
Description
Use the ntdp timer command to configure the interval to collect topology information.
Use the undo ntdp timer command to restore the default.
By default, the interval to collect topology information is 1 minute.
Note that the management device can start to collect the topology information only after the cluster is
set up.
Examples
1-13
ntdp timer hop-delay
Syntax
View
System view
Default Level
2: System level
Parameters
delay-time: Delay time (in milliseconds) for a device receiving topology-collection requests to forward
them through its first port. This argument ranges from 1 to 1,000.
Description
Use the ntdp timer hop-delay command to set the delay time for the device to forward
topology-collection requests through the first port.
Use the undo ntdp timer hop-delay command to restore the default delay time, which is 200 ms.
Examples
# Set the delay time for the device to forward topology-collection requests through the first port to 300
ms.
<Sysname> system-view
[Sysname] ntdp timer hop-delay 300
Syntax
View
System view
Default Level
2: System level
Parameters
delay-time: Delay time (in milliseconds) for a device to forward a topology-collection request through its
successive ports, in the range 1 to 100.
Description
Use the ntdp timer port-delay command to set the delay time for a device to forward a received
topology-collection request through its successive ports.
1-14
Use the undo ntdp timer port-delay command to restore the default delay time, or 20 ms.
Examples
# Set the delay time for the device to forward topology-collection requests through the successive ports
to 40 ms.
<Sysname> system-view
[Sysname] ntdp timer port-delay 40
Syntax
View
Cluster view
Default Level
2: System level
Parameters
member-number: Member number assigned to the candidate device to be added to a cluster. This
argument varies with devices.
mac-address: MAC address of the candidate device (in hexadecimal form of H-H-H).
password: Password of the candidate device, a string of 1 to 16 characters. The password is required
when you add a candidate device to a cluster. However, this argument is not needed if the candidate
device is not configured with a super password.
Description
Examples
#Add a candidate device to the cluster on the management device, setting the member number to 6.
(Assume that the MAC address and user password of the candidate device are 00E0-FC00-35E7 and
123456 respectively.)
<aaa_0.Sysname> system-view
[aaa_0.Sysname] cluster
[aaa_0.Sysname-cluster] add-member 6 mac-address 00e0-fc00-35e7 password 123456
1-15
administrator-address
Syntax
View
Cluster view
Default Level
2: System level
Parameters
mac-address: MAC address of the management device (in hexadecimal form of H-H-H).
cluster-name: Name of an existing cluster, a string of 1 to 8 characters, which can only be letters,
numbers, subtraction sign (-), and underline (_).
Description
Examples
auto-build
Syntax
auto-build [ recover ]
View
Cluster view
Default Level
2: System level
1-16
Parameters
Description
Examples
Processing...please wait
Cluster auto-build Finish!
0 member(s) added successfully.
1-17
black-list add-mac
Syntax
View
Cluster view
Default Level
2: System level
Parameters
mac-address: MAC address of the device to be added into the blacklist, in the form of H-H-H.
Description
Examples
# Add a device with the MAC address of 0EC0-FC00-0001 to the blacklist on the management device.
<aaa_0.Sysname> system-view
[aaa_0.Sysname] cluster
[aaa_0.Sysname-cluster] black-list add-mac 0ec0-fc00-0001
The black-list is cleared!
black-list delete-mac
Syntax
View
Cluster view
Default Level
2: System level
Parameters
Description
Use the black-list delete-mac command to delete a device from the blacklist.
Note that this command can be executed on the management device only.
1-18
Examples
# Delete a device with the MAC address of 0EC0-FC00-0001 from the blacklist on the management
device.
<aaa_0.Sysname> system-view
[aaa_0.Sysname] cluster
[aaa_0.Sysname-cluster] black-list delete-mac 0ec0-fc00-0001
build
Syntax
build cluster-name
undo build
View
Cluster view
Default Level
2: System level
Parameters
cluster-name: Cluster name, a string of 1 to 8 characters, which can only be letters, numbers,
subtraction sign (-), and underline (_).
Description
Use the build command to configure the current device as the management device and specify a name
for it.
Use the undo build command to configure the current management device as a candidate device.
By default, the device is not a management device.
Note that:
z When executing this command, you will be asked whether to create a standard topology map or
not.
z This command can only be applied to devices that are capable of being a management device and
are not members of other clusters. The command takes no effect if you execute the command on a
device which is already a member of another cluster. If you execute this command on a
management device, you will replace the cluster name with the one you specify.
z The member number of the management device is 0.
Examples
# Configure the current device as a management device and specify the cluster name as aaa.
<Sysname> system-view
[Sysname] cluster
[Sysname-cluster] build aaa
[Sysname-cluster] ip-pool 172.16.0.1 255.255.255.248
1-19
Restore topology from local flash file,for there is no base topology.
(Please confirm in 30 seconds, default No). (Y/N)
Y
Begin get base topology file from local flash......
Get file error, can not finish base topology recover
cluster
Syntax
cluster
View
System view
Default Level
2: System level
Parameters
None
Description
Examples
cluster enable
Syntax
cluster enable
undo cluster enable
1-20
View
System view
Default Level
2: System level
Parameters
None
Description
Examples
cluster switch-to
Syntax
View
User view
Default Level
0: Visit level
Parameters
1-21
Description
Use the cluster switch-to command to switch between the management device and member devices.
Examples
# Switch from the operation interface of the management device to that of the member device
numbered 6 and then switch back to the operation interface of the management device.
<aaa_0.Sysname> cluster switch-to 6
<aaa_6.Sysname> quit
<aaa_0.Sysname>
cluster-local-user
Syntax
View
Cluster view
Default Level
1: Monitor level
Parameters
Description
Examples
# On the management device, configure Web user accounts for the devices within a cluster, with
username being abc, password being 123456 and displayed in plain text.
<aaa_0.Sysname> system-view
[aaa_0.Sysname] cluster
[aaa_0.Sysname-cluster] cluster-local-user abc password simple 123456
1-22
cluster-mac
Syntax
cluster-mac mac-address
undo cluster-mac
View
Cluster view
Default Level
2: System level
Parameters
mac-address: Multicast MAC address (in hexadecimal in the format of H-H-H), which can be
0180-C200-0000, 0180-C200-000A, 0180-C200-0020 through 0180-C200-002F, or 010F-E200-0002.
Description
Use the cluster-mac command to configure the destination MAC address for cluster management
protocol packets.
Use the undo cluster-mac command to restore the default.
By default, the destination MAC address for cluster management protocol packets is 0180-C200-000A.
Note that this command can be executed on the management device only.
Examples
# Set the destination MAC address of the cluster management protocol packets to 0180-C200-0000 on
the management device.
<Sysname> system-view
[Sysname] cluster
[Sysname-cluster] ip-pool 10.1.1.1 24
[Sysname-cluster] build aaa
[aaa_0.Sysname-cluster] cluster-mac 0180-C200-0000
cluster-mac syn-interval
Syntax
View
Cluster view
Default Level
2: System level
1-23
Parameters
interval: Interval (in minutes) to send MAC address negotiation broadcast packets, which ranges from 0
to 30. If the interval is set to 0, the management device does not send broadcast packets to the member
devices.
Description
Use the cluster-mac syn-interval command to set the interval for a management device to send MAC
address negotiation broadcast packets for cluster management.
By default, the interval is set to one minute.
Note that this command can be executed on the management device only.
Examples
# Set the interval for the management device to send MAC address negotiation broadcast packets for
cluster management to two minutes on the management device.
<Sysname> system-view
[Sysname] cluster
[Sysname-cluster] ip-pool 10.1.1.1 24
[Sysname-cluster] build aaa
[aaa_0.Sysname-cluster] cluster-mac syn-interval 2
cluster-snmp-agent community
Syntax
View
Cluster view
Default Level
1: Monitor level
Parameters
read: Indicates to allow the community’s read-only access to MIB objects. The community with
read-only authority can only query the device information.
write: Indicates to allow the community’s read-write access to MIB objects. The community with
read-write authority can configure the device information.
community-name: Community name, which is a string of 1 to 26 characters.
view-name: MIB view name, which is a string of 1 to 32 characters.
Description
1-24
z The command used to configure the SNMP community with read-only or read-and-write authority
can only be executed once on the management device. This configuration will be synchronized to
the member devices in the whitelist, which is equal to configuring multiple member devices at one
time.
z SNMP community name will be retained if a cluster is dismissed or a member device is removed
from the whitelist.
z If the same community name as the current one has been configured on a member device, the
current community name will replace the original one.
Examples
# Configure the SNMP community name shared by a cluster as comaccess and allow the community’s
read-only access to MIB objects.
<aaa_0.Sysname> system-view
[aaa_0.Sysname] cluster
[aaa_0.Sysname-cluster] cluster-snmp-agent community read comaccess
# Configure the SNMP community name shared by a cluster as comaccesswr and allow the
community’s read-write access to MIB objects.
[aaa_0.Sysname-cluster] cluster-snmp-agent community write comacceswr
cluster-snmp-agent group v3
Syntax
View
Cluster view
Default Level
1: Monitor level
Parameters
Description
Use the cluster-snmp-agent group command to configure the SNMPv3 group shared by a cluster and
set its access rights.
Use the undo cluster-snmp-agent group command to remove the SNMPv3 group shared by a
cluster.
1-25
Note that:
z The command can be executed once on the management device only. This configuration will be
synchronized to the member devices in the whitelist, which is equal to configuring multiple member
devices at one time.
z SNMPv3 group name will be retained if a cluster is dismissed or a member device is deleted from
the whitelist.
z If the same group name as the current one has been configured on a member device, the current
group name will replace the original one.
Examples
cluster-snmp-agent mib-view
Syntax
View
Cluster view
Default Level
1: Monitor level
Parameters
Description
Use the cluster-snmp-agent mib-view command to create or update the MIB view information shared
by a cluster.
Use the undo cluster-snmp-agent mib-view command to delete the MIB view information shared by a
cluster.
By default, the MIB view name shared by a cluster is ViewDefault, in which the cluster can access ISO
subtree.
Note that:
z This command can be executed once on the management device only. This configuration will be
synchronized to member devices on the whitelist, which is equal to configuring multiple member
devices at one time.
1-26
z The MIB view will be retained if a cluster is dismissed or a member device is deleted from the
whitelist.
z If the same view name as the current one has been configured on a member device, the current
view will replace the original one on the member device.
Examples
cluster-snmp-agent usm-user v3
Syntax
View
Cluster view
Default Level
1: Monitor level
Parameters
Description
Use the cluster-snmp-agent usm-user v3 command to add a new user to the SNMP v3 group shared
by a cluster.
Use the undo cluster-snmp-agent usm-user v3 command to delete the SNMP v3 group user shared
by the cluster.
Note that:
1-27
z The command can be executed once on the management device only. This configuration will be
synchronized to member devices on the whitelist, which is equal to configuring multiple member
devices at one time.
z SNMPv3 group user will be retained if a cluster is dismissed or a member device is deleted from
the whitelist.
z If the same username as the current one has been configured on a member device, the current
username will replace the original one on the member device.
Examples
# Add a user wang to the SNMP group snmpgroup, set the security level to authentication-needed and
specify the authentication protocol as HMAC-MD5-96 and authentication password as pass.
<aaa_0.Sysname> system-view
[aaa_0.Sysname] cluster
[aaa_0.Sysname-cluster] cluster-snmp-agent usm-user v3 wang snmpgroup authentication-mode
md5 pass
delete-member
Syntax
View
Cluster view
Default Level
2: System level
Parameters
Description
Use the delete-member command to remove a member device from the cluster.
Note that:
z This command can be executed only on the management device.
z If you only remove a member device from the cluster without adding it to the blacklist, the device
will be automatically added to the cluster again.
Examples
# Remove the member device numbered 2 from the cluster on the management device.
<Sysname> system-view
[Sysname] cluster
[Sysname-cluster] ip-pool 10.1.1.1 24
[Sysname-cluster] build aaa
[aaa_0.Sysname-cluster] delete-member 2 to-black-list
1-28
display cluster
Syntax
display cluster
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display cluster command to display the information of the cluster to which the current device
belongs.
Note that this command can be executed on the management device and member devices only.
Examples
# Display the information of the cluster to which the current device belongs on the management device.
<aaa_0.Sysname> display cluster
Cluster name:"aaa"
Role:Administrator
Management-vlan:100
Handshake timer:10 sec
Handshake hold-time:60 sec
IP-Pool:1.1.1.1/16
cluster-mac:0180-c200-000a
No logging host configured
No SNMP host configured
No FTP server configured
No TFTP server configured
# Display the information of the cluster to which the current device belongs on a member device.
<aaa_1.Sysname> display cluster
Cluster name:"aaa"
Role:Member
Member number:1
Management-vlan:100
cluster-mac:0180-c200-000a
Handshake timer:10 sec
Handshake hold-time:60 sec
1-29
Administrator device mac address:00e0-fc00-1d00
Administrator status:Up
Field Description
Cluster name Name of the cluster
Role of the switch in the cluster"
Role z Administrator: The current device is a management
device.
z Member: The current device is a member device.
Member number Member number of the switch in the cluster
Management-vlan Management VLAN of the cluster
Handshake timer Interval to send handshake packets
Handshake hold-time Value of handshake timer
IP-Pool Private IP addresses of the member devices in the cluster
cluster-mac Multicast MAC address of cluster management packets
Administrator device IP address IP address of the management device
Syntax
View
Any view
Default Level
2: System level
Parameters
mac-address: Specifies a device by its MAC address. The system will display the standard topology
with the device as the root.
member-number: Specifies a device by its number. The system will display the standard topology with
the device as the root.
Description
Use the display cluster topology command to display the standard topology information of a cluster.
You can create a standard topology map when executing the build or auto-build command, or you can
use the topology accept command to save the current topology map as the standard topology map.
Note that this command can be executed on the management device only.
1-30
Examples
1-31
|
├-(P_1/10)<-->(P_4/1)[Sysname:00e0-fc05-4300]
|
└-(P_1/8)<-->(P_1/12)[aaa_1.Sysname:00e0-fc00-7016]
Field Description
PeerPort Peer port
Syntax
View
Any view
Default Level
2: System level
Parameters
None
Description
Use the display cluster black-list command to display the current blacklist of a cluster.
Note that this command can be executed on the management device only.
Examples
Field Description
Device ID ID of the blacklist device, indicated by its MAC address.
ID of the device connected to the blacklist device,
Access Device ID
indicated by its MAC address.
Access port Port connected to the blacklist device.
1-32
display cluster candidates
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
mac-address mac-address: Specifies the MAC address of a candidate device, in the format of H-H-H.
verbose: Displays the detailed information about a candidate device.
Description
Use the display cluster candidates command to display the information about the candidate devices
of a cluster.
Note that the command can be executed on the management device only.
Examples
Hostname : Sysname
MAC : 000f-cbb8-9528
Hop : 1
1-33
Device : S5120
IP : 31.31.31.56/24
Field Description
Hostname System name of a candidate device
MAC MAC address of a candidate device
Hop Hops from a candidate device to the management device
IP IP address of a candidate device
Device Product model of a candidate device
Syntax
View
Any view
Default Level
2: System level
Parameters
member-number: Number of the devices in a cluster (including the management device and member
devices).
mac-address: MAC addresses of the devices in a cluster (including the management device and
member devices).
Description
Use the display cluster current-topology command to display the current topology information of the
cluster.
Note that:
z If you specify both the mac-address mac-address and to-mac-address mac-address arguments,
the topology information of the devices that are in a cluster and form the connection between two
specified devices is displayed.
z If you specify both the member-id member-number and to-member-id member-number
arguments, the topology information of the devices that are in a cluster and form the connection
between two specified devices is displayed.
z If you specify only the mac-address mac-address or member-id member-number argument, the
topology information of all the devices in a cluster is displayed, with a specified device as the root
node.
This command can be executed on the management device only.
1-34
Examples
Field Description
PeerPort Peer port
1-35
A new device in the topology information is identified based on the standard topology. After you add a
device into a cluster, if you do not use the topology accept command to confirm the current topology
and save it as the standard topology, this device is still regarded as a new device.
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display cluster members command to display the information about cluster members.
Note that this command can be executed on the management device only.
Examples
Field Description
SN Member number
Device Device model
MAC Address MAC address of a device
1-36
Field Description
State of a device:
z up: The member device which is up
Status z down: The member which is down
z deleting: The member which is being deleted
z admin: The management device
Name System name of a device
# Display the detailed information about the management device and all member devices.
<aaa_0.Sysname> display cluster members verbose
Member number:0
Name:aaa_0.Sysname
Device:H3C S5120
MAC Address:00e0-fc00-1400
Member status:Admin
Hops to administrator device:0
IP:
Version:
H3C Comware Platform Software
Comware Software, Version 5.20, Alpha 1101
Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
H3C S5120
Member number:1
Name:aaa_1.Sysname
Device:H3C S5120
MAC Address:00e0-fc00-7016
Member status:Up
Hops to administrator device:2
IP: 192.168.100.245/24
Version:
H3C Comware Platform Software
Comware Software, Version 5.20, Alpha 1101
Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
H3C S5120
Member number:2
Name:aaa_2.Sysname
Device:H3C S5120
MAC Address:00e0-fd00-5500
Member status:Up
Hops to administrator device:2
IP:
Version:
H3C Comware Platform Software
Comware Software, Version 5.20, Alpha 1101
1-37
Copyright (c) 2004-2009 Hangzhou H3C Tech. Co., Ltd. All rights reserved.
H3C S5120
Field Description
Member number Device member number
Name of a member device, composed of the cluster name
and the system name of the member device, in the format of
cluster name.systemname
When the management device type is not consistent with the
Name member device type, if a user modifies the cluster name on
the management device continuously, the cluster name may
appear twice in the cluster member name, for example,
“clustername.clustername.systemname”. This abnormal
case can restore in a period of time.
Device Device model
MAC Address MAC address of a device
Member status State of a device
Hops to administrator device Hops from the current device to the management device
IP IP address of a device
Version Software version of the current device
ftp-server
Syntax
View
Cluster view
Default Level
3: Manage level
Parameters
1-38
Description
Use the ftp-server command to configure a public FTP server (by setting its IP address, username, and
password) on the management device for the member devices in the cluster.
Use the undo ftp-server command to remove the FTP server configured for the member devices in the
cluster.
By default, a cluster is not configured with a public FTP server.
Note that the command can be executed on the management device only.
Examples
# Set the IP address, username and password of an FTP server shared by the cluster on the
management device to be 1.0.0.9, ftp, and in plain text respectively.
<Sysname> system-view
[Sysname] cluster
[Sysname-cluster] ip-pool 10.1.1.1 24
[Sysname-cluster] build aaa
[aaa_0.Sysname-cluster] ftp-server 1.0.0.9 user-name ftp password simple ftp
holdtime
Syntax
holdtime hold-time
undo holdtime
View
Cluster view
Default Level
2: System level
Parameters
Description
Examples
1-39
[Sysname-cluster] ip-pool 10.1.1.1 24
[Sysname-cluster] build aaa
[aaa_0.Sysname-cluster] holdtime 30
ip-pool
Syntax
View
Cluster view
Default Level
2: System level
Parameters
Description
Use the ip-pool command to configure a private IP address range for cluster members.
Use the undo ip-pool command to remove the IP address range configuration.
By default, no private IP address range is configured for cluster members.
Note that:
z You must configure the IP address range on the management device only and before establishing
a cluster. If a cluster has already been established, you are not allowed to change the IP address
range.
z For a cluster to work normally, the IP addresses of the VLAN interfaces of the management device
and member devices must not be in the same network segment as that of the cluster address pool.
Examples
logging-host
Syntax
logging-host ip-address
undo logging-host
1-40
View
Cluster view
Default Level
2: System level
Parameters
Description
Examples
# Configure the IP address of the logging host shared by a cluster on the management device as
10.10.10.9.
<Sysname> system-view
[Sysname] cluster
[Sysname-cluster] ip-pool 10.1.1.1 24
[Sysname-cluster] build aaa
[aaa_0.Sysname-cluster] logging-host 10.10.10.9
management-vlan
Syntax
management-vlan vlan-id
undo management-vlan
View
System view
Default Level
2: System level
Parameters
Description
1-41
Use the undo management-vlan command to restore the default.
By default, VLAN 1 is the management VLAN.
Note that:
z The management VLAN must be specified before a cluster is created. Once a member device is
added to a cluster, the management VLAN configuration cannot be modified. To modify the
management VLAN for a device belonging to a cluster, you need to cancel the cluster-related
configurations on the device, specify the desired VLAN to be the management VLAN, and then
re-create the cluster.
z For the purpose of security, you are not recommended to configure the management VLAN as the
default VLAN ID of the port connecting the management device and the member devices.
z Only when the default VLAN ID of all cascade ports and the port connecting the management
device and the member device is the management VLAN, can the packets in the management
VLAN packets be passed without a tag. Otherwise, you must configure the packets from a
management VLAN to pass these ports. For the configuration procedure, see VLAN Configuration.
Examples
Syntax
View
Cluster view
Default Level
1: Monitor level
Parameters
None
Description
Use the management-vlan synchronization enable command to enable the management VLAN
auto-negotiation function.
Use the undo management-vlan synchronization enable command to disable the management
VLAN auto-negotiation function.
By default, the management VLAN auto-negotiation function is disabled.
Examples
1-42
[aaa_0.Sysname] cluster
[aaa_0.Sysname-cluster] management-vlan synchronization enable
nm-interface vlan-interface
Syntax
View
Cluster view
Default Level
2: System level
Parameters
interface-name: ID of the VLAN interface. The value range is the same as that of the existing VLAN
interface ID.
Description
Use the nm-interface vlan-interface command to configure the VLAN interface of the access
management device (including FTP/TFTP server, management host and log host) as the network
management interface of the management device.
Examples
reboot member
Syntax
View
Cluster view
Default Level
2: System level
Parameters
1-43
Description
Examples
snmp-host
Syntax
View
Cluster view
Default Level
3: Manage level
Parameters
Description
Use the snmp-host command to configure a shared SNMP host for a cluster.
Use the undo snmp-host command to cancel the SNMP host configuration.
By default, no SNMP host is configured for a cluster.
Note that this command can be executed on the management device only.
Examples
# Configure a shared SNMP host for the cluster on the management device.
<Sysname> system-view
[Sysname] cluster
[Sysname-cluster] ip-pool 10.1.1.1 24
[Sysname-cluster] build aaa
[aaa_0.Sysname-cluster] snmp-host 1.0.0.9 community-string read 123 write 456
1-44
tftp-server
Syntax
tftp-server ip-address
undo tftp-server
View
Cluster view
Default Level
2: System level
Parameters
Description
Use the tftp-server command to configure a shared TFTP server for a cluster.
Use the undo tftp-server command to cancel the TFTP server of the cluster.
By default, no TFTP server is configured.
Note that this command can be executed on the management device only.
Examples
timer
Syntax
timer interval
undo timer
View
Cluster view
Default Level
2: System level
Parameters
interval: Interval (in seconds) to send handshake packets. This argument ranges from 1 to 255.
1-45
Description
Use the timer command to set the interval to send handshake packets.
Use the undo timer command to restore the default.
By default, the interval to send handshake packets is 10 seconds.
Note that:
z This command can be executed on the management device only.
z This configuration is valid for all member devices in a cluster.
Examples
# Configure the interval to send handshake packets as 3 seconds on the management device.
<Sysname> system-view
[Sysname] cluster
[Sysname-cluster] ip-pool 10.1.1.1 24
[Sysname-cluster] build aaa
[aaa_0.Sysname-cluster] timer 3
topology accept
Syntax
View
Cluster view
Default Level
2: System level
Parameters
all: Accepts the current cluster topology information as the standard topology information.
mac-address mac-address: Specifies a device by its MAC address. The device will be accepted to join
the standard topology of the cluster.
member-id member-number: Specifies a device by its member number. The device will be accepted to
join the standard topology of the cluster. The member-number argument is in the range 0 to 255.
save-to: Confirms the current topology as the standard topology, and backs up the standard topology
on the FTP server or local flash in a file named “topology.top”.
Description
Use the topology accept command to confirm the current topology information and save it as the
standard topology.
Use the undo topology accept to delete the standard topology information.
Note that:
z This command can be executed on the management device only.
1-46
z The file used to save standard topology on the FTP server or the local flash is named “topology.top”,
which includes both the information of blacklist and whitelist. A blacklist contains the devices that
are prohibited to be added to a cluster. A whitelist contains devices that can be added to a cluster.
Examples
# Take the current topology as the standard topology on the management device.
<Sysname> system-view
[Sysname] cluster
[Sysname-cluster] ip-pool 10.1.1.1 24
[Sysname-cluster] build aaa
[aaa_0.Sysname-cluster] topology accept all
topology restore-from
Syntax
View
Cluster view
Default Level
2: System level
Parameters
ftp-server: Restores the standard topology information from the FTP server.
local-flash: Restores the standard topology information from the local flash.
Description
Use the topology restore-from command to restore the standard topology information in case the
cluster topology information is incorrect.
Note that:
z This command can be executed on the management device only.
z If the stored standard topology is not correct, the device cannot be aware of if. Therefore, you must
ensure that the standard topology is correct.
Examples
1-47
topology save-to
Syntax
View
Cluster view
Default Level
2: System level
Parameters
Description
Use the topology save-to command to save the standard topology information to the FTP server or the
local flash.
Note that:
z The file used to save standard topology on the FTP server or the local flash is named “topology.top”,
which includes both the information of blacklist and whitelist. A blacklist contains the devices that
are prohibited to be added to a cluster. A whitelist contains devices that can be added to a cluster.
z This command can be executed on the management device only.
Examples
# Save the standard topology information to the local flash on the management device.
<Sysname> system-view
[Sysname] cluster
[Sysname-cluster] ip-pool 10.1.1.1 24
[Sysname-cluster] build aaa
[aaa_0.Sysname-cluster] topology save-to local-flash
1-48
Table of Contents
i
1 HTTP Configuration Commands
Syntax
display ip http
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Examples
Basic ACL A basic ACL number associated with the HTTP service
1-1
ip http acl
Syntax
View
System view
Default Level
2: System level
Parameters
acl-number: ACL number, in the range 2000 to 2999 (basic IPv4 ACL).
Description
Use the ip http acl command to associate the HTTP service with an ACL.
Use the undo ip http acl command to remove the association.
By default, the HTTP service is not associated with any ACL.
After the HTTP service is associated with an ACL, only the clients permitted by the ACL can access the
device.
Note that: If you execute the ip http acl command for multiple times to associate the HTTP service with
different ACLs, the HTTP service is only associated with the last specified ACL.
Related commands: display ip http and acl number in ACL Commands.
Examples
# Configure to associate the HTTP service with ACL 2001 and only allow the clients within the
10.10.0.0/16 network segment to access the device through the Web function.
<Sysname> system-view
[Sysname] acl number 2001
[Sysname-acl-basic-2001] rule permit source 10.10.0.0 0.0.255.255
[Sysname-acl-basic-2001] quit
[Sysname] ip http acl 2001
ip http enable
Syntax
ip http enable
undo ip http enable
View
System view
Default Level
2: System level
1-2
Parameters
None
Description
Examples
ip http port
Syntax
View
System view
Default Level
3: Manage level
Parameters
port-number: Port number of the HTTP service, which ranges from 1 to 65535.
Description
Use the ip http port command to configure the port number of the HTTP service.
Use the undo ip http port command to restore the default.
By default, the port number of the HTTP service is 80.
Note that this command does not check whether the configured port number conflicts with that of an
existing service. Therefore, ensure that the port number is not used by another service before the
configuration.
Related commands: display ip http.
Examples
1-3
2 HTTPS Configuration Commands
Syntax
display ip https
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Examples
Field Description
SSL server policy The SSL server policy associated with the HTTPS service
Basic ACL The basic ACL number associated with the HTTPS service
2-1
Field Description
ip https acl
Syntax
View
System view
Default Level
3: Manage level
Parameters
acl-number: ACL number, in the range 2000 to 2999 (basic IPv4 ACL).
Description
Use the ip https acl command to associate the HTTPS service with an ACL.
Use the undo ip https acl command to remove the association.
By default, the HTTPS service is not associated with any ACL.
After the HTTPS service is associated with an ACL, only the clients permitted by the ACL can access
the device.
Note that: If you execute the ip https acl command for multiple times to associate the HTTPS service
with dirrenrent ACLs, the HTTPS service is only associated with the last specified ACL.
Related commands: display ip https and acl number in ACL Commands.
Examples
# Associate the HTTPS service with ACL 2001 and only allow the clients within the 10.10.0.0/16
network segment to access the HTTPS server through the Web function.
<Sysname> system-view
[Sysname] acl number 2001
[Sysname-acl-basic-2001] rule permit source 10.10.0.0 0.0.255.255
[Sysname-acl-basic-2001] quit
[Sysname] ip https acl 2001
Syntax
2-2
View
System view
Default Level
3: Manage level
Parameters
policy-name: Name of the certificate attribute access control policy, a string of 1 to 16 characters.
Description
Use the ip https certificate access-control-policy command to associate the HTTPS service with a
certificate attribute access control policy.
Use the undo ip https certificate access-control-policy command to remove the association.
By default, the HTTPS service is not associated with any certificate attribute access control policy.
Association of the HTTPS service with a certificate attribute access control policy can control the
access rights of clients.
Related commands: display ip https and pki certificate access-control-policy. (In PKI Commands)
Examples
# Associate the HTTPS server to certificate attribute access control policy myacl.
<Sysname> system-view
[Sysname] ip https certificate access-control-policy myacl
ip https enable
Syntax
ip https enable
undo ip https enable
View
System view
Default Level
3: Manage level
Parameters
None
Description
2-3
Note that enabling of the HTTPS service triggers an SSL handshake negotiation process. During the
process, if a local certificate of the device already exists, the SSL negotiation is successfully performed,
and the HTTPS service can be started normally. If no local certificate exists, a certificate application
process will be triggered by the SSL negotiation. Because the application process takes much time, the
SSL negotiation often fails and the HTTPS service cannot be started normally. Therefore, execute the
ip https enable command for multiple times to ensure normal startup of the HTTPS service.
Related commands: display ip https.
Examples
ip https port
Syntax
View
System view
Default Level
3: Manage level
Parameters
port-number: Port number of the HTTPS service, which ranges from 1 to 65535.
Description
Use the ip https port command to configure the port number of the HTTPS service.
Use the undo ip https port command to restore the default.
By default, the port number of the HTTPS service is 443.
Note that this command does not check whether the configured port number conflicts with that of an
existing service. Therefore, ensure that the port number is not used by another service before the
configuration.
Related commands: display ip https.
Examples
2-4
ip https ssl-server-policy
Syntax
View
System view
Default Level
3: Manage level
Parameters
Description
Use the ip https ssl-server-policy command to associate the HTTPS service with an SSL server-end
policy.
Use the undo ip https ssl-server-policy to remove the association between the HTTPS service and
an SSL server-end policy.
By default, the HTTPS service is not associated with any SSL server-end policy.
Note that:
z The HTTPS service can be enabled only after this command is configured successfully.
z You cannot modify an SSL server-end policy or remove the association between the HTTPS
service and an SSL server-end policy after the HTTPS service is enabled.
Related commands: display ip https and ssl server-policy in SSL Commands.
Examples
2-5
Table of Contents
i
1 Stack Management Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
members: Displays stack information of the stack members, including the master device and the slave
devices. This keyword is only available to the master device of a stack.
Description
Examples
1-1
Table 1-1 display stack command output description
Field Description
Role of the device in the stack.
z Master indicates that the device is the master device of
Role the stack.
z Slave indicates that the device is a slave device of the
stack.
ID of the management VLAN, where interactive packets of
the stack are transmitted to implement the internal
Management VLAN
communication between the master device and the slave
devices.
IP pool Range of the private IP addresses used by the stack
Total number of the devices in the stack, which is displayed
Device total number
on the master device only.
MAC address of the master device, which is displayed on a
Master MAC address
slave device only.
Number: 1
Role: Slave
Sysname: stack_1.Sysname
Device type: S5120
MAC Address: 000f-e200-2000
Field Description
Sequence number of the device in the stack.
z Value 0 indicates that the device is the master device of
Number the stack.
z A value other than 0 indicates that the device is a slave
device and the value is the sequence number of the slave
device in the stack.
Role of the device in the stack.
z Master indicates that the device is the master device of
Role the stack.
z Slave indicates that the device is a slave device of the
stack.
Sysname Host name of the device
MAC Address MAC address of the device
1-2
stack ip-pool
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the stack ip-pool command to configure a private IP address pool for a stack.
Use the undo stack ip-pool command to remove the configured private IP address pool.
By default, no private IP address pool is configured for a stack.
Before creating a stack, you need to configure a private IP address pool for the stack, so that when a
slave device joins the stack, the master device can assign an available IP address to it automatically.
Examples
# Configure a private IP address pool containing IP addresses from 192.168.1.1 to 192.168.1.255 for a
stack.
<Sysname> system-view
[Sysname] stack ip-pool 192.168.1.1 24
Syntax
View
System view
Default Level
2: System level
1-3
Parameters
None
Description
Examples
# Create a stack.
<Sysname> system-view
[Sysname] stack role master
[stack_0.Sysname]
stack stack-port
Syntax
View
System view
Default Level
2: System level
Parameters
stack-port-num: Number of stack ports to be configured. The value range varies with the device model
and the number of ports.
interface-list: List of Ethernet ports to be configured as stack ports. You can specify multiple Ethernet
ports by providing this argument in the format of interface-list = { interface-type
interface-number }&<1-n>, where interface-type is the interface type, interface-number is the interface
number, and &<1-n> indicates that you can specify up to n ports or port lists. The value of n equals that
of stack-port-num.
Description
Use the stack stack-port command to configure the specified ports as stack ports.
Use the undo stack stack-port command to remove the configuration.
By default, a port is not a stack port.
Examples
# Configure a stack port on the device and assign port GigabitEthernet 1/0/1 as a stack port.
1-4
<Sysname> system-view
[Sysname] stack stack-port 1 gigabitethernet 1/0/1
stack switch-to
Syntax
View
User view
Default Level
2: System level
Parameters
member-id: ID of the slave device which you want to switch to. The value ranges from 1 to 8.
Description
Use the stack switch-to command to switch from the master device to a slave device to perform
configurations.
This command is used to switch from the master device to a slave device with the user level unchanged.
To switch back, use the quit command.
Examples
1-5
Table of Contents
i
1 PoE Configuration Commands
Syntax
View
Default Level
2: System level
Parameters
index index: Index number of the PoE configuration file, in the range 1 to 100.
name profile-name: Name of the PoE configuration file, a string of 1 to 15 characters.
Description
Use the apply poe-profile command to apply the PoE configuration file to the current PoE interface.
Use the undo apply poe-profile command to remove the application of the PoE configuration file to
the current PoE interface.
Note that the index number, instead of the name, of the PoE configuration file is displayed when you
execute the display this command.
Related commands: display poe-profile, apply poe-profile interface.
Examples
# Apply the PoE configuration file named forIPphone to the PoE interface GigabitEthernet 1/0/20.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/20
[Sysname-GigabitEthernet1/0/20] apply poe-profile name forIPphone
[Sysname-GigabitEthernet1/0/20] display this
#
interface GigabitEthernet1/0/20
apply poe-profile index 1
#
return
1-1
apply poe-profile interface
Syntax
View
System view
Default Level
2: System level
Parameters
index index: Index number of the PoE configuration file, in the range 1 to 100.
name profile-name: Name of the PoE configuration file, a string of 1 to 15 characters.
interface-range: Range of Ethernet interface numbers, indicating multiple Ethernet interfaces. The
expression is interface-range = interface-type interface-number [ to interface-type interface-number ],
where interface-type interface-number represents the interface type and interface number. The start
interface number should be smaller than the end interface number. Ethernet interface numbers can
be in any range. If any interface in the specified range does not support PoE, it is ignored when the
PoE configuration file is applied.
Description
Use the apply poe-profile interface command to apply the PoE configuration file to one or more PoE
interfaces.
Use the undo apply poe-profile interface command to remove the application of the PoE
configuration file to the specified PoE interface(s).
Related commands: display poe-profile interface, apply poe-profile.
Examples
# Apply the PoE configuration file named forIPphone to the PoE interface GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] apply poe-profile name forIPphone interface gigabitethernet 1/0/1
# Apply the PoE configuration file with index number being 1 to PoE interfaces GigabitEthernet 1/0/2
through GigabitEthernet 1/0/8.
<Sysname> system-view
[Sysname] apply poe-profile index 1 interface gigabitethernet 1/0/2 to gigabitethernet 1/0/8
Syntax
View
Any view
1-2
Default Level
1: Monitor level
Parameters
None
Description
Use the display poe device command to display information about power sourcing equipments
(PSEs).
Examples
Field Description
ID of the PSE. For a centralized device, this
PSE ID
field is 1.
Slot number of the PSE. For a centralized
SlotNo
device, this filed is 1.
Sub-slot number of the PSE. For a centralized
SubSNo
device, this field is 0.
PortNum Number of PoE interfaces on the PSE
MaxPower(W) Maximum power of the PSE (W)
PSE state:
on: The PSE is supplying power.
State
off: The PSE stops supplying power.
faulty: The PSE fails.
Model PSE model
Syntax
View
Any view
Default Level
1: Monitor level
1-3
Parameters
Description
Use the display poe interface command to display the power information of the specified interface.
If no interface is specified, the power information of all PoE interfaces is displayed.
Examples
Field Description
PoE state: enabled/disabled
Port Power Enabled z enabled: PoE is enabled.
z disabled: PoE is disabled.
Power priority of the PoE interface:
1-4
Field Description
Port operating status varies with devices.
Field Description
Interface Shortened form of a PoE interface
1-5
Field Description
PoE state: enabled/disabled
Status z enabled: PoE is enabled.
z disabled: PoE is disabled.
Power priority of a PoE interface:
Syntax
View
Any view
1-6
Default Level
1: Monitor level
Parameters
Description
Use the display poe interface power command to display the power information of a PoE
interface(s).
If no interface is specified, the power information of all PoE interfaces will be displayed.
Examples
Field Description
Interface Shortened form of a PoE interface
CurPower Current power of a PoE interface
PeakPower Peak power of a PoE interface
MaxPower Maximum power of a PoE interface
Description of the PD connected with a PoE
interface When the description contains more
PD Description
than 34 characters, the first 30 characters
followed by four dots are displayed.
Number of PoE interfaces that are supplying
port(s) on
power
consumed Power currently consumed by all PoE interfaces
Remaining Total remaining power of the system
1-7
display poe pse
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display poe pse command to display the information of PSE(s).
Examples
Field Description
PSE ID ID of the PSE
PSE Slot No Slot number of the PSE
PSE SubSlot No SubSlot number of the PSE
PSE Model Model of the PSE module
PSE Power Enabled PoE is enabled for the PSE
PSE Current Power Current power of the PSE
PSE Average Power Average power of the PSE
1-8
Field Description
PSE Peak Power Peak power of the PSE
PSE Max Power Maximum power of the PSE
Guaranteed remaining power of the PSE =
Guaranteed maximum power of the PSE– the
PSE Remaining Guaranteed
sum of the maximum power of the critical PoE
interfaces of the PSE
PSE CPLD Version PSE CPLD version
PSE Software Version PSE software version number
PSE Hardware Version PSE hardware version number
Nonstandard PD detection by the PSE:
PSE Legacy Detection z enabled: Enabled
z disabled: Disabled
PSE Utilization-threshold PSE power alarm threshold
display poe-profile
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
index index: Index number of the PoE configuration file, in the range 1 to 100.
name profile-name: Name of the PoE configuration file, a string of 1 to 15 characters.
Description
Use the display poe-profile command to display the information of the PoE configuration file.
If no argument is specified, all information of the configurations and applications of existing PoE
configuration files is displayed.
Examples
1-9
GE1/0/9
GE1/0/10
forAP 2 2 GE1/0/11 poe enable
GE1/0/12 poe max-power 14000
--- 2 poe-profile(s) created, 8 port(s) applied ---
# Display the information of the PoE configuration file with index number being 1.
<Sysname> display poe-profile index 1
Poe-profile Index ApplyNum Interface Configuration
forIPphone 1 6 GE1/0/5 poe enable
GE1/0/6 poe priority critical
GE1/0/7
GE1/0/8
GE1/0/9
GE1/0/10
--- 6 port(s) applied ---
Field Description
Poe-profile Name of the PoE configuration file
Index Index number of the PoE configuration file
ApplyNum Number of PoE interfaces to which a PoE configuration file is applied
Shortened form of the PoE interface to which the PoE configuration is
Interface
applied
Configuration Configurations of the PoE configuration file
poe-profile(s) created Number of PoE configuration files
Sum of the number of PoE interfaces to which all PoE configuration files
port(s) applied
are respectively applied
Syntax
1-10
View
Any view
Default Level
1: Monitor level
Parameters
Description
Use the display poe-profile interface command to display all information of the configurations and
applications of the PoE configuration file that currently takes effect on the specified PoE interface.
Examples
# Display all information of the configurations and applications of the current PoE configuration file
applied to GigabitEthernet1/0/1.
<Sysname> display poe-profile interface gigabitethernet 1/0/1
Poe-profile Index ApplyNum Interface Current Configuration
forIPphone 1 6 GE1/0/1 poe enable
poe priority critical
Because not all the configurations of a PoE configuration file can be applied successfully, only the
configurations that currently take effect on the interface are displayed. For the descriptions for other
fields, refer to Table 1-6.
poe disconnect
Syntax
poe disconnect { ac | dc }
undo poe disconnect
View
System view
Default Level
2: System level
Parameters
Description
1-11
Examples
poe enable
Syntax
poe enable
undo poe enable
View
Default Level
2: System level
Parameters
None
Description
z If a PoE configuration file is already applied to a PoE interface, you need to remove the
application of the file to the PoE interface before configuring the interface in PoE-profile view.
z If a PoE configuration file is applied to a PoE interface, you need to remove the application of the
file to the PoE interface before configuring the interface in PoE interface view.
Examples
1-12
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] apply poe-profile name abc
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the poe legacy enable command to enable the PSE to detect nonstandard PDs.
Use the undo poe legacy enable command to disable the PSE from detecting nonstandard PDs.
By default, the PSE is disabled from detecting nonstandard PDs.
Examples
# Enable the PSE to detect nonstandard PDs (for a device with a single PSE).
<Sysname> system-view
[Sysname] poe legacy enable
poe max-power
Syntax
View
Default Level
2: System level
Parameters
max-power: Maximum power in milliwatts allocated to a PoE interface. The range from 1000 to 30000.
Description
Use the poe max-power command to configure the maximum power for a PoE interface.
Use the undo poe max-power command to restore the default.
1-13
By default, the maximum power of the PoE interface is 30000 milliwatts.
Examples
poe mode
Syntax
View
Default Level
2: System level
Parameters
signal: Specifies the PoE mode as signal (power over signal cables), that is, using the pairs (1, 2, 3,
6) for transmitting data in category 3/5 twisted pair cable to supply DC power.
Description
Examples
poe pd-description
Syntax
View
Default Level
2: System level
1-14
Parameters
Description
Use the poe pd-description command to configure a description for the PD connected to a PoE
interface.
Use the undo poe pd-description command to restore the default.
By default, no description is available for the PD connected to a PoE interface.
Examples
# Configure the description for the PD connected to GigabitEthernet 1/0/1 as IP Phone for Room 101.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] poe pd-description IP Phone For Room 101
poe priority
Syntax
View
Default Level
2: System level
Parameters
critical: Sets the power priority of a PoE interface to critical. The PoE interface whose power priority
level is critical works in guaranteed mode, that is, power is first supplied to the PD connected to this
critical PoE interface.
high: Sets the power priority of a PoE interface to high.
low: Sets the power priority of a PoE interface to low.
Description
Use the poe priority command to configure a power priority level for a PoE interface.
Use the undo poe priority command to restore the default.
By default, the power priority of a PoE interface is low.
Note that:
z When the PoE power is insufficient, power is first supplied to PoE interfaces with a higher priority
level.
z If a PoE configuration file is already applied to a PoE interface, you need to remove the
application of the file to the PoE interface before configuring the interface in PoE-profile view.
1-15
z If a PoE configuration file is applied to a PoE interface, you need to remove the application of the
file to the PoE interface before configuring the interface in PoE interface view.
z If two PoE interfaces have the same priority level, the PoE interface with a smaller ID has the
higher priority level.
Examples
# Set the power priority of GigabitEthernet 1/0/1 to critical through a PoE configuration file.
<Sysname> system-view
[Sysname] poe-profile abc
[Sysname-poe-profile-abc-1] poe priority critical
[Sysname-poe-profile-abc-1] quit
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] apply poe-profile name abc
poe update
Syntax
View
System view
Default Level
2: System level
Parameters
full: Specifies to upgrade the PSE processing software in full mode when the software is unavailable.
refresh: Specifies to upgrade the PSE processing software in refresh mode when the software is
available.
filename: Name of the upgrade file, a string of 1 to 64 characters. This file must be under the root
directory of the file system of the device. The extension of the upgrade file varies with devices.
Description
Use the poe update command to upgrade the PSE processing software online.
1-16
z The full mode is used only in the case that anomalies occur when you use the refresh mode to
upgrade the PSE processing software. Do not use the full mode in other circumstances.
z You can use the full mode to upgrade the PSE processing software to restore the PSE firmware
when the PSE processing software is unavailable (it means that none of the PoE commands are
executed successfully).
Examples
poe utilization-threshold
Syntax
View
System view
Default Level
2: System level
Parameters
Description
Use the poe utilization-threshold command to configure a power alarm threshold for the PSE.
Use the undo poe utilization-threshold command to restore the default power alarm threshold of
the PSE.
By default, the power alarm threshold for the PSE is 80%.
The system sends a Trap message when the percentage of power utilization exceeds the alarm
threshold. If the percentage of the power utilization always keeps above the alarm threshold, the
system does not send any Trap message. Instead, when the percentage of the power utilization drops
below the alarm threshold, the system sends a Trap message again.
Examples
1-17
poe-profile
Syntax
View
System view
Default Level
2: System level
Parameters
profile-name: Name of a PoE configuration file, a string of 1 to 15 characters. A PoE configuration file
name begins with a letter (a through z or A through Z) and must not contain reserved keywords such
as undo, all, name, interface, user, poe, disable, max-power, mode, priority and enable.
index: Index number of a PoE configuration file, in the range 1 to 100.
Description
Use the poe-profile profile-name command to create a PoE configuration file and enter PoE-profile
view.
Use the undo poe-profile command to delete the specified PoE configuration file.
If no index is specified, the system automatically assigns an index to the PoE configuration file,
starting from 1.
Note that if a PoE configuration file is already applied to a PoE interface, you cannot delete it. To
delete the file, you must first execute the undo apply poe-profile command to remove the application
of the PoE configuration file to the PoE interface.
Examples
# Create a PoE configuration file, name it abc, and specify the index number as 3.
<Sysname> system-view
[Sysname] poe-profile abc 3
1-18
Table of Contents
i
1 IP Source Guard Configuration Commands
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
interface interface-type interface-number: Displays the dynamic bindings of the interface specified by
its type and number.
ip-address ip-address: Displays the dynamic bindings of an IP address.
mac-address mac-address: Displays the dynamic bindings of an MAC address (in the format of
H-H-H).
Description
Examples
Field Description
Total entries found Total number of found entries
1-1
Field Description
MAC address of the dynamic binding. N/A means that no MAC address is
MAC
bound in the entry.
IP address of the dynamic binding. N/A means that no IP address is
IP
bound in the entry.
VLAN to which the obtained binding entry belongs. N/A means that no
Vlan
VLAN is bound in the entry.
Port Port to which the dynamic binding entry is applied
Status Type of dynamically obtaining the binding entry
display user-bind
Syntax
View
Any view
Default Level
1: Monitor level
Parameters
interface interface-type interface-number: Displays the static bindings of the interface specified by its
type and number.
ip-address ip-address: Displays the static bindings of an IP address.
mac-address mac-address: Displays the static bindings of an MAC address (in the format of H-H-H).
Description
Examples
1-2
Table 1-2 display user-bind command output description
Field Description
Total entries found Total number of found entries
MAC address of the binding. N/A means that no MAC address is bound in
MAC
the entry.
IP address of the binding. N/A means that no IP address is bound in the
IP
entry.
Vlan VLAN of the binding. N/A means that no VLAN is bound in the entry.
Port Port of the binding
Status Type of the binding. Static means that the binding is manually configured.
ip check source
Syntax
View
Default Level
2: System level
Parameters
Description
Use the ip check source command to configure the dynamic binding function on a port.
Use the undo ip check source command to restore the default.
By default, the dynamic binding function is disabled.
Note that: You cannot configure the dynamic binding function on a port that is in an aggregation group.
Related commands: display ip check source.
Examples
# Configure dynamic binding function on port GigabitEthernet 1/0/1 to filter packets based on both
source IP address and MAC address.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] ip check source ip-address mac-address
1-3
user-bind
Syntax
View
Default Level
2: System level
Parameters
ip-address ip-address: Specifies the IP address for the static binding. The IP address can only be a
Class A, Class B, or Class C address and can be neither 127.x.x.x nor 0.0.0.0.
mac-address mac-address: Specifies the MAC address for the static binding in the format of H-H-H.
The MAC address cannot be all 0s, all Fs (a broadcast address), or a multicast address.
vlan vlan-id: Specifies the VLAN for the static binding. vlan-id is the ID of the VLAN to be bound, in the
range 1 to 4094.
Description
Examples
1-4
Appendix A Command Index
The command index includes all the commands in the Command Manual, which are arranged alphabetically.
ABCDEFGHIJKLMNOPQRSTUVWXYZ
A
aaa nas-id profile 21-AAA Commands 1-1
A-1
arp anti-attack active-ack enable 13-ARP Commands 2-1
B
backup startup-configuration 32-File System Management Commands 2-4
A-2
binary 15-FTP and TFTP Commands 1-7
C
ca identifier 22-PKI Commands 1-2
A-3
close 15-FTP and TFTP Commands 1-9
D
databits 02-Login Commands 1-4
A-4
delete static-routes all 17-Static Routing Commands 1-1
A-5
dhcp-snooping information remote-id string 14-DHCP Commands 3-5
A-6
display current-configuration 34-Basic System Configuration Commands 1-9
A-7
display hotkey 34-Basic System Configuration Commands 1-12
A-8
display local-user 21-AAA Commands 1-19
A-9
display poe-profile 40-PoE Commands 1-9
A-10
display snmp-agent statistics 30-SNMP Commands 1-5
A-11
display traffic classifier 19-QoS Commands 1-1
A-12
dot1x retry 20-802.1X Commands 1-15
E
enable log updown 35-Information Center Commands 1-10
F
fast-leave (IGMP-Snooping view) 18-Mulitcast Commands 1-4
A-13
ftp-server 37-Cluster Management Commands 1-38
G
get 15-FTP and TFTP Commands 1-16
H
habp enable 26-HABP Commands 1-3
I
idle-cut enable 21-AAA Commands 1-24
A-14
igmp-snooping general-query source-ip 18-Mulitcast Commands 1-10
A-15
info-center source 35-Information Center Commands 1-20
A-16
ip route-static 17-Static Routing Commands 1-2
J
jumboframe enable 03-Ethernet Port Commands 1-15
K
key (RADIUS scheme view) 21-AAA Commands 2-10
L
lacp port-priority 05-Ethernet Link Aggregation Commands 1-9
A-17
lldp timer tx-delay 08-LLDP Commands 1-22
M
mac-address (Interface view) 36-MAC Address Table Commands 1-4
A-18
mkdir 24-SSH2.0 Commands 1-21
N
name 09-VLAN Commands 1-6
A-19
ntp-service source-interface 29-NTP Commands 1-15
O
open 15-FTP and TFTP Commands 1-19
P
packet-filter 27-ACL Commands 1-7
A-20
poe max-power 40-PoE Commands 1-13
A-21
public-key peer import sshkey 25-Public Key Commands 1-10
Q
qos apply policy 19-QoS Commands 1-12
R
radius client 21-AAA Commands 2-13
A-22
rename 24-SSH2.0 Commands 1-24
A-23
retry realtime-accounting 21-AAA Commands 2-19
S
save 32-File System Management Commands 2-11
A-24
server-type 21-AAA Commands 2-22
A-25
speed 02-Login Commands 1-19
A-26
stp bpdu-protection 10-MSTP Commands 1-17
A-27
sysname 02-Login Commands 1-21
T
tcp anti-naptha enable 12-IP Performance Optimization Commands 1-18
A-28
topology restore-from 37-Cluster Management Commands 1-47
U
undelete 32-File System Management Commands 1-15
V
verbose 15-FTP and TFTP Commands 1-26
W
X
A-29
Y
Z
A-30