null  null
Table of Contents
1 CLI Configuration Commands··················································································································1-1
CLI Configuration Commands·················································································································1-1
command-privilege level··················································································································1-1
display history-command·················································································································1-3
super················································································································································1-4
super authentication-mode··············································································································1-5
super password ·······························································································································1-6
i
1
CLI Configuration Commands
CLI Configuration Commands
command-privilege level
Syntax
command-privilege level level view view command
undo command-privilege view view command
View
System view
Parameters
level level: Command level to be set, in the range of 0 to 3.
view view: CLI view. It can be any CLI view that the Ethernet switch supports. The 3com switch 4500
supports only the CLI views listed in Table 1-1:
Table 1-1 Available CLI views for the view argument
CLI view
Description
acl-adv
Advanced ACL view
acl-basic
Basic ACL view
acl-ethernetframe
Layer 2 ACL view
acl-user
User-defined ACL view
aux
Aux 1/0/0 port view, that is, console port view
cluster
Cluster view
detect-group
Detected group view
ethernet
100M Ethernet port view
ftp-client
FTP client view
gigabitethernet
GigabitEthernet port view
hwtacacs
HWTACACS view
isp
ISP domain view
loopback
Loopback interface view
luser
Local user view
manage-vlan
Management VLAN view
mst-region
MST region view
null
NULL interface view
1-1
CLI view
Description
peer-key-code
Public key editing view
peer-public-key
Public key view
poe-profile
PoE profile view
qinq
QinQ view
qos-profile
QoS profile view
radius-template
RADIUS scheme view
remote-ping
Remote-ping test group view
rip
RIP view
route-policy
Routing policy view
shell
User view
system
System view
user-interface
User interface view
vlan
VLAN view
vlan-interface
VLAN interface view
command: Command for which the level is to be set.
Description
Use the command-privilege level command to set the level of a specified command in a specified
view.
Use the undo command-privilege view command to restore the default.
Commands fall into four levels: visit (level 0), monitor (level 1), system (level 2), and manage (level 3).
The administrator can change the level of a command as required. For example, the administrator can
change a command from a higher level to a lower level so that the lower level users can use the
command.
The default levels of commands are described in the following table:
Table 1-2 Default levels of commands
Level
Name
Command
0
Visit level
Commands used to diagnose network, such as ping, tracert, and
telnet commands.
1
Monitor level
Commands used to maintain the system and diagnose service fault,
such as debugging, terminal and reset commands.
2
System level
All configuration commands except for those at the manage level.
Manage level
Commands associated with the basic operation modules and
support modules of the system, such as file system,
FTP/TFTP/XMODEM downloading, user management, and level
setting commands.
3
Note that:
1-2
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.
z
When you change the level of a command with multiple keywords or arguments, you should input
the keywords or arguments one by one in the order they appear in the command syntax. Otherwise,
your configuration will not take effect. The values of the arguments should be within the specified
ranges.
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/0/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 level of the tftp get command in user view (shell) to 0, and configure the keywords or
arguments one by one in the order they appear in the tftp get command syntax.
[Sysname] command-privilege level 0 view shell tftp
[Sysname] command-privilege level 0 view shell tftp 192.168.0.1
[Sysname] command-privilege level 0 view shell tftp 192.168.0.1 get
[Sysname] command-privilege level 0 view shell tftp 192.168.0.1 get bootrom.btm
# Restore the default level of the tftp get command. To restore the default levels of the commands
starting with the tftp keyword, you only need to specify the tftp keyword.
[Sysname] undo command-privilege view shell tftp
display history-command
Syntax
display history-command
View
Any view
Parameters
None
1-3
Description
Use the display history-command command to display the history commands of the current user, so
that the user can check the configurations performed formerly.
History commands are those commands that were successfully executed recently and saved in the
history command buffer. You can set the size of the buffer by the history-command max-size
command. When the history command buffer is full for that user, the earlier commands will be
overwritten by the new ones.
By default, the CLI can save 10 history commands for each user.
Related commands: history-command max-size in login module.
Examples
# Display the history commands of the current user.
<Sysname> display history-command
system-view
quit
display history-command
super
Syntax
super [ level ]
View
User view
Parameters
level: User level, in the range of 0 to 3.
Description
Use the super command to switch from the current user level to a specified level.
Executing this command without the level argument will switch the current user level to level 3 by
default.
Note that:
z
Users logged into the switch fall into four user levels, which correspond to the four command levels
respectively. Users at a specific level can only use the commands at the same level or lower levels.
z
You can switch between user levels after logging into a switch successfully. The high-to-low user
level switching is unlimited. However, the low-to-high user level switching requires the
corresponding authentication. The authentication mode can be set through the super
authentication-mode command.
z
For security purpose, the password entered is not displayed when you switch to another user level.
You will remain at the original user level if you have tried three times but failed to enter the correct
authentication information.
Related commands: super authentication-mode, super password.
1-4
Examples
# Switch from the current user level to user level 3, using super password authentication.
<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
# Switch from the current user level to level 3, using HWTACACS authentication.
<Sysname> super 3
Username: [email protected]
Password:
User privilege level is 3, and only those commands can be used
whose level is equal or less than this.
Privilege note: 0-VISIT, 1-MONITOR, 2-SYSTEM, 3-MANAGE
super authentication-mode
Syntax
super authentication-mode { super-password | scheme }*
undo super authentication-mode
View
User interface view
Parameters
super-password: Adopts super password authentication for low-to-high user level switching.
scheme: Adopts Huawei terminal access controller access control system (HWTACACS)
authentication for low-to-high user level switching.
Description
Use the super authentication-mode command to specify the authentication mode used for low-to-high
user level switching.
Use the undo super authentication-mode command to restore the default.
By default, super password authentication is adopted for low-to-high user level switching.
Note that, the two authentication modes, super password authentication and HWTACACS
authentication, are available at the same time to provide authentication redundancy. When both the two
authentication modes are specified, the order to perform the two types of authentication is determined
by the order in which they are specified, as described below.
z
If the super authentication-mode super-password scheme command is executed to specify the
authentication mode for user level switching, the super password authentication is preferred and
the HWTACACS authentication mode is the backup.
z
If the super authentication-mode scheme super-password command is executed to specify the
authentication mode for low-to-high user level switching, the HWTACACS authentication is
preferred and the super password authentication mode is the backup.
1-5
z
When both the super password authentication and the HWTACACS authentication are specified,
the device adopts the preferred authentication mode first. If the preferred authentication mode
cannot be implemented (for example, the super password is not configured or the HWTACACS
authentication server is unreachable), the backup authentication mode is adopted.
Examples
# Specify HWTACACS authentication as the preferred authentication mode when a VTY 0 user
switches from the current level to a higher level, with the super password authentication as the backup
authentication mode.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface vty 0
[Sysname-ui-vty0] super authentication-mode scheme super-password
super password
Syntax
super password [ level level ] { cipher | simple } password
undo super password [ level level ]
View
System view
Parameters
level level: User level, in the range of 1 to 3. It is 3 by default.
cipher: Stores the password in the configuration file in ciphered text.
simple: Stores the password in the configuration file in plain text.
password: Password to be set. If the simple keyword is used, you must provide a plain-text password,
that is, a string of 1 to 16 characters. If the cipher keyword is used, you can provide a password in either
of the two ways:
z
Input a plain-text password, that is, a string of 1 to 16 characters, which will be automatically
converted into a 24-character cipher-text password.
z
Directly input a cipher-text password, that is, a string of 1 to 24 characters, which must correspond
to a plain-text password. For example, The cipher-text password “_(TT8F]Y\5SQ=^Q`MAF4<1!!”
corresponds to the plain-text password 1234567.
Description
Use the super password command to set a switching password for a specified user level, which will be
used when users switch from a lower user level to the specified user level.
Use the undo super password command to restore the default configuration.
By default, no such password is set.
Note that, no matter whether a plain-text or cipher-text password is set, users must enter the plain-text
password during authentication.
1-6
Examples
# Set the switching password for level 3 to 0123456789 in plain text.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] super password level 3 simple 0123456789
1-7
Table of Contents
1 Login Commands ······································································································································1-1
Login Commands ····································································································································1-1
authentication-mode ························································································································1-1
auto-execute command ···················································································································1-3
copyright-info enable ·······················································································································1-4
databits ············································································································································1-4
display telnet-server source-ip ········································································································1-5
display telnet source-ip····················································································································1-6
display user-interface ······················································································································1-6
display users····································································································································1-9
display web users ····························································································································1-9
free user-interface ·························································································································1-10
header ···········································································································································1-11
history-command max-size ···········································································································1-13
idle-timeout ····································································································································1-13
ip http shutdown ····························································································································1-14
lock ················································································································································1-15
parity ··············································································································································1-16
protocol inbound ····························································································································1-16
screen-length·································································································································1-18
send ···············································································································································1-18
service-type ···································································································································1-19
set authentication password··········································································································1-20
shell ···············································································································································1-21
speed ·············································································································································1-22
stopbits ··········································································································································1-22
telnet ··············································································································································1-23
telnet ipv6 ······································································································································1-24
telnet source-interface ···················································································································1-25
telnet source-ip ······························································································································1-25
telnet-server source-interface········································································································1-26
telnet-server source-ip···················································································································1-27
user-interface·································································································································1-27
user privilege level·························································································································1-28
2 Commands for User Control ····················································································································2-1
Commands for Controlling Logging in Users ··························································································2-1
acl ····················································································································································2-1
free web-users·································································································································2-2
ip http acl ·········································································································································2-2
snmp-agent community ···················································································································2-3
snmp-agent group ···························································································································2-3
snmp-agent usm-user······················································································································2-4
i
1
Login Commands
Login Commands
authentication-mode
Syntax
authentication-mode { password | scheme [ command-authorization ] | none }
View
User interface view
Parameters
none: Specifies not to authenticate users.
password: Authenticates users using the local password.
scheme: Authenticates users locally or remotely using usernames and passwords.
command-authorization: Performs command authorization on TACACS authentication server.
Description
Use the authentication-mode command to specify the authentication mode.
z
If you specify the password keyword to authenticate users using the local password, remember to
set the local password using the set authentication password command. Otherwise, AUX users
can log in to the switch successfully without password, but VTY users will fail the login. VTY users
must enter the correct authentication password to log in to the switch.
z
If you specify the scheme keyword to authenticate users locally or remotely using usernames and
passwords, the actual authentication mode, that is, local or remote, depends on other related AAA
scheme configuration of the domain.
z
If this command is executed with the command-authorization keyword specified, authorization is
performed on the TACACS server whenever you attempt to execute a command, and the
command can be executed only when you pass the authorization. Normally, a TACACS server
contains a list of the commands available to different users.
By default, the authentication mode is none for AUX users and password for VTY users.
For a VTY user interface, to specify the none keyword or password keyword for login users, make sure
that SSH is not enabled in the user interface. Otherwise, the configuration fails. Refer to the protocol
inbound command for related configuration.
1-1
To improve security and prevent attacks to the unused Sockets, TCP 23 and TCP 22, ports for Telnet
and SSH services respectively, will be enabled or disabled after corresponding configurations.
z
If the authentication mode is none, TCP 23 will be enabled, and TCP 22 will be disabled.
z
If the authentication mode is password, and the corresponding password has been set, TCP 23 will
be enabled, and TCP 22 will be disabled.
z
If the authentication mode is scheme, there are three scenarios: when the supported protocol is
specified as telnet, TCP 23 will be enabled; when the supported protocol is specified as SSH, TCP
22 will be enabled; when the supported protocol is specified as all, both the TCP 23 and TCP 22
port will be enabled.
Examples
z
Example of the password authentication mode configuration
# Configure to authenticate users using the local password on the console port, and set the
authentication password to aabbcc in plain text.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] authentication-mode password
[Sysname-ui-aux0] set authentication password simple aabbcc
After the configuration, when a user logs in to the switch through the console port, the user must enter
the correct password.
z
Example of the scheme authentication mode configuration
# Configure the authentication mode as scheme for VTY users logging in through Telnet.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface vty 0
[Sysname-ui-vty0] authentication-mode scheme
[Sysname-ui-vty0] quit
# Specify domain system as the default domain, and set the scheme authentication mode to local for
the domain.
[Sysname] domain default enable system
[Sysname] domain system
[Sysname-isp-system] scheme local
[Sysname-ui-vty0] quit
# Configure the local authentication username and password.
[Sysname] local-user guest
[Sysname-luser-guest] password simple 123456
[Sysname-luser-guest] service-type telnet level 2
After the configuration, when a user logs in to the switch through VTY0, the user must enter the
configured username and password.
1-2
auto-execute command
Syntax
auto-execute command text
undo auto-execute command
View
VTY user interface view
Parameters
text: Command to be executed automatically.
Description
Use the auto-execute command command to set the command that is executed automatically after a
user logs in.
Use the undo auto-execute command command to disable the specified command from being
automatically executed.
By default, no command is configured to be executed automatically after a user logs in.
Normally, the telnet command is specified to be executed automatically to enable the user to Telnet to a
specific network device automatically.
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 in to 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 in to 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.
1-3
copyright-info enable
Syntax
copyright-info enable
undo copyright-info enable
View
System view
Parameters
None
Description
Use the copyright-info enable command to enable copyright information displaying.
Use the undo copyright-info enable command to disable copyright information displaying.
By default, copyright information displaying is enabled. That is, the copyright information is displayed
after a user logs into a switch successfully.
Note that these two commands apply to users logging in through the console port and by means of
Telnet.
Examples
# Disable copyright information displaying.
********************************************************************************
*
Copyright(c) 2004-2008 3Com Corp. and its licensors. All rights reserved.
*
*
Without the owner's prior written consent,
*
*
no decompiling or reverse-engineering shall be allowed.
*
********************************************************************************
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] undo copyright-info enable
# After the above configuration, no copyright information is displayed after a user logs in, as shown
below.
<Sysname>
databits
Syntax
databits { 7 | 8 }
undo databits
View
AUX user interface view
1-4
Parameters
7: Sets the databits to 7.
8: Sets the databits to 8.
Description
Use the databits command to set the databits for the user interface.
Use the undo databits command to revert to the default databits.
The default databits is 8.
Examples
# Set the databits to 7.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] databits 7
display telnet-server source-ip
Syntax
display telnet-server source-ip
View
Any view
Parameters
None
Description
Use the display telnet-server source-ip command to display the source IP address configured for the
switch operating as the Telnet server. That is, when the switch operates as the Telnet server, the client
uses this IP address to log in to the switch.
z
If the source IP address or source interface is specified for the switch, this command displays the
IP address or the primary IP address of the source interface.
z
If neither source IP address nor source interface is specified, 0.0.0.0 is displayed. That is, as long
as there is a route between the switch and client, the client can log in to the switch using the IP
address of any Layer 3 interface on the switch.
When you use the display telnet-server source-ip command to display the source IP address, the
primary IP address of an interface will be displayed even if you have specified a secondary IP address
of the interface as the source IP address.
1-5
Examples
# Display the source IP address configured for the switch operating as the Telnet server.
<Sysname> display telnet-server source-ip
The source IP you specified is 192.168.1.1
display telnet source-ip
Syntax
display telnet source-ip
View
Any view
Parameters
None
Description
Use the display telnet source-ip command to display the source IP address configured for the switch
operating as the Telnet client. That is, the source IP address of the Telnet service packets sent when the
switch operates as the Telnet client to log in to the remote device.
z
If the source interface is specified for the switch, this command displays the IP address of the
source interface.
z
If no source address or source IP interface is specified for the switch, 0.0.0.0 is displayed. That is,
the source IP address of Telnet service packets is that of the outbound interface.
Examples
# Display the source IP address configured for the switch operating as the Telnet client.
<Sysname> display telnet source-ip
The source IP you specified is 192.168.1.1
display user-interface
Syntax
display user-interface [ type number | number ] [ summary ]
View
Any view
Parameters
type: User interface type, which can be AUX (for AUX user interface) and VTY (for VTY user interface).
number: User interface index. A user interface index can be relative or absolute.
z
In relative user interface number scheme, the type argument is required. In this case, AUX user
interfaces are numbered from AUX0 through AUX7; VTY user interfaces are numbered from VTY0
through VTY4.
1-6
In absolute user interface number scheme, the type argument is not required. In this case, user
z
interfaces are numbered from 0 to 12.
summary: Displays the summary information about a user interface.
Description
Use the display user-interface command to display the information about a specified user interface or
all user interfaces. If the summary keyword is not specified, this command displays user interface type,
absolute/relative user interface index, transmission speed, available command level, authentication
mode, and physical position. If the summary keyword is specified, this command displays the number
and type of the user interfaces, including those that are in use and those that are not in use.
Examples
# Display the information about user interface 0.
<Sysname> display user-interface 0
Idx
F 0
Type
Tx/Rx
AUX 0
19200
Modem Privi Auth
-
3
N
Int
Super
-
S
+
: Current user-interface is active.
F
: Current user-interface is active and work in async mode.
Idx
: Absolute index of user-interface.
Type : Type and relative index of user-interface.
Privi: The privilege of user-interface.
Auth : The authentication mode of user-interface.
Int
: The physical location of UIs.
Super: The Super authentication mode of UIs.
A
: Authentication use AAA.
N
: Current UI need not authentication.
P
: Authentication use current UI's password.
S
: Authentication use super password.
Table 1-1 Descriptions on the fields of the display user-interface command
Filed
Description
+
The user interface is in use.
F
The user interface operates in asynchronous
mode.
Idx
The absolute index of the user interface
Type
User interface type and the relative index
Tx/Rx
Transmission speed of the user interface
Modem
Indicates whether or not a modem is used.
Privi
Available command level
Auth
Authentication mode
Int
Physical position of the user interface
1-7
The authentication mode used for a user to
switch from the current lower user level to a
higher level, including S, A, SA and AS.
S: Super password authentication
A: HWTACACS authentication
SA: Super password authentication is preferred,
with HWTACACS authentication being a backup
Super
AS: HWTACACS authentication is preferred,
with super password authentication being a
backup
For details about the four authentication modes,
refer to the CLI part of the manual.
A
The current user authentication mode is scheme.
N
The current user authentication mode is none.
P
The current user authentication mode is
password.
S
Super password authentication
# Display the summary information about the user interface.
<Sysname> display user-interface summary
User interface type : [AUX]
0:UXXX XXXX
User interface type : [VTY]
8:UUUU X
5 character mode users.
(U)
8 UI never used.
(X)
5 total UI in use
Table 1-2 Description on the fields of the display user-interface summary command
Field
Description
User interface type
User interface type: AUX or VTY
0:UXXX XXXX/8:UUUU X
0 and 8 represent the least absolute number for
AUX user interfaces and VTY user interfaces.
“U” and “X” indicate the usage state of an
interface: U indicates that the corresponding
user interface is used; X indicates that the
corresponding user interface is idle. The total
number of Us and Xs is the total number of user
interfaces that are available.
character mode users.
UI never used.
The number of current users, that is, the number
of Us
(U)
The number of user interfaces not being used
currently, that is, the number of Xs
(X)
The total number of user interfaces being used
currently, that is, the total number of users
currently logging in to the switch successfully
total UI in use.
1-8
display users
Syntax
display users [ all ]
View
Any view
Parameters
all: Displays the user information about all user interfaces.
Description
Use the display users command to display the user information about user interfaces.
If you do not specify the all keyword, only the user information about the current user interface is
displayed.
Examples
# Display the user information about the current user interface.
<Sysname> display users
UI
+ 8
VTY 0
Delay
Type
Ipaddress
00:00:00
TEL
192.168.0.208
Username
+
: Current operation user.
F
: Current operation user work in async mode.
Userlevel
3
Table 1-3 Descriptions on the fields of the display users command
Field
Description
UI
The numbers in the left sub-column are the absolute user interface
indexes, and those in the right sub-column are the relative user
interface indexes.
Delay
The period (in seconds) the user interface idles for.
Type
User type
Ipaddress
The IP address from which the user logs in.
Username
The login name of the user that logs into the user interface.
Userlevel
The level of the commands available to the users logging in to the
user interface
F
The information is about the current user interface, and the current
user interface operates in asynchronous mode.
+
The user interface is in use.
display web users
Syntax
display web users
1-9
View
Any view
Parameters
None
Description
Use the display web users command to display the information about the current on-line Web users.
Examples
# Display the information about the current on-line Web users.
<Sysname> display web users
ID
Name
Language
Level
Login Time
Last Req. Time
00800003
admin
English
Management
06:16:32
06:18:35
Table 1-4 Description on the fields of the display web users command
Field
Description
ID
ID of a Web user
Name
Name of a Web user
Language
Language a Web user uses
Level
Level of a Web user
Login Time
Time when a Web user logs in
Last Req. Time
Time when the latest request is made
free user-interface
Syntax
free user-interface [ type ] number
View
User view
Parameters
type: User interface type, which can be AUX (for AUX user interface) and VTY (for VTY user interface).
number: User interface index. A user interface index can be relative or absolute.
z
In relative user interface index scheme, the type argument is required. In this case, AUX user
interfaces are numbered from AUX0 through AUX7; VTY user interfaces are numbered from VTY0
through VTY4.
z
In absolute user interface index scheme, the type argument is not required. In this case, user
interfaces are numbered from 0 to 12.
1-10
Description
Use the free user-interface command to free a user interface. That is, this command tears down the
connection between a user and a user interface.
Note that the current user interface cannot be freed.
Examples
# Release user interface VTY 1.
<Sysname> free user-interface vty 1
Are you sure you want to free user-interface vty1 [Y/N]? y
[OK]
After you perform the above operation, the user connection on user interface VTY1 is torn down. The
user in it must log in again to connect to the switch.
header
Syntax
header [ incoming | legal | login | shell ] text
undo header { incoming | legal | login | shell }
View
System view
Parameters
incoming: Sets the login banner for users that log in through modems. If you specify to authenticate
login users, the banner appears after a user passes the authentication. (The session does not appear in
this case.)
legal: Sets the authorization banner, which is displayed when a user enters user view.
login: Sets the login banner. The banner set by this keyword is valid only when users are authenticated
before they log in to the switch and appears while the switch prompts for user name and password. If a
user logs in to the switch through Web, the banner text configured will be displayed on the banner page.
shell: Sets the session banner, which appears after a session is established. If you specify to
authenticate login users, the banner appears after a user passes the authentication.
text: Banner to be displayed. If no keyword is specified, this argument is the login banner. You can
provide this argument in two ways. One is to enter the banner in the same line as the command (A
command line can accept up to 254 characters.) The other is to enter the banner in multiple lines (you
can start a new line by pressing Enter,) where you can enter a banner that can contain up to 2000
characters (including the invisible characters such as carriage return). Note that the first character is the
beginning character and the end character of the banner. After entering the end character, you can
press Enter to exit the interaction.
Description
Use the header command to set the banners that are displayed when a user logs into a switch. The
login banner is displayed on the terminal when the connection is established. And the session banner is
displayed on the terminal if a user successfully logs in.
Use the undo header command to disable displaying a specific banner or all banners.
1-11
By default, no banner is configured.
Note the following:
If you specify any one of the four keywords without providing the text argument, the specified
z
keyword will be regarded as the login information.
The banner configured with the header incoming command is displayed after a modem user logs
z
in successfully or after a modem user passes the authentication when authentication is required. In
the latter case, the shell banner is not displayed.
The banner configured with the header legal command is displayed when you enter the user
z
interface. If password authentication is enabled or an authentication scheme is specified, this
banner is displayed before login authentication.
With password authentication enabled or an authentication scheme specified, the banner
z
configured with the header login command is displayed after the banner configured with the
header legal command and before login authentication.
The banner configured with the header shell command is displayed after a non-modem user
z
session is established.
Examples
# Configure banners.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] header login %Welcome to login!%
[Sysname] header shell %
Input banner text, and quit with the character '%'.
Welcome to shell!%
[Sysname] header incoming %
Input banner text, and quit with the character '%'.
Welcome to incoming!%
[Sysname] header legal %
Input banner text, and quit with the character '%'.
Welcome to legal!%
z
The character % is the starting/ending character of text in this example. Entering % after the
displayed text quits the header command.
z
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-2008 3Com Corp. and its licensors. All rights reserved.
*
*
Without the owner's prior written consent,
*
*
no decompiling or reverse-engineering shall be allowed.
*
********************************************************************************
1-12
Welcome to legal!
Press Y or ENTER to continue, N to exit.
Welcome to login!
Login authentication
Password:
Welcome to shell!
<Sysname>
history-command max-size
Syntax
history-command max-size value
undo history-command max-size
View
User interface view
Parameters
value: Size of the history command buffer, ranging from 0 to 256 (in terms of commands).
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.
By default, the history command buffer can contain up to ten commands.
Related commands: display history-command.
Examples
# Set the size of the history command buffer of AUX 0 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
idle-timeout minutes [ seconds ]
undo idle-timeout
View
User interface view
1-13
Parameters
minutes: Number of minutes. This argument ranges from 0 to 35,791.
seconds: Number of seconds. This argument ranges from 0 to 59.
Description
Use the idle-timeout command to set the timeout time. The connection to a user interface is terminated
if no operation is performed in the user interface within the timeout time.
Use the undo idle-timeout command to revert to the default timeout time.
You can use the idle-timeout 0 command to disable the timeout function.
The default timeout time is 10 minutes.
Examples
# Set the timeout time of AUX 0 to 1 minute.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] idle-timeout 1
ip http shutdown
Syntax
ip http shutdown
undo ip http shutdown
View
System view
Parameters
None
Description
Use the ip http shutdown command to shut down the WEB Server.
Use the undo ip http shutdown command to launch the WEB Server.
By default, the WEB Server is launched.
To improve security and prevent attacks to the unused Sockets, TCP 80 port for HTTP service will be
enabled or disabled after corresponding configurations.
z
TCP 80 port is enabled only after you use the undo ip http shutdown command to enable the
Web server.
z
If you use the ip http shutdown command to disabled the Web server, TCP 80 port is disabled.
1-14
After the Web file is upgraded, you need to use the boot web-package command to specify a new Web
file or specify a new Web file from the boot menu after reboot for the Web server to operate properly.
Refer to the File System Management part in this manual for information about the boot web-package
command.
Examples
# Shut down the WEB Server.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ip http shutdown
# Launch the WEB Server.
[Sysname] undo ip http shutdown
lock
Syntax
lock
View
User view
Parameters
None
Description
Use the lock command to lock the current user interface to prevent unauthorized operations in the user
interface.
After you execute this command, the system prompts you for the password and prompts you to confirm
the password. The user interface is locked only when the password entered is correct.
To unlock a user interface, press Enter and then enter the password as prompted.
Note that if you set a password containing more than 16 characters, the system matches only the first
16 characters of the password entered for unlocking the user interface. That is, the system unlocks the
user interface as long as the first 16 characters of the password entered are correct.
By default, the current user interface is not locked.
Examples
# Lock the current user interface.
<Sysname> lock
Press Enter, enter a password, and then confirm it as prompted. (The password entered is not
displayed).
1-15
Password:
Again:
locked !
In this case, the user interface is locked. To operate the user interface again, you need to press Enter
and provide the password as prompted.
Password:
<Sysname>
parity
Syntax
parity { even | none | odd | }
undo parity
View
AUX user interface view
Parameters
even: Performs even checks.
none: Does not check.
odd: Performs odd checks.
Description
Use the parity command to set the check mode of the user interface.
Use the undo parity command to revert to the default check mode.
By default, no check is performed.
Examples
# Set to perform even checks.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] parity even
protocol inbound
Syntax
protocol inbound { all | ssh | telnet }
View
VTY user interface view
Parameters
all: Supports both Telnet protocol and SSH protocol.
ssh: Supports SSH protocol.
1-16
telnet: Supports Telnet protocol.
Description
Use the protocol inbound command to specify the protocols supported by the user interface.
Both Telnet protocol and SSH protocol are supported by default.
Related commands: user-interface vty.
To improve security and prevent attacks to the unused Sockets, TCP 23 and TCP 22 (ports for Telnet
and SSH services respectively) will be enabled or disabled after corresponding configurations.
z
If the authentication mode is none, TCP 23 will be enabled, and TCP 22 will be disabled.
z
If the authentication mode is password, and the corresponding password has been set, TCP 23 will
be enabled, and TCP 22 will be disabled.
z
If the authentication mode is scheme, there are three scenarios: when the supported protocol is
specified as telnet, TCP 23 will be enabled; when the supported protocol is specified as ssh, TCP
22 will be enabled; when the supported protocol is specified as all, both the TCP 23 and TCP 22
port will be enabled.
To configure a user interface to support SSH, you need to set the authentication mode to scheme for
users to log in successfully. If the authentication mode is set to password or none for login users, the
protocol inbound ssh command will fail. Refer to the authentication-mode command for the related
configuration.
Examples
# Configure that only SSH protocol is supported in VTY 0.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface vty 0
[Sysname-ui-vty0] protocol inbound ssh
1-17
screen-length
Syntax
screen-length screen-length
undo screen-length
View
User interface view
Parameters
screen-length: Number of lines the screen can contain. This argument ranges from 0 to 512.
Description
Use the screen-length command to set the number of lines the terminal screen can contain.
Use the undo screen-length command to revert to the default number of lines.
By default, the terminal screen can contain up to 24 lines.
You can use the screen-length 0 command to disable the function to display information in pages.
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
send { all | number | type number }
View
User view
Parameters
all: Sends messages to all user interfaces.
type: User interface type, which can be AUX (for AUX user interface) and VTY (for VTY user interface).
number: User interface index. A user interface index can be relative or absolute.
z
In relative user interface index scheme, the type argument is required. In this case, AUX user
interfaces are numbered from AUX0 through AUX7; VTY user interfaces are numbered from VTY0
through VTY4.
z
In absolute user interface index scheme, the type argument is not required. In this case, user
interfaces are numbered from 0 to 12.
Description
Use the send command to send messages to a user interface or all the user interfaces.
1-18
Examples
# Send “hello” to all user interfaces.
<Sysname> send all
Enter message, end with CTRL+Z or Enter; abort with CTRL+C:
hello^Z
Send message? [Y/N]y
The current user interface will receive the following information:
<Sysname>
***
***
***Message from vty1 to vty1
***
hello
service-type
Syntax
service-type { ftp | lan-access | { ssh | telnet | terminal }* [ level level ] }
undo service-type { ftp | lan-access | { ssh | telnet | terminal }* }
View
Local user view
Parameters
ftp: Specifies the users to be of FTP type.
lan-access: Specifies the users to be of LAN-access type, which normally means Ethernet users, such
as 802.1x users.
ssh: Specifies the users to be of SSH type.
telnet: Specifies the users to be of Telnet type.
terminal: Makes terminal services available to users logging in through the console port.
level level: Specifies the user level for Telnet users, Terminal users, or SSH users. The level argument
ranges from 0 to 3 and defaults to 0.
Description
Use the service-type command to specify the login type and the corresponding available command
level.
Use the undo service-type command to cancel login type configuration.
Commands fall into four command levels: visit, monitor, system, and manage, which are described as
follows:
z
Visit level: Commands at this level are used to diagnose network and change the language mode
of user interface, such as the ping, tracert, and language-mode command. The telnet command
is also at this level. Commands at this level cannot be saved in configuration files.
1-19
Monitor level: Commands at this level are used to maintain the system, to debug service problems,
z
and so on. The display and debugging commands are at monitor level. Commands at this level
cannot be saved in configuration files.
System level: Commands at this level are used to configure services. Commands concerning
z
routing and network layers are at system level. You can utilize network services by using these
commands.
Manage level: Commands at this level are for the operation of the entire system and the system
z
supporting modules. Services are supported by these commands. Commands concerning file
system, file transfer protocol (FTP), trivial file transfer protocol (TFTP), downloading using
XModem, user management, and level setting are at administration level.
Refer to CLI for detailed introduction to the command level.
Examples
# Configure commands at level 0 are available to the users logging in using the user name of zbr.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] local-user zbr
[Sysname-luser-zbr] service-type telnet level 0
# To verify the above configuration, you can quit the system, log in again using the user name of zbr,
and then list the available commands, as listed in the following.
<Sysname> ?
User view commands:
cluster
Run cluster command
display
Display current system information
nslookup
Query Internet name servers
ping
Ping function
quit
Exit from current command view
super
Set the current user priority level
telnet
Establish one TELNET connection
tracert
Trace route function
undo
Cancel current setting
set authentication password
Syntax
set authentication password { cipher | simple } password
undo set authentication password
View
User interface view
Parameters
cipher: Specifies to save the local password in cipher text.
simple: Specifies to save the local password in plain text.
1-20
password: Password to be set. 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 cipher text or plain text, as described in the following.
z
When you enter the password in plain text containing no more than 16 characters (such as 123),
the system converts the password to the corresponding 24-character encrypted password.
z
When you enter the password in cipher text containing 24 characters, make sure you are aware of
the corresponding password in plaintext. For example, the plain text “123456” corresponds to the
cipher text “OUM!K%F<+$[Q=^Q`MAF4<1!!”.
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, password authentication is performed when a user logs in through a modem or Telnet. If no
password is set, the user cannot establish a connection with the switch.
Examples
# Set the local password of VTY 0 to “123”.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface vty 0
[Sysname-ui-vty0] set authentication password simple 123
shell
Syntax
shell
undo shell
View
User interface view
Parameters
None
Description
Use the shell command to enable terminal services.
Use the undo shell command to disable terminal services.
By default, terminal services are disabled in all user interfaces.
1-21
Note the following when using the undo shell command:
z
Terminal services cannot be disabled in AUX user interfaces.
z
This command is unavailable in the current user interface.
z
The execution of this command requires user confirmation.
Examples
# Disable terminal services in VTY 0 through VTY 4 (assuming that you log in through an AUX user
interface).
<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
AUX user interface view
Parameters
speed-value: Transmission speed (in bps). This argument can be 300, 600, 1200, 2400, 4800, 9600,
19,200, 38,400, 57,600, and 115,200.
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.
By default, the transmission speed is 19,200 bps.
Examples
# Set the transmission speed of the user interface AUX 0 to 115,200 bps.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] speed 115200
stopbits
Syntax
stopbits { 1 | 1.5 | 2 }
undo stopbits
1-22
View
AUX user interface view
Parameters
1: Sets the stopbits to 1.
1.5: Sets the stopbits to 1.5.
2: Sets the stopbits to 2.
Description
Use the stopbits command to set the stopbits of the user interface.
Use the undo stopbits command to revert to the default stopbits.
Execute these two commands in AUX user interface view only.
By default, the stopbits is 1.
z
The Switch 4500 does 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
# Set the stop bits to 2.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] stopbits 2
telnet
Syntax
telnet { hostname | ip-address } [ service-port ] [ source-interface interface-type interface-number |
source-ip ip-address ]
View
User view
Parameters
hostname: Host name of the remote device, a string of 1 to 20 characters.
ip-address: IPv4 address of the remote device.
service-port: Number of the TCP port through which the remote device provides Telnet service. This
argument ranges from 0 to 65535, and defaults to 23.
1-23
source-interface interface-type interface-number: Specifies the type and number of the source
interface.
source-ip ip-address: Specifies the source IP address.
Description
Use the telnet command to Telnet to another device from the current switch to manage the former
remotely. You can terminate a Telnet connection by pressing Ctrl+K or by executing the quit command.
Examples
# Telnet from Ethernet switch Switch A to Switch B whose IP address is 129.102.0.1.
<SwitchA> telnet 129.102.0.1
Trying 129.102.0.1 ...
Press CTRL+K to abort
Connected to 129.102.0.1 ...
********************************************************************************
*
Copyright(c) 2004-2008 3Com Corp. and its licensors. All rights reserved.
*
*
Without the owner's prior written consent,
*
*
no decompiling or reverse-engineering shall be allowed.
*
********************************************************************************
<SwitchB>
telnet ipv6
Syntax
telnet ipv6 remote-system [ -i interface-type interface-number ] [ port-number ]
View
User view
Parameters
remote-system: IPv6 address or host name of the remote system. An IPv6 address can be up to 46
characters; a host name is a string of 1 to 20 characters.
-i interface-type interface-number: Specifies the outbound interface by interface type and interface
number. The outbound interface is required when the destination address is a local link address.
port-number: TCP port number assigned to Telnet service on the remote system, in the range 0 to
65535 and defaults to 23.
Description
Use the telnet ipv6 command to Telnet to a device from the current device to perform remote
management operation. You can terminate a Telnet session by pressing Ctrl+K.
Example
# Telnet to the device with IPv6 address 3001::1.
<Sysname> telnet ipv6 3001::1
Trying 3001::1 ...
1-24
Press CTRL+K to abort
Connected to 3001::1 ...
********************************************************************************
*
Copyright(c) 2004-2008 3Com Corp. and its licensors. All rights reserved.
*
*
Without the owner's prior written consent,
*
*
no decompiling or reverse-engineering shall be allowed.
*
********************************************************************************
<Sysname>
telnet source-interface
Syntax
telnet source-interface interface-type interface-number
undo telnet source-interface
View
System view
Parameters
interface-type interface-number: Interface type and interface number.
Description
Use the telnet source-interface command to specify the source interface for a Telnet client.
Use the undo telnet source-interface command to remove the specified source interface.
The source interface can be a loopback interface or a VLAN interface. If the specified interface does not
exist, the system prompts that this configuration fails.
With this command configured, when a device logs in to the Telnet server as a Telnet client, the source
IP address is the IP address of the specified interface, the login succeeds only when there is a route
between the specified source interface and the Telnet server.
Examples
# Specify VLAN-interface 2 as the source interface for the Telnet client.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] telnet source-interface Vlan-interface 2
telnet source-ip
Syntax
telnet source-ip ip-address
undo telnet source-ip
View
System view
1-25
Parameters
ip-address: IP address to be set.
Description
Use the telnet source-ip command to specify the source IP address for a Telnet client.
Use the undo telnet source-ip command to remove the source IP address.
With the telnet source-ip command configured, the specified IP address functions as the source IP
address when a device logs into a Telnet server as a Telnet client, and the login succeeds only when
there is a route between the specified source IP address and the Telnet server.
Note that when the telnet source-ip command is executed, if the IP address specified is not an IP
address of the local device, your configuration fails.
Examples
# Set the source IP address to 192.168.1.1 for the Telnet client.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] telnet source-ip 192.168.1.1
telnet-server source-interface
Syntax
telnet-server source-interface interface-type interface-number
undo telnet-server source-interface
View
System view
Parameters
interface-type interface-number: Interface type and interface number.
Description
Use the telnet-server source-interface command to specify the source interface for a Telnet server.
Use the undo telnet-server source-interface command to remove the source interface.
The source interface can be a loopback interface or a VLAN interface. If the specified interface does not
exist, the system prompts that this configuration fails, and the login succeeds only when there is a route
between the Telnet client and the specified source interface.
With the telnet-server source-interface command configured, the client can log in to the local device
using only the primary IP address of the specified interface.
Examples
# Specify VLAN-interface 2 as the source interface for the Telnet server.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] telnet source-interface Vlan-interface 2
1-26
telnet-server source-ip
Syntax
telnet-server source-ip ip-address
undo telnet-server source-ip
View
System view
Parameters
ip-address: Source IP address to be set.
Description
Use the telnet-server source-ip command to specify the source Telnet server IP address.
Use the undo telnet-server source-ip command to remove the source Telnet server IP address.
With the telnet-server source-ip command configured, the client can log in to the local device using
the specified IP address only, and the login succeeds only when there is a route between the client and
specified source IP address.
z
If the specified IP address is not an address on the local switch, the system prompts configuration
failure.
z
If the specified IP address is a secondary IP address of a Layer 3 interface, a client can log in to the
switch using only the primary IP address of the interface.
Examples
# Specify the source IP address of the Telnet server as 192.168.1.1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] telnet-server source-ip 192.168.1.1
user-interface
Syntax
user-interface [ type ] first-number [ last-number ]
View
System view
Parameters
type: User interface type, which can be AUX (for AUX user interface) and VTY (for VTY user interface).
1-27
first-number: User interface index identifying the first user interface to be configured. A user interface
index can be relative or absolute.
z
In relative user interface index scheme, the type argument is required. In this case, AUX user
interfaces are numbered from AUX0 through AUX7; VTY user interfaces are numbered from VTY0
through VTY4.
z
In absolute user interface index scheme, the type argument is not required. In this case, user
interfaces are numbered from 0 to 12.
last-number: User interface number identifying the last user interface to be configured. The value of this
argument must be larger than that of the first-number argument.
Description
Use the user-interface command to enter one or more user interface views to perform configuration.
Examples
# Enter VTY0 user interface.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface vty 0
[Sysname-ui-vty0]
user privilege level
Syntax
user privilege level level
undo user privilege level
View
User interface view
Parameters
level: Command level ranging from 0 to 3.
Description
Use the user privilege level command to configure the command level available to the users logging in
to the user interface.
Use the undo user privilege level command to revert to the default command level.
By default, the commands at level 3 are available to the users logging in to the AUX user interface. The
commands at level 0 are available to the users logging in to VTY user interfaces.
Commands fall into four command levels: visit, monitor, system, and manage, which are described as
follows:
z
Visit level: Commands at this level are used to diagnose network, such as the ping, tracert, and
telnet command. Commands at this level cannot be saved in configuration files.
z
Monitor level: Commands at this level are used to maintain the system, to debug service problems,
and so on. The display and debugging commands are at monitor level. Commands at this level
cannot be saved in configuration files.
1-28
System level: Commands at this level are used to configure services. Commands concerning
z
routing and network layers are at system level. You can utilize network services by using these
commands.
Manage level: Commands at this level are for the operation of the entire system and the system
z
supporting modules. Services are supported by these commands. Commands concerning file
system, file transfer protocol (FTP), trivial file transfer protocol (TFTP), downloading using
XModem, user management, and level setting are at administration level.
Refer to CLI Configuration for information about command level.
Examples
# Configure that commands at level 1 are available to the users logging in to 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 1
# 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:
cluster
Run cluster command
debugging
Enable system debugging functions
display
Display current system information
mtracert
Trace route to multicast source
nslookup
Query Internet name servers
ping
Ping function
quit
Exit from current command view
reset
Reset operation
send
Send information to other user terminal interfaces
super
Set the current user priority level
telnet
Establish one TELNET connection
terminal
Set the terminal line characteristics
tracert
Trace route function
undo
Cancel current setting
1-29
2
Commands for User Control
Commands for Controlling Logging in Users
acl
Syntax
acl acl-number { inbound | outbound }
undo acl acl-number { inbound | outbound }
View
User interface view
Parameters
acl-number: ACL number. This argument can identify different types of ACLs, as listed below.
z
2000 to 2999, for basic ACLs
z
3000 to 3999, for advanced ACLs
z
4000 to 4999, for Layer 2 ACLs
inbound: Applies the ACL for the users Telnetting to the local switch from the current user interface.
outbound: Applies the ACL for the users Telnetting to other devices from the current user interface.
This keyword is unavailable to Layer 2 ACLs.
Description
Use the acl command to apply an ACL for Telnet users.
Use the undo acl command to cancel the configuration.
By default, no ACL is applied.
Examples
# Apply ACL 2000 (a basic ACL) for the users Telnetting to the current switch (assuming that ACL 2000
already exists.)
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface vty 0 4
[Sysname-ui-vty0-4] acl 2000 inbound
2-1
free web-users
Syntax
free web-users { all | user-id user-id | user-name user-name }
View
User view
Parameters
all: Specifies all Web users.
user-id: Web user ID, an eight-digit hexadecimal number.
user-name: User name of the Web user. This argument can contain 1 to 80 characters.
Description
Use the free web-users command to disconnect a specified Web user or all Web users by force.
Examples
# Disconnect all Web users by force.
<Sysname> free web-users all
ip http acl
Syntax
ip http acl acl-number
undo ip http acl
View
System view
Parameters
acl-number: ACL number ranging from 2000 to 2999.
Description
Use the ip http acl command to apply an ACL to filter Web users.
Use the undo ip http acl command to disable the switch from filtering Web users using the ACL.
By default, the switch does not use the ACL to filter Web users.
Examples
# Apply ACL 2000 to filter Web users (assuming that ACL 2000 already exists.)
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ip http acl 2000
2-2
snmp-agent community
Syntax
snmp-agent community { read | write } community-name [ acl acl-number | mib-view view-name ]*
undo snmp-agent community community-name
View
System view
Parameters
read: Specifies that the community has read-only permission in the specified view.
write: Specifies that the community has read/write permission in the specified view.
community-name: Community name, a string of 1 to 32 characters.
acl acl-number: Specifies an ACL number for the community. The acl-number argument ranges from
2000 to 2999.
mib-view view-name: Sets the name of the MIB view accessible to the community. The view-name
argument is a string of 1 to 32 characters.
Description
Use the snmp-agent community command to set a community name and to enable users to access
the switch through SNMP. You can also optionally use this command to apply an ACL to perform access
control for network management users.
Use the undo snmp-agent community command to cancel community-related configuration for the
specified community.
By default, SNMPv1 and SNMPv2c access a switch by community names.
Examples
# Set the community name to h123, enable users to access the switch in the name of the community
(with read-only permission). Apply ACL 2000 for network management users (assuming that ACL 2000
already exists.)
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] snmp-agent community read h123 acl 2000
snmp-agent group
Syntax
In SNMPv1 and SNMPv2c:
snmp-agent group { v1 | v2c } group-name [ read-view read-view ] [ write-view write-view ]
[ notify-view notify-view ] [ acl acl-number ]
undo snmp-agent group { v1 | v2c } group-name
In SNMPv3:
snmp-agent group v3 group-name [ authentication | privacy ] [ read-view read-view ] [ write-view
write-view ] [ notify-view notify-view ] [ acl acl-number ]
2-3
undo snmp-agent group v3 group-name [ authentication | privacy ]
View
System view
Parameters
v1: SNMPv1.
v2c: SNMPv2c.
v3: SNMPv3.
group-name: Group name. This argument can be of 1 to 32 characters.
authentication: Specifies to authenticate SNMP data without encrypting the data.
privacy: Authenticates and encrypts packets.
read-view: Name of the view to be set to read-only. This argument can be of 1 to 32 characters.
write-view: Name of the view to be set to readable & writable. This argument can be of 1 to 32
characters.
notify-view: Name of the view to be set to a notifying view. This argument can be of 1 to 32 characters.
acl acl-number: Specifies an ACL. The acl-number argument ranges from 2,000 to 2,999.
Description
Use the snmp-agent group command to create an SNMP group. You can also optionally use this
command to apply an ACL to filter network management users.
Use the undo snmp-agent group command to remove a specified SNMP group.
By default, the SNMP group configured through the snmp-agent group v3 command is not
authenticated or encrypted.
Examples
# Create an SNMP group named h123 and apply ACL 2001 for network management users (assuming
that basic ACL 2001 already exists).
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] snmp-agent group v1 h123 acl 2001
snmp-agent usm-user
Syntax
For SNMPv1 and SNMPv2c:
snmp-agent usm-user { v1 | v2c } user-name group-name [ acl acl-number ]
undo snmp-agent usm-user { v1 | v2c } user-name group-name
For SNMPv3:
snmp-agent usm-user v3 user-name group-name [ [ cipher ] authentication-mode { md5 | sha }
auth-password [ privacy-mode { aes128 | des56 } priv-password ] ] [ acl acl-number ]
undo snmp-agent usm-user v3 user-name group-name { engineid engineid-string | local }
2-4
View
System view
Parameters
v1: SNMPv1.
v2c: SNMPv2c.
v3: SNMPv3.
user-name: User name, a string of 1 to 32 characters.
group-name: Name of the group to which the user corresponds. This argument is a string of 1 to 32
characters.
cipher: Specifies the authentication or encryption password to be in ciphertext.
authentication-mode: Requires authentication. If this keyword is not provided, neither authentication
nor encryption is performed.
md5: Adopts HMAC-MD5 algorithm.
sha: Adopts HMAC-SHA algorithm.
auth-password: Authentication password, a string of 1 to 64 characters in plain text, a 32-bit
hexadecimal number in cipher text if MD5 algorithm is used, and a 40-bit hexadecimal number in cipher
text if SHA algorithm is used.
privacy: Encrypts packets.
des56: Specifies data encryption standard (DES) for encrypting.
aes128: Specifies advanced encryption standard (AES) for encrypting.
priv-password: Encryption password, a string of 1 to 64 characters in plain text, a 32-bit hexadecimal
number in cipher text if MD5 algorithm is used, and a 40-bit hexadecimal number in cipher text if SHA
algorithm is used.
acl-number: Basic ACL number, ranging from 2000 to 2999.
local: Specifies local entity users.
engineid-string: Engine ID associated with the user, a string of even number of hexadecimal numbers
and comprising of 10 to 64 hexadecimal digits.
Description
Use the snmp-agent usm-user command to add a user to an SNMP group. You can also optionally
use this command to apply an ACL for network management users.
Use the undo snmp-agent usm-user command to remove an SNMP user from the corresponding
SNMP group and to remove the ACL configuration on the user.
Examples
# Add a user named aaa to an SNMP group named group1, specify to require authentication, specify
the authentication protocol as HMAC-MD5-96 and authentication password as 123, and apply ACL
2002 to filter network management users (assuming that ACL 2002 already exists).
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] snmp-agent usm-user v3 aaa group1 authentication-mode md5 123 acl 2002
2-5
2-6
Table of Contents
1 Configuration File Management Commands ··························································································1-1
File Attribute Configuration Commands ··································································································1-1
display current-configuration ···········································································································1-1
display current-configuration vlan····································································································1-5
display saved-configuration·············································································································1-6
display startup ·································································································································1-8
display this·······································································································································1-9
reset saved-configuration ··············································································································1-10
save ···············································································································································1-11
startup saved-configuration ···········································································································1-13
i
1
Configuration File Management Commands
The 4500 series Ethernet switches support Expandable Resilient Networking (XRN), and allow you to
access a file on the switch in one of the following ways:
z
To access a file on the specified unit, you need to enter the file universal resource locator (URL)
starting with unit[No.]>flash:/, where [No.] represents the unit ID of the switch. For example, if the
unit ID of the switch is 1, the URL of the file named text.txt in the root directory of the switch is
unit1>flash:/text.txt.
z
To access a file on the current unit, you need to enter the file URL starting with flash:/. For example,
the URL of file text.txt in the root directory of the Flash on the current unit is flash:/text.txt.
z
To access a file on the current directory, enter the path name or file name directly. For example, to
access file text.txt in the current directory, you can directly input the file name text.txt as the file
URL.
File Attribute Configuration Commands
display current-configuration
Syntax
display current-configuration [ configuration [ configuration-type ] | interface [ interface-type ]
[ interface-number ] ] [ by-linenum ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Parameters
configuration configuration-type: Specifies to display non-interface configuration. If configuration-type
is not specified, all the non-interface configurations are displayed; if configuration-type is specified, the
specified type of configuration is displayed. The configuration type you can specify is based on your
current configuration. For example:
z
acl-adv: Indicates the advanced Access Control List (ACL) configuration.
z
acl-basic: Indicates the basic ACL configuration.
z
acl-ethernetframe: Indicates the Layer 2 ACL configuration.
z
acl-user: Indicates the user-defined ACL configuration.
z
remote-ping: Indicates the remote-ping configuration.
z
isp: Indicates the internet service provider configuration.
z
radius-template: Indicates the radius template configuration.
1-1
z
system: Indicates the system configuration.
z
user-interface: Indicates the user interface configuration.
interface: Displays port/interface configuration.
interface-type: Port/interface type, which can be one of the following: Aux, Ethernet, GigabitEthernet,
Loopback, NULL and VLAN-interface.
interface-number: Port/interface number.
by-linenum: Displays configuration information with line numbers.
|: Uses a regular expression to filter the configuration of the switch to be displayed. By specifying a
regular expression, you can locate and query the needed information quickly.
regular-expression: A regular expression, case sensitive. It supports the following match rules:
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 only the lines that match the regular expression.
A regular expression also supports some special characters. For match rules of the special characters,
refer to Table 1-1 for details.
Table 1-1 Special characters in regular expression
Character
Meaning
Remarks
^
Starting sign, the string to the right of this
character appears only at the beginning
of a line.
For example, regular expression ^user
matches lines beginning with user, not
Auser.
$
Ending sign, the string to the left of this
character appears only at the end of a
line.
For example, regular expression user$
matches lines ending with user, not
userA.
.
Full stop, a wildcard used in place of any
character, including blank
None
*
Asterisk, the character to the left of the
asterisk should match zero or more
consecutive times.
For example, zo* can match z and zoo,
and so on, but not zo.
+
Plus sign, the character to the left of the
plus sign should match one or more
consecutive times.
For example, zo+ can match zo and
zoo, and so on, but not z.
-
Hyphen. It connects two values (the
smaller one before it and the bigger one
after it) to indicate a range together with
[ ].
For example, 1-9 means numbers from 1
to 9 (inclusive); a-h means from a to h
(inclusive).
[]
Square brackets. Specifies a range of
characters, and matches any character
in the specified range.
For example, [1-36A] can match a
string containing any character among
1, 2, 3, 6, and A.
Parenthesis. Specifies a character
group. It is usually used with + or *.
For example, (123A) means a character
group 123A; 408(12)+ can match 40812
or 408121212. But it cannot match 408.
That is, 12 can appear continuously and
it must at least appear once.
()
Description
Use the display current-configuration command to display the current configuration of a switch.
1-2
After you finish a set of configurations, you can execute the display current-configuration command
to display the parameters that take effect currently.
Note that:
z
Parameters that are the same as the default are not displayed.
z
The configured parameter whose corresponding function does not take effect is not displayed.
Related commands: save, reset saved-configuration, display saved-configuration.
Examples
# Display configuration information about all the interfaces on the current switch.
<Sysname> display current-configuration interface
#
interface Vlan-interface1
ip address 192.168.0.39 255.255.255.0
#
interface Aux1/0/0
#
interface Ethernet1/0/1
line-rate inbound 640
#
interface Ethernet1/0/2
#
interface Ethernet1/0/3
#
interface Ethernet1/0/4
#
interface Ethernet1/0/5
#
interface Ethernet1/0/6
#
interface Ethernet1/0/7
#
interface Ethernet1/0/8
#
interface Ethernet1/0/9
#
interface Ethernet1/0/10
#
interface Ethernet1/0/11
#
interface Ethernet1/0/12
#
interface Ethernet1/0/13
#
interface Ethernet1/0/14
#
interface Ethernet1/0/15
#
1-3
interface Ethernet1/0/16
#
interface Ethernet1/0/17
#
interface Ethernet1/0/18
#
interface Ethernet1/0/19
#
interface Ethernet1/0/20
#
interface Ethernet1/0/21
#
interface Ethernet1/0/22
#
interface Ethernet1/0/23
#
interface Ethernet1/0/24
#
interface GigabitEthernet1/0/25
#
interface GigabitEthernet1/0/26
#
interface GigabitEthernet1/0/27
shutdown
#
interface GigabitEthernet1/0/28
shutdown
#
interface NULL0
#
return
# Display the lines that include the strings matching 10* in the configuration information. (The character
* means that the character 0 in the string before it can appear multiple times or does not appear.)
<Sysname> display current-configuration | include 10*
password-control login-attempt 3 exceed lock-time 120
vlan 1
interface Vlan-interface1
ip address 192.168.0.39 255.255.255.0
interface Aux1/0/0
interface Ethernet1/0/1
interface Ethernet1/0/2
interface Ethernet1/0/3
interface Ethernet1/0/4
interface Ethernet1/0/5
interface Ethernet1/0/6
interface Ethernet1/0/7
interface Ethernet1/0/8
1-4
interface Ethernet1/0/9
interface Ethernet1/0/10
interface Ethernet1/0/11
interface Ethernet1/0/12
interface Ethernet1/0/13
interface Ethernet1/0/14
interface Ethernet1/0/15
interface Ethernet1/0/16
interface Ethernet1/0/17
interface Ethernet1/0/18
interface Ethernet1/0/19
interface Ethernet1/0/20
interface Ethernet1/0/21
interface Ethernet1/0/22
interface Ethernet1/0/23
interface Ethernet1/0/24
interface GigabitEthernet1/0/25
interface GigabitEthernet1/0/26
interface GigabitEthernet1/0/27
interface GigabitEthernet1/0/28
ip route-static 0.0.0.0 0.0.0.0 1.2.1.1 preference 60
# Display the configuration information starting with the string user.
<Sysname> display current-configuration | include ^user
user-interface aux 0 7
user-interface vty 0 4
display current-configuration vlan
Syntax
display current-configuration vlan [ vlan-id ] [ by-linenum ]
View
Any view
Parameters
vlan vlan-id: VLAN ID, in the range 1 to 4094.
by-linenum: Displays configuration information with line numbers.
Description
Use the display current-configuration vlan command to display the current VLAN configuration of
the switch.
Without the vlan-id argument specified, this command displays configuration information about all the
VLANs that exist on the switch.
If there are contiguous VLANs without any configuration, the system combines these VLANs together in
the format of vlan-id to vlan-id when displaying the VLAN configuration information.
Related commands: save, reset saved-configuration, display saved-configuration.
1-5
Examples
# Display the VLAN configuration information of the current switch.
<Sysname> display current-configuration vlan
#
vlan 1
#
vlan 5 to 69
#
vlan 70
description Vlan 70
#
vlan 71 to 100
#
return
display saved-configuration
Syntax
display saved-configuration [ unit unit-id ] [ by-linenum ]
View
Any view
Parameters
unit unit-id: Specifies the unit ID of a switch. With this keyword-argument combination specified, this
command can display the initial configuration file of the specified unit.
by-linenum: Displays configuration information with line numbers.
Description
Use the display saved-configuration command to display the initial configuration file of a switch.
Note that:
If the switch starts up without a configuration file, the system will display that no configuration file
z
exists upon execution of the command.
If you have saved configuration after the switch starts up, the command displays the last saved
z
configuration.
Related commands: save, reset saved-configuration, display current-configuration.
Examples
# Display the initial configuration file of the current switch.
<Sysname> display saved-configuration
#
sysname sysname
#
password-control login-attempt 3 exceed lock-time 120
#
radius scheme system
1-6
#
domain system
#
vlan 1
#
interface Vlan-interface1
ip address 192.168.0.39 255.255.255.0
#LOCCFG. MUST NOT DELETE
#
interface Aux1/0/0
#
interface Ethernet1/0/1
#
interface Ethernet1/0/2
#
interface Ethernet1/0/3
#
interface Ethernet1/0/4
#
interface Ethernet1/0/5
#
interface Ethernet1/0/6
#
interface Ethernet1/0/7
#
interface Ethernet1/0/8
#
interface Ethernet1/0/9
#
interface Ethernet1/0/10
#
interface Ethernet1/0/11
#
interface Ethernet1/0/12
#
interface Ethernet1/0/13
#
interface Ethernet1/0/14
#
interface Ethernet1/0/15
#
interface Ethernet1/0/16
#
interface Ethernet1/0/17
#
interface Ethernet1/0/18
#
interface Ethernet1/0/19
1-7
#
interface Ethernet1/0/20
#
interface Ethernet1/0/21
#
interface Ethernet1/0/22
#
interface Ethernet1/0/23
#
interface Ethernet1/0/24
#
interface GigabitEthernet1/0/25
#
interface GigabitEthernet1/0/26
#
interface GigabitEthernet1/0/27
shutdown
#
interface GigabitEthernet1/0/28
shutdown
#TOPOLOGYCFG. MUST NOT DELETE
#
undo xrn-fabric authentication-mode
#GLBCFG. MUST NOT DELETE
#
interface NULL0
#
ip route-static 0.0.0.0 0.0.0.0 1.2.1.1 preference 60
#
user-interface aux 0 7
user-interface vty 0 4
authentication-mode none
user privilege level 3
#
return
The configuration information output above in turn is the system configuration, logical interface
configuration, physical port configuration, and user interface configuration.
display startup
Syntax
display startup [ unit unit-id ]
View
Any view
1-8
Parameters
unit unit-id: Specifies the unit ID of a switch. With this keyword-argument combination specified, this
command can display the startup configuration file information of the specified unit.
Description
Use the display startup command to display the startup configuration of a switch.
Note that:
If the switch is not a unit of a fabric, this command displays the startup configuration file information
z
of the current switch no matter whether you have specified the unit-id argument or not.
If the switch is a unit of a fabric, without unit-id specified, this command displays the startup
z
configuration file information of all the units in the fabric; with unit-id specified, this command
displays the startup configuration file information of the specified unit.
Related commands: startup saved-configuration.
Examples
# Display the startup configuration file information of the current switch, which is not in any fabric.
<Sysname> display startup
UNIT1:
Current Startup saved-configuration file:
flash:/config.cfg
Next main startup saved-configuration file:
flash:/config.cfg
Next backup startup saved-configuration file:
flash:/backup.cfg
Bootrom-access enable state:
enabled
Table 1-2 Description on the fields of the display startup command
Field
Description
Current Startup
saved-configuration file
The configuration file used for the current startup
Next main startup
saved-configuration file
The main configuration file used for the next startup
Next backup startup
saved-configuration file
The backup configuration file used for the next startup
Whether you can use the user-defined password to access the
Boot ROM:
z
Bootrom-access enable state
z
enabled indicates you can access the Boot ROM with the
user-defined password.
disabled indicates you cannot access the Boot ROM with the
user-defined password.
For related information, refer to the startup bootrom-access
enable command in the File System Management part of the
manual.
display this
Syntax
display this [ by-linenum ]
1-9
View
Any view
Parameters
by-linenum: Displays configuration information with line numbers.
Description
Use the display this command to display the current configuration performed in the current view. To
verify the configuration performed in a view, you can use this command to display the parameters that
are valid in the current view.
Note that:
z
Effective parameters that are the same as the default are not displayed.
z
The configured parameter whose corresponding function does not take effect is not displayed.
z
Execution of this command in any user interface view or VLAN view displays the valid configuration
parameters in all user interfaces or VLANs.
Related commands: save, reset saved-configuration, display saved-configuration, display
current-configuration.
Examples
# Display the configuration parameters that take effect in all user interface views.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] display this
#
user-interface aux 0 4
idle-timeout 0 0
user-interface aux 5 7
user-interface vty 0
authentication-mode none
user privilege level 3
set authentication password simple 123
idle-timeout 0 0
user-interface vty 1 4
authentication-mode none
user privilege level 3
set authentication password simple 1
idle-timeout 0 0
#
return
reset saved-configuration
Syntax
reset saved-configuration [ backup | main ]
1-10
View
User view
Parameters
backup: Erases the backup configuration file.
main: Erases the main configuration file.
Description
Use the reset saved-configuration command to erase the configuration file saved in the Flash of a
switch.
The following two situations exist:
While the reset saved-configuration [ main ] command erases the configuration file with main
z
attribute, it only erases the main attribute of a configuration file having both main and backup
attribute.
While the reset saved-configuration backup command erases the configuration file with backup
z
attribute, it only erases the backup attribute of a configuration file having both main and backup
attribute.
You may need to erase the configuration file for one of these reasons:
z
After you upgrade software, the old configuration file does not match the new software.
z
The startup configuration file is corrupted or not the one you need.
z
This command will permanently delete the configuration file from the switch.
z
An error occurs when you execute this command if the configuration file to be deleted does not
exist.
Related commands: save.
Examples
# Erase the main configuration file to be used in the next startup.
<Sysname> reset saved-configuration main
The saved configuration will be erased.
Are you sure?[Y/N]y
Configuration in flash memory is being cleared.
Please wait ...
....
Unit1 reset saved-configuration successfully.
save
Syntax
save [ cfgfile | [ safely ] [ backup | main ] ]
1-11
View
Any view
Parameters
cfgfile: Path name or file name of a configuration file in the Flash, a string of 5 to 56 characters.
safely: Saves the current configuration in the safe mode.
backup: Saves the configuration to the backup configuration file.
main: Saves the configuration to the main configuration file.
Description
Use the save command to save the current configuration to a configuration file in the Flash.
When you use this command to save the configuration file,
z
If the main and backup keywords are not specified, the current configuration will be saved to the
main configuration file.
z
If the cfgfile argument is specified, but the file specified by it does not exist, the system will create
the file and then save the current configuration to it. The file attribute is neither main nor backup.
z
If the cfgfile argument is specified and the file specified by it exists, the system will save the current
configuration to the specified file. The file attribute is the original attribute of the file.
z
If the cfgfile argument is not specified, the system will save the current configuration to the
configuration file used for this startup. If the switch starts up without loading the configuration file,
the system will save the current configuration with the default name (config.cfg) in the root
directory.
The system supports two modes for saving the current configuration file.
z
Fast saving mode. This is the mode when you use the save command without the safely keyword.
The mode saves the file quicker but is likely to lose the original configuration file if the switch
reboots or the power fails during the process.
z
Safe mode. This is the mode when you use the save command with the safely keyword. The mode
saves the file slower but can retain the original configuration file in the Flash even if the switch
reboots or the power fails during the process.
When you use the save safely command to save the configuration file, if the switch reboots or the
power fails during the saving process, the switch initializes itself in the following two conditions when it
starts up next time:
z
If a configuration file with the extension .cfg exists in the Flash, the switch uses the configuration
file to initialize itself when it starts up next time.
z
If there is no .cfg configuration file in the Flash, but there is a configuration file with the
extension .cfgbak (backup configuration file containing the original configuration information)
or/and a configuration file with the extension .cfgtmp (temporary configuration file containing the
current configuration information) in the Flash, you can change the extension .cfgbak or .cfgtmp
to .cfg using the rename command. The switch will use the renamed configuration file to initialize
itself when it starts up next time.
For details of the rename command, refer to the File System Management part of the manual.
1-12
It is recommended to adopt the fast saving mode in the conditions of stable power and adopt the
z
safe mode in the conditions of unstable power or remote maintenance.
If you use the save command after a fabric is formed on the switch, the units in the fabric save their
z
own startup configuration files automatically.
The extension name of the configuration file must be .cfg.
z
Examples
# Save the current configuration to 123.cfg as the main configuration file for the next startup.
<Sysname> save main
The configuration will be written to the device.
Are you sure?[Y/N]y
Please input the file name(*.cfg)(To leave the existing filename
unchanged press the enter key):123.cfg
Now saving current configuration to the device.
Saving configuration. Please wait...
............
Unit1 save configuration flash:/123.cfg successfully
# Save the current configuration to 234.cfg in unit 1.
<Sysname> save unit1>flash:/234.cfg
The current configuration will be saved to unit1>flash:/234.cfg [Y/N]:y
Now saving current configuration to the device.
Saving configuration. Please wait...
...........
Unit1 save configuration unit1>flash:/234.cfg successfully
startup saved-configuration
Syntax
startup saved-configuration cfgfile [ backup | main ]
undo startup saved-configuration [ unit unit-id ]
View
User view
Parameters
cfgfile: Path name or file name of a configuration file in the Flash, a string of 5 to 56 characters.
backup: Specifies the configuration file to be the backup configuration file.
main: Specifies the configuration file to be the main configuration file.
unit unit-id: Specifies a switch by its unit ID. You can configure a switch in the fabric to use null
configuration when it restarts by specifying the switch unit ID in unit unit-id.
1-13
Description
Use the startup saved-configuration command to specify a configuration file to be the main
configuration file or the backup configuration file to be used for the next startup of the switch.
Use the undo startup saved-configuration command to specify a switch to use null configuration
when it restarts.
Note that:
If you execute the startup saved-configuration command with neither the backup nor the main
z
keyword specified, the configuration file identified by the cfgfile argument is specified as the main
configuration file to be used for the next startup of the switch.
If the switch has not joined any fabric, the startup saved-configuration command specifies the
z
configuration file to be used for the next startup of the switch; if the switch has joined a fabric, this
command specifies the configuration file to be used for the next startup of all the switches in the
fabric.
If the switch has joined a fabric, without the unit keyword, the undo startup saved-configuration
z
command will specify all the switches in the fabric to use null configuration when they restart; with
the unit keyword specified, this command will specify the specified unit in the fabric to use null
configuration when it restarts.
The configuration file must use .cfg as its extension name and the startup configuration file must be
saved at the root directory in the Flash of the switch.
Related commands: display startup.
Examples
# Configure the configuration file named config.cfg as the main configuration file to be used for the next
startup of the current switch, which is not in any fabric.
<Sysname> startup saved-configuration config.cfg main
Please wait......Done!
# When a fabric is formed, configure the configuration file named 123.cfg as the backup configuration
file to be used for the next startup of unit 1 in the fabric.
<Sysname> startup saved-configuration unit1>flash:/123.cfg backup
Please wait......Done!
1-14
Table of Contents
1 VLAN Configuration Commands··············································································································1-1
VLAN Configuration Commands·············································································································1-1
description ·······································································································································1-1
display interface Vlan-interface ·······································································································1-1
display vlan······································································································································1-2
interface Vlan-interface····················································································································1-4
name················································································································································1-4
shutdown ·········································································································································1-5
vlan ··················································································································································1-6
Port-Based VLAN Configuration Commands··························································································1-7
display port ······································································································································1-7
port···················································································································································1-7
port access vlan·······························································································································1-8
port hybrid pvid vlan ························································································································1-9
port hybrid vlan ································································································································1-9
port link-type ··································································································································1-10
port trunk permit vlan·····················································································································1-11
port trunk pvid vlan ························································································································1-12
i
1
VLAN Configuration Commands
VLAN Configuration Commands
description
Syntax
description text
undo description
View
VLAN view, VLAN interface view
Parameter
text: Case sensitive character string to describe the current VLAN or VLAN interface. Special characters
and spaces are allowed.
It has:
z
1 to 32 characters for a VLAN description.
z
1 to 80 characters for a VLAN interface description.
Description
Use the description command to assign a description string to the current VLAN or VLAN interface.
Use the undo description command to restore the default description string.
By default, the description string of the current VLAN is its VLAN ID, such as “VLAN 0001”; the
description string of the current VLAN interface is its name, such as “Vlan-interface 1 Interface”.
Related command: display vlan, and display interface Vlan-interface.
Example
# Specify the description string of VLAN 1 as “RESEARCH”.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan 1
[Sysname-vlan1] description RESEARCH
display interface Vlan-interface
Syntax
display interface Vlan-interface [ vlan-id ]
View
Any view
1-1
Parameter
vlan-id: ID of the specific VLAN interface.
Description
Use the display interface Vlan-interface command to display the information about the VLAN
interface.
VLAN interface is a virtual interface in Layer 3 mode, used to realize the layer 3 communication
between different VLANs. Each VLAN has a VLAN interface, which can forward packets of the local
VLAN to the destination IP addresses at the network layer.
If the vlan-id argument is specified, the information about the specified VLAN interface is displayed; if
the vlan-id argument is not specified, the information about all the created VLAN interfaces is displayed.
Related command: interface Vlan-interface.
Example
# Display the information about VLAN-interface2.
<Sysname> display interface Vlan-interface 2
Vlan-interface2 current state : DOWN
Line protocol current state : DOWN
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 000f-e207-4101
Internet Address is 10.1.1.1/24 Primary
Description : Vlan-interface2 Interface
The Maximum Transmit Unit is 1500
Table 1-1 Description on the fields of the display interface Vlan-interface command
Field
Description
Vlan-interface2 current state
Current state of the VLAN interface
Line protocol current state
Current state of the link protocol
IP Sending Frames' Format
Format of the frames that IP sends
Hardware address
MAC address corresponding to the VLAN interface
Internet Address
IP address corresponding to the VLAN interface
Description
Description string of the VLAN interface
The Maximum Transmit Unit
Maximum transmission unit (MTU)
display vlan
Syntax
display vlan [ vlan-id [ to vlan-id ] | all | dynamic | static ]
View
Any view
Parameter
vlan-id: VLAN ID, in the range of 1 to 4094.
1-2
to: Specifies multiple contiguous VLAN IDs. The VLAN ID after to cannot be less than that before to.
all: Displays the information about all the VLANs.
dynamic: Displays information about the dynamic VLANs (which are registered through GVRP
protocol).
static: Displays information about the static VLANs (which are created through manual configuration).
Description
Use the display vlan command to display the information about the specified VLANs or all VLANs.
z
If the vlan-id argument is specified, information about the specified VLAN will be displayed.
z
If the vlan-id argument is not specified, the VLAN IDs of all the existing VLANs will be displayed.
z
If the dynamic or static keyword is specified, this command displays the amount and VLAN IDs of
the dynamic or static VLANs.
Related command: vlan.
Example
# Display the information about VLAN 1.
<Sysname> display vlan 1
VLAN ID: 1
VLAN Type: static
Route Interface: configured
IP Address: 192.168.0.39
Subnet Mask: 255.255.255.0
Description: VLAN 0001
Name: VLAN 0001
Tagged
Ports: none
Untagged Ports:
GigabitEthernet1/0/1
GigabitEthernet1/0/2
GigabitEthernet1/0/3
GigabitEthernet1/0/4
GigabitEthernet1/0/5
GigabitEthernet1/0/6
GigabitEthernet1/0/7
GigabitEthernet1/0/8
GigabitEthernet1/0/9
GigabitEthernet1/0/10
GigabitEthernet1/0/11
GigabitEthernet1/0/12
GigabitEthernet1/0/13
GigabitEthernet1/0/14
GigabitEthernet1/0/15
GigabitEthernet1/0/16
GigabitEthernet1/0/17
GigabitEthernet1/0/18
GigabitEthernet1/0/19
GigabitEthernet1/0/20
GigabitEthernet1/0/21
GigabitEthernet1/0/22
GigabitEthernet1/0/23
GigabitEthernet1/0/24
Table 1-2 Description on the fields of the display vlan command
Field
Description
VLAN ID
VLAN ID
VLAN Type
VLAN type (dynamic or static)
Route Interface
Whether the VLAN interface of the VLAN is configured as a route
forwarding interface (Whether an IP address is assigned to the VLAN
interface)
IP Address
Primary IP address of the VLAN interface
Subnet Mask
Subnet mask of the IP address of the VLAN interface
Description
Description string of the VLAN
1-3
Field
Description
Name
VLAN name
Tagged Ports
Ports through which packets are sent with VLAN tag kept.
Untagged Ports
Port through which packets are sent with VLAN tag stripped.
interface Vlan-interface
Syntax
interface Vlan-interface vlan-id
undo interface Vlan-interface vlan-id
View
System view
Parameter
vlan-id: ID of the VLAN interface, in the range of 1 to 4,094.
Description
Use the interface Vlan-interface command to create a VLAN interface and enter VLAN interface view.
VLAN interface is a virtual interface in Layer 3 mode, used to realize the layer 3 communication
between different VLANs. Each VLAN has a VLAN interface, which can forward packets of the local
VLAN to the destination IP addresses at the network layer.
Use the undo interface Vlan-interface command to delete the VLAN interface.
Related command: display interface Vlan-interface.
Before you can create a VLAN interface, you must create the corresponding VLAN.
Example
# Enter VLAN-interface1 view
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 1
[Sysname-Vlan-interface1]
name
Syntax
name text
1-4
undo name
View
VLAN view
Parameter
text: VLAN name, in the range of 1 character to 32 characters. It can contain special characters and
spaces.
Parameter
Use the name command to assign a name to the current VLAN.
Use the undo name command to restore to the default VLAN name.
By default, the name of a VLAN is its VLAN ID, such as “VLAN 0001”.
Example
# Specify the name of VLAN 2 as ”test vlan”.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan 2
[Sysname-vlan2] name test vlan
shutdown
Syntax
shutdown
undo shutdown
View
VLAN interface view
Parameter
None
Description
Use the shutdown command to disable the VLAN interface.
Use the undo shutdown command to enable the VLAN interface.
By default, the VLAN interface is enabled. In this case, the physical status of the VLAN interface is
affected by that of the ports in the VLAN.
z
When all the Ethernet ports in the VLAN are down, the VLAN interface of the VLAN is down, that is,
the VLAN interface is disabled.
z
When one or more Ethernet ports in the VLAN are up, the VLAN interface of the VLAN is up, that is,
the VLAN interface is enabled.
If you disable the VLAN interface, the status of the VLAN interface will always be down, regardless of
the status of the ports in the VLAN.
1-5
You can use the undo shutdown command to enable a VLAN interface when its related parameters
and protocols are configured. When a VLAN interface fails, you can use the shutdown command to
disable the interface, and then use the undo shutdown command to enable this interface again, which
may restore the interface.
The operation of enabling/disabling a VLAN interface does not influence the status of the Ethernet ports
belonging to this VLAN.
Example
# Disable the VLAN-interface2.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 2
[Sysname-Vlan-interface2] shutdown
vlan
Syntax
vlan vlan-id
undo vlan vlan-id
View
System view
Parameter
vlan-id: ID of the VLAN which you want to create and whose view you want to enter. This argument
ranges from 1 to 4,094.
Description
Use the vlan command to enter VLAN view. If the VLAN identified by the vlan-id argument does not
exist, this command creates the VLAN and then enters VLAN view.
Use the undo vlan command to remove the specified VLAN.
z
VLAN 1 is the default VLAN and cannot be removed.
z
When you use the undo vlan command to remove a VLAN which is the default VLAN of a trunk
port or a hybrid port on the device, the configuration of the default VLAN of the trunk port or hybrid
port does not change after the undo vlan command is executed, that is, the trunk port or the hybrid
port will use the removed VLAN (the already non-existing VLAN) as its default VLAN.
z
The VLANs kept by protocol , voice VLAN, management VLAN, the control VLAN of SmartLink and
the probe VLAN for remote mirroring cannot be removed using the undo vlan command.
1-6
Example
# Enter VLAN 1 view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan 1
[Sysname-vlan1]
# Remove VLAN 5.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] undo vlan 5
Port-Based VLAN Configuration Commands
display port
Syntax
display port { hybrid | trunk }
View
Any view
Parameters
hybrid: Displays hybrid ports.
trunk: Displays trunk ports.
Description
Use the display port command to display the existing hybrid or trunk ports, if any.
Examples
# Display the existing hybrid ports.
<Sysname> display port hybrid
The following hybrid ports exist:
GigabitEthernet1/0/1
GigabitEthernet1/0/2
The above information shows the current system has two hybrid ports: GigabitEthernet 1/0/1 and
GigabitEthernet 1/0/2.
port
Syntax
port interface-list
undo port interface-list
View
VLAN view
1-7
Parameters
interface-list: List of Ethernet ports to be added to or removed from a VLAN. Provide this argument in
the form of interface-list = { interface-type interface-number [ to interface-type interface-number ] }
&<1-10>, where:
z
interface-type is port type and interface-number is port number.
z
The port number to the right of the to keyword must be larger than or equal to the one to the left of
the keyword.
z
&<1-10> means that you can provide up to 10 port lists.
Description
Use the port command to assign one or multiple ports to a VLAN.
Use the undo port command to remove the specified ports from a VLAN.
Related command: display vlan.
Examples
# Assign GigabitEthernet1/0/2 through GigabitEthernet1/0/4 to VLAN 2.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan 2
[Sysname-vlan2] port GigabitEthernet 1/0/2 to GigabitEthernet 1/0/4
port access vlan
Syntax
port access vlan vlan-id
undo port access vlan
View
Ethernet port view
Parameters
vlan-id: VLAN ID defined in IEEE802.1Q, in the range of 1 to 4094.
Description
Use the port access vlan command to assign the current access port to the specified VLAN.
Use the undo port access vlan command to remove the access port from the specified VLAN.
The VLAN specified by the vlan-id argument must already exist.
All access ports belong to VLAN 1, the system default VLAN. You cannot assign an access port to or
remove an access port from VLAN 1. If you do that, you can see the message “Can't delete ports from
or add ports to the default VLAN!”
1-8
Examples
# Assign GigabitEthernet 1/0/1 to VLAN 3.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan 3
[Sysname-vlan3] quit
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port access vlan 3
[Sysname-GigabitEthernet1/0/1]
port hybrid pvid vlan
Syntax
port hybrid pvid vlan vlan-id
undo port hybrid pvid
View
Ethernet port view
Parameters
vlan-id: VLAN ID defined in IEEE802.1Q, in the range of 1 to 4094. By default, the default VLAN for a
hybrid port is VLAN 1.
Description
Use the port hybrid pvid vlan command to set the default VLAN ID for the hybrid port.
Use the undo port hybrid pvid command to restore the default VLAN ID of the port.
Related commands: port link-type.
The local and remote hybrid ports must use the same default VLAN ID for the traffic of the default VLAN
to be transmitted properly.
Examples
# Set the default VLAN ID of the hybrid port GigabitEthernet 1/0/1 to 100.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface GigabitEthernet1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type hybrid
[Sysname-GigabitEthernet1/0/1] port hybrid pvid vlan 100
port hybrid vlan
Syntax
port hybrid vlan vlan-id-list { tagged | untagged }
1-9
undo port hybrid vlan vlan-id-list
View
Ethernet port view
Parameters
vlan-id-list: VLAN range to which the hybrid port will be added. vlan-id-list = [ vlan-id1 [ to
vlan-id2 ] ]&<1-10>, where, vlan-id is in the range of 1 to 4094 and can be discrete, and &<1-10> means
you can input up to ten VLAN IDs/ID ranges.
tagged: Keeps VLAN tags when the packets of the specified VLANs are forwarded on this port.
untagged: Removes VLAN tags when the packets of the specified VLANs are forwarded on this port.
Description
Use the port hybrid vlan command to assign the hybrid port into specified VLANs.
Use the undo port hybrid vlan command to remove the hybrid port from specified VLANs.
A hybrid port can belong to multiple VLANs. When you use the command multiple times, all VLANs
specified in the commands will be allowed to pass through the port.
The VLAN specified by the vlan-id argument must exist. Otherwise, this command is invalid.
Related commands: port link-type.
Examples
# Assign the hybrid port GigabitEthernet 1/0/1 to VLAN 2, VLAN 4, and VLAN 50 through VLAN 100,
configuring the port to keep VLAN tags when the packets of the specified VLANs are forwarded on the
port.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan 2
[Sysname-vlan2] quit
[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
port link-type
Syntax
port link-type { access | hybrid | trunk }
undo port link-type
View
Ethernet port view
Parameters
access: Sets the port as an access port.
hybrid: Sets the port as a hybrid port.
trunk: Sets the port as a trunk port.
1-10
Description
Use the port link-type command to set the link type of the current Ethernet port.
Use the undo port link-type command to restore the default link type.
By default, the link type of an Ethernet port is access.
The three types of ports can coexist on an Ethernet switch.
You can change the link type of an Ethernet port. However, you cannot change the link type of a port
directly from hybrid to trunk or vice versa. To do that, you must set the link type to access first.
Examples
# Configure GigabitEthernet 1/0/1 as a trunk port.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
port trunk permit vlan
Syntax
port trunk permit vlan { vlan-id-list | all }
undo port trunk permit vlan { vlan-id-list | all }
View
Ethernet port view
Parameters
vlan-id-list: VLAN range to which the trunk port will be added. vlan-id-list = [ vlan-id1 [ to
vlan-id2 ] ]&<1-10>, where, vlan-id is in the range of 1 to 4094 and can be discrete, and &<1-10> means
you can input up to ten VLAN IDs/ID ranges.
all: Adds the trunk port to all VLANs.
Description
Use the port trunk permit vlan command to assign the trunk port to the specified VLANs.
Use the undo port trunk permit vlan command to remove the hybrid port from the specified VLANs.
A trunk port can belong to multiple VLANs. When you use the command multiple times, all VLANs
specified in the commands will be allowed to pass through the port.
Related commands: port link-type.
Examples
# Assign the trunk port GigabitEthernet 1/0/1 to VLAN 2, VLAN 4, and VLAN 50 through VLAN 100.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[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-11
Please wait... Done.
port trunk pvid vlan
Syntax
port trunk pvid vlan vlan-id
undo port trunk pvid
View
Ethernet port view
Parameters
vlan-id: VLAN ID defined in IEEE802.1Q, in the range of 1 to 4094. It is 1 by default.
Description
Use the port trunk pvid vlan command to set the default VLAN ID for the trunk port.
Use the undo port trunk pvid command to restore the default.
To guarantee the proper packet transmission, the default VLAN ID of the local trunk port must be
identical with that of the trunk port on the peer switch connected with the local trunk port.
Related commands: port link-type.
Examples
# Set the default VLAN ID of the trunk port GigabitEthernet 1/0/1 to 100.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface GigabitEthernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] port trunk pvid vlan 100
1-12
Table of Contents
1 IP Address Configuration Commands·····································································································1-1
IP Address Configuration Commands·····································································································1-1
display ip host··································································································································1-1
display ip interface···························································································································1-1
display ip interface brief···················································································································1-3
ip address ········································································································································1-4
ip host ··············································································································································1-6
2 IP Performance Optimization Configuration Commands ······································································2-1
IP Performance Configuration Commands ·····························································································2-1
display fib·········································································································································2-1
display fib ip-address·······················································································································2-2
display fib acl ···································································································································2-3
display fib |·······································································································································2-4
display fib ip-prefix···························································································································2-5
display fib statistics··························································································································2-5
display icmp statistics ······················································································································2-6
display ip socket ······························································································································2-7
display ip statistics···························································································································2-8
display tcp statistics·······················································································································2-10
display tcp status ···························································································································2-12
display udp statistics······················································································································2-13
icmp redirect send ·························································································································2-14
icmp unreach send ························································································································2-15
reset ip statistics ····························································································································2-15
reset tcp statistics ··························································································································2-16
reset udp statistics·························································································································2-16
tcp timer fin-timeout ·······················································································································2-16
tcp timer syn-timeout ·····················································································································2-17
tcp window·····································································································································2-18
i
1
IP Address Configuration Commands
IP Address Configuration Commands
display ip host
Syntax
display ip host
View
Any view
Parameters
None
Description
Use the display ip host command to display mappings between host names and IP addresses in the
static DNS database.
Examples
# Display mappings between host names and IP addresses in the static DNS database.
<Sysname> display ip host
Host
Age
Flags
Address
host.com
0
static 192.168.0.38
Table 1-1 Description on the fields of the display ip host command
Field
Host
Description
Host name
Time to live. 0 means that a static entry is never outdated.
Age
Flags
You can only manually remove the mappings between host names and IP
addresses.
Indicates the type of mappings between host names and IP addresses, static
or dynamic
Static indicates static mapping between host names and IP addresses
Address
IP address of a host
display ip interface
Syntax
display ip interface [ interface-type interface-number ]
1-1
View
Any view
Parameters
interface-type interface-number: Specifies an interface by its type and number.
Description
Use the display ip interface command to display information about a specified or all Layer 3
interfaces.
If no argument is specified, information about all Layer 3 interfaces is displayed.
Examples
# Display information about VLAN-interface 1.
<Sysname> display ip interface Vlan-interface 1
Vlan-interface1 current state :UP
Line protocol current state :UP
Internet Address is 192.168.0.39/24 Primary
Broadcast address : 192.168.0.255
The Maximum Transmit Unit : 1500 bytes
IP packets input number: 9678, bytes: 475001, multicasts: 7
IP packets output number: 8622, bytes: 391084, multicasts: 0
TTL invalid packet number:
0
ICMP packet input number:
0
Echo reply:
0
Unreachable:
0
Source quench:
0
Routing redirect:
0
Echo request:
0
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
Table 1-2 Description on the fields of the display ip interface command
Field
Description
Vlan-interface1 current state
Current physical state of VLAN-interface 1
Line protocol current state
Current state of the link layer protocol
1-2
Field
Description
IP address of the interface followed by:
Internet Address
z
z
Primary: Identifies a primary IP address, or
Sub: Identifies a secondary IP address.
Broadcast address
Directed broadcast address of the subnet
attached to the interface
The Maximum Transmit Unit
Maximum transmission unit on the interface
IP packets input number: 9678, bytes: 475001,
multicasts: 7
IP packets output number: 8622, bytes: 391084,
multicasts: 0
TTL invalid packet number
ICMP packet input number:
Echo reply:
Total number of packets, bytes, and multicast
packets forwarded and received on the interface
Number of received invalid TTL packets
0
0
Unreachable:
0
Source quench:
0
Routing redirect:
0
Echo request:
0
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
Total number of received ICMP packets,
including:
Echo reply packet, unreachable packet, source
quench packet, routing redirect packet, Echo
request packet, router advert packet, router
solicit packet, time exceed packet, IP header bad
packet, timestamp request packet, timestamp
reply packet, information request packet,
information reply packet, netmask request
packet, netmask reply packet, and unknown
types of packets.
display ip interface brief
Syntax
display ip interface brief [ interface-type [ interface-number ] ]
View
Any view
Parameters
interface-type: Interface type.
interface-number: Interface number.
Description
Use the display ip interface brief command to display brief information about a specified or all Layer 3
interfaces.
1-3
With no argument included, the command displays information about all layer 3 interfaces; with only the
interface type specified, it displays information about all layer 3 interfaces of the specified type; with
both the interface type and interface number specified, it displays information about the specified
interface.
Related commands: display ip interface.
Examples
# Display brief information about VLAN-interface 1.
<Sysname> display ip interface brief vlan-interface 1
*down: administratively down
(l): loopback
(s): spoofing
Interface
IP Address
Vlan-interface1
192.168.0.39
Physical Protocol
up
up
Description
Vlan-inte...
Table 1-3 Description on the fields of the display ip interface brief command
Field
Description
*down
The interface is administratively shut down with the shutdown
command.
(s)
Spoofing attribute of the interface. It indicates that the interface whose
link layer protocol is displayed up may have no such a link present or the
link is set up only on demand.
Interface
Interface name
IP Address
IP address of the interface (If no IP address is configured, “unassigned”
is displayed.)
Physical
Physical state of the interface
Protocol
Link layer protocol state of the interface
Interface description information.
Description
If the description has no more than 12 characters, the whole description
can be displayed. If it has more than 12 characters, only the first nine
characters are displayed.
ip address
Syntax
ip address ip-address { mask | mask-length } [ sub ]
undo ip address [ ip-address { mask | mask-length } [ sub ] ]
View
VLAN interface view, loopback interface view
Parameters
ip-address: IP address, in dotted decimal notation.
mask: Subnet mask, in dotted decimal notation.
1-4
mask-length: Subnet mask length, the number of consecutive ones in the mask. It is in the range of 0 to
32.
sub: Specifies a secondary IP address of a VLAN or loopback interface.
Description
Use the ip address command to specify an IP address and mask for a VLAN or loopback interface.
Use the undo ip address command to remove an IP address and mask of a VLAN or loopback
interface.
By default, no IP address is configured for VLAN or loopback interface.
Note that:
z
If you execute the undo ip address command without any parameter, the switch deletes both
primary and secondary IP addresses of the interface.
z
The undo ip address ip-address { mask | mask-length } command is used to delete the primary IP
address.
z
The undo ip address ip-address { mask | mask-length } sub command is used to delete specified
secondary IP addresses.
z
You can assign at most five IP address to an interface, among which one is the primary IP address
and the others are secondary IP addresses. A newly specified primary IP address overwrites the
previous one if there is any.
z
The primary and secondary IP addresses of an interface cannot reside on the same network
segment; the IP address of a VLAN interface must not be in the same network segment as that of a
loopback interface on a device.
z
A VLAN interface cannot be configured with a secondary IP address if the interface has been
configured to obtain an IP address through BOOTP or DHCP.
Related commands: display ip interface.
Examples
# Assign the primary IP address 129.12.0.1 and secondary IP address 129.12.1.1 to VLAN-interface 1
with subnet mask 255.255.255.0.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 1
[Sysname-Vlan-interface1] ip address 129.12.0.1 255.255.255.0
[Sysname-Vlan-interface1] ip address 129.12.1.1 255.255.255.0 sub
1-5
ip host
Syntax
ip host hostname ip-address
undo ip host hostname [ ip-address ]
View
System view
Parameters
hostname: Host name, a string of 1 to 20 characters which can be letters, numbers, hyphens (-), or dots
(.). The host name must include at least one letter.
ip-address: IP address of the specified host, in dotted decimal notation.
Description
Use the ip host command to create a mapping between host name and IP address in the static DNS
database.
Use the undo ip host command to remove the mapping.
No mappings are created by default.
Each host name can correspond to only one IP address. When IP addresses are configured for the
same host for multiple times, only the IP address configured last time is valid.
Related commands: display ip host.
Examples
# Configure IP address 10.110.0.1 for host aaa.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ip host aaa 10.110.0.1
1-6
2
IP Performance Optimization Configuration
Commands
IP Performance Configuration Commands
display fib
Syntax
display fib
View
Any view
Parameters
None
Description
Use the display fib command to display all forwarding information base (FIB) information.
Examples
# Display all FIB information.
<Sysname> display fib
Flag:
U:Usable
R:Reject
G:Gateway
H:Host
E:Equal cost multi-path
B:Blackhole
D:Dynamic
L:Generated by ARP or ESIS
S:Static
Destination/Mask
Flag TimeStamp
Interface
10.153.17.0/24
10.153.17.99
U
t[37]
Vlan-interface1
10.153.18.88/32
127.0.0.1
GHU
t[37]
InLoopBack0
10.153.18.0/24
10.153.18.88
U
t[37]
LoopBack0
10.153.17.99/32
127.0.0.1
GHU
t[37]
InLoopBack0
127.0.0.0/8
127.0.0.1
U
t[33]
InLoopBack0
2-1
Nexthop
Table 2-1 Description on the fields of the display fib command
Field
Description
Flags:
U: A route is up and available.
G: Gateway route
H: Local host route
Flag
B: Blackhole route
D: Dynamic route
S: Static route
R: Rejected route
E: Multi-path equal-cost route
L: Route generated by ARP or ESIS
Destination/Mask
Destination address/mask length
Nexthop
Next hop address
TimeStamp
Timestamp
Interface
Forwarding interface
display fib ip-address
Syntax
display fib ip-address1 [ { mask1 | mask-length1 } [ ip-address2 { mask2 | mask-length2 } | longer ] |
longer ]
View
Any view
Parameters
ip-address1, ip-address2: Destination IP addresses, in dotted decimal notation. ip-address1 and
ip-address2 together define an address range. The FIB entries in this address range will be displayed.
mask1, mask2: Subnet masks, in dotted decimal notation.
mask-length1, mask-length2: Length of the subnet masks, the number of consecutive ones in the
masks, in the range of 0 to 32.
longer: Displays the FIB entries matching the specified address/mask and having masks longer than or
equal to the specified mask. If no masks are specified, FIB entries that match the natural network
address and have the masks longer than or equal to the natural mask will be displayed.
2-2
Description
Use the display fib ip-address command to view the FIB entries matching 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 and mask will be displayed.
Examples
# Display FIB entry information which matches destination 12.158.10.0 and has a mask length no less
than eight.
<Sysname> display fib 12.158.10.0 longer
Route Entry Count: 1
Flag:
U:Usable
G:Gateway
H:Host
B:Blackhole
R:Reject
E:Equal cost multi-path
D:Dynamic
S:Static
L:Generated by ARP or ESIS
Destination/Mask
Nexthop
Flag TimeStamp
Interface
12.158.10.0/24
12.158.10.1
U
Vlan-interface10
t[85391]
# Display FIB entry information which has a destination in the range of 12.158.10.0/24 to
12.158.10.6/24 and has a mask length of 24.
<Sysname> display fib 12.158.10.0 255.255.255.0 12.158.10.6 255.255.255.0
Route Entry Count: 1
Flag:
U:Usable
G:Gateway
H:Host
B:Blackhole
R:Reject
E:Equal cost multi-path
D:Dynamic
S:Static
L:Generated by ARP or ESIS
Destination/Mask
Nexthop
Flag TimeStamp
Interface
12.158.10.0/24
12.158.10.1
U
Vlan-interface10
t[85391]
For details about the displayed information, see Table 2-1.
display fib acl
Syntax
display fib acl acl-number
View
Any view
Parameters
acl-number: Basic ACL number, in the range of 2000 to 2999.
Description
Use the display fib acl command to display the FIB entries matching a specific ACL. For ACL, refer to
the part discussing ACL in this manual.
Examples
# Configure and display ACL 2001.
2-3
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] acl number 2001
[Sysname-acl-basic-2001] rule permit source 211.71.75.0 0.0.0.255
[Sysname-acl-basic-2001] display acl 2001
Basic ACL
2001, 1 rule
Acl's step is 1
rule 0 permit source 211.71.75.0 0.0.0.255
# Display the FIB entries filtered by ACL 2001.
<Sysname> display fib acl 2001
Route Entry matched by access-list 2001
Summary Counts :1
Flag:
U:Usable
G:Gateway
H:Host
B:Blackhole
R:Reject
E:Equal cost multi-path
D:Dynamic
S:Static
L:Generated by ARP or ESIS
Destination/Mask
Nexthop
Flag TimeStamp
Interface
211.71.75.0/24
1.1.1.2
GSU
Vlan-interface2
t[250763]
For details about the displayed information, see Table 2-1.
display fib |
Syntax
display fib | { begin | exclude | include } regular-expression
View
Any view
Parameters
|: Uses a regular expression to match FIB entries. For detailed information about regular expression,
refer to Configuration File Management Command.
begin: Displays a specific FIB entry and all the FIB entries following it. The specific FIB entry is the first
entry that matches the specified regular expression.
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 character string.
Description
Use the display fib | command to display the FIB entries filtered by the specified regular expression.
Examples
# Display the entries starting from the first one containing the string 169.254.0.0.
<Sysname> display fib | begin 169.254.0.0
169.254.0.0/16 2.1.1.1
U
t[0]
Vlan-interface1
2.0.0.0/16
U
t[0]
Vlan-interface1
2.1.1.1
For details about the displayed information, see Table 2-1.
2-4
display fib ip-prefix
Syntax
display fib ip-prefix ip-prefix-name
View
Any view
Parameters
ip-prefix-name: IP prefix list name, in the range of 1 to 19 characters.
Description
Use the display fib ip-prefix command to display the FIB entries matching a specific IP prefix list. For
details about IP prefix list, refer to the part discussing IP routing in this manual.
Examples
# Configure and display the IP prefix list abc.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ip ip-prefix abc permit 211.71.75.0 24
[Sysname] display ip ip-prefix abc
name
index
conditions
ip-prefix / mask
GE
LE
abc
10
permit
211.71.75.0/24
--
--
# Display the FIB entries matching IP prefix list abc.
<Sysname> display fib ip-prefix abc
Route Entry matched by prefix-list abc
Summary Counts :1
Flag:
U:Usable
G:Gateway
H:Host
B:Blackhole
R:Reject
E:Equal cost multi-path
D:Dynamic
S:Static
L:Generated by ARP or ESIS
Destination/Mask
Nexthop
Flag TimeStamp
Interface
211.71.75.0/24
1.1.1.2
GSU
Vlan-interface2
t[250763]
For details about the displayed information, see Table 2-1.
display fib statistics
Syntax
display fib statistics
View
Any view
Parameters
None
2-5
Description
Use the display fib statistics command to display the total number of FIB entries.
Examples
# Display the total number of FIB entries.
<Sysname> display fib statistics
Route Entry Count : 8
display icmp statistics
Syntax
display icmp statistics
View
Any view
Parameters
None
Description
Use the display icmp statistics command to display the statistics about ICMP packets.
Related commands: display ip interface, reset ip statistics.
Examples
# Display the statistics about ICMP packets.
<Sysname> display icmp statistics
Input: bad formats
0
bad checksum
0
echo
5
destination unreachable 0
source quench 0
redirects
0
echo reply
10
parameter problem
0
timestamp
0
information request
0
mask replies
0
mask requests 0
time exceeded 0
Output:echo
10
destination unreachable 0
source quench 0
redirects
0
echo reply
5
parameter problem
0
timestamp
0
information reply
mask requests 0
0
mask replies
0
time exceeded 0
Table 2-2 Description on the fields of the display icmp statistics command
Field
Input:
Description
bad formats
Number of received wrong format packets
bad checksum
Number of received wrong checksum packets
echo
Number of received echo packets
2-6
Field
Output:
Description
destination unreachable
Number of received destination unreachable
packets
source quench
Number of received source quench packets
redirects
Number of received redirection packets
echo reply
Number of received replies
parameter problem
Number of received parameter problem packets
timestamp
Number of received time stamp packets
information request
Number of received information request packets
mask requests
Number of received mask requests
mask replies
Number of received mask replies
time exceeded
Number of received expiration packets
echo
Number of sent echo packets
destination unreachable
Number of sent destination unreachable packets
source quench
Number of sent source quench packets
redirects
Number of sent redirection packets
echo reply
Number of sent replies
parameter problem
Number of sent parameter problem packets
timestamp
Number of sent time stamp packets
information reply
Number of sent information reply packets
mask requests
Number of sent mask requests
mask replies
Number of sent mask replies
time exceeded
Number of sent expiration packets
display ip socket
Syntax
display ip socket [ socktype sock-type ] [ task-id socket-id ]
View
Any view
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: ID of a task, with the value ranging from 1 to 100.
socket-id: ID of a socket, with the value ranging from 0 to 3072.
Description
Use the display ip socket command to display socket information.
2-7
Examples
# Display the information about the socket of the TCP type.
<Sysname> display ip socket socktype 1
SOCK_STREAM:
Task = VTYD(18), 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_SENDVPNID SO_SETKEEPALIVE,
socket state = SS_PRIV SS_ASYNC
Task = VTYD(18), socketid = 2, Proto = 6,
LA = 10.153.17.99:23, FA = 10.153.17.56:1161,
sndbuf = 8192, rcvbuf = 8192, sb_cc = 0, rb_cc = 0,
socket option = SO_KEEPALIVE SO_OOBINLINE SO_SENDVPNID SO_SETKEEPALIVE,
socket state = SS_ISCONNECTED SS_PRIV SS_ASYNC
Task = VTYD(18), socketid = 3, Proto = 6,
LA = 10.153.17.99:23, FA = 10.153.17.82:1121,
sndbuf = 8192, rcvbuf = 8192, sb_cc = 0, rb_cc = 0,
socket option = SO_KEEPALIVE SO_OOBINLINE SO_SENDVPNID SO_SETKEEPALIVE,
socket state = SS_ISCONNECTED SS_PRIV SS_ASYNC
Table 2-3 Description on the fields of the display ip socket command
Field
Description
SOCK_STREAM
Indicates the socket type is TCP
SOCK_DGRAM
Indicates the socket type is UDP
SOCK_RAW
Indicates the socket type is raw IP
Task
Task ID
socketid
Socket ID
Proto
Protocol number used by the socket
sndbuf
Sending buffer size of the socket
rcvbuf
Receiving buffer size of the socket
sb_cc
Current data size in the sending buffer. The value makes sense
only for the socket of TCP type, because only TCP is able to cache
data.
rb_cc
Current data size in the receiving buffer
socket option
Option of a socket
socket state
State of a socket
display ip statistics
Syntax
display ip statistics
2-8
View
Any view
Parameters
None
Description
Use the display ip statistics command to display the statistics about IP packets.
Related commands: display ip interface, reset ip statistics.
Examples
# Display the statistics about IP packets.
<Sysname> display ip statistics
Input:
Output:
sum
7120
local
112
bad protocol
0
bad format
0
bad checksum
0
bad options
0
forwarding
0
local
27
dropped
0
no route
2
output
0
compress fails 0
Fragment:input
0
dropped
0
fragmented
0
couldn't fragment 0
0
timeouts
Reassembling:sum
0
Table 2-4 Description on the fields of the display ip statistics command
Field
Description
sum
Total number of packets received
local
Total number of packets with destination being local
Total number of unknown protocol packets.
bad protocol
Input:
Output:
Fragment:
Unknown protocol packets are destined to the local device,
but the upper layer protocol specified in their IP header
cannot be processed by the device. (For example, if a switch
is not enabled with the Layer 3 multicast function, it considers
IGMP packets as unknown protocol packets.)
bad format
Total number of packets with incorrect header format that
contains a wrong version, or has a header length less than 20
bytes.
bad checksum
Total number of packets with incorrect checksum
bad options
Total number of packets with incorrect option
forwarding
Total number of IP packets forwarded by the local device
local
Total number of IP packets initiated from the local device
dropped
Total number of IP packets discarded
no route
Total number of IP packets for which no route is available
compress fails
Total number of IP packets failed to compress
input
Total number of fragments received
2-9
Field
Description
output
Total number of fragments sent
dropped
Total number of fragments discarded
fragmented
Total number of IP packets successfully fragmented
couldn't
fragment
Total number of IP packets that cannot be fragmented
sum
Total number of IP packets reassembled
timeouts
Total number of reassembly timeout IP packets
Reassembling:
display tcp statistics
Syntax
display tcp statistics
View
Any view
Parameters
None
Description
Use the display tcp statistics command to display the statistics about TCP packets.
Related commands: display tcp status, reset tcp statistics.
Examples
# Display the statistics about TCP connections.
<Sysname> display tcp statistics
Received packets:
Total: 753
packets in sequence: 412 (11032 bytes)
window probe packets: 0, window update packets: 0
checksum error: 0, offset error: 0, short error: 0
duplicate packets: 4 (88 bytes), partially duplicate packets: 5 (7 bytes)
out-of-order packets: 0 (0 bytes)
packets of data after window: 0 (0 bytes)
packets received after close: 0
ACK packets: 481 (8776 bytes)
duplicate ACK packets: 7, too much ACK packets: 0
Sent packets:
Total: 665
urgent packets: 0
2-10
control packets: 5 (including 1 RST)
window probe packets: 0, window update packets: 2
data packets: 618 (8770 bytes) data packets retransmitted: 0 (0 bytes)
ACK-only packets: 40 (28 delayed)
Retransmitted timeout: 0, connections dropped in retransmitted timeout: 0
Keepalive timeout: 0, keepalive probe: 0, Keepalive timeout, so connections disconnected :
0
Initiated connections: 0, accepted connections: 0, established connections: 0
Closed connections: 0 (dropped: 0, initiated dropped: 0)
Packets dropped with MD5 authentication: 0
Packets permitted with MD5 authentication: 0
Table 2-5 Description on the fields of the display tcp statistics command
Field
Received
packets:
Sent packets:
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
short error
Number of received packets with length being too
small
duplicate packets
Number of completely duplicate packets received
partially duplicate packets
Number of partially duplicate packets received
out-of-order packets
Number of out-of-order packets received
packets of data after
window
Number of packets outside the receiving window
packets received after close
Number of packets that arrived after connection
is 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; in brackets are
retransmitted packets
window probe packets
Number of window probe packets sent; in the
brackets are resent 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
2-11
Field
Description
Number of ACK packets sent; in brackets are
delayed ACK packets
ACK-only packets: 40
Retransmitted timeout
Number of retransmission timer timeouts
connections dropped in retransmitted timeout
Number of connections broken due to
retransmission timeouts
Keepalive timeout
Number of keepalive timer timeouts
keepalive probe
Number of keepalive probe packets sent
Keepalive timeout, so connections disconnected
Number of connections broken due to keepalive
probe failures
Initiated connections
Number of connections initiated
accepted connections
Number of connections accepted
established connections
Number of connections established
Closed connections
Number of connections closed; in brackets are
connections closed accidentally (before receiving
SYN from the peer) and connections closed
initiatively (after receiving SYN from the peer)
Packets dropped with MD5 authentication
Number of packets dropped with MD5
authentication
Packets permitted with MD5 authentication
Number of packets permitted with MD5
authentication
display tcp status
Syntax
display tcp status
View
Any view
Parameters
None
Description
Use the display tcp status command to display the state of all the TCP connections so that you can
monitor TCP connections in real time.
Examples
# Display the state of all the TCP connections.
<Sysname> display tcp status
*: TCP MD5 Connection
TCPCB
Local Add:port
Foreign Add:port
State
03e37dc4
0.0.0.0:4001
0.0.0.0:0
Listening
04217174
100.0.0.204:23
100.0.0.253:65508
Established
2-12
Table 2-6 Description on the fields of the display tcp status command
Field
Description
*
If there is an asterisk before a connection, it
means that the TCP connection is authenticated
through the MD5 algorithm.
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
display udp statistics
Syntax
display udp statistics
View
Any view
Parameters
None
Description
Use the display udp statistics command to display the statistics about UDP packets.
Related commands: reset udp statistics.
Examples
# Display the statistics about UDP packets.
<Sysname> display udp statistics
Received packets:
Total: 26320
checksum error: 0
shorter than header: 0, data length larger than packet: 0
no socket on port: 0
total broadcast or multicast packets : 25006
no socket broadcast or multicast packets: 24989
not delivered, input socket full: 0
input packets missing pcb cache: 1314
Sent packets:
Total: 7187
Table 2-7 Description on the fields of the display udp statistics command
Field
Received
Total
Description
Total number of received UDP packets
2-13
Field
packets:
Sent
packets:
Description
checksum error
Total number of packets with incorrect checksum
shorter than header
Number of packets with data shorter than header
data length larger than
packet
Number of packets with data longer than packet
no socket on port
Number of unicast packets with no socket on port
total broadcast or multicast
packets
Total number of received broadcast or multicast
packets
no socket broadcast or
multicast packets
Total number of broadcast or multicast packets without
socket on port
not delivered, input socket
full
Number of not delivered packets due to a full socket
cache
input packets missing pcb
cache
Number of packets without matching PCB cache
Total
Total number of UDP packets sent
icmp redirect send
Syntax
icmp redirect send
undo icmp redirect send
View
System view
Parameters
None
Description
Use the icmp redirect send command to enable the device to send ICMP redirection packets.
Use the undo icmp redirect send command to disable the device from sending ICMP redirection
packets.
By default, the device is enabled to send ICMP redirection packets.
Examples
# Disable the device from sending ICMP redirection packets.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] undo icmp redirect send
2-14
icmp unreach send
Syntax
icmp unreach send
undo icmp unreach send
View
System view
Parameters
None
Description
Use the icmp unreach send command to enable the device to send ICMP destination unreachable
packets. After enabled with this feature, the switch, upon receiving a packet with an unreachable
destination, discards the packet and then sends a destination unreachable packet to the source host.
Use the undo icmp unreach send command to disable the device from sending ICMP destination
unreachable packets.
By default, the device is enabled to send ICMP destination unreachable packets.
Examples
# Disable the device from sending ICMP destination unreachable packets.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] undo icmp unreach send
reset ip statistics
Syntax
reset ip statistics
View
User view
Parameters
None
Description
Use the reset ip statistics command to clear the statistics about IP packets. You can use the display
ip statistics command to view the current IP packet statistics.
Related commands: display ip interface.
Examples
# Clear the statistics about IP packets.
<Sysname> reset ip statistics
2-15
reset tcp statistics
Syntax
reset tcp statistics
View
User view
Parameters
None
Description
Use the reset tcp statistics command to clear the statistics about TCP packets. You can use the
display tcp statistics command to view the current TCP packet statistics.
Examples
# Clear the statistics about TCP packets.
<Sysname> reset tcp statistics
reset udp statistics
Syntax
reset udp statistics
View
User view
Parameters
None
Description
Use the reset udp statistics command to clear the statistics about UDP packets. You can use the
display udp statistics command to view the current UDP packet statistics.
Examples
# Clear the statistics about UDP packets.
<Sysname> reset udp statistics
tcp timer fin-timeout
Syntax
tcp timer fin-timeout time-value
undo tcp timer fin-timeout
View
System view
2-16
Parameters
time-value: TCP finwait timer, in seconds, with the value ranging from 76 to 3600.
Description
Use the tcp timer fin-timeout command to configure the TCP finwait timer.
Use the undo tcp timer fin-timeout command to restore the default value of the TCP finwait timer.
By default, the value of the TCP finwait timer is 675 seconds.
When the TCP connection state changes from FIN_WAIT_1 to FIN_WAIT_2, the finwait timer is
enabled. If the switch does not receive FIN packets before finwait timer times out, the TCP connection
will be terminated.
Related commands: tcp timer syn-timeout, tcp window.
Examples
# Configure the value of the TCP finwait timer to 800 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] tcp timer fin-timeout 800
tcp timer syn-timeout
Syntax
tcp timer syn-timeout time-value
undo tcp timer syn-timeout
View
System view
Parameters
time-value: TCP synwait timer, in seconds, with the value ranging from 2 to 600.
Description
Use the tcp timer syn-timeout command to configure the TCP synwait timer.
Use the undo tcp timer syn-timeout command to restore the default value of the TCP synwait timer.
By default, the value of the TCP synwait timer is 75 seconds.
When sending the SYN packet, TCP starts the synwait timer. If the response packet is not received
before synwait times out, the TCP connection will be terminated.
Related commands: tcp timer fin-timeout, tcp window.
Examples
# Configure the value of the TCP synwait timer to 80 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] tcp timer syn-timeout 80
2-17
tcp window
Syntax
tcp window window-size
undo tcp window
View
System view
Parameters
window-size: Size of the transmission and receiving buffers of the connection-oriented socket,
measured in kilobytes (KB), in the range of 1 to 32.
Description
Use the tcp window command to configure the size of the transmission and receiving buffers of the
connection-oriented socket.
Use the undo tcp window command to restore the default size of the transmission and receiving
buffers of the connection-oriented socket.
By default, the size of the transmission and receiving buffers is 8 KB.
Related commands: tcp timer fin-timeout, tcp timer syn-timeout.
Examples
# Configure the size of the transmission and receiving buffers of the connection-oriented socket to 3 KB.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] tcp window 3
2-18
Table of Contents
1 Voice VLAN Configuration Commands ···································································································1-1
Voice VLAN Configuration Commands···································································································1-1
display voice vlan error-info·············································································································1-1
display voice vlan oui·······················································································································1-1
display voice vlan status··················································································································1-2
display vlan······································································································································1-3
voice vlan·········································································································································1-4
voice vlan aging·······························································································································1-5
voice vlan enable·····························································································································1-6
voice vlan legacy ·····························································································································1-6
voice vlan mac-address···················································································································1-7
voice vlan mode·······························································································································1-8
voice vlan security enable ···············································································································1-9
i
1
Voice VLAN Configuration Commands
Voice VLAN Configuration Commands
display voice vlan error-info
Syntax
display voice vlan error-info
View
Any view
Parameters
None
Description
Use the display voice vlan error-info command to display the ports on which the voice VLAN function
fails to be enabled.
When ACL number applied to a port reaches to its threshold, voice VLAN cannot be enabled on this
port.
Examples
# Display the ports on which voice VLAN fails to be enabled.
<Sysname> display voice vlan error-info
Fail to apply voice VLAN ACL rules to the following port(s):
Ethernet1/0/10
Ethernet1/0/15
display voice vlan oui
Syntax
display voice vlan oui
View
Any view
1-1
Parameters
None
Description
Use the display voice vlan oui command to display the organizationally unique identifier (OUI) list
used for identifying voice traffic.
The output of the command displays the OUI addresses, their masks, and descriptions.
By default, there are five pre-defined OUI addresses in the system. You can use the voice vlan
mac-address command to add, modify, or remove OUI addresses.
Examples
# Display the OUI list for the voice VLAN.
<Sysname> display voice vlan oui
Oui Address
Mask
Description
0003-6b00-0000
ffff-ff00-0000
Cisco phone
000f-e200-0000
ffff-ff00-0000
H3C Aolynk phone
00d0-1e00-0000
ffff-ff00-0000
Pingtel phone
00e0-7500-0000
ffff-ff00-0000
Polycom phone
00e0-bb00-0000
ffff-ff00-0000
3Com phone
display voice vlan status
Syntax
display voice vlan status
View
Any view
Parameters
None
Description
Use the display voice vlan status command to display voice VLAN-related information.
The output of the command displays information such as the voice VLAN security mode and voice
VLAN assignment mode (manual or automatic).
Related commands: voice vlan, voice vlan enable.
Examples
# Display the information about the voice VLAN.
<Sysname> display voice vlan status
Voice Vlan status: ENABLE
Voice Vlan ID: 2
Voice Vlan security mode: Security
Voice Vlan aging time: 100 minutes
Current voice vlan enabled port mode:
1-2
PORT
MODE
-------------------------------Ethernet1/0/2
AUTO
Ethernet1/0/3
MANUAL
Table 1-1 Description on the fields of the display voice vlan status command
Field
Description
Voice Vlan status
The status of global voice VLAN function:
enabled or disabled.
Voice Vlan ID
The VLAN which is currently enabled with voice
VLAN.
Voice Vlan security mode
The status of voice VLAN security mode:
enabled or disabled.
Voice Vlan aging time
The voice VLAN aging time
Current voice vlan enable port mode
The ports on which the voice VLAN function is
enabled.
The Current voice vlan enable port mode field lists the ports with the voice VLAN function enabled.
Note that not all of them are transmitting packets in the voice VLAN. To view the ports operating in the
voice VLAN currently, use the display vlan command.
display vlan
Syntax
display vlan vlan-id
View
Any view
Parameters
vlan-id: Specifies the ID of the current voice VLAN in the range of 1 to 4094.
Description
Use the display vlan command to display information about the specified VLAN.
For the voice VLAN, this command displays all the ports in the VLAN.
Related commands: voice vlan, voice vlan enable.
Examples
# Display all the ports in the current voice VLAN, assuming that the current voice VLAN is VLAN 6.
<Sysname> display vlan 6
VLAN ID: 6
1-3
VLAN Type: static
Route Interface: not configured
Description: VLAN 0006
Name: VLAN 0006
Tagged
Ports:
Ethernet1/0/5
Untagged Ports:
Ethernet1/0/6
The output indicates that Ethernet 1/0/5 and Ethernet 1/0/6 are in the voice VLAN.
voice vlan
Syntax
voice vlan vlan-id enable
undo voice vlan enable
View
System view
Parameters
vlan-id: Specifies the ID of the VLAN to be enabled with the voice VLAN function, in the range of 2 to
4094. Note that the VLAN must already exist.
Description
Use the voice vlan command to configure the specified VLAN as the voice VLAN, that is, enable voice
VLAN globally.
Use the undo voice vlan enable command to remove the voice VLAN configuration from the specified
VLAN.
By default, voice VLAN is disabled globally.
After a VLAN is configured as the voice VLAN, the switch will modify QoS priorities for the traffic in the
VLAN to improve its transmission preference, guaranteeing that the voice data can be transmitted
preferentially.
To make the voice VLAN function take effect on a port, you must enable the function both globally and
on the port with the voice vlan enable command.
z
If you want to delete a VLAN with voice VLAN function enabled, you must disable the voice VLAN
function first.
z
The voice VLAN function can be enabled for only one VLAN at one time.
Related commands: display voice vlan status.
1-4
Examples
# Create VLAN 2, and enable the voice VLAN function on it.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan 2
[Sysname-vlan2] quit
[Sysname] voice vlan 2 enable
# After the voice VLAN function of VLAN 2 is enabled, if you enable the voice VLAN function for other
VLANs, the system will prompt that your configuration fails.
[Sysname] voice vlan 4 enable
Can't change voice vlan configuration when other voice vlan is running
voice vlan aging
Syntax
voice vlan aging minutes
undo voice vlan aging
View
System view
Parameters
minutes: Sets the voice VLAN aging timer in minutes, in the range of 5 to 43200.
Description
Use the voice vlan aging command to set the voice VLAN aging timer.
Use the undo voice vlan aging command to restore the default.
By default, the voice VLAN aging timer is 1440 minutes.
If a port is configured to work in automatic voice VLAN assignment mode, the switch automatically
assigns the port to the voice VLAN when receiving a packet with the source MAC address matching an
entry in the OUI list of the switch. As soon as the port is assigned to the voice VLAN, the voice VLAN
aging timer starts. If no recognizable voice traffic has been received before the timer expires, the port is
removed from the voice VLAN.
The voice VLAN aging timer does not take effect on ports working in manual voice VLAN assignment
mode, because these ports are assigned to the voice VLAN statically.
When setting the voice VLAN aging timer, consider the usage frequency of IP phones. Note that:
z
A large voice VLAN aging timer setting can prevent a port from being assigned to or removed from
the voice VLAN frequently, keeping voice communication stable. However, this may cause a port to
stay in the voice VLAN even if it has not transmitted voice traffic for a long time, occupying system
resources and bringing about security problems. Therefore, you are recommended to set a large
voice VLAN aging timer in a network with credible network devices and many voice applications.
z
A small voice VLAN aging timer enables the switch to remove a port that has not transmitted voice
traffic from the voice VLAN timely, thus improving network security. However, this may cause the
port to be assigned to or removed from the voice VLAN frequently. Therefore, you are
1-5
recommended to set a small voice VLAN aging timer in a network with only a few voice
applications.
Related commands: display voice vlan status.
Examples
# Set the aging time of the voice VLAN to 100 minutes.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] voice vlan aging 100
voice vlan enable
Syntax
voice vlan enable
undo voice vlan enable
View
Ethernet port view
Parameters
None
Description
Use the voice vlan enable command to enable the voice VLAN function on the port.
Use the undo voice vlan enable command to disable the voice VLAN function on the port.
By default, the voice VLAN function is disabled on all ports.
To have the voice VLAN function take effect on a port, you must enable it both globally and on the port.
Note that the operations are order independent.
Related commands: display voice vlan error-info, display voice vlan status.
Examples
# Enable the voice VLAN function on Ethernet1/0/2.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/2
[Sysname-Ethernet1/0/2] voice vlan enable
voice vlan legacy
Syntax
voice vlan legacy
undo voice vlan legacy
View
Ethernet port view
1-6
Parameters
None
Description
Use the voice vlan legacy command to realize the communication between 3Com device and other
vendors’ voice device by automatically adding the voice VLAN tag to the voice data coming from other
vendors’ voice device.
Use the undo voice vlan legacy command to disable the voice VLAN legacy function.
By default, the voice VLAN legacy function is disabled.
Examples
# Enable the voice VLAN legacy function on Ethernet1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] voice vlan legacy
voice vlan mac-address
Syntax
voice vlan mac-address oui mask oui-mask [ description text ]
undo voice vlan mac-address oui
View
System view
Parameters
oui: Specify a MAC address, in the format of H-H-H.
oui-mask: Specify a MAC address mask, made up of consecutive Fs and consecutive 0s. It specifies the
matching length of the OUI address. When the switch receives a packet, it matches the bits in the
source MAC address corresponding to the Fs against the OUI list.
text: Description of the MAC address, containing 1 to 30 characters.
Description
Use the voice vlan mac-address command to add an OUI entry to the OUI list for the specified MAC
address. The OUI list contains the MAC addresses of recognizable voice devices. A packet is
considered as a voice packet only when its source MAC address can match an entry in the OUI list.
Use the undo voice vlan mac-address command to remove an OUI entry from the OUI list.
By default, the OUI list contains the five pre-defined OUI addresses in Table 1-2. You can modify them
with the voice vlan mac-address command.
The OUI list can contain up to 16 OUI address entries.
1-7
Table 1-2 Default OUI addresses of a switch
Number
OUI address
Vendor
1
0003-6b00-0000
Cisco phone
2
000f-e200-0000
H3C Aolynk phone
3
00d0-1e00-0000
Pingtel phone
4
00e0-7500-0000
Polycom phone
5
00e0-bb00-0000
3Com phone
Related commands: display voice vlan oui.
Examples
# Add MAC address 00aa-bb00-0000 to the OUI list and configure its description as ABC.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] voice vlan mac-address 00aa-bb00-0000 mask ffff-ff00-0000 description ABC
voice vlan mode
Syntax
voice vlan mode auto
undo voice vlan mode auto
View
Ethernet port view
Parameters
None
Description
Use the voice vlan mode auto command to configure the voice VLAN assignment mode of the
Ethernet port to automatic.
Use the undo voice vlan mode auto command to configure the voice VLAN assignment mode of the
Ethernet port to manual.
You cannot and need not to assign a port working in automatic voice VLAN assignment mode to the
voice VLAN manually. When the port receives a packet whose source MAC address matches the OUI
list, the port is assigned to the voice VLAN automatically, and the packet is tagged with the voice VLAN
tag. If the port has not received any voice data before the voice VLAN aging timer expires, the port is
removed from the voice VLAN automatically.
By default, an Ethernet port works in automatic voice VLAN assignment mode.
A port working in manual voice VLAN assignment mode needs to be assigned to the voice VLAN
manually. The port stays in the voice VLAN no matter whether voice data is present on the port, that is,
the voice VLAN aging timer does not take effect on the port.
Related commands: display voice vlan status.
1-8
Examples
# Configure the voice VLAN assignment mode on Ethernet1/0/2 to manual.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/2
[Sysname-Ethernet1/0/2] undo voice vlan mode auto
voice vlan security enable
Syntax
voice vlan security enable
undo voice vlan security enable
View
System view
Parameters
None
Description
Use the voice vlan security enable command to enable the voice VLAN security mode.
Use the undo voice vlan security enable command to disable the voice VLAN security mode.
In security mode, the ports in a voice VLAN and with voice devices attached to can only forward voice
data. Data packets with their MAC addresses not among the OUI addresses that can be identified by
the system will be filtered out. This mode has no effects on other VLANs.
By default, the voice VLAN security mode is enabled.
Related commands: display voice vlan status.
Examples
# Disable the voice VLAN security mode.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] undo voice vlan security enable
1-9
Table of Contents
1 GVRP Configuration Commands ·············································································································1-1
GARP Configuration Commands ············································································································1-1
display garp statistics ······················································································································1-1
display garp timer ····························································································································1-2
garp timer ········································································································································1-3
garp timer leaveall ···························································································································1-4
reset garp statistics··························································································································1-5
GVRP Configuration Commands ············································································································1-6
display gvrp statistics·······················································································································1-6
display gvrp status···························································································································1-7
gvrp··················································································································································1-7
gvrp registration·······························································································································1-8
i
1
GVRP Configuration Commands
GARP Configuration Commands
display garp statistics
Syntax
display garp statistics [ interface interface-list ]
View
Any view
Parameters
interface-list: Specifies a list of Ethernet ports for which the statistics about GARP are to be displayed. In
this list, you can specify individual ports and port ranges. An individual port takes the form of
interface-type interface-number and a port range takes the form of interface-type interface-number1 to
interface-type
interface-number2,
with
interface-number2
taking
a
value
greater
than
interface-number1. The total number of individual ports and port ranges defined in the list must not
exceed 10.
Description
Use the display garp statistics command to display the GARP statistics of the specified or all ports. If
the interface interface-list keyword-argument combination is not specified, this command displays the
GARP statistics on all the ports.
The switch automatically collects statistics about GVRP packets sent, received and dropped on
GVRP-enabled ports. Upon system reboot or the execution of the reset garp statistics command, the
system automatically deletes the statistics and starts collecting statistics again. You can check whether
GVRP is running normally on a port by checking the GVRP statistics on it:
z
If the number of received GVRP packets and the number of sent GVRP packets are the same as
those on the remote port, it indicates that the ports are transmitting and receiving GVRP packets
normally and no registration information is lost.
z
If the number of dropped GVRP packets is not 0, it indicates that the registration mode on the port
may be fixed or forbidden. As in either mode dynamic VLANs cannot be registered, GVRP packet
drop may occur on the port.
Examples
# Display the GARP statistics on Ethernet1/0/1 and Ethernet 1/0/2.
<Sysname> display garp statistics interface Ethernet 1/0/1 to Ethernet 1/0/2
1-1
GARP statistics on port Ethernet1/0/1
Number Of GVRP Frames Received
: 0
Number Of GVRP Frames Transmitted
: 0
Number Of Frames Discarded
: 0
GARP statistics on port Ethernet1/0/2
Number Of GVRP Frames Received
: 0
Number Of GVRP Frames Transmitted
: 0
Number Of Frames Discarded
: 0
Table 1-1 Description on the fields of the display garp statistics command
Field
Description
Number of GVRP Frames Received
Number of the GVRP frames received on the
port
Number of GVRP Frames Transmitted
Number of the GVRP frames transmitted through
the port
Number of Frames Discarded
Number of GVRP frames discarded by the port
display garp timer
Syntax
display garp timer [ interface interface-list ]
View
Any view
Parameters
interface-list: Specifies a list of Ethernet ports of which the GARP timer settings are to be displayed. In
this list, you can specify individual ports and port ranges. An individual port takes the form of
interface-type interface-number and a port range takes the form of interface-type interface-number1 to
interface-type
interface-number2,
with
interface-number2
taking
a
value
greater
than
interface-number1. The total number of individual ports and port ranges defined in the list must not
exceed 10.
Description
Use the display garp timer command to display the settings of the GARP timers on specified ports or
all ports.
If the interface interface-list keyword-argument combination is not specified, this command displays
the GARP timer settings of all ports.
This command displays the settings of the following timers:
z
Join timer
1-2
z
Leave timer
z
LeaveAll timer
z
Hold timer
Related commands: garp timer, garp timer leaveall.
Examples
# Display the settings of the GARP timers on port Ethernet1/0/1.
<Sysname> display garp timer interface Ethernet 1/0/1
GARP timers on port Ethernet1/0/1
Garp Join Time
: 20 centiseconds
Garp Leave Time
: 60 centiseconds
Garp LeaveAll Time
: 1000 centiseconds
Garp Hold Time
: 10 centiseconds
garp timer
Syntax
garp timer { hold | join | leave } timer-value
undo garp timer { hold | join | leave }
View
Ethernet port view
Parameters
hold: Sets the GARP Hold timer.
join: Sets the GARP Join timer.
leave: Sets the GARP Leave timer.
timer-value: Timeout time (in centiseconds) of the GARP timer (Hold, Join or Leave) to be set.
Description
Use the garp timer command to set a GARP timer (that is, the Hold timer, the Join timer, or the Leaver
timer) for an Ethernet port.
Use the undo garp timer command to restore the default setting of a GARP timer.
By default, the Hold, Join, and Leave timers are set to 10, 20, and 60 centiseconds.
Note that:
z
The setting of each timer must be a multiple of 5 (in centiseconds).
z
The timeout ranges of the timers vary depending on the timeout values you set for other timers. If
you want to set the timeout time of a timer to a value out of the current range, you can set the
timeout time of the associated timer to another value to change the timeout range of this timer.
The following table describes the relations between the timers:
1-3
Table 1-2 Relations between the timers
Timer
Lower threshold
Upper threshold
Hold
10 centiseconds
This upper threshold is less
than or equal to one-half of the
timeout time of the Join timer.
You can change the threshold
by changing the timeout time of
the Join timer.
Join
This lower threshold is greater
than or equal to twice the
timeout time of the Hold timer.
You can change the threshold
by changing the timeout time of
the Hold timer.
This upper threshold is less
than one-half of the timeout
time of the Leave timer. You
can change the threshold by
changing the timeout time of
the Leave timer.
Leave
This lower threshold is greater
than twice the timeout time of
the Join timer. You can change
the threshold by changing the
timeout time of the Join timer.
This upper threshold is less
than the timeout time of the
LeaveAll timer. You can
change the threshold by
changing the timeout time of
the LeaveAll timer.
LeaveAll
This lower threshold is greater
than the timeout time of the
Leave timer. You can change
threshold by changing the
timeout time of the Leave timer.
32,765 centiseconds
In networking, the following GARP timer settings are recommended:
z
GARP hold timer: 100 centiseconds (1 second)
z
GARP Join timer: 600 centiseconds (6 seconds)
z
GARP Leave timer: 3000 centiseconds (30 seconds)
Related commands: display garp timer.
Examples
# Set the GARP Join timer to 30 centiseconds for Ethernet1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] garp timer join 30
garp timer leaveall
Syntax
garp timer leaveall timer-value
undo garp timer leaveall
1-4
View
System view
Parameters
timer-value: Setting (in centiseconds) of the GARP LeaveAll timer. You need to set this argument with
the Leave timer settings of other Ethernet ports as references. That is, this argument needs to be larger
than the Leave timer settings of any Ethernet ports. Also note that this argument needs to be a multiple
of 5 and cannot be larger than 32,765.
Description
Use the garp timer leaveall command to set the GARP LeaveAll timer.
Use the undo garp timer leaveall command to restore the default setting of the GARP LeaveAll timer.
By default, the LeaveAll timer is set to 1,000 centiseconds, that is, 10 seconds.
In networking, you are recommended to set the GARP LeaveAll timer to 12000 centiseconds (2
minutes).
Related commands: display garp timer.
Examples
# Set the GARP LeaveAll timer to 100 centiseconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] garp timer leaveall 100
reset garp statistics
Syntax
reset garp statistics [ interface interface-list ]
View
User view
Parameters
interface-list: Specifies a list of Ethernet ports. In this list, you can specify individual ports and port
ranges. An individual port takes the form of interface-type interface-number and a port range takes the
form of interface-type interface-number1 to interface-type interface-number2, with interface-number2
taking a value greater than interface-number1. The total number of individual ports and port ranges
defined in the list must not exceed 10.
1-5
Description
Use the reset garp statistics command to clear the GARP statistics (including statistics about packets
received/sent/discarded by GVRP) on the specified or all ports. You can use the display garp
statistics command to view the NDP statistics before and after the execution of the reset garp
statistics command to verify the execution result.
Executing the reset garp statistics command without any parameter clears the GARP statistics of all
ports.
Related commands: display garp statistics.
Examples
# Clear GARP statistics of all ports.
<Sysname> reset garp statistics
GVRP Configuration Commands
display gvrp statistics
Syntax
display gvrp statistics [ interface interface-list ]
View
Any view
Parameters
interface interface-list: Specifies an Ethernet port list. By providing a value for this argument, you can
display the GVRP statistics on the specified ports. You need to provide the interface-list argument in the
format of { interface-type interface-number [ to interface-type interface-number ] } &<1-10>, where the
interface-type argument represents the port type, the interface-number argument represents the port
number, and & <1-10> means that you can provide up to 10 port indexes/port index ranges for this
argument.
Note that, this command displays GVRP statistics only on the trunk ports included in the list. Statistics
on non-trunk ports will not be displayed.
Description
Use the display gvrp statistics command to display the GVRP statistics of trunk ports.
This command displays the following information:
z
GVRP status
z
Number of the GVRP entries that fail to be registered
z
Source MAC address of the previous GVRP PDU
z
GVRP registration type of a port
Examples
# Display the GVRP statistics of Ethernet1/0/1, assuming that the port is a trunk port.
<Sysname> display gvrp statistics interface Ethernet 1/0/1
GVRP statistics on port Ethernet1/0/1
1-6
GVRP Status
: Enabled
GVRP Failed Registrations
: 0
GVRP Last Pdu Origin
: 0000-0000-0000
GVRP Registration Type
: Normal
display gvrp status
Syntax
display gvrp status
View
Any view
Parameters
None
Description
Use the display gvrp status command to display the global GVRP status (enabled or disabled).
Examples
# Display the global GVRP status.
<Sysname> display gvrp status
GVRP is enabled
The above information indicates that GVRP is enabled globally.
gvrp
Syntax
gvrp
undo gvrp
View
System view, Ethernet port view
Parameters
None
Description
Use the gvrp command to enable GVRP globally (in system view) or for a port (in Ethernet port view).
Use the undo gvrp command to disable GVRP globally (in system view) or on a port (in Ethernet port
view).
By default, GVRP is disabled both globally and on ports.
Note that:
1-7
To enable GVRP for a port, you need to enable GVRP globally first. GVRP does not take effect
z
automatically on ports upon being enabled globally.
z
You can enable/disable GVRP only on trunk ports.
z
After you enable GVRP on a trunk port, you cannot change the port to other types.
Related commands: display gvrp status.
Examples
# Enable GVRP globally.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] gvrp
GVRP is enabled globally.
# Enable GVRP on Ethernet 1/0/1.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] gvrp
GVRP is enabled on port Ethernet1/0/5.
gvrp registration
Syntax
gvrp registration { fixed | forbidden | normal }
undo gvrp registration
View
Ethernet port view
Parameters
fixed: Specifies the fixed GVRP registration mode. A port operating in this mode cannot register or
deregister VLAN information dynamically. It only propagates static VLAN information. Besides, the port
permits only static VLANs, that is, it propagates only static VLAN information to the other GARP
members.
forbidden: Specifies the forbidden GVRP registration mode. A port operating in this mode cannot
register or deregister VLAN information dynamically. It permits only VLAN 1, that is, it propagates only
the information about VLAN 1 to the other GARP members.
normal: Specifies the normal mode. A port operating in this mode can dynamically register or deregister
VLAN information and can propagate both dynamic and static VLAN information.
Description
Use the gvrp registration command to configure the GVRP registration mode on a port.
Use the undo gvrp registration command to restore the default GVRP registration mode on a port.
By default, the GVRP registration mode is normal.
Note that these commands only apply to trunk ports.
Related commands: display gvrp statistics
1-8
Examples
# Configure Ethernet1/0/1 to operate in fixed GVRP registration mode.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet1/0/1
[Sysname-Ethernet1/0/1] gvrp registration fixed
1-9
Table of Contents
1 Port Basic Configuration Commands······································································································1-1
Port Basic Configuration Commands······································································································1-1
broadcast-suppression ····················································································································1-1
copy configuration ···························································································································1-2
description ·······································································································································1-4
display brief interface·······················································································································1-5
display interface·······························································································································1-7
display link-delay ···························································································································1-11
display loopback-detection ············································································································1-11
display port combo ························································································································1-12
display unit·····································································································································1-13
duplex ············································································································································1-14
enable log updown ························································································································1-15
flow-control ····································································································································1-16
flow-control no-pauseframe-sending ·····························································································1-16
flow interval····································································································································1-17
giant-frame statistics enable··········································································································1-18
interface·········································································································································1-18
jumboframe enable························································································································1-19
link-delay ·······································································································································1-20
loopback ········································································································································1-20
loopback-detection control enable·································································································1-21
loopback-detection enable ············································································································1-22
loopback-detection interface-list enable ························································································1-23
loopback-detection interval-time····································································································1-24
loopback-detection per-vlan enable ······························································································1-25
loopback-detection shutdown enable ····························································································1-25
mdi ·················································································································································1-26
multicast-suppression····················································································································1-27
reset counters interface ·················································································································1-28
shutdown ·······································································································································1-29
speed ·············································································································································1-30
speed auto·····································································································································1-30
unicast-suppression·······················································································································1-31
virtual-cable-test ····························································································································1-32
i
1
Port Basic Configuration Commands
Port Basic Configuration Commands
broadcast-suppression
Syntax
broadcast-suppression { ratio | pps max-pps }
undo broadcast-suppression
View
System view, Ethernet port view
Parameters
ratio: Maximum ratio of the broadcast traffic allowed on a port to the total transmission capacity of the
port. The value ranges from 1 to 100 (in step of 1) and defaults to 100. The smaller the ratio is, the less
broadcast traffic is allowed.
max-pps: Maximum number of broadcast packets allowed to be received per second on an Ethernet
port (in pps). The following are the value ranges for the argument:
z
In system view, the value range is 1 to 262143.
z
In Ethernet port view, the value range is 1 to 148810 for an Ethernet port, and 1 to 262143 for a
GigabitEthernet port.
Description
Use the broadcast-suppression command to limit broadcast traffic allowed to be received on each
port (in system view) or on a specified port (in Ethernet port view).
Use the undo broadcast-suppression command to restore the default broadcast suppression setting.
The broadcast-suppression command is used to enable broadcast suppression. By default,
broadcast suppression is disabled.
When incoming broadcast traffic exceeds the broadcast traffic threshold you set, the system drops the
packets exceeding the threshold to reduce the broadcast traffic ratio to the specified range, so as to
keep normal network service.
You can use the undo broadcast-suppression command in system view to cancel the broadcast
suppression settings on all ports, or use the broadcast-suppression command in system view to make a
global setting.
Executing the commands in Ethernet port view only takes effect on the current port.
1-1
The global broadcast suppression setting configured by the broadcast-suppression command in
system view takes effect on all Ethernet ports in the system except for the reflection ports, stack ports
and ports having their own broadcast suppression settings.
If you configure broadcast-suppression command in both system view and Ethernet port view, the
configuration in Ethernet port view will take effect.
Examples
# Allow incoming broadcast traffic on Ethernet 1/0/1 to occupy at most 20% of the total transmission
capacity of the port and suppress the broadcast traffic that exceeds the specified range.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] broadcast-suppression 20
# Set the maximum number of broadcast packets that can be received per second by the Ethernet 1/0/1
port to 1,000.
[Sysname-Ethernet1/0/1] broadcast-suppression pps 1000
copy configuration
Syntax
copy configuration source { interface-type interface-number | aggregation-group source-agg-id }
destination { interface-list [ aggregation-group destination-agg-id ] | aggregation-group
destination-agg-id }
View
System view
Parameters
interface-type: Port type.
interface-number: Port number.
source-agg-id: Source aggregation group number, in the range of 1 to 416. The port with the smallest
port number in the aggregation group is used as the source port.
destination-agg-id: Destination aggregation group number, in the range of 1 to 416.
interface-list: Destination port list, interface-list = interface-type interface-number [ to interface-type
interface-number ] &<1-10. &<1-10> means that you can input up to 10 ports/port ranges.
Description
Use the copy configuration command to duplicate the configuration of a port to specified ports to keep
consistent configuration on them.
1-2
If you specify a source aggregation group ID, the system uses the port with the smallest port
z
number in the aggregation group as the source.
If you specify a destination aggregation group ID, the configuration of the source port will be copied
z
to all ports in the aggregation group and all ports in the group will have the same configuration as
that of the source port.
Refer to Table 1-1 for the configurations that can be copied.
Table 1-1 Configurations that can be copied
Configuration category
Contents
VLAN
VLANs carried on the port and the default VLAN ID.
Protocol-based VLAN
Protocol VLAN IDs and protocol indexes.
The enable/disable status of LACP.
LACP (Link Aggregation
Control protocol)
(As the configuration commands of manual and static link
aggregation groups cannot be copied, you cannot assign a port to a
link aggregation group with the copy command.)
QoS
Traffic policing, packet priority marking, port priority, traffic
accounting, VLAN mapping, port rate limiting, priority trust mode,
QoS profile (the qos-profile port-based configuration cannot be
copied), and so on.
STP
The enable/disable state of STP on the port, link attribute of the port
(point-to-point or non-point-to-point), STP priority, path cost,
transmission rate limit, enable/disable state of loop protection,
enable/disable state of root protection, and whether the port is an
edge port.
GARP
GVRP enable/disable status, timer settings, and registration mode.
Basic port configuration
Link type of the port, port rate, and duplex mode.
In case a configuration setting fails to be copied, the system will print the error message.
Examples
# Copy the configurations of Ethernet 1/0/1 to Ethernet 1/0/2 and Ethernet 1/0/3.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] copy configuration source ethernet 1/0/1 destination ethernet 1/0/2 ethernet 1/0/3
Note: The following will be removed from destination port list:
Aggregation port(s), Voice vlan port(s).
Copying VLAN configuration...
Copying Protocol based VLAN configuration...
Copying LACP configuration...
Copying QOS configuration...
Copying GARP configuration...
Copying STP configuration...
1-3
Copying speed/duplex configuration...
z
Any aggregation group port you input in the destination port list will be removed from the list and the
copy command will not take effect on the port. If you want an aggregation group port to have the
same configuration with the source port, you can specify the aggregation group of the port as the
destination (with the destination-agg-id argument).
z
Any voice-VLAN-enabled port you input in the destination port list will be removed from the list.
# Copy the configurations of GigabitEthernet 1/1/1 to Ethernet 1/0/1.
[Sysname]copy configuration source g1/1/1 destination e1/0/1
Copying VLAN configuration...
Copying Protocol based VLAN configuration...
Copying LACP configuration...
Copying QOS configuration...
Copying GARP configuration...
Copying STP configuration...
Copying speed/duplex configuration...
Copying speed configuration to interface Ethernet1/0/1 failed
Copying QoS rate limit configuration to interface Ethernet1/0/2 failed
The output shows that all configurations except port rate limiting and QoS traffic policing were copied
successfully.
description
Syntax
description text
undo description
View
Ethernet port view
Parameters
text: Port description, a string of 1 to 80 characters. Currently, the switch support 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,
such as Chinese, Korean, and Japanese. Note that, each character or symbol conforming to the
Unicode standard takes the space of two regular characters.
1-4
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.
Description
Use the description command to configure a description for the port.
Use the undo description command to remove the port description.
By default, no description is configured for a port.
You can use the display brief interface command to display the configured description.
Examples
# Set description string home for the Ethernet 1/0/1 port.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] description home
display brief interface
Syntax
display brief interface [ interface-type [ interface-number ] ] [ | { begin | include | exclude }
regular-expression ]
View
Any view
Parameters
interface-type: Port type.
interface-number: Port number.
|: Specifies to use a regular expression to filter the configuration information entries to be displayed.
begin: Each entry must begin with a specified character string.
include: Each entry must include a specified character string.
exclude: Each entry must not include a specified character string.
regular-expression: Regular expression, a string of 1 to 256 characters.
1-5
For details about regular expression, refer to the Configuration File Management module in this manual.
Description
Use the display brief interface command to display the brief configuration information about one or all
interfaces, including: interface type, link state, link rate, duplex attribute, link type, default VLAN ID and
description string.
Currently, for the port types other than Ethernet port, this command only displays the link state, and
shows "--" in all other configuration information fields.
Related commands: display interface.
Examples
# Display the brief configuration information about the Ethernet 1/0/1 port.
<Sysname> display brief interface Ethernet 1/0/1
Interface:
Eth
- Ethernet
Loop - LoopBack
GE
- GigabitEthernet TENGE - tenGigabitEthernet
Vlan - Vlan-interface
Cas
- Cascade
Speed/Duplex:
A - auto-negotiation
Interface
Link
Speed
Duplex Type
PVID Description
-----------------------------------------------------------------------Eth1/0/1
DOWN
A
A
hybrid 1
home
Table 1-2 Description on the fields of the display brief interface command
Field
Description
Interface
Port type
Link
Current link state: UP, DOWN or ADMINISTRATIVELY DOWN
Speed
Link rate
Duplex
Duplex attribute
Type
Link type: access, hybrid or trunk
PVID
Default VLAN ID
Description
Port description string
1-6
The state of an Ethernet port can be UP, DOWN, or ADMINISTRATIVELY DOWN. The following table
shows the port state transitions.
Table 1-3 Port state transitions
Initial port state
Not connected to
any cable
State after executing
the undo shutdown
command
DOWN
DOWN
ADMINISTRATIVELY
DOWN
DOWN
DOWN
Connected to a
cable
State after executing the
shutdown command
ADMINISTRATIVELY
DOWN
DOWN
UP
UP
ADMINISTRATIVELY
DOWN
UP
display interface
Syntax
display interface [ interface-type | interface-type interface-number ]
View
Any view
Parameters
interface-type: Port type.
interface-number: Port number.
For details about the arguments, refer to the parameter description of the interface command.
Description
Use the display interface command to display port configuration.
When using this command:
z
If you specify neither port type nor port number, the command displays information about all ports.
z
If you specify only port type, the command displays information about all ports of the specified type.
z
If you specify both port type and port number, the command displays information about the
specified port.
Examples
# Display the configuration information of Ethernet 1/0/1.
<Sysname> display interface ethernet 1/0/1
Ethernet1/0/1 current state : DOWN
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0012-a990-2240
Media type is twisted pair, loopback not set
Port hardware type is 100_BASE_TX
100Mbps-speed mode, full-duplex mode
Link speed type is force link, link duplex type is force link
1-7
Flow-control is enabled
The Maximum Frame Length is 9216
Broadcast MAX-pps: 500
Unicast MAX-ratio: 100%
Multicast MAX-ratio: 100%
Allow jumbo frame to pass
PVID: 1
Mdi type: auto
Port link-type: access
Tagged
VLAN ID : none
Untagged VLAN ID : 1
Last 300 seconds input:
0 packets/sec 0 bytes/sec
Last 300 seconds output:
Input(total):
0 packets/sec 0 bytes/sec
0 packets, 0 bytes
0 broadcasts, 0 multicasts, 0 pauses
Input(normal):
- packets, - bytes
- broadcasts, - multicasts, - pauses
Input:
0 input errors, 0 runts, 0 giants,
0 frame,
- throttles, 0 CRC
- overruns, 0 aborts, 0 ignored, - parity errors
Output(total): 0 packets, 0 bytes
0 broadcasts, 0 multicasts, 0 pauses
Output(normal): - packets, - bytes
- broadcasts, - multicasts, - pauses
Output: 0 output errors,
- underruns, - buffer failures
0 aborts, 0 deferred, 0 collisions, 0 late collisions
0 lost carrier, - no carrier
Table 1-4 Description on the fields of the display interface command
Field
Description
Ethernet1/0/1 current state
Current Ethernet port status: UP, DOWN or
ADMINISTRATIVELY DOWN
IP Sending Frames' Format
Ethernet frame format
Hardware address
Port hardware address
Media type
Media type
Port hardware type
Port hardware type
100Mbps-speed mode, full-duplex mode
Current speed mode and duplex mode
Link speed type is force link, link duplex
type is force link
Link speed and duplex status ( force or
auto-negotiation)
Flow-control is enabled
Status of flow-control on the port
The Maximum Frame Length
Maximum frame length allowed on the port
Broadcast MAX-ratio
Broadcast suppression ratio on the port
Unicast MAX-ratio
Unknown unicast suppression ratio on the port
Multicast MAX-ratio
Multicast suppression ratio on the port
Allow jumbo frame to pass
Whether Jumbo frame is allowed on the port.
1-8
Field
Description
PVID
Default VLAN ID of the port
Mdi type
Network cable type
Port link-type
Port link type
Tagged VLAN ID
Identify the VLANs whose packets will be forwarded
with tags on the port.
Untagged VLAN ID
Identify the VLANs whose packets will be forwarded
without tags on the port.
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 broadcasts, 0 multicasts, 0
pauses
Average input and output rates (in pps and Bps) in the
last 300 seconds
Count in packets and in bytes of total incoming traffic
on the port, including incoming normal packets,
abnormal packets, and normal PAUSE frames
The number of incoming broadcast packets, the
number of incoming multicast packets, and the number
of incoming PAUSE frames on the port.
Count in packets and in bytes of incoming normal
packets on the port, including incoming normal packets
and normal PAUSE frames
Input(normal): - packets, - bytes
- broadcasts, - multicasts, - pauses
The number of normal incoming broadcast packets, the
number of normal incoming multicast packets, and the
number of normal incoming PAUSE frames of the port
A hyphen (-) indicates that the statistical item is not
supported
input errors
The total number of incoming error frames
The number of incoming runt frames
runts
A runt frame is of less than 64 bytes but has the correct
format and CRC field
The number of incoming giant frames
giants
(A giant frame is of more than 1518 bytes if untagged
or more than 1522 bytes if tagged.)
The number of throttles that occurred on the port
- throttles
(A throttle occurs when a port is shut down due to
buffer or memory overload.)
CRC
The number of CRC error frames received in correct
length
frame
The number of incoming CRC error frames with
non-integer number of bytes
- overruns
The number of packets dropped because the receiving
rate of the port exceeds the processing capability of the
input queues
1-9
Field
Description
The total number of incoming illegal packets, including:
z
z
aborts
z
z
z
Fragments: CRC error frames of less than 64 bytes
(integer or non-integer).
Jabber frames: CRC error frames of more than
1518 bytes if untagged or 1522 bytes if tagged
(integer or non-integer).
Symbol error frames: frames with at least one
symbol error.
Unknown operator frames: MAC control frames that
are not Pause frames
Length error frames: frames whose actual length
(46-1500 bytes) is inconsistent with the length field
in the 802.3 header.
ignored
The number of packets dropped due to insufficient
receive buffer on the port
- parity errors
The number of incoming parity error frames
Output(total): 0 packets, 0 bytes
0 broadcasts, 0 multicasts, 0
pauses
Count in packets and in bytes of total outgoing traffic on
the port, including normal packets, abnormal packets,
and normal Pause frames
The number of outgoing broadcast packets, the
number of outgoing multicast packets, and the number
of outgoing Pause frames on the port
Count in packets and in bytes of outgoing normal
packets on the port, including outgoing normal packets
and normal Pause frames.
Output(normal): - packets, - bytes
- broadcasts, - multicasts, - pauses
The number of normal outgoing broadcast packets, the
number of normal outgoing multicast packets, and the
number of normal outgoing Pause frames on the port.
A hyphen (-) indicates that the statistical item is not
supported.
output errors
The total number of outgoing error frames
- underruns
The number of packets dropped because the
transmitting rate of the port exceeds the processing
capacity of the output queue, which is a rare hardware
error.
- buffer failures
The number of packets dropped due to insufficient
transmit buffer on the port
aborts
The number of transmission failures due to various
reasons, such as collisions
deferred
The number of first transmission attempts delayed
because of detection of collisions
The number of detected collisions
collisions
(Transmission of a frame will be aborted upon
detection of a collision.)
The number of detected late collisions
late collisions
(A late collision occurs if the transmission of a frame
defers due to detection of collision after its first 512 bits
have been transmitted.)
1-10
Field
Description
The lost carrier counter applicable to serial WAN
interfaces
lost carrier
The counter increases by 1 upon each carrier loss
detected during frame transmission.
The no carrier counter applicable to serial WAN
interfaces
- no carrier
The counter increases by 1 upon each carrier detection
failure for frame transmission.
display link-delay
Syntax
display link-delay
View
Any view
Parameters
None
Description
Use the display link-delay command to display the information about the ports with the link-delay
command configured, including the port name and the configured delay.
Related commands: link-delay.
Examples
# Display the information about the ports with the link-delay command configured.
<Sysname> display link-delay
Interface
Time Delay
===================== ==============
Ethernet1/0/5
8
display loopback-detection
Syntax
display loopback-detection
View
Any view
Parameters
None
1-11
Description
Use the display loopback-detection command to display the loopback detection status on the port. If
loopback detection is enabled, this information will also be displayed: time interval for loopback
detection and the loopback ports.
Examples
# Display the loopback detection status on the port.
<Sysname> display loopback-detection
Port Ethernet1/0/1 loopback-detection is running
system Loopback-detection is running
Detection interval time is 30 seconds
There is no port existing loopback link
Table 1-5 Description on the fields of the display loopback-detection command
Field
Description
Port Ethernet1/0/1 loopback-detection is running
Loopback detection is enabled on the Ethernet
1/0/1.
system Loopback-detection is running
Loopback detection is enabled globally.
Detection interval time is 30 seconds
Time interval for loopback detection is 30
seconds.
There is no port existing loopback link
No loopback port exists.
display port combo
Syntax
display port combo
View
Any view
Parameters
None
Description
Use the display port combo command to display the Combo ports of a device and the corresponding
optical ports and electrical ports.
Examples
# Display the Combo ports of the device and the corresponding optical ports and electrical ports.
<Sysname> display port combo
Combo-group
Active
Inactive
1
GigabitEthernet1/0/25
GigabitEthernet1/0/27
2
GigabitEthernet1/0/26
GigabitEthernet1/0/28
1-12
Table 1-6 display port combo command output description
Field
Description
Combo-group
Combo ports of the device, represented by Combo port number, which
is generated by the system.
Active
Ports of the Combo ports that are active
Inactive
Ports of the Combo ports that are inactive
As for the optical port and the electrical port of a Combo port, the one with the smaller port number is
active by default. You can determine whether a port is an optical port or an electrical port by checking
the “Media type is” field of the display interface command.
display unit
Syntax
display unit unit-id interface
View
Any view
Parameters
unit-id: Unit ID, in the range of 1 to 8.
Description
Use the display unit command to display information about the ports on a specified unit.
Examples
# Display information about the ports on unit 1.
<Sysname> display unit 1 interface
Aux1/0/0
Description :
Aux Interface
Ethernet1/0/1 current state : DOWN
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 000f-e290-2240
Media type is twisted pair, loopback not set
Port hardware type is 100_BASE_TX
100Mbps-speed mode, full-duplex mode
Link speed type is force link, link duplex type is force link
Flow-control is enabled
The Maximum Frame Length is 9216
Broadcast MAX-pps: 500
Unicast MAX-ratio: 100%
Multicast MAX-ratio: 100%
Allow jumbo frame to pass
PVID: 1
Mdi type: auto
Port link-type: access
1-13
Tagged
VLAN ID : none
Untagged VLAN ID : 1
Last 300 seconds input:
Last 300 seconds output:
Input(total):
0 packets/sec 0 bytes/sec
0 packets/sec 0 bytes/sec
0 packets, 0 bytes
0 broadcasts, 0 multicasts, 0 pauses
Input(normal):
- packets, - bytes
- broadcasts, - multicasts, - pauses
Input:
0 input errors, 0 runts, 0 giants,
0 frame,
- throttles, 0 CRC
- overruns, 0 aborts, 0 ignored, - parity errors
Output(total): 0 packets, 0 bytes
0 broadcasts, 0 multicasts, 0 pauses
Output(normal): - packets, - bytes
- broadcasts, - multicasts, - pauses
Output: 0 output errors,
- underruns, - buffer failures
0 aborts, 0 deferred, 0 collisions, 0 late collisions
0 lost carrier, - no carrier
(The following displayed information is omitted)
Table 1-7 Description on the fields of the display unit command
Field
Description
Aux1/0/0
The description string of the AUX port is Aux
Interface.
Description : Aux Interface
For the description of other fields, refer to Table 1-4.
duplex
Syntax
duplex { auto | full | half }
undo duplex
View
Ethernet port view
Parameters
auto: Sets the port to auto-negotiation mode.
full: Sets the port to full duplex mode.
half: Sets the port to half duplex mode.
Description
Use the duplex command to set the duplex mode of the current port.
Use the undo duplex command to restore the default duplex mode, that is, auto-negotiation.
By default, the port is in auto-negotiation mode.
Related commands: speed.
1-14
Examples
# Set the Ethernet 1/0/1 port to auto-negotiation mode.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] duplex auto
enable log updown
Syntax
enable log updown
undo enable log updown
View
Ethernet port view
Parameters
None
Description
Use the enable log updown command to enable Up/Down log information output.
Use the undo log enable updown command to disable Up/Down log information output.
By default, a port is allowed to output Up/Down log information.
Examples
# By default, a port is allowed to output the Up/Down log information. Execute the shutdown command
or the undo shutdown command on Ethernet 1/0/1, and the system outputs Up/Down log information
of Ethernet 1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] shutdown
[Sysname-Ethernet1/0/1]
%Apr
5 07:25:37:634 2000 Sysname L2INF/5/PORT LINK STATUS CHANGE:- 1 -
Ethernet1/0/1 is DOWN
[Sysname-Ethernet1/0/1] undo shutdown
[Sysname-Ethernet1/0/1]
%Apr
5 07:25:56:244 2000 Sysname L2INF/5/PORT LINK STATUS CHANGE:- 1 -
Ethernet1/0/1 is UP
# Disable Ethernet 1/0/1 from outputting Up/Down log information and execute the shutdown
command or the undo shutdown command on Ethernet 1/0/1. No Up/Down log information is output
for Ethernet 1/0/1.
[Sysname-Ethernet1/0/1] undo enable log updown
[Sysname-Ethernet1/0/1] shutdown
[Sysname-Ethernet1/0/1] undo shutdown
1-15
flow-control
Syntax
flow-control
undo flow-control
View
Ethernet port view
Parameters
None
Description
Use the flow control command to configure flow control to operate in TxRx mode on the current port.
Use the undo flow-control command to disable flow control on the port.
A port configured with the flow-control command can not only receive and process remote pause
frames, but also send pause frames actively when the port is congested.
By default, flow control is disabled on Ethernet ports.
Examples
# Enable flow control on the Ethernet 1/0/1 port.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] flow-control
flow-control no-pauseframe-sending
Syntax
flow-control no-pauseframe-sending
undo flow-control
View
Ethernet port view
Parameters
None
Description
Use the flow-control no-pauseframe-sending command to configure flow control to operate in Rx
mode on the current port.
Use the undo flow-control command to disable flow control on the port.
A port configured with the flow-control no-pauseframe-sending command can receive and process
remote pause frames but cannot send pause frames actively when it is congested.
By default, flow control is disabled on Ethernet ports.
1-16
Reflector ports and fabric ports do not support the flow-control no-pauseframe-sending command.
Examples
# Configure flow control to operate in Rx mode on Ethernet 1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] flow-control no-pauseframe-sending
flow interval
Syntax
flow-interval interval
undo flow-interval
View
Ethernet port view
Parameters
Interval: Interval (in seconds) to perform statistics on port information. This argument ranges from 5 to
300 (in step of 5) and is 300 by default.
Description
Use the flow-interval command to set the interval to perform statistics on port information.
Use the undo flow-interval command to restore the default interval.
By default, this interval is 300 seconds.
When you use the display interface interface-type interface-number command to display the
information of a port, the system performs statistical analysis on the traffic flow passing through the port
during the specified interval and displays the average rates in the interval. For example, if you set the
interval to 100 seconds, the displayed information is as follows:
Last 100 seconds input:
Last 100 seconds output:
0 packets/sec 0 bytes/sec
0 packets/sec 0 bytes/sec
Related commands: display interface.
Examples
# Set the interval to perform statistics on the Ethernet 1/0/1 port to 100 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] flow-interval 100
1-17
giant-frame statistics enable
Syntax
giant-frame statistics enable
undo giant-frame statistics enable
View
System view
Parameters
None
Description
Use the giant-frame statistics enable command to enable the giant-frame statistics function.
Use the undo giant-frame statistics enable command to disable the giant-frame statistics function.
By default, the giant-frame statistics function is not enabled.
After enabling the giant-frame statistics function, you can use the display interface command to view
the statistics about giant frames.
Giant frames refer to VLAN untagged frames of more than 1518 bytes and VLAN tagged frames of
more than 1522 bytes.
Examples
# Enable the giant-frame statistics function.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] giant-frame statistics enable
interface
Syntax
interface interface-type interface-number
View
System view
Parameters
interface-type: Port type, which can be Aux, Ethernet, GigabitEthernet, LoopBack, NULL or
VLAN-interface.
interface-number: Port number, in the format of Unit ID/slot number/port number, where:
1-18
Unit ID is in the range of 1 to 8;
The slot number is 0 if the port is an Ethernet port, the slot number is 1 if the port is a GigabitEthernet
port.
The port number is relevant to the device.
Description
Use the interface command to enter specific port view. To configure an Ethernet port, you need to enter
Ethernet port view first.
Examples
# Enter Ethernet 1/0/1 port view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1]
jumboframe enable
Syntax
jumboframe enable
undo jumboframe enable
View
Ethernet port view
Parameters
None
Description
Use the jumboframe enable command to set the maximum frame size allowed on a port to 9,216
bytes.
Use the undo jumboframe enable command to set the maximum frame size allowed on a port to 1,536
bytes.
By default, the maximum frame size allowed on an Ethernet port is 9,216 bytes.
Examples
# Set the maximum frame size allowed on Ethernet 1/0/1 to 9.216 bytes.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] jumboframe enable
1-19
link-delay
Syntax
link-delay delay-time
undo link-delay
View
Ethernet port view
Parameters
delay-time: Port state change delay to be set. This argument is in the range 2 to 10 (in seconds).
Description
Use the link-delay command to set the port state change delay.
Use the undo link-delay command to restore the default.
By default, the port state change delay is 0 seconds, that is, the port state changes without any delay.
During a short period after you connect your switch to another device, the connecting port may go up
and down frequently due to hardware compatibility, resulting in service interruption.
To avoid situations like this, you may set a port state change delay.
z
The port state change delay takes effect when the port goes down but not when the port goes up.
z
The delay configured in this way does not take effect for ports in DLDP down state. For information
about the DLDP down state, refer to DLDP.
Examples
# Set the port state change delay of Ethernet 1/0/5 to 8 seconds.
<Sysname> system-view
Enter system view, return to user view with Ctrl+Z.
[Sysname] interface Ethernet1/0/5
[Sysname-Ethernet1/0/5] link-delay 8
loopback
Syntax
loopback { external | internal }
View
Ethernet port view
1-20
Parameters
external: Performs external loop test. In the external loop test, self-loop headers must be used on the
port of the switch. The external loop test can locate the hardware failures on the port.
For 100M port, the self-loop headers are made from four cores of the 8-core cables, for 1000M port, the
self-loop headers are made from eight cores of the 8-core cables, and the packets forwarded by the port
will be received by itself.
internal: Performs internal loop test. In the internal loop test, self loop is established in the switching
chip to locate the chip failure which is related to the port.
Description
Use the loopback command to perform a loopback test on the current Ethernet port to check whether
the Ethernet port works normally. The loopback test terminates automatically after running for a specific
period.
By default, no loopback test is performed on the Ethernet port.
Examples
# Perform an internal loop test on Ethernet 1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] loopback internal
Loopback internal succeeded.
loopback-detection control enable
Syntax
loopback-detection control enable
undo loopback-detection control enable
View
Ethernet port view
Parameters
None
Description
Use the loopback-detection control enable command to enable the loopback detection control
feature on the current trunk or hybrid port.
1-21
Use the undo loopback-detection control enable command to disable the loopback detection control
feature on the trunk or hybrid port.
This function needs to be used in conjunction with the loopback detection function. For details, refer to
the loopback-detection enable command. When a loopback is detected in a VLAN on a trunk or
hybrid port, you can use this function to control the working status of the port.
z
If this feature is enabled on the trunk or hybrid port, when loopback is found on the port, the system
sets the port to the block state (where the port cannot forward data packets), sends log messages
to the terminal, and removes the corresponding MAC forwarding entry. After the loop is removed,
the port automatically resumes the normal forwarding state.
z
If this feature is disabled on the trunk or hybrid port, when loopback is found on the port, the system
merely reports a Trap message, and the port still works normally.
By default, the loopback detection control feature is disabled on the trunk or hybrid port.
Note that, this command is not applicable to access ports. When the link type of a non-access port
changes to access, the loopback-detection control enable command already configured on the port
becomes invalid automatically.
Related commands: loopback-detection enable.
Examples
# Enable the loopback detection control feature on Ethernet 1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] port link-type trunk
[Sysname-Ethernet1/0/1] loopback-detection control enable
loopback-detection enable
Syntax
loopback-detection enable
undo loopback-detection enable
View
System view or Ethernet port view
Parameters
None
Description
Use the loopback-detection enable command to enable the loopback detection feature on ports to
detect whether external loopback occurs on a port.
Use the undo loopback-detection enable command to disable the loopback detection feature on port.
1)
If a loop is found on an access port, the system sets the port to the block state (where the port
cannot forward data packets), sends log messages to the terminal, and removes the corresponding
MAC forwarding entry.
1-22
z
If you have also enabled the loopback port auto-shutdown function on the port, the system shuts
down the port, and sends log messages to the terminal. After the loop is removed, you need to use
the undo shutdown command to bring up the port.
z
If you have not enabled the loopback port auto-shutdown function on the port, the port
automatically resumes the normal forwarding state after the loop is removed.
2)
If a loop is found on a trunk or hybrid port, the system merely sends log messages to the terminal
but does not set the port to the block state or remove the corresponding MAC forwarding entry.
You can also further control the loopback port by enabling one of the following function on it (note
that, the following two functions are mutually exclusive, and the latest function configured takes
effect):
z
Enable the loopback port control function on the port: the system sets the port to the block state
(where the port cannot forward data packets), sends log messages to the terminal, and removes
the corresponding MAC forwarding entry. After the loop is removed, the port automatically resumes
the normal forwarding state.
z
Enable the loopback port auto-shutdown function on the port: the system shuts down the port and
sends log messages to the terminal. After the loop is removed, the port does not automatically
resume the normal forwarding state. Instead, you need to use the undo shutdown command to
bring up the port.
The loopback detection function on a specific port can take effect only after you enable the loopback
detection function globally (in system view) and on the port (in the specified port view).
By default, the global loopback detection function is enabled if the device boots with the default
configuration file (config.def);
By default, this function is disabled. if the device boots with null configuration,
Related command: loopback-detection control enable, loopback-detection shutdown enable
Examples
# Enable the loopback detection feature on Ethernet 1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] loopback-detection enable
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] loopback-detection enable
loopback-detection interface-list enable
Syntax
loopback-detection interface-list enable
undo loopback-detection interface-list enable
1-23
View
System view
Parameter
interface-list: Ethernet port list, in the form of interface-list = { interface-type interface-number [ to
interface-type interface-number ] } &<1-10>, where
z
interface-type is the port type, and interface-number is the port number.
z
Keyword to is used to specify a range of ports. The port number after to must be equal to or greater
z
&<1-10> means that you can specify up to 10 ports or port ranges.
than that before to.
Description
Use the loopback-detection interface-list enable command to enable the loopback detection function
on a range of ports.
Use the undo loopback-detection interface-list enable command to disable the loopback detection
function on a range of ports.
z
By default, the loopback detection function is enabled on ports if the device boots with the default
configuration file (config.def);
z
if the device boots with null configuration, this function is disabled.
Example
# Enable the loopback detection function on ports Ethernet 1/0/1 through Ethernet 1/0/4.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] loopback-detection enable
[Sysname] loopback-detection Ethernet 1/0/1 to Ethernet 1/0/4 enable
loopback-detection interval-time
Syntax
loopback-detection interval-time time
undo loopback-detection interval-time
View
System view
Parameters
time: Time interval for loopback detection, in the range of 5 to 300 (in seconds). It is 30 seconds by
default.
Description
Use the loopback-detection interval-time command to set time interval for loopback detection.
Use the undo loopback-detection interval-time command to restore the default time interval.
1-24
Examples
# Set time interval for loopback detection to 10 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] loopback-detection interval-time 10
loopback-detection per-vlan enable
Syntax
loopback-detection per-vlan enable
undo loopback-detection per-vlan enable
View
Ethernet port view
Parameters
None
Description
Use the loopback-detection per-vlan enable command to configure the system to run loopback
detection on all VLANs of the current trunk or hybrid port.
Use the undo loopback-detection per-vlan enable command to restore the default setting.
By default, the system runs loopback detection only on the default VLAN of the trunk or hybrid port.
Note that, this command is not applicable to access ports. When the link type of a non-access port
changes to access, the loopback-detection per-vlan enable command already configured on the port
becomes invalid automatically.
Examples
# Configure the system to run loopback detection on all VLANs of the trunk port Ethernet 1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] port link-type trunk
[Sysname-Ethernet1/0/1] loopback-detection per-vlan enable
loopback-detection shutdown enable
Syntax
loopback-detection shutdown enable
undo loopback-detection shutdown enable
View
Ethernet port view
1-25
Parameter
None
Description
Use the loopback-detection shutdown enable command to enable the loopback port auto-shutdown
function.
Use the undo loopback-detection shutdown enable command to disable the function.
The loopback port auto-shutdown function works in conjunction with the loopback detection function
(refer to loopback-detection enable). If a loop is found at a port:
z
With the function enabled on the port, the system will shut down the port, and send log messages
to the terminal. After the loop is removed, you need to use the undo shutdown command to bring
up the port.
z
With the function disabled on the port, the system will only send log messages to the terminal, and
the port is still in the normal forwarding state.
By default, the loopback port auto-shutdown function is enabled on ports if the device boots with the
default configuration file (config.def); if the device boots with null configuration, this function is disabled.
Related command: loopback-detection enable; loopback-detection control enable.
You cannot enable both the loopback port control function (with the loopback-detection control
enable command) and the loopback port auto-shutdown function on a port. If you do so, the function
configured later will take effect.
Example
# Enable the loopback port auto-shutdown function on port Ethernet 1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] loopback-detection enable
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] loopback-detection shutdown enable
mdi
Syntax
mdi { across | auto | normal }
undo mdi
View
Ethernet port view
1-26
Parameters
across: Sets the MDI mode to medium dependent interface (MDI).
normal: Sets the MDI mode to media dependent interface-X mode (MDI-X).
auto: Sets the MDI mode to auto-sensing. Port operating in this mode adjust its MDI mode between
MDI and MDI-X automatically.
z
An RJ-45 interface can operate in MDI or MDI-X mode.
z
To connect two RJ-45 interfaces operating in the same MDI mode, use a crossover cable; to
connect two RJ-45 interfaces operating in different MDI modes, use a straight-through cable.
z
The MDI mode of an optical port is fixed to auto.
Description
Use the mdi command to set the MDI mode for a port.
Use the undo mdi command to restore the default setting.
By default, a port operates in auto-sensing MDI mode.
Examples
# Set the MDI mode of Ethernet 1/0/1 to MDI.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] mdi across
multicast-suppression
Syntax
multicast-suppression { ratio | pps max-pps }
undo multicast-suppression
View
Ethernet port view
Parameters
ratio: Maximum ratio of the multicast traffic allowed on the port to the total transmission capacity of the
port. This argument ranges from 1 to 100 (in step of 1) and defaults to 100. The smaller the ratio, the
less multicast traffic is allowed to be received.
max-pps: Maximum number of multicast packets allowed to be received per second (in pps). This
argument ranges from 1 to 148,810 (for Ethernet ports) or 1 to 262,143 (for GigabitEthernet ports).
1-27
Description
Use the multicast-suppression command to limit multicast traffic allowed to be received on the current
port.
Use the undo multicast-suppression command to restore the default multicast suppression setting on
the current port.
When incoming multicast traffic on the port exceeds the multicast traffic threshold you set, the system
drops the packets exceeding the threshold to reduce the multicast traffic ratio to the reasonable range,
so as to keep normal network service.
By default, the switch does not suppress multicast traffic.
Examples
# Allow the incoming multicast traffic on Ethernet 1/0/1 to occupy at most 20% of the transmission
capacity of the port, and suppress the multicast traffic that exceeds the specified range.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] multicast-suppression 20
# Set the maximum number of multicast packets that can be received per second by Ethernet 1/0/1 to
1,000.
[Sysname-Ethernet1/0/1] multicast-suppression pps 1000
reset counters interface
Syntax
reset counters interface [ interface-type | interface-type interface-number ]
View
User view
Parameters
interface-type: Port type.
interface-number: Port number.
For details about the parameters, see the parameter description of the interface command.
Description
Use the reset counters interface command to clear the statistics of the port, preparing for a new
statistics collection.
If you specify neither port type nor port number, the command clears statistics of all ports.
If specify only port type, the command clears statistics of all ports of this type.
If specify both port type and port number, the command clears statistics of the specified port.
Note that the statistics of the 802.1x-enabled ports cannot be cleared.
Examples
# Clear the statistics of Ethernet 1/0/1.
1-28
<Sysname> reset counters interface ethernet 1/0/1
shutdown
Syntax
shutdown
undo shutdown
View
Ethernet port view
Parameters
None
Description
Use the shutdown command to shut down an Ethernet port.
Use the undo shutdown command to bring up an Ethernet port.
By default, an Ethernet port is in up state.
Examples
# Shut down Ethernet 1/0/1 and then bring it up.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] shutdown
#Apr 13 23:13:53:600 2000 Sysname L2INF/2/PORT LINK STATUS CHANGE:- 1 Trap 1.3.6.1.6.3.1.1.5.3(linkDown): portIndex is 4227650, ifAdminStatus is 2, ifOperStatus
is 2
%Apr 13 23:13:53:807 2000 Sysname L2INF/5/PORT LINK STATUS CHANGE:- 1 Ethernet1/0/4 is DOWN
%Apr 13 23:13:53:927 2000 Sysname L2INF/5/VLANIF LINK STATUS CHANGE:- 1 Vlan-interface3 is DOWN
%Apr 13 23:13:54:057 2000 Sysname IFNET/5/UPDOWN:- 1 -Line protocol on the interface
Vlan-interface3 is DOWN
# Enable Ethernet 1/0/1.
[Sysname-Ethernet1/0/1] undo shutdown
#Apr 13 23:14:54:454 2000 Sysname L2INF/2/PORT LINK STATUS CHANGE:- 1 Trap 1.3.6.1.6.3.1.1.5.4(linkUp): portIndex is 4227650, ifAdminStatus is 1, ifOperStatus
is 1
%Apr 13 23:14:54:657 2000 Sysname L2INF/5/PORT LINK STATUS CHANGE:- 1 Ethernet1/0/4 is UP
1-29
%Apr 13 23:14:54:777 2000 Sysname L2INF/5/VLANIF LINK STATUS CHANGE:- 1 Vlan-interface3 is UP
%Apr 13 23:14:54:897 2000 Sysname IFNET/5/UPDOWN:- 1 -Line protocol on the interface
Vlan-interface3 is UP
speed
Syntax
speed { 10 | 100 | 1000 | auto }
undo speed
View
Ethernet port view
Parameters
10: Specifies the port speed to 10 Mbps.
100: Specifies the port speed to 100 Mbps.
1000: Specifies the port speed to 1,000 Mbps (only available to GigabitEthernet ports).
auto: Specifies the port speed to the auto-negotiation mode.
Description
Use the speed command to set the port speed.
Use the undo speed command to restore the port speed to the default setting.
By default, the port speed is in the auto-negotiation mode.
Note that you can only specify the 1000 and auto keyword for Gigabit Ethernet ports.
Related commands: duplex.
Examples
# Set the speed of Ethernet 1/0/1 to 10 Mbps.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] speed 10
speed auto
Syntax
speed auto [ 10 | 100 | 1000 ]*
1-30
View
Ethernet port view
Parameters
10: Configures 10 Mbps as an auto-negotiation speed of the port.
100: Configures 100 Mbps as an auto-negotiation speed of the port.
1000: Configures 1,000 Mbps as an auto-negotiation speed of the port.
Description
Use the speed auto [ 10 | 100 | 1000 ]* command to configure auto-negotiation speed(s) for the current
port.
By default, the port speed is auto-negotiated.
The last configuration will take effect if you configure the command for multiple times.
Examples
# Configure 10 Mbps and 1000 Mbps as the auto-negotiation speeds of Ethernet 1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] speed auto 10 1000
unicast-suppression
Syntax
unicast-suppression { ratio | pps max-pps }
undo unicast-suppression
View
Ethernet port view
Parameters
ratio: Maximum ratio of the unknown unicast traffic allowed on the port to the total transmission capacity
of the port. This argument ranges from 1 to 100 (in step of 1) and defaults to 100. The smaller the ratio,
the lesser unknown unicast traffic is allowed to be received.
max-pps: Maximum number of unknown unicast packets allowed to be received per second on the
Ethernet port (in pps). This argument ranges from 1 to 148,810 (for Ethernet ports) or 1 to 262,143 (for
GigabitEthernet ports).
Description
Use the unicast-suppression command to limit the unknown unicast traffic allowed to be received on
the current port.
Use the undo broadcast-suppression command to restore the default unknown unicast suppression
setting on the port.
1-31
When incoming unknown unicast traffic exceeds the unknown unicast traffic threshold you set, the
system drops the packets exceeding the threshold to reduce the unknown unicast traffic ratio to the
reasonable range, so as to keep normal network service.
By default, the switch does not suppress unknown unicast traffic.
Examples
# Allow unknown incoming unicast traffic on Ethernet 1/0/1 to occupy at most 20% of the transmission
capacity of the port, and suppress the unknown unicast traffic that exceeds the specified range.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface ethernet 1/0/1
[Sysname-Ethernet1/0/1] unicast-suppression 20
# Set the maximum number of unknown unicast packets that can be received per second by Ethernet
1/0/1 to 1,000.
[Sysname-Ethernet1/0/1] unicast-suppression pps 1000
virtual-cable-test
Syntax
virtual-cable-test
View
Ethernet port view
Parameters
None
Description
Use the virtual-cable-test command to enable the system to test the cable connected to a specific port
and to display the results. The system can test these attributes of the cable:
z
Cable status, including normal, abnormal, abnormal-open, abnormal-short and failure
z
Cable length
z
If the cable is in normal state, the displayed length value is the total length of the cable.
z
If the cable is in any other state, the displayed length value is the length from the port to the faulty
point.
z
Pair impedance mismatch
z
Pair skew
z
Pair swap
z
Pair polarity
z
Insertion loss
1-32
z
Return loss
z
Near-end crosstalk
By default, the system does not test the cable connected to the Ethernet port.
Currently, only cable status and cable length can be tested. A hyphen (-) indicates that the
corresponding test item is not supported.
Examples
# Enable the system to test the cable connected to Ethernet 1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] virtual-cable-test
Cable status: normal, 0 meter(s)
Pair Impedance mismatch: Pair skew: - ns
Pair swap: Pair polarity: Insertion loss: - db
Return loss: - db
Near-end crosstalk: - db
1-33
Table of Contents
1 Link Aggregation Configuration Commands··························································································1-1
Link Aggregation Configuration Commands ···························································································1-1
display link-aggregation interface····································································································1-1
display link-aggregation summary···································································································1-2
display link-aggregation verbose·····································································································1-3
display lacp system-id ·····················································································································1-4
lacp enable ······································································································································1-5
lacp port-priority·······························································································································1-5
lacp system-priority··························································································································1-6
link-aggregation group description ··································································································1-6
link-aggregation group mode···········································································································1-7
port link-aggregation group ·············································································································1-8
reset lacp statistics ··························································································································1-9
i
1
Link Aggregation Configuration Commands
Link Aggregation Configuration Commands
display link-aggregation interface
Syntax
display
link-aggregation
interface
interface-type
interface-number
[
to
interface-type
interface-number ]
View
Any view
Parameters
interface-type: Port type.
interface-number: Port number.
to: Specifies a port index range, with the two interface-type interface-number argument pairs around it
as the two ends.
Description
Use the display link-aggregation interface command to display the link aggregation details about a
specified port or port range.
Note that as ports in a manual link aggregation groups do not acquire the information about their peers
automatically, so the entries in the information about the peer ports displayed are all 0 instead of the
actual values.
Examples
# Display the link aggregation details on Ethernet 1/0/1.
<Sysname> display link-aggregation interface Ethernet1/0/1
Ethernet1/0/1:
Selected AggID: 1
Local:
Port-Priority: 32768, Oper key: 2, Flag: 0x45
Remote:
System ID: 0x8000, 0000-0000-0000
Port Number: 0, Port-Priority: 32768 , Oper-key: 0, Flag: 0x38
Received LACP Packets: 0 packet(s), Illegal: 0 packet(s)
Sent LACP Packets: 0 packet(s)
1-1
Table 1-1 Description on the fields of the display link-aggregation interface command
Field
Description
Selected AggID
ID of the aggregation group to which the
specified port belongs
Local
Information about the local end
Port-Priority
Port priority
Oper key
Operation key
Flag
Protocol status flag
Remote
Information about the remote end
System ID
Remote device ID
Port number
Port number
Received LACP Packets: 0 packet(s), Illegal: 0
packet(s)
Statistics about received, invalid, and sent LACP
packets
Sent LACP Packets: 0 packet(s)
display link-aggregation summary
Syntax
display link-aggregation summary
View
Any view
Parameters
None
Description
Use the display link-aggregation summary command to display summary information of all
aggregation groups.
Note that as ports in a manual link aggregation groups do not acquire the information about their peers
automatically, so the entries in the information about the peer ports displayed are all 0 instead of the
actual values.
Examples
# Display summary information of all aggregation groups.
<Sysname> display link-aggregation summary
Aggregation Group Type:D -- Dynamic, S -- Static , M -- Manual
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Actor ID: 0x8000, 000f-e20f-5104
AL
AL
ID
Type
Partner ID
Select Unselect Share Master
Ports
Ports
1-2
Type
Port
-------------------------------------------------------------------------1
S
0x8000,0000-0000-0000 0
2
M
none
1
0
NonS
1
Ethernet1/0/2
NonS
Ethernet1/0/3
Table 1-2 Description on the fields of the display link-aggregation summary command
Field
Description
Aggregation Group Type
Aggregation group type: D for dynamic, S for
static, and M for manual
Loadsharing Type
Load sharing type: Shar for load sharing and
NonS for non-load sharing
Actor ID
Local device ID
AL ID
Aggregation group ID
AL Type
Aggregation group type: D (dynamic), S (static),
or M (manual)
ID of the remote device, including the system
priority and system MAC address of the remote
device
Partner ID
For a device belonging to an dynamic
aggregation group or static aggregation group, if
no LACP packet is received, the partner ID is
displayed as 0x8000, 0000-0000-0000.
Select Ports
Number of the selected ports
Unselect Ports
Number of the unselected ports
Share Type
Load sharing type: Shar (load-sharing), or NonS
(non-load-sharing)
Master Port
the smallest port number in an aggregation
group
display link-aggregation verbose
Syntax
display link-aggregation verbose [ agg-id ]
View
Any view
Parameters
agg-id: Aggregation group ID, which ranges from 1 to 416 and must be the ID of an existing aggregation
group.
Description
Use the display link-aggregation verbose command to display the details about a specified
aggregation group or all aggregation groups.
Note that as ports in a manual link aggregation groups do not acquire the information about their peers
automatically, so the entries in the information about the peer ports displayed are all 0 instead of the
actual values.
1-3
Examples
# Display the details about aggregation group 1.
<Sysname> display link-aggregation verbose 1
Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
Flags:
A -- LACP_Activity, B -- LACP_timeout, C -- Aggregation,
D -- Synchronization, E -- Collecting, F -- Distributing,
G -- Defaulted, H -- Expired
Aggregation ID: 1,
AggregationType: Manual,
Loadsharing Type: NonS
Aggregation Description:
System ID: 0x8000, 000f-e214-000a
Port Status: S -- Selected,
U -- Unselected
Local:
Port
Status
Priority
Key
Flag
-------------------------------------------------------------------------Ethernet1/0/2
S
32768
1
{}
Ethernet1/0/3
U
32768
1
{}
Remote:
Actor
Partner Priority Key
SystemID
Flag
-------------------------------------------------------------------------Ethernet1/0/2
0
0
0
0x0000,0000-0000-0000 {}
Ethernet1/0/3
0
0
0
0x0000,0000-0000-0000 {}
Table 1-3 Description on the fields of the display link-aggregation verbose command
Field
Description
Loadsharing Type
Loadsharing type, including Loadsharing and
Non-Loadsharing
Flags
Flag types of LACP
Aggregation ID
Aggregation group ID
Aggregation Description
Aggregation group description string
AggregationType
Aggregation group type
System ID
Device ID
Port Status
Port status, including selected and unselected
display lacp system-id
Syntax
display lacp system-id
View
Any view
1-4
Parameters
None
Description
Use the display lacp system-id command to display the device ID of the local system, including the
system priority and the MAC address.
Examples
# Display the device ID of the local system.
<Sysname> display lacp system-id
Actor System ID: 0x8000, 000f-e20f-0100
The value of the Actor System ID field is the device ID.
lacp enable
Syntax
lacp enable
undo lacp enable
View
Ethernet port view
Parameters
None
Description
Use the lacp enable command to enable LACP on the current port.
Use the undo lacp enable command to disable LACP.
By default, LACP is disabled on a port.
Examples
# Enable the LACP protocol on Ethernet 1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet1/0/1
[Sysname-Ethernet1/0/1] lacp enable
lacp port-priority
Syntax
lacp port-priority port-priority
undo lacp port-priority
View
Ethernet port view
1-5
Parameters
port-priority: Port priority, ranging from 0 to 65,535.
Description
Use the lacp port-priority command to set the priority of the current port.
Use the undo lacp port-priority command to restore the default port priority.
By default, the port priority is 32,768.
You can use the display link-aggregation verbose command or the display link-aggregation
interface command to check the configuration result.
Examples
# Set the priority of Ethernet 1/0/1 to 64.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet1/0/1
[Sysname-Ethernet1/0/1] lacp port-priority 64
lacp system-priority
Syntax
lacp system-priority system-priority
undo lacp system-priority
View
System view
Parameters
system-priority: System priority, ranging from 0 to 65,535.
Description
Use the lacp system-priority command to set the system priority.
Use the undo lacp system-priority command to restore the default system priority.
By default, the system priority is 32,768.
Examples
# Set the system priority to 64.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] lacp system-priority 64
link-aggregation group description
Syntax
link-aggregation group agg-id description agg-name
1-6
undo link-aggregation group agg-id description
View
System view
Parameters
agg-id: Aggregation group ID, in the range of 1 to 416.
agg-name: Aggregation group name, a string of 1 to 32 characters.
Description
Use the link-aggregation group description command to set a description for an aggregation group.
Use the undo link-aggregation group description command to remove the description of an
aggregation group.
If you have saved the current configuration with the save command, after system reboot, the
configuration concerning manual and static aggregation groups and their descriptions still exists, but
that of the dynamic aggregation groups and their descriptions gets lost.
You can use the display link-aggregation verbose command to check the configuration result.
Examples
# Set the description abc for aggregation group 1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] link-aggregation group 1 description abc
link-aggregation group mode
Syntax
link-aggregation group agg-id mode { manual | static }
undo link-aggregation group agg-id
View
System view
Parameters
agg-id: Aggregation group ID, in the range of 1 to 416.
manual: Creates a manual aggregation group.
static: Creates a static aggregation group.
1-7
Description
Use the link-aggregation group mode command to create a manual or static aggregation group.
Use the undo link-aggregation group command to remove the specified aggregation group.
Related commands: display link-aggregation summary.
Examples
# Create manual aggregation group 22
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] link-aggregation group 22 mode manual
port link-aggregation group
Syntax
port link-aggregation group agg-id
undo port link-aggregation group
View
Ethernet port view
Parameters
agg-id: Aggregation group ID, in the range of 1 to 416.
Description
Use the port link-aggregation group command to add the current Ethernet port to a manual or static
aggregation group.
Use the undo port link-aggregation group command to remove the current Ethernet port from the
aggregation group.
Related commands: display link-aggregation verbose.
Examples
# Add Ethernet 1/0/1 to aggregation group 22.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet1/0/1
[Sysname-Ethernet1/0/1] port link-aggregation group 22
1-8
reset lacp statistics
Syntax
reset lacp statistics [ interface interface-type interface-number [ to interface-type interface-number ] ]
View
User view
Parameters
interface-type: Port type
interface-number: Port number
to: Specifies a port index range, with the two interface-type interface-number argument pairs around it
as the two ends.
Description
Use the reset lacp statistics command to clear LACP statistics on specified port(s), or on all ports if no
port is specified.
Related commands: display link-aggregation interface.
Examples
# Clear LACP statistics on all Ethernet ports.
<Sysname> reset lacp statistics
1-9
Table of Contents
1 Port Isolation Configuration Commands ································································································1-1
Port Isolation Configuration Commands ·································································································1-1
display isolate port···························································································································1-1
port isolate ·······································································································································1-1
i
1
Port Isolation Configuration Commands
Port Isolation Configuration Commands
display isolate port
Syntax
display isolate port
View
Any view
Parameters
None
Description
Use the display isolate port command to display the Ethernet ports assigned to the isolation group.
Examples
# Display the Ethernet ports added to the isolation group.
<Sysname> display isolate port
Isolated port(s) on UNIT 1:
Ethernet1/0/2, Ethernet1/0/3, Ethernet1/0/4
The information above shows that Ethernet1/0/2, Ethernet1/0/3, and Ethernet1/04 are in the isolation
group. Neither Layer-2 nor Layer-3 packets can be exchanged between these ports.
port isolate
Syntax
port isolate
undo port isolate
View
Ethernet port view
Parameters
None
Description
Use the port isolate command to assign the Ethernet port to the isolation group.
Use the undo port isolate command to remove the Ethernet port from the isolation group.
1-1
z
Assigning or removing an aggregation member port to or from the isolation group can cause the
other ports in the aggregation group join or leave the isolation group.
z
For ports that belong to an aggregation group and an isolation group simultaneously, removing a
port from the aggregation group has no effect on the other ports. That is, the rest ports remain in
the aggregation group and the isolation group.
z
Ports that belong to an aggregation group and the isolation group simultaneously are still isolated
after they are removed from the aggregation group (in system view).
z
Assigning an isolated port to an aggregation group causes all the ports in the aggregation group on
the local unit to join the isolation group.
z
The S4500 series Ethernet switches support cross-device port isolation if XRN fabric is enabled.
By default, the isolation group contains no port.
Examples
# Assign Ethernet 1/0/1 and Ethernet 1/0/2 to the isolation group.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface ethernet1/0/1
[Sysname-Ethernet1/0/1] port isolate
[Sysname-Ethernet1/0/1] quit
[Sysname] interface ethernet1/0/2
[Sysname-Ethernet1/0/2] port isolate
After the configuration, packets cannot be exchanged between Ethernet 1/0/1 and Ethernet 1/0/2.
# Remove Ethernet 1/0/1 from the isolation group.
[Sysname-Ethernet1/0/1] undo port isolate
1-2
Table of Contents
1 Port Security Commands··························································································································1-1
Port Security Commands ························································································································1-1
display mac-address security ··········································································································1-1
display port-security·························································································································1-2
mac-address security ······················································································································1-5
port-security authorization ignore ····································································································1-6
port-security enable ·························································································································1-7
port-security guest-vlan ···················································································································1-8
port-security intrusion-mode ············································································································1-9
port-security max-mac-count·········································································································1-11
port-security ntk-mode···················································································································1-12
port-security oui ·····························································································································1-13
port-security port-mode ·················································································································1-14
port-security timer autolearn··········································································································1-17
port-security timer disableport ·······································································································1-18
port-security timer guest-vlan-reauth·····························································································1-19
port-security trap····························································································································1-19
i
1
Port Security Commands
Port Security Commands
display mac-address security
Syntax
display mac-address security [ interface interface-type interface-number ] [ vlan vlan-id ] [ count ]
View
Any view
Parameters
Interface interface-type interface-number: Specify a port by its type and number, of which the security
MAC address information is to be displayed.
vlan vlan-id: Specify a VLAN by its ID, of which the security MAC address information is to be displayed.
The value range for the vlan-id argument is 1 to 4094.
count: Displays the number of matching security MAC addresses.
Description
Use the display mac-address security command to display security MAC address entries.
If no argument is specified, the command displays information about all security MAC address entries.
For each security MAC address entry, the output of the command displays the MAC address, the VLAN
that the MAC address belongs to, state of the MAC address (which is always security), port associated
with the MAC address, and the remaining lifetime of the entry.
By checking the output of this command, you can verify the current configuration.
Examples
# Display information about all security MAC address entries.
<Sysname> display mac-address security
MAC ADDR
VLAN ID
STATE
PORT INDEX
0000-0000-0001
1
Security
Ethernet1/0/20
NOAGED
0000-0000-0002
1
Security
Ethernet1/0/20
NOAGED
0000-0000-0003
1
Security
Ethernet1/0/20
NOAGED
0000-0000-0004
1
Security
Ethernet1/0/20
NOAGED
0000-0000-0001
2
Security
Ethernet1/0/22
NOAGED
0000-0000-0007
2
Security
Ethernet1/0/22
NOAGED
---
6 mac address(es) found
AGING TIME(s)
---
# Display the security MAC address entries for port Ethernet 1/0/20.
<Sysname> display mac-address security interface Ethernet 1/0/20
1-1
MAC ADDR
VLAN ID
STATE
PORT INDEX
0000-0000-0001
1
Security
Ethernet1/0/20
NOAGED
0000-0000-0002
1
Security
Ethernet1/0/20
NOAGED
0000-0000-0003
1
Security
Ethernet1/0/20
NOAGED
0000-0000-0004
1
Security
Ethernet1/0/20
NOAGED
---
AGING TIME(s)
4 mac address(es) found on port Ethernet1/0/20 ---
# Display the security MAC address entries for VLAN 1.
<Sysname> display mac-address security vlan 1
MAC ADDR
VLAN ID
STATE
PORT INDEX
0000-0000-0001
1
Security
Ethernet1/0/20
NOAGED
0000-0000-0002
1
Security
Ethernet1/0/20
NOAGED
0000-0000-0003
1
Security
Ethernet1/0/20
NOAGED
0000-0000-0004
1
Security
Ethernet1/0/20
NOAGED
---
AGING TIME(s)
4 mac address(es) found in vlan 1 ---
# Display the total number of security MAC address entries.
<Sysname> display mac-address security count
6 mac address(es) found
# Display the number of security MAC address entries for VLAN 1.
<Sysname> display mac-address security vlan 1 count
4 mac address(es) found in vlan 1
Table 1-1 Description on the fields of the display mac-address security command
Field
Description
MAC ADDR
Security MAC address
VLAN ID
VLAN that the MAC address belongs to
STATE
MAC address type, which is always security for a security
MAC address
PORT INDEX
Port associated with the MAC address
AGING TIME(s)
Remaining lifetime of the MAC address entry
mac address(es) found
Number of matching security MAC addresses
display port-security
Syntax
display port-security [ interface interface-list ]
View
Any view
Parameters
interface interface-list: Specify a list of Ethernet ports of which the port security configurations are to be
displayed. For the interface-list argument, you can specify individual ports and port ranges. An
1-2
individual port takes the form of interface-type interface-number and a port range takes the form of
interface-type interface-number1 to interface-type interface-number2, with interface-number2 taking a
value greater than interface-number1. The total number of individual ports and port ranges defined in
the list must not exceed 10.
Description
Use the display port-security command to display port security configurations.
If no interface is specified, the command displays the port security configurations of all Ethernet ports.
The output of the command includes the global configurations (such as whether port security is enabled
on the switch and whether the sending of specified Trap messages is enabled) and port configurations
(such as the security mode and the port security features).
By checking the output of this command, you can verify the current configuration.
Examples
# Display the global port security configurations and those of all ports.
<Sysname> display port-security
Equipment port-security is enabled
AddressLearn trap is Enabled
Intrusion trap is Enabled
Dot1x logon trap is Enabled
Dot1x logoff trap is Enabled
Dot1x logfailure trap is Enabled
RALM logon trap is Enabled
RALM logoff trap is Enabled
RALM logfailure trap is Enabled
Disableport Timeout: 20 s
OUI value:
Index is 5,
OUI value is 000100
Ethernet1/0/1 is link-up
Port mode is AutoLearn
NeedtoKnow mode is needtoknowonly
Intrusion mode is BlockMacaddress
Max mac-address num is 4
Stored mac-address num is 0
Authorization is ignore
(The rest of the information is omitted.)
# Display the port security configurations of ports Ethernet 1/0/1 to Ethernet 1/0/3.
<Sysname> display port-security interface Ethernet 1/0/1 to Ethernet 1/0/3
Ethernet1/0/1 is link-up
Port mode is AutoLearn
NeedtoKnow mode is needtoknowonly
Intrusion mode is BlockMacaddress
Max mac-address num is 4
Stored mac-address num is 0
Authorization is ignore
Ethernet1/0/2 is link-down
1-3
Port mode is AutoLearn
NeedtoKnow mode is disabled
Intrusion mode is no action
Max mac-address num is not configured
Stored mac-address num is 0
Authorization is ignore
Ethernet1/0/3 is link-down
Port mode is AutoLearn
NeedtoKnow mode is disabled
Intrusion mode is BlockMacaddress
Max mac-address num is not configured
Stored mac-address num is 0
Authorization is ignore
Table 1-2 Description on the fields of the display port-security command
Field
Description
Equipment port security is enabled
Port security is enabled on the switch.
AddressLearn trap is Enabled
The sending of address-learning trap messages
is enabled.
Intrusion trap is Enabled
The sending of intrusion-detection trap
messages is enabled.
Dot1x logon trap is Enabled
The sending of 802.1x user authentication
success trap messages is enabled.
Dot1x logoff trap is Enabled
The sending of 802.1x user logoff trap messages
is enabled.
Dot1x logfailure trap is Enabled
The sending of 802.1x user authentication failure
trap messages is enabled.
RALM logon trap is Enabled
The sending of MAC-based authentication
success trap messages is enabled.
RALM logoff trap is Enabled
The sending of logoff trap messages for
MAC-based authenticated users is enabled.
RALM logfailure trap is Enabled
The sending of MAC-based authentication
failure trap messages is enabled.
Disableport Timeout: 20 s
The temporary port-disabling time is 20 seconds.
OUI value
The next line displays OUI value.
Index
OUI index
Ethernet1/0/1 is link-up
The link status of port Ethernet 1/0/1 is up.
Port mode is AutoLearn
The security mode of the port is autolearn.
NeedtoKnow mode is needtoknowonly
The NTK (Need To Know) mode is ntkonly.
Intrusion mode is BlockMacaddress
The intrusion detection mode is
BlockMacaddress.
Max mac-address num is 4
The maximum number of MAC addresses
allowed on the port is 4.
Stored mac-address num is 0
No MAC address is stored.
1-4
Field
Description
Authorization information delivered by the
Remote Authentication Dial-In User Service
(RADIUS) server will not be applied to the port.
Authorization is ignore
mac-address security
Syntax
In system view:
mac-address security mac-address interface interface-type interface-number vlan vlan-id
undo mac-address security [ [ mac-address [ interface interface-type interface-number ] ] vlan
vlan-id ]
In Ethernet port view:
mac-address security mac-address vlan vlan-id
undo mac-address security [ [ mac-address ] vlan vlan-id ]
View
System view, Ethernet port view
Parameters
mac-address: Security MAC address, in the H-H-H format.
interface interface-type interface-number: Specify the port on which the security MAC address is to be
added. The interface-type interface-number arguments indicate the port type and port number.
vlan vlan-id: Specify the VLAN to which the MAC address belongs. The vlan-id argument specifies a
VLAN ID in the range 1 to 4094.
Description
Use the mac-address security command to create a security MAC address entry.
Use the undo mac-address security command to remove a security MAC address.
By default, no security MAC address entry is configured.
z
The mac-address security command can be configured successfully only when port security is
enabled and the security mode is autolearn.
z
To create a security MAC address entry successfully, you must make sure that the specified VLAN
is carried on the specified port.
1-5
Examples
# Enable port security; configure the port security mode of Ethernet 1/0/1 as autolearn and create a
security MAC address entry for 0001-0001-0001, setting the associated port to Ethernet 1/0/1 and
assigning the MAC address to VLAN 1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] port-security enable
[Sysname] interface Ethernet1/0/1
[Sysname-Ethernet1/0/1] port-security max-mac-count 100
[Sysname-Ethernet1/0/1] port-security port-mode autolearn
[Sysname-Ethernet1/0/1] mac-address security 0001-0001-0001 vlan 1
# Use the display mac-address interface command to verify the configuration result.
[Sysname]display mac-address interface Ethernet 1/0/1
MAC ADDR
VLAN ID
STATE
0001-0001-0001
1
Security
---
PORT INDEX
Ethernet1/0/1
AGING TIME(s)
NOAGED
1 mac address(es) found on port Ethernet1/0/1 ---
port-security authorization ignore
Syntax
port-security authorization ignore
undo port-security authorization ignore
View
Ethernet port view
Parameters
None
Description
Use the port-security authorization ignore command to configure the port to ignore the authorization
information delivered by the RADIUS server.
Use the undo port-security authorization ignore command to restore the default configuration.
By default, the port uses (does not ignore) the authorization information delivered by the RADIUS
server.
You can use the display port-security command to check whether the port will use the authorization
information delivered by the RADIUS server.
1-6
After a RADIUS user passes authentication, the RADIUS server authorizes the attributes configured for
the user account such as the dynamic VLAN configuration. For more information, refer to AAA
Command.
Examples
# Configure Ethernet 1/0/2 to ignore the authorization information delivered by the RADIUS server.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/2
[Sysname-Ethernet1/0/2] port-security authorization ignore
port-security enable
Syntax
port-security enable
undo port-security enable
View
System view
Parameters
None
Description
Use the port-security enable command to enable port security.
Use the undo port-security enable command to disable port security.
By default, port security is disabled.
Enabling port security resets the following configurations on the ports to the defaults (as shown in
parentheses below):
z
802.1x (disabled), port access control method (macbased), and port access control mode (auto)
z
MAC authentication (disabled)
In addition, you cannot perform the above-mentioned configurations manually because these
configurations change with the port security mode automatically.
Related commands: display port-security.
1-7
Examples
# Enable port security.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] port-security enable
Notice: The port-control of 802.1x will be restricted to auto when port-security is enabled.
Please wait... Done.
port-security guest-vlan
Syntax
port-security guest-vlan vlan-id
undo port-security guest-vlan
View
Ethernet port view
Parameters
vlan-id: Specifies a guest VLAN by its VLAN ID in the range of 1 to 4094. The VLAN must already exist.
Description
Use the port-security guest-vlan command to specify an existing VLAN as the guest VLAN of a port.
Use the undo port-security guest-vlan command to remove the guest VLAN configuration.
By default, no guest VLAN is specified for a port.
Note that:
z
Only an existing VLAN can be specified as a guest VLAN. Make sure the guest VLAN of the port
contain the resources that the users need.
z
If one user of the port has passed or is undergoing authentication, you cannot specify a guest
VLAN for it.
z
When a user using a port with a guest VLAN specified fail the authentication, the port is added to
the guest VLAN and users of the port can access only the resources in the guest VLAN.
z
Multiple users may connect to one port in the macAddressOrUserLoginSecure
mode for
authentication; however, after a guest VLAN is specified, a maximum of one user can pass the
security authentication. In this case, the authentication client software of the other 802.1x users
displays messages about the failure; MAC address authentication does not have any client
software and therefore no such messages will be displayed.
z
To change the security mode from macAddressOrUserLoginSecure mode of a port that is
assigned to a guest VLAN, execute the undo port-security guest-vlan command first to remove
the guest VLAN configuration.
z
For a port configured with both the port-security guest-vlan and port-security intrusion-mode
disableport commands, when authentication of a user fails, only the intrusion detection feature is
triggered. The port is not added to the specified guest VLAN.
z
It is not recommended to configure the port-security guest-vlan and port-security
intrusion-mode blockmac commands simultaneously for a port. Because when the
1-8
authentication of a user fails, the blocking MAC address feature will be triggered and packets of the
user will be dropped, making the user unable to access the guest VLAN.
Examples
# Set the security mode of port Ethernet 1/0/1 to macAddressOrUserLoginSecure, and specify VLAN
100 as the guest VLAN of the port.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] port-security port-mode userlogin-secure-or-mac
[Sysname-Ethernet1/0/1] port-security guest-vlan 100
port-security intrusion-mode
Syntax
port-security intrusion-mode { blockmac | disableport | disableport-temporarily }
undo port-security intrusion-mode
View
Ethernet port view
Parameters
blockmac: Adds the source MAC addresses of illegal packets to the blocked MAC address list. As a
result, the packets sourced from the blocked MAC addresses will be filtered out. A blocked MAC
address will be unblocked three minutes (not user configurable) after the block action.
disableport: Disables a port permanently once an illegal frame or event is detected on it.
disableport-temporarily: Disables a port for a specified period of time after an illegal frame or event is
detected on it. You can set the period with the port-security timer disableport command.
Description
Use the port-security intrusion-mode command to set intrusion protection.
Use the undo port-security intrusion-mode command to disable intrusion protection.
By default, intrusion protection is not configured.
By checking the source MAC addresses in inbound data frames or the username and password in
802.1x authentication requests on a port, intrusion protection detects illegal packets (packets with
illegal MAC address) or events and takes a pre-set action accordingly. The actions you can set include:
disconnecting the port temporarily/permanently and blocking packets with invalid MAC addresses.
The following cases can trigger intrusion protection on a port:
1-9
A packet with unknown source MAC address is received on the port while MAC address learning is
z
disabled on the port.
A packet with unknown source MAC address is received on the port while the amount of security
z
MAC addresses on the port has reached the preset maximum number.
The user fails the 802.1x or MAC address authentication.
z
After executing the port-security intrusion-mode blockmac command, you can only use the display
port-security command to view blocked MAC addresses.
Related commands: display port-security, port-security timer disableport.
Examples
# Configure the intrusion protection mode on Ethernet 1/0/1 as blockmac.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] port-security intrusion-mode blockmac
# Display information about blocked MAC addresses after intrusion protection is triggered.
<Sysname> display port-security
Equipment port-security is enabled
AddressLearn trap is Enabled
Intrusion trap is Enabled
Dot1x logon trap is Enabled
Dot1x logoff trap is Enabled
Dot1x logfailure trap is Enabled
RALM logon trap is Enabled
RALM logoff trap is Enabled
RALM logfailure trap is Enabled
Disableport Timeout: 20 s
OUI value:
Index is 5,
OUI value is 000100
Blocked Mac info:
MAC ADDR
From Port
Vlan
--- On unit 1, 2 blocked mac address(es) found. --0000-0000-0003
Ethernet1/0/1
1
0000-0000-0004
Ethernet1/0/1
1
--- 2 blocked mac address(es) found. --Ethernet1/0/1 is link-up
Port mode is Secure
NeedtoKnow mode is disabled
Intrusion mode is BlockMacaddress
Max mac-address num is 2
Stored mac-address num is 2
Authorization is permit
For description on the output information, refer to Table 1-2.
1-10
# Configure the intrusion protection mode on Ethernet 1/0/1 as disableport-temporarily. As a result,
the port will be disconnected when intrusion protection is triggered and then re-enabled 30 seconds
later.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] port-security timer disableport 30
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] port-security intrusion-mode disableport-temporarily
# Configure the intrusion protection mode on Ethernet 1/0/1 as disableport. As a result, when intrusion
protection is triggered, the port will be disconnected permanently.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] port-security intrusion-mode disableport
You can bring up a port that has been permanently disabled by running the undo shutdown command
or disabling port security on the port.
port-security max-mac-count
Syntax
port-security max-mac-count count-value
undo port-security max-mac-count
View
Ethernet port view
Parameters
count-value: Maximum number of MAC addresses allowed on the port, in the range of 1 to 1024.
Description
Use the port-security max-mac-count command to set the maximum number of MAC addresses
allowed on the port.
Use the undo port-security max-mac-count command to cancel this limit.
By default, there is no limit on the number of MAC addresses allowed on the port.
1-11
By configuring the maximum number of MAC addresses allowed on a port, you can:
z
Limit the number of users accessing the network through the port.
z
Limit the number of security MAC addresses that can be added on the port.
When the maximum number of MAC addresses allowed on a port is reached, the port will not allow
more users to access the network through this port.
z
The port-security max-mac-count command is irrelevant to the maximum number of MAC
addresses that can be learned on a port configured in MAC address management.
z
When there are online users on a port, you cannot perform the port-security max-mac-count
command on the port.
Examples
# Set the maximum number of MAC addresses allowed on the port to 100.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] port-security enable
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] port-security max-mac-count 100
port-security ntk-mode
Syntax
port-security ntk-mode { ntkonly | ntk-withbroadcasts | ntk-withmulticasts }
undo port-security ntk-mode
View
Ethernet port view
Parameters
ntkonly: Allows the port to transmit only unicast packets with successfully-authenticated destination
MAC addresses.
ntk-withbroadcasts: Allows the port to transmit broadcast packets and unicast packets with
successfully-authenticated destination MAC addresses.
ntk-withmulticasts: Allows the port to transmit multicast packets, broadcast packets and unicast
packets with successfully-authenticated destination MAC addresses.
Description
Use the port-security ntk-mode command to configure the NTK feature on the port.
1-12
Use the undo port-security ntk-mode command to restore the default setting.
Be default, NTK is disabled on a port, namely all frames are allowed to be sent.
By checking the destination MAC addresses of the data frames to be sent from a port, the NTK feature
ensures that only successfully authenticated devices can obtain data frames from the port, thus
preventing illegal devices from intercepting network data.
Examples
# Set the NTK feature to ntk-withbroadcasts on Ethernet 1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] port-security enable
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] port-security ntk-mode ntk-withbroadcasts
port-security oui
Syntax
port-security oui OUI-value index index-value
undo port-security oui index index-value
View
System view
Parameters
OUI-value: OUI value. You can input a 48-bit MAC address in the form of H-H-H for this argument and
the system will take the first 24 bits as the OUI value and ignore the rest.
index-value: OUI index, ranging from 1 to 16.
The organizationally unique identifiers (OUIs) are assigned by the IEEE to different vendors. Each OUI
uniquely identifies an equipment vendor in the world and is the higher 24 bits of a MAC address.
Description
Use the port-security oui command to set an OUI value for authentication.
Use the undo port-security oui command to cancel the OUI value setting.
1-13
By default, no OUI value is set for authentication.
The OUI value set by this command takes effect only when the security mode of the port is set to
z
userLoginWithOUI by the port-security port-mode command.
The OUI value set by this command cannot be a multicast MAC address.
z
Related commands: port-security port-mode.
Examples
# Configure an OUI value of 00ef-ec00-0000, setting the OUI index to 5.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] port-security oui 00ef-ec00-0000 index 5
port-security port-mode
Syntax
port-security port-mode { autolearn | mac-and-userlogin-secure | mac-and-userlogin-secure-ext
| mac-authentication | mac-else-userlogin-secure | mac-else-userlogin-secure-ext | secure |
userlogin
|
userlogin-secure
|
userlogin-secure-ext
|
userlogin-secure-or-mac
userlogin-secure-or-mac-ext | userlogin-withoui }
undo port-security port-mode
View
Ethernet port view
Parameters
Table 1-3 shows the description on the security mode keywords.
Table 1-3 Keyword description
Keyword
autolearn
Security mode
Description
In this mode, a port can learn a specified
number of MAC addresses and save those
addresses as security MAC addresses. It
permits only packets whose source MAC
addresses are the security MAC addresses
that were learned or configured manually.
autolearn
When the number of security MAC addresses
reaches the upper limit configured by the
port-security max-count command, the port
changes to work in secure mode and no more
MAC addresses can be added to the port.
1-14
|
Keyword
mac-and-userlogin-sec
ure
Security mode
Description
macAddressAndUser
LoginSecure
In this mode, users trying to assess the
network through the port must first pass MAC
address authentication and then 802.1x
authentication.
In this mode, only one user can access the
network through the port at a time.
mac-and-userlogin-sec
ure-ext
macAddressAndUser
LoginSecureExt
This mode is similar to the
macAddressAndUserLoginSecure mode,
except that in this mode, more than one user
can access the network through the port in this
mode.
mac-authentication
macAddressWithRad
ius
In this mode, MAC address authentication is
applied on users trying to access the network.
mac-else-userlogin-se
cure
mac-else-userlogin-se
cure-ext
secure
macAddressElseUse
rLoginSecure
macAddressElseUse
rLoginSecureExt
In this mode, MAC address authentication is
first applied on users. If the authentication
succeeds, the users can access the network
successfully. If not, 802.1x authentication is
applied.
In this mode, only one 802.1x-authenticated
user can access the network through the port.
But at the same time, there can be more than
one MAC-address-authenticated user on the
port.
This mode is similar to the
macAddressElseUserLoginSecure mode,
except that in this mode, there can be more
than one 802.1x-authenticated user on the
port.
In this mode, MAC address learning is
disabled on the port. The port permits packets
whose source MAC addresses are static and
dynamic MAC addresses that were configured
manually.
secure
When the port mode changes from autolearn
to secure, the security MAC addresses that
were learned in the autolearn mode are
permitted to pass through the port.
userlogin
In this mode, 802.1x authentication is applied
on users trying to access the network through
the current port.
userlogin
In this mode, MAC-based 802.1x
authentication is applied on users trying to
access the network through the port. The port
will be enabled when the authentication
succeeds and allow packets from
authenticated users to pass through.
userlogin-secure
userLoginSecure
In this mode, only one 802.1x-authenticated
user can access the network through the port.
When the security mode of the port changes
from noRestriction to this mode, the old
dynamic MAC address entries and
authenticated MAC address entries kept on
the port are deleted automatically.
1-15
Keyword
userlogin-secure-ext
Security mode
Description
userLoginSecureExt
This mode is similar to the userLoginSecure
mode, except that in this mode, there can be
more than one 802.1x-authenticated user on
the port.
MAC address authentication and 802.1x
authentication can coexist on a port, with
802.1x authentication having higher priority.
userlogin-secure-or-m
ac
macAddressOrUserL
oginSecure
802.1x authentication can be applied on users
who have already passed MAC address
authentication.
However, users who have already passed
802.1x authentication do not need to go
through MAC address authentication.
In this mode, only one 802.1x-authenticated
user can access the network through the port.
However, there can be more than one
MAC-address-authenticated user on the port.
userlogin-secure-or-m
ac-ext
userlogin-withoui
macAddressOrUserL
oginSecureExt
userLoginWithOUI
This mode is similar to the
macAddressOrUserLoginSecure mode,
except that in this mode, there can be more
than one 802.1x-authenticated user on the
port.
Similar to the userLoginSecure mode, in this
mode, there can be only one
802.1x-authenticated user on the port.
However, the port also allows packets with the
OUI address to pass through.
When the security mode of the port changes
from noRestriction to this mode, the old
dynamic MAC address entries and
authenticated MAC address entries kept on
the port are deleted automatically.
Description
Use the port-security port-mode command to set the security mode of the port.
Use the undo port-security port-mode command to restore the default mode.
By default, the port is in the noRestriction mode, namely access to the port is not restricted.
1-16
z
Before setting the security mode to autolearn, you need to use the port-security max-mac-count
command to configure the maximum number of MAC addresses allowed on the port.
z
When a port operates in the autolearn mode, you cannot change the maximum number of MAC
addresses allowed on the port.
z
After setting the security mode to autolearn, you cannot configure static or blackhole MAC
addresses on the port.
z
When the port security mode is not noRestriction, you need to use the undo port-security
port-mode command to change it back to noRestriction before you change the port security
mode to other modes.
On a port configured with a security mode, you cannot do the following:
z
Configure the maximum number of MAC addresses that can be learned.
z
Configure the port as a reflector port for port mirroring.
z
Configure the port as a Fabric port.
z
Configure link aggregation.
Related commands: display port-security.
Examples
# Set the security mode of Ethernet 1/0/1 on the switch to userLogin.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] port-security enable
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] port-security port-mode userlogin
port-security timer autolearn
Syntax
port-security timer autolearn age
undo port-security timer autolearn
View
System view
Parameters
age: Aging time of the security MAC address entries, in the range 1 to 30240 minutes.
Description
Use the port-security timer autolearn command to configure the aging time for the security MAC
address entries that are learned by the port automatically.
Use the undo port-security timer autolearn command to restore the default.
By default, the aging time is 0, that is, the security MAC address entries are not aged.
1-17
After you execute the port-security timer autolearn command, you can display security MAC address
entries by the display mac-address security command. Though the aging time field displayed has a
value of "NOAGED", the aging of security MAC address entries is enabled already.
Examples
# Set the security mode to autolearn, the maximum number of MAC address entries allowed on the
port to 4, and the aging time for the learned security MAC address entries to 10 minutes.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] port-security timer autolearn 10
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] port-security max-mac-count 4
[Sysname-Ethernet1/0/1] port-security port-mode autolearn
port-security timer disableport
Syntax
port-security timer disableport timer
undo port-security timer disableport
View
System view
Parameters
timer: This argument ranges from 20 to 300, in seconds.
Description
Use the port-security timer disableport command to set the time during which the system temporarily
disables a port.
Use undo port-security timer disableport command restore the default time.
By default, the system disables a port for 20 seconds.
The port-security timer disableport command is used in conjunction with the port-security
intrusion-mode disableport-temporarily command to set the length of time during which the port
remains disabled.
1-18
Related commands: port-security intrusion-mode.
Examples
# Set the intrusion protection mode on Ethernet 1/0/1 to disableport-temporarily. It is required that
when intrusion protection is triggered, the port be shut down temporarily and then go up 30 seconds
later.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] port-security timer disableport 30
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] port-security intrusion-mode disableport-temporarily
port-security timer guest-vlan-reauth
Syntax
port-security timer guest-vlan-reauth interval
undo port-security timer guest-vlan-reauth
View
System view
Parameters
interval: Time period in the range of 1 to 3600, in seconds.
Description
Use the port-security timer guest-vlan-reauth command to configure the interval at which the switch
triggers MAC address authentication after a port is added to its guest VLAN.
Use the undo port-security timer guest-vlan-reauth command to restore the default.
By default, the switch triggers MAC address authentication at intervals of 30 seconds.
At a certain interval, the switch uses the first MAC address learned in the guest VLAN to trigger MAC
address authentication. If the authentication succeeds, the port leaves the guest VLAN.
Examples
# Configure the switch to trigger MAC address authentication at intervals of 60 seconds.
<Sysname> system-view
[Sysname] port-security timer guest-vlan-reauth 60
port-security trap
Syntax
port-security trap { addresslearned | dot1xlogfailure | dot1xlogoff | dot1xlogon | intrusion |
ralmlogfailure | ralmlogoff | ralmlogon }
undo port-security trap { addresslearned | dot1xlogfailure | dot1xlogoff | dot1xlogon | intrusion |
ralmlogfailure | ralmlogoff | ralmlogon }
1-19
View
System view
Parameters
addresslearned: Enables/disables sending traps for MAC addresses learning events.
dot1xlogfailure: Enables/disables sending traps for 802.1x authentication failures.
dot1xlogoff: Enables/disables sending traps for 802.1x-authenticated user logoff events.
dot1xlogon: Enables/disables sending traps for 802.1x-authenticated user logon events.
intrusion: Enables/disables sending traps for detections of intrusion packets.
ralmlogfailure: Enables/disables sending traps for MAC authentication failures.
ralmlogoff: Enables/disables sending traps for MAC-authenticated user logoff events.
ralmlogon: Enables/disables sending traps for MAC-authenticated user logon events.
RADIUS authenticated login using MAC-address (RALM) refers to MAC-based RADIUS authentication.
Description
Use the port-security trap command to enable the sending of specified type(s) of trap messages.
Use the undo port-security trap command to disable the sending of specified type(s) of trap
messages.
By default, the system disables the sending of any types of trap messages.
This command is based on the device tracking feature, which enables the switch to send trap messages
when special data packets (generated by illegal intrusion, abnormal user logon/logoff, or other special
activities) are passing through a port, so as to help the network administrator to monitor special
activities.
When you use the display port-security command to display global information, the system will
display which types of trap messages are allowed to send.
Related commands: display port-security.
Examples
# Allow the sending of intrusion packet-detected trap messages.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] port-security trap intrusion
1-20
# Use the display port-security command to display the related configuration information.
<Sysname> display port-security
Equipment port-security is enabled
Intrusion trap is Enabled
Disableport Timeout: 20 s
OUI value:
Ethernet1/0/1 is link-down
Port mode is AutoLearn
NeedtoKnow mode is needtoknowonly
Intrusion mode is disableportTemporarily
Max mac-address num is 4
Stored mac-address num is 0
Authorization is ignore
The rest of the information is omitted, if any.
For description of the output information, refer to Table 1-2.
1-21
Table of Contents
1 DLDP Configuration Commands··············································································································1-1
DLDP Configuration Commands·············································································································1-1
display dldp······································································································································1-1
dldp ··················································································································································1-2
dldp authentication-mode ················································································································1-3
dldp interval ·····································································································································1-4
dldp reset·········································································································································1-5
dldp unidirectional-shutdown···········································································································1-5
dldp work-mode ·······························································································································1-6
dldp delaydown-timer ······················································································································1-7
i
1
DLDP Configuration Commands
DLDP Configuration Commands
display dldp
Syntax
display dldp { unit-id | interface-type interface-number }
View
Any view
Parameters
unit-id: Unit number of a device, only can be set as 1 for switch 4500.
interface-type: Port type.
interface-number: Port number.
Description
Use the display dldp command to display the DLDP configuration of a unit or a port.
Examples
# Display information about all DLDP-enabled ports on unit 1.
<Sysname> display dldp 1
dldp interval 10
dldp work-mode enhance
dldp authentication-mode none
dldp unidirectional-shutdown manual
dldp delaydown-timer 1
The port number of unit 1 with DLDP is 1.
interface GigabitEthernet1/0/49
dldp port state : advertisement
dldp link state : up
The neighbor number of the port is 1.
neighbor mac address : 000f-e20f-7206
neighbor port index : 98
neighbor state : two way
neighbor aged time : 24
1-1
Table 1-1 Description on the fields of the display dldp command
Field
Description
dldp interval
Interval for sending DLDP advertisement packets (in
seconds)
dldp work-mode
DLDP work mode (enhance or normal)
dldp authentication-mode
DLDP authentication mode (none, simple, or md5)
password
Password for DLDP authentication
dldp unidirectional-shutdown
DLDP action to be performed on detecting a
unidirectional link (auto or manual)
dldp delaydown-timer
Setting of the DelayDown timer
The port number of unit 1 with DLDP
Number of the DLDP-enabled ports on unit 1
interface GigabitEthernet1/0/49
Port type and port number
dldp port state
DLDP state on a port (initial, inactive, active,
advertisement, probe, disable, or delaydown)
dldp link state
Port state (up or down)
The neighbor number of the port
Number of the neighbor ports
neighbor mac address
MAC address of a neighbor port
neighbor port index
Neighbor port index
neighbor state
Neighbor state (unknown, one way, or two way)
neighbor aged time
Neighbor aging time
dldp
Syntax
dldp { enable | disable }
View
System view/Ethernet port view
Parameters
None
Description
In system view:
Use the dldp enable command to enable DLDP on all optical ports of the switch.
Use the dldp disable command to disable DLDP on all optical ports of the switch.
In Ethernet port view:
Use the dldp enable command to enable DLDP on the current port.
Use the dldp disable command to disable DLDP on the current port.
The dldp command can apply to a non-optical port as well as an optical port.
By default, DLDP is disabled.
1-2
When you use the dldp enable/dldp disable command in system view to enable/disable DLDP on all
optical ports of the switch, the configuration takes effect on the existing optical ports, instead of those
added subsequently.
Examples
# Enable DLDP on all optical ports of the switch.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dldp enable
# Enable DLDP on fiber-optic port GigabitEthernet 1/0/49.
[Sysname] interface GigabitEthernet 1/0/49
[Sysname-GigabitEthernet1/0/49] dldp enable
dldp authentication-mode
Syntax
dldp authentication-mode { none | simple simple-password | md5 md5-password }
undo dldp authentication-mode
View
System view
Parameters
none: Sets the authentication mode on the port to none (Performs no authentication on the port).
simple: Sets the authentication mode on the port to plain text.
simple-password: Plain text authentication password, a string in plain text consisting of 1 to 16
characters.
md5: Sets the authentication mode on the port to MD5.
md5-password: MD5 authentication password, a string in plain text consisting of 1 to 16 characters or a
string in cipher text corresponding to the string in plain text.
Description
Use the dldp authentication-mode command to set the DLDP authentication mode and password on
the current port.
Use the undo dldp authentication-mode to remove the DLDP authentication mode and password on
the current port.
By default, the authentication mode on the current port is none.
Note that:
1-3
When you configure a DLDP authentication mode and authentication password on a port, make sure
that the same DLDP authentication mode and password are set on the ports connected with a fiber
cable or copper twisted pair. Otherwise, DLDP authentication fails. DLDP cannot work before DLDP
authentication succeeds.
Related commands: dldp unidirectional-shutdown.
Examples
# Set the DLDP authentication mode and password to plain text and abc respectively on the ports
connected with a fiber cable or copper twisted pair between Switch A and Switch B.
z
Configure Switch A
<SwitchA> system-view
System View: return to User View with Ctrl+Z.
[SwitchA] dldp authentication-mode simple abc
z
Configure Switch B
<SwitchB> system-view
System View: return to User View with Ctrl+Z.
[SwitchB] dldp authentication-mode simple abc
dldp interval
Syntax
dldp interval timer-value
undo dldp interval
View
System view
Parameters
timer-value: Interval between sending advertisement packets in seconds, in the range of 1 to 100. It is 5
by default.
Description
Use the dldp interval command to set the interval between sending advertisement packets for all
DLDP-enabled ports in the advertisement state.
Use the undo dldp interval command to restore the interval to the default value.
By default, the interval between sending advertisement packets is 5 seconds.
A device in Advertisement state periodically sends out Advertisement packets to notify the neighbors of
its existence. Meanwhile, the device also retrieves neighbor information from the received
Advertisement packets and maintains its own neighbor entries. When the device receives an
Advertisement packet from a device that does not match any of its neighbor entries, it transits from
Advertisement state to Probe state and sends DLDP Probe packets to detect unidirectional links.
Note that:
z
The interval takes effect on all DLDP-enabled ports.
z
It is recommended that you set the interval shorter than one-third of the STP convergence time
(usually 30 seconds). If too long an interval is set, an STP loop may occur before DLDP shuts down
1-4
unidirectional links. On the contrary, if too short an interval is set, network traffic increases,
unnecessarily consuming port bandwidth.
Examples
# Set the interval between sending advertisement packets to 6 seconds for all DLDP-enabled ports in
the advertisement state.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dldp interval 6
dldp reset
Syntax
dldp reset
View
System view/Ethernet port view
Parameters
None
Description
In system view:
Use the dldp reset command to reset the DLDP status of all the ports disabled by DLDP.
In Ethernet port view:
Use the dldp reset command to reset the DLDP status of the current port disabled by DLDP.
After the dldp reset command is executed, the DLDP status of a port changes from disable to active
and DLDP restarts to detect the link status of the fiber cable or copper twisted pair.
Related commands: dldp and dldp unidirectional-shutdown.
Examples
# Reset the DLDP status of all the ports disabled by DLDP.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dldp reset
dldp unidirectional-shutdown
Syntax
dldp unidirectional-shutdown { auto | manual }
undo dldp unidirectional-shutdown
View
System view
1-5
Parameters
auto: Disables automatically the corresponding port when DLDP detects an unidirectional link or finds
in the enhanced mode that the peer port is down.
manual: Generates log and traps and prompts the user to disable manually the corresponding port
when DLDP detects an unidirectional link or finds in the enhanced mode that the peer port is down. After
the port is disabled, it stops sending and receiving DLDP packets.
Description
Use the dldp unidirectional-shutdown command to set the DLDP handling mode after a unidirectional
link is found.
Use the undo dldp unidirectional-shutdown command to restore the default DLDP handling mode
after a unidirectional link is found.
By default, the DLDP handling mode after a unidirectional link is found is auto.
Related commands: dldp work-mode.
Examples
# Configure DLDP to automatically disable the corresponding port when a unidirectional link is found.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dldp unidirectional-shutdown auto
dldp work-mode
Syntax
dldp work-mode { enhance | normal }
undo dldp work-mode
View
System view
Parameters
enhance: Configures DLDP to work in enhanced mode. In this mode, DLDP detects whether neighbors
exist when neighbor tables are aging.
normal: Configures DLDP to work in normal mode. In this mode, DLDP does not detect whether
neighbors exist when neighbor tables are aging.
Description
Use the dldp work-mode command to set the DLDP operating mode.
Use the undo dldp work-mode command to restore the default DLDP operating mode.
By default, DLDP works in normal mode.
1-6
z
When DLDP works in normal mode, the system can identify only the unidirectional link caused by
fiber cross-connection.
z
When the DLDP protocol works in enhanced mode, the system can identify two types of
unidirectional links: one is caused by fiber cross-connection and the other is caused by one fiber
being not connected or being broken. To detect unidirectional links that are of the latter type, you
need to configure the ports to operate at specific speed and in full duplex mode. Otherwise, DLDP
cannot take effect.
Examples
# Configure DLDP to work in enhanced mode.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dldp work-mode enhance
dldp delaydown-timer
Syntax
dldp delaydown-timer delaydown-time
undo dldp delaydown-timer
View
System view
Parameters
delaydown-time: Delaydown timer to be set (in seconds). This argument ranges from 1 to 5.
Description
Use the dldp delaydown-timer command to set the delaydown timer.
Use the undo dldp delaydown-timer command to restore the default delaydown timer setting.
By default, the DelayDown timer is set to 1 second. A period of 5 seconds is recommended.
When a device in the active, advertisement, or probe DLDP state receives a port down message, it
does not remove the corresponding neighbor immediately, nor does it transit to the inactive state.
Instead, it transits to the delaydown state and starts the DelayDown timer. In delaydown state, the
device retains the related DLDP neighbor information. When the DelayDown timer expires, the DLDP
neighbor information is removed.
1-7
Examples
# Set the delaydown timer to 5 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dldp delaydown-timer 5
1-8
Table of Contents
1 MAC Address Table Management Configuration Commands ······························································1-1
MAC Address Table Management Configuration Commands································································1-1
display mac-address aging-time······································································································1-1
display mac-address························································································································1-2
mac-address····································································································································1-3
mac-address aging destination-hit enable·······················································································1-5
mac-address max-mac-count··········································································································1-5
mac-address timer···························································································································1-6
i
1
MAC Address Table Management Configuration
Commands
This chapter describes the management of static, dynamic, and blackhole MAC address entries. For
information about the management of multicast MAC address entries, refer to the “Multicast Protocol”
part of the manual.
MAC Address Table Management Configuration Commands
display mac-address aging-time
Syntax
display mac-address aging-time
View
Any view
Parameters
None
Description
Use the display mac-address aging-time command to display the aging time of the dynamic MAC
address entries in the MAC address table.
Related commands: mac-address, mac-address timer, display mac-address.
Examples
# Display the aging time of the dynamic MAC address entries.
<Sysname> display mac-address aging-time
Mac address aging time: 300s
The output information indicates that the aging time of the dynamic MAC address entries is 300
seconds.
<Sysname> display mac-address aging-time
Mac address aging time: no-aging
The output information indicates that dynamic MAC address entries do not age out.
1-1
display mac-address
Syntax
display mac-address [ mac-address [ vlan vlan-id ] | [ [ dynamic | static | blackhole ] [ interface
interface-type interface-number ] [ vlan vlan-id ] [ count ] ] [ unit unit-id ]
View
Any view
Parameters
mac-address: Displays MAC address entries in a specified MAC address, in the format of H-H-H.
static: Displays static MAC address entries. Similar to blackhole MAC address entries, these entries do
not age but you can add or remove them.
dynamic: Displays dynamic MAC address entries. Aging time is set for these entries.
blackhole: Displays blackhole MAC address entries. These entries do not age but you can add or
remove them. Packets whose destination MAC addresses or source MAC addresses match destination
blackhole MAC address entries are dropped.
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.
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.
statistics: Displays statistics of the MAC address entries maintained by the switch.
unit unit-id: Displays information about the MAC address forwarding table of the specified unit in the
fabric.
Description
Use the display mac-address command to display information about MAC address entries in the MAC
address table, including: MAC address, VLAN and port corresponding to the MAC address, the type
(static or dynamic) of a MAC address entry, whether a MAC address is within the aging time and so on.
If you specify a unit ID with unit unit-id, the information about the MAC address entries on the specified
device in the fabric will be displayed.
Examples
# Display information about MAC address 000f-e20f-0101.
<Sysname> display mac-address 000f-e20f-0101
Unit 1
MAC ADDR
VLAN ID
STATE
000f-e20f-0101
1
Learned
PORT INDEX
GigabitEthernet1/0/1
AGING TIME(s)
AGING
# Display the MAC address entries for the port GigabitEthernet 1/0/4.
<Sysname> display mac-address interface GigabitEthernet 1/0/4
Unit 1
MAC ADDR
VLAN ID
STATE
PORT INDEX
1-2
AGING TIME(s)
000d-88f6-44ba
1
Learned
GigabitEthernet1/0/4
AGING
000d-88f7-9f7d
1
Learned
GigabitEthernet1/0/4
AGING
000d-88f7-b094
1
Learned
GigabitEthernet1/0/4
AGING
000f-e200-00cc
1
Learned
GigabitEthernet1/0/4
AGING
000f-e200-2201
1
Learned
GigabitEthernet1/0/4
AGING
000f-e207-f2e0
1
Learned
GigabitEthernet1/0/4
AGING
000f-e209-ecf9
1
Learned
GigabitEthernet1/0/4
AGING
---
7 mac address(es) found on port GigabitEthernet1/0/4 ---
# Display the total number of MAC address entries for VLAN 2.
<Sysname> display mac-address vlan 2 count
Unit 1
9 mac address(es) found in vlan 2
Table 1-1 Description on the fields of the display mac-address command
Field
Description
MAC ADDR
MAC address
VLAN ID
ID of the VLAN to which the network device identified by the MAC
address belongs
The state of the MAC address entry, which can be one of the following:
z
STATE
z
z
z
Config static: Indicates a manually configured static address entry.
Learned: Indicates a dynamically learnt address entry.
Config dynamic: Indicates a manually configured dynamic address
entry.
Blackhole: Indicates a blackhole entry.
PORT INDEX
Outgoing port out of which the traffic destined for the MAC address
should be sent.
AGING TIME(s)
Indicates whether the MAC address entry is aging. AGING indicates that
the entry is aging; NOAGED indicates that the entry will never age out.
mac-address
Syntax
z
In system view:
mac-address { static | dynamic | blackhole } mac-address interface interface-type interface-number
vlan vlan-id
undo mac-address [ mac-address-attribute ]
z
In Ethernet port view:
mac-address { static | dynamic | blackhole } mac-address vlan vlan-id
undo mac-address { static | dynamic | blackhole } mac-address vlan vlan-id
View
System view, Ethernet port view
Parameters
static: Specifies a static MAC address entry.
1-3
dynamic: Specifies a dynamic MAC address entry.
blackhole: Specifies a blackhole MAC address entry.
mac-address: Specifies a MAC address, in the form of H-H-H. When entering the MAC address, you
can omit the leading 0s in each segment. For example, you can input f-e2-1 for 000f-00e2-0001.
interface-type interface-number: Specifies the outgoing port by its type and number for the MAC
address. All traffic destined for the MAC address will be sent out the port.
vlan-id: Specifies a VLAN ID, in the range of 1 to 4094. The VLAN must already exist.
mac-address-attribute: Specifies the criteria for removing MAC address entries. Available syntax
options for the argument are described in Table 1-2.
Table 1-2 Available syntax options for the mac-address-attribute argument
Syntax
Description
{ static | dynamic | blackhole } interface
interface-type interface-number
Removes the static, dynamic, or blackhole MAC
address entries concerning a specified port.
{ static | dynamic | blackhole } vlan vlan-id
Removes the static, dynamic, or blackhole MAC
address entries concerning a specified VLAN.
{ static | dynamic | blackhole } mac-address
[ interface interface-type interface-number ]
vlan vlan-id
Removes a specified static, dynamic, or
blackhole MAC address entry.
interface interface-type interface-number
Removes all the MAC address entries
concerning a specified port.
vlan vlan-id
Removes all the MAC address entries
concerning a specified VLAN.
mac-address [ interface interface-type
interface-number ] vlan vlan-id
Removes a specified MAC address entry.
Description
Use the mac-address command to add or modify a MAC address entry.
Use the undo mac-address command to remove one or more MAC address entries.
In Ethernet port view, the MAC address entry configured with the mac-address command in Ethernet
port view takes the current Ethernet port as the outgoing port.
If the MAC address you input in the mac-address command already exists in the MAC address table,
the system will modify the attributes of the corresponding MAC address entry according to your settings
in the command.
You can remove all unicast MAC address entries on a port, or remove a specific type of MAC address
entries, such as the addresses learnt by the system, dynamic or static MAC address entries configured,
or blackhole addresses.
Examples
# Configure a static MAC address entry with the following settings:
z
MAC address: 000f-e20f-0101
z
Outbound port: GigabitEthernet 1/0/1 port
z
GigabitEthernet 1/0/1 port belongs to VLAN 2.
<Sysname> system-view
1-4
System View: return to User View with Ctrl+Z.
[Sysname] mac-address static 000f-e20f-0101 interface GigabitEthernet 1/0/1 vlan 2
mac-address aging destination-hit enable
Syntax
mac-address aging destination-hit enable
undo mac-address aging destination-hit enable
View
System view
Parameters
None
Description
Use the mac-address aging destination-hit enable command to enable the destination MAC address
triggered update function.
Use the undo mac-address aging destination-hit enable command to disable the function.
With the destination MAC address triggered update function, the switch, when forwarding packets,
updates the MAC address entries for the destination MAC addresses. This increases the MAC address
table update frequency, improves the usability of the MAC address table, and reduces broadcasts.
By default, the destination MAC address triggered update function is disabled.
Examples
# Enable destination MAC address triggered update.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] mac-address aging destination-hit enable
mac-address max-mac-count
Syntax
mac-address max-mac-count count
undo mac-address max-mac-count
View
Ethernet port view
Parameters
count: Maximum number of MAC addresses a port can learn. This argument ranges from 0 to 4096. A
value of 0 disables the port from learning MAC addresses.
Description
Use the mac-address max-mac-count command to set the maximum number of MAC addresses an
Ethernet port can learn.
1-5
Use the undo mac-address max-mac-count command to cancel the limitation on the number of MAC
addresses an Ethernet port can learn.
By default, the number of MAC addresses an Ethernet port can learn is unlimited.
When you use the mac-address max-mac-count command, the port stops learning MAC addresses
after the number of MAC addresses it learned reaches the value of the count argument you provided.
You can use the undo command to cancel this limit so that the port can learn MAC addresses without
the number limitation. By default, no number limitation is set to the port for MAC address learning.
To prevent illegal devices from accessing the network through a port, you can configure static MAC
addresses and disable MAC address learning for the port. Thus, only the packets destined for the
configured MAC addresses can be forwarded out the port.
Related commands: mac-address, mac-address timer.
Examples
# Set the maximum number of MAC addresses GigabitEthernet 1/0/3 port can learn to 600.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface GigabitEthernet 1/0/3
[Sysname-GigabitEthernet1/0/3] mac-address max-mac-count 600
mac-address timer
Syntax
mac-address timer { aging age | no-aging }
undo mac-address timer aging
View
System view
Parameters
aging age: Specifies the aging time (in seconds) for dynamic MAC address entries. The age argument
ranges from 10 to 1000000.
no-aging: Specifies not to age dynamic MAC address entries.
Description
Use the mac-address timer command to set the MAC address aging timer.
Use the undo mac-address timer command to restore the default.
The default MAC address aging timer is 300 seconds.
The timer applies only to dynamic address entries, including both entries learnt and configured.
Setting an appropriate MAC address aging timer is important for the switch to run efficiently.
z
If the aging timer is set too short, the MAC address entries that are still valid may be removed.
Upon receiving a packet destined for a MAC address that is already removed, the switch
broadcasts the packet through all its ports in the VLAN which the packet belongs to. This
decreases the operating performance of the switch.
1-6
z
If the aging timer is set too long, MAC address entries may still exist even if they turn invalid. This
causes the switch to be unable to update its MAC address table in time. In this case, the MAC
address table cannot reflect the position changes of network devices in time.
Examples
# Set the aging time of MAC address entries to 500 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] mac-address timer aging 500
1-7
Table of Contents
1 Auto Detect Configuration Commands ···································································································1-1
Auto Detect Configuration Commands ···································································································1-1
detect-group ····································································································································1-1
detect-list ·········································································································································1-2
display detect-group ························································································································1-3
ip route-static detect-group··············································································································1-4
option ···············································································································································1-5
retry··················································································································································1-6
standby detect-group·······················································································································1-6
timer loop·········································································································································1-7
timer wait ·········································································································································1-7
i
1
Auto Detect Configuration Commands
Auto Detect Configuration Commands
z
Refer to the Routing Protocol part of the manual for information about static routing.
z
Refer to the VRRP part of the manual for information about VRRP.
detect-group
Syntax
detect-group group-number
undo detect-group group-number
View
System view
Parameters
group-number: Detected group number ranging from 1 to 25.
Description
Use the detect-group command to create a detected group and enter detected group view.
Use the undo detect-group command to remove a detected group.
When a detected group is used by other features (such as static routing, VRRP, or interface backup),
the detected group cannot be deleted unless you delete the features first.
Examples
# Create detected group 10.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] detect-group 10
1-1
[Sysname-detect-group-10]
detect-list
Syntax
detect-list list-number ip address ip-address [ nexthop ip-address ]
undo detect-list list-number
View
Detected group view
Parameters
list-number: Sequence number of the IP address to be detected. This argument ranges from 1 to 10.
ip address ip-address: Specifies the destination IP address (in dotted decimal notation) to be detected.
nexthop ip-address: Specifies the next hop IP address (in dotted decimal notation) for Auto Detect.
When configuring the destination IP address for Auto Detect, you can specify the next hop address as
required. For example, when multiple routes reach the destination IP address, you can specify Auto
Detect to detect a specific link. With the next hop address specified, if the destination IP address to be
detected and the Auto Detect-enabled switch are not on the same network segment, the ICMP packets
will be forwarded to the specified next hop.
Description
Use the detect-list command to add a detected object to a detected group and specify the detection
sequence number of the detected object.
Use the undo detect-list command to remove a specified detected object.
When performing Auto Detect, a switch detects the configured detected objects in the order specified by
their sequence numbers.
If you have configured multiple detected objects, you can use the option command to set the logical
relationships between the detected objects.
Related commands: option.
Examples
# Add the detected object 202.13.1.55 to detected group 10, with the detection sequence number set to
1, and the next hop IP address set to 1.2.3.4.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] detect-group 10
[Sysname-detect-group-10] detect-list 1 ip address 202.13.1.55 nexthop 1.2.3.4
1-2
display detect-group
Syntax
display detect-group [ group-number ]
View
Any view
Parameters
group-number: Detected group number ranging from 1 to 25.
Description
Use the display detect-group command to display the configuration of the specified detected group or
all detected groups.
Examples
# Display the configuration of detected group 1.
<Sysname> display detect-group 1
detect-group 1 :
detect loop time(s) : 15
ping wait time(s) : 2
detect retry times : 2
detect ip option : and
group state : not detecting
register module num : 0
detect ip count : 1
detect-list
ip address
next hop
1
202.13.1.55
1.2.3.4
Table 1-1 Description on the fields of the display detect-group command
Field
Description
detect-group 1
Detected group number 1
detect loop time(s)
Detecting interval, in seconds.
ping wait time(s)
Timeout time of a ping operation, in seconds.
detect retry times
Number of retries of an auto detect operation.
detect ip option
The logic relationship between the detected
objects in the detected group. It can be and or
or.
group state
Current state of the detected group
register module num
Number of registered modules (that is, the
number of the modules utilizing the detected
group.)
detect ip count
Number of the IP addresses contained in a
detected group
detect-list
Sequence number of an IP address contained in
a detected group
1-3
Field
Description
ip address
IP address to be detected
next hop
Next hop IP address
ip route-static detect-group
Syntax
ip route-static ip-address { mask | mask-length } { interface-type interface-number | next-hop }
[ preference preference-value ] [ reject | blackhole ] detect-group group-number
undo ip route-static ip-address { mask | mask-length } [ interface-type interface-number | next-hop ]
[ preference preference-value ]
View
System view
Parameters
ip-address: IP address in dotted decimal notation.
mask: Subnet mask.
mask-length: Length of the subnet mask, that is, the number of successive bits in the subnet mask
whose values are 1.
interface-type interface-number: Interface type and interface number.
next-hop: Next hop IP address in dotted decimal notation.
preference-value: Priority of the route. This argument ranges from 1 to 255.
reject: Specifies the route to be unreachable. If you specify this keyword when executing this command,
any packet destined for the specified IP address is discarded, and the system informs the source that
the destination is unreachable.
blackhole: Specifies the route to be a blackhole route. If you specify this keyword when executing this
command, all outbound interfaces of the static route are the NULL 0 interfaces regardless of the next
hop. In addition, the system discards any packet transmitted along this route without informing the
source.
group-number: Detected group number ranging from 1 to 25.
Description
Use the ip route-static detect-group command to configure a static route, whose validity depends on
detecting results as follows:
z
The route is valid when the detecting result is reachable.
z
The route is invalid when the detecting result is unreachable.
Use the undo ip route-static command to remove an existing static route.
Examples
# Configure a static route to 192.168.1.5/24 with 192.168.0.2 as the next hop, and control the static
route validity using the detecting result of detected group 10.
1-4
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ip route-static 192.168.1.5 24 192.168.0.2 detect-group 10
After the configuration, if detected group 10 is reachable, the static route is valid; if detected group 10 is
unreachable, the static route is invalid.
option
Syntax
option [ and | or ]
undo option
View
Detected group view
Parameters
and: Specifies the relationship between detected objects as logic AND, which means that the detecting
result is reachable only when all the detected objects contained in the detected group are reachable.
or: Specifies the relationship between detected objects as logic OR, which means that the detecting
result is reachable if one of the detected objects contained in the detected group is reachable.
Description
Use the option command to specify the way to generate detecting results.
Use the undo option command to restore the default way to generate detecting results.
By default, the relationship between the detected objects is and.
When a detecting operation is being carried out, the switch detects each detected object contained in
the detected group in turn by their sequence number.
z
If you specify the and keyword, the switch returns reachable as the detecting result only if all the
detected objects in the detected group are detected reachable.
z
If you specify the or keyword, the switch returns reachable as the detecting result only if one of the
detected objects in the detected group is detected reachable and the remaining detected objects
will not be detected any more.
Examples
# Specify the relationship between the three detected objects in detected group 10 as or.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] detect-group 10
[Sysname-detect-group-10] detect-list 1 ip address 202.13.1.55 nexthop 1.2.3.4
[Sysname-detect-group-10] detect-list 2 ip address 202.13.1.56 nexthop 1.2.3.4
[Sysname-detect-group-10] detect-list 3 ip address 202.13.1.57 nexthop 1.2.3.4
[Sysname-detect-group-10] option or
After the configuration, if one of the three detected objects is reachable, the system will consider
detected group 10 reachable.
1-5
retry
Syntax
retry retry-times
undo retry
View
Detected group view
Parameters
retry-times: Maximum retry times during a detect operation. This argument ranges from 0 to 10 and
defaults to 2.
Description
Use the retry command to set the maximum retry times during a detect operation.
Use the undo retry command to restore the default times.
By default, the maximum retry times during a detect operation is two.
When an Auto Detect-enabled switch detects objects, it sends an ICMP Request to each detected
object. If the switch fails to receive an ICMP Reply from the object within the time waiting for an ICMP
Reply configured with the time wait command, the switch re-sends an ICMP Request until the
maximum retry times configured with the retry command is reached. If still no ICMP Reply is received,
the destination IP address is considered as unreachable.
Examples
# Specify the maximum number of retires to 3 for detected group 10.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] detect-group 10
[Sysname-detect-group-10] retry 3
standby detect-group
Syntax
standby detect-group group-number
undo standby detect-group
View
VLAN interface view
Parameters
group-number: Detected group number ranging from 1 to 25.
Description
Use the standby detect-group command to configure the interface backup function by using the auto
detect function.
1-6
Use the undo standby detect-group command to disable the interface backup function.
Examples
# Specify to enable VLAN-interface 2 (the backup interface) when the detected group 10 is
unreachable.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] standby detect-group 10
After the configuration, if detected group 10 is reachable, the backup interface VLAN-interface 2 will be
in the disabled state, and if detected group 10 is unreachable, VLAN-interface 2 will be enabled.
timer loop
Syntax
timer loop interval
undo timer loop
View
Detected group view
Parameters
seconds: Detecting interval. This argument ranges form 1 to 86,400 (in seconds) and defaults to 15.
Description
Use the timer loop command to set the detecting interval, that is, the frequency to perform auto detect
operations.
Use the undo timer loop command to restore the default.
By default, auto detect operations are performed on all detected groups every 15 seconds.
To monitor the destination IP address in real time, an Auto Detect-enabled switch detects all objects
within each detecting interval configured with the time loop command. During a detect operation, the
switch judges whether a destination IP address is reachable according to the time for waiting for an
ICMP Reply configured with the time wait command and the maximum retry times configured with the
retry command.
Examples
# Set the detecting interval to 60 seconds for detected group 10.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] detect-group 10
[Sysname-detect-group-10] timer loop 60
timer wait
Syntax
timer wait seconds
1-7
undo timer wait
View
Detected group view
Parameters
seconds: Timeout waiting for an ICMP reply. This argument ranges from 1 to 30 (in seconds) and
defaults to 2.
Description
Use the timer wait command to set a timeout waiting for an ICMP reply.
Use the undo timer wait command to restore the default.
By default, timeout waiting for an ICMP reply in an auto detect operation is 2 seconds. When an Auto
Detect-enabled switch detects objects, it sends an ICMP Request to each detected object. If the switch
fails to receive an ICMP Reply from the object within the time waiting for an ICMP Reply configured with
the time wait command, the switch re-sends an ICMP Request until the maximum retry times
configured with the retry command is reached. If still no ICMP Reply is received, the destination IP
address is considered as unreachable.
Examples
# Set a timeout of 3 seconds waiting for an ICMP reply in detected group 10.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] detect-group 10
[Sysname-detect-group-10] timer wait 3
1-8
Table of Contents
1 MSTP Configuration Commands ·············································································································1-1
MSTP Configuration Commands ············································································································1-1
active region-configuration ··············································································································1-1
bpdu-drop any ·································································································································1-1
check region-configuration ··············································································································1-2
display stp········································································································································1-3
display stp abnormalport ·················································································································1-7
display stp portdown························································································································1-8
display stp region-configuration·······································································································1-8
display stp root ································································································································1-9
instance ·········································································································································1-10
region-name ··································································································································1-11
reset stp·········································································································································1-12
revision-level··································································································································1-12
stp ··················································································································································1-13
stp bpdu-protection························································································································1-14
stp bridge-diameter························································································································1-15
stp compliance·······························································································································1-16
stp config-digest-snooping ············································································································1-17
stp cost ··········································································································································1-19
stp dot1d-trap ································································································································1-21
stp edged-port ·······························································································································1-22
stp loop-protection ·························································································································1-23
stp max-hops ·································································································································1-25
stp mcheck ····································································································································1-25
stp mode········································································································································1-27
stp no-agreement-check················································································································1-27
stp pathcost-standard ····················································································································1-29
stp point-to-point····························································································································1-30
stp port priority·······························································································································1-32
stp portlog······································································································································1-33
stp portlog all ·································································································································1-33
stp priority ······································································································································1-34
stp region-configuration ·················································································································1-35
stp root primary······························································································································1-35
stp root secondary ·························································································································1-37
stp root-protection··························································································································1-38
stp tc-protection ·····························································································································1-39
stp tc-protection threshold ·············································································································1-40
stp timer forward-delay ··················································································································1-41
stp timer hello ································································································································1-41
stp timer max-age··························································································································1-42
stp timer-factor·······························································································································1-43
i
stp transmit-limit ····························································································································1-44
vlan-mapping modulo ····················································································································1-45
vlan-vpn tunnel ······························································································································1-46
ii
1
MSTP Configuration Commands
MSTP Configuration Commands
active region-configuration
Syntax
active region-configuration
View
MST region view
Parameters
None
Description
Use the active region-configuration command to activate the settings of a multiple spanning tree
(MST) region.
Configuring MST region-related parameters (especially the VLAN-to-instance mapping table) can result
in network topology jitter. To reduce network topology jitter caused by such a configuration change,
multiple spanning tree protocol (MSTP) does not recalculate spanning trees immediately after the
configuration change; it does this only after you activate the new MST region-related settings or enable
MSTP; only then will the new settings begin to take effect.
When you carry out this command, MSTP will replace the currently running MST region–related
parameters with the parameters you have just configured and will perform spanning tree recalculation.
Related commands: instance, region-name, revision-level, vlan-mapping modulo, check
region-configuration.
Examples
# Activate the MST region-related settings.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp region-configuration
[Sysname-mst-region] active region-configuration
bpdu-drop any
Syntax
bpdu-drop any
undo bpdu-drop any
1-1
View
Ethernet port view
Parameters
None
Description
Use the bpdu-drop any command to enable BPDU dropping on the Ethernet port.
Use the undo bpdu-drop any command to disable BPDU dropping on the Ethernet port.
By default, BPDU dropping is disabled.
In a STP-enabled network, some malicious users may send BPDU packets to the switch continuously in
order to destabilize the network. When a switch receives the BPDU packets, it will forward them to other
switches. As a result, STP calculation is performed repeatedly, which may occupy too much CPU of the
switches or cause errors in the protocol state of the BPDU packets.
In order to avoid this problem, you can enable BPDU dropping on Ethernet ports. Once the function is
enabled on a port, the port will not receive or forward any BPDU packets. In this way, the switch is
protected against the BPDU packet attack and the STP calculation correctness is ensured.
Examples
# Enable BPDU dropping on Ethernet 1/0/1.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] bpdu-drop any
check region-configuration
Syntax
check region-configuration
View
MST region view
Parameters
None
Description
Use the check region-configuration command to display the MST region-related configuration which
is being modified currently, including region name, revision level, and VLAN-to-instance mapping table.
As specified in the MSTP protocol, the configurations of MST regions must be right, especially the
VLAN-to-instance mapping table. MSTP-enabled switches are in the same region only when they have
the same format selector (a 802.1s-defined protocol selector, which is 0 by default and cannot be
configured), region name, VLAN-to-instance mapping table, and revision level. A switch cannot be in
the expected region if any of the four MST region-related parameters mentioned above are not
consistent with those of other switches in the region.
1-2
The 3Com switches 4500 support only the MST region name, VLAN-to-instance mapping table, and
revision level. Switches which have the settings of these parameters the same are assigned to the
same MST region.
This command is used to display the configuration information of inactivated MST regions. You can use
this command to find the MST region the switch currently belongs to or check to see whether or not the
MST region-related configuration is correct.
Related commands: instance, region-name, revision-level, vlan-mapping modulo, active
region-configuration.
Examples
# Display the MST region-related configuration.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp region-configuration
[Sysname-mst-region] check region-configuration
Admin Configuration
Format selector :0
Region name
:00e0fc004500
Revision level
:0
Instance
0
16
Vlans Mapped
1 to 9, 11 to 4094
10
Table 1-1 Description on the fields of the check region-configuration command
Field
Description
Format selector
The selector specified by MSTP
Region name
The name of the MST region
Revision level
The revision level of the MST region
Instance Vlans Mapped
VLAN-to-instance mappings in the MST region
display stp
Syntax
display stp [ instance instance-id ] [ interface interface-list | slot slot-number ] [ brief ]
View
Any view
Parameters
instance-id: ID of the MSTI ranging from 0 to 16. The value of 0 refers to the common and internal
spanning tree (CIST).
1-3
interface-list: Ethernet port list. You can specify multiple Ethernet ports by providing this argument in the
form of interface-list = { interface-type interface-number [ to interface-type interface-number ] } &<1-10>,
where &<1-10> means that you can provide up to 10 port indexes/port index ranges for this argument.
slot slot-number: Specifies a slot whose STP-related information is to be displayed.
brief: Displays only port state and protection measures taken on the port.
Description
Use the display stp command to display the state and statistical information about one or all spanning
trees.
The state and statistical information about MSTP can be used to analyze and maintain the topology of a
network. It can also be helpful when trying to make MSTP operate properly.
If neither MSTI nor port list is specified, the command displays spanning tree information about all
z
MSTIs on all ports in the order of port number.
If only one MSTI is specified, the command displays information about the specified MSTI on all
z
ports in the order of the port number.
If only a port list is specified, the command displays information about all MSTIs on these ports in
z
the order of the port numbers.
If both an MSTI ID list and a port list are specified, the command displays spanning tree information
z
about the specified MSTIs and the specified ports in the order of MSTI ID.
MSTP state information includes:
1)
Global CIST parameters: Protocol operating mode, switch priority in the CIST instance, MAC
address, hello time, max age, forward delay, max hops, the common root of the CIST, the external
path cost for the switch to reach the CIST common root, region root, the internal path cost for the
switch to reach the region root, CIST root port of the switch, the state of the BPDU guard function
(enabled or disabled), the state of the digest snooping feature (enabled or disabled), and the state
of the TC-BPDU attack guard function (enabled or disabled).
2)
CIST port parameters: Port protocol, port role, port priority, path cost, designated bridge,
designated port, edge port/non-edge port, whether or not the link on a port is a point-to-point link,
format of the MST BPDUs that the port can send, the maximum transmitting speed, type of the
enabled guard function, state of the digest snooping feature (enabled or disabled), VLAN mappings,
hello time, max age, forward delay, Message-age time, and remaining hops.
3)
Global MSTI parameters: MSTI instance ID, bridge priority of the instance, region root, internal
path cost, MSTI root port, master bridge, and external path cost.
4)
MSTI port parameters: Port state, role, priority, path cost, designated bridge, designated port,
remaining hops, and the number of VLANs mapped to the current MSTI.
The statistical information includes: the numbers of the TCN BPDUs, the configuration BPDUs, the RST
BPDUs, and the MST BPDUs transmitted/received by each port.
Related commands: reset stp.
Examples
# Display the brief state information of MSTI 0 on Ethernet 1/0/1 through Ethernet 1/0/4.
<Sysname> display stp instance 0 interface Ethernet 1/0/1 to Ethernet 1/0/4 brief
MSTID
Port
Role
STP State
Protection
0
Ethernet1/0/1
ALTE
DISCARDING
LOOP
0
Ethernet1/0/2
DESI
FORWARDING
NONE
1-4
0
Ethernet1/0/3
DESI
FORWARDING
NONE
0
Ethernet1/0/4
DESI
FORWARDING
NONE
Table 1-2 Description on the fields of the display stp brief command
Field
Description
MSTID
ID of an MSTI in the MST region
Port
Port index corresponding to an MSTI
Port role, which can be one of the following:
z
z
Role
z
z
z
z
ALTE: The port is an alternate port
BACK: The port is a backup port
ROOT: The port is a root port
DESI: The port is a designated port
MAST: The port is a master port
DISA: The port is disabled
MSTP state on the port , which can be:
z
STP State
z
z
FORWARDING: The port learns MAC addresses and forwards
user traffic
DISCARDING: The port does not learn MAC addresses or
forward user traffic
LEARNING: The port learns MAC addresses but does not
forward user traffic
Protection type of the port, which can be one of the following:
z
Protection
z
z
z
ROOT: Root protection
LOOP: Loop protection
BPDU: BPDU protection
NONE: No protection
# Display the detailed MSTP status information and statistics information.
<Sysname> display stp instance 0 interface Ethernet 1/0/2
-------[CIST Global Info][Mode MSTP]------CIST Bridge
:32768.00e0-fc12-4001
Bridge Times
:Hello 2s MaxAge 20s FwDly 15s MaxHop 20
CIST Root/ERPC
:32768.000f-cb00-6600 / 200
CIST RegRoot/IRPC
:32768.00e0-fc12-4001 / 0
CIST RootPortId
:128.22
BPDU-Protection
:disabled
TC-Protection
:enabled / Threshold=6
Bridge Config
Digest Snooping
:disabled
TC or TCN received
:0
Time since last TC
:0 days 1h:33m:54s
----[Port2(Ethernet1/0/2)][DOWN]---Port Protocol
:enabled
Port Role
:CIST Disabled Port
Port Priority
:128
Port Cost(Legacy)
:Config=auto / Active=200000
Desg. Bridge/Port
:32768.00e0-fc12-4001 / 128.2
1-5
Port Edged
:Config=disabled / Active=disabled
Point-to-point
:Config=auto / Active=false
Transmit Limit
:10 packets/hello-time
Protection Type
:None
MSTP BPDU format
:Config=auto / Active=legacy
Port Config
Digest Snooping
:disabled
Num of Vlans Mapped :1
PortTimes
:Hello 2s MaxAge 20s FwDly 15s MsgAge 0s RemHop 20
BPDU Sent
:0
TCN: 0, Config: 0, RST: 0, MST: 0
BPDU Received
:0
TCN: 0, Config: 0, RST: 0, MST: 0
Table 1-3 display stp command output description
Field
CIST Bridge
Description
CIST bridge ID
Major parameters for the bridge:
z
Bridge Times
z
z
z
Hello: Hello timer
MaxAge: Max Age timer
FwDly: Forward delay timer
MaxHop: Max hops within the MST region
CIST Root/ERPC
CIST root and external path cost
CIST RegRoot/IRPC
CIST regional root and internal path cost
CIST RootPortId
CIST root port ID
BPDU-Protection
Indicates whether BPDU protection is enabled globally.
TC-Protection*** / Threshold=**
Indicates whether TC-BPDU attack guard function is enabled
globally, and the maximum times that a switch can remove the
MAC address table and ARP entries within each 10 seconds.
Bridge Config
Digest Snooping
Indicates whether Digest Snooping is enabled globally on the
bridge.
TC or TCN received
Number of received TC/TCN packets
Time since last TC
Time of the latest topology change
Port Protocol
Indicates whether STP is enabled on the port
Port Role
Port role, which can be Alternate, Backup, Root, Designated,
Master, or Disabled
Port Priority
Port priority
Port Cost(Legacy)
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. Config indicates the configured
value, and Active indicates the actual value.
Designated bridge ID and port ID of the port
Desg. Bridge/Port
Port Edged
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
configured value, and Active indicates the actual value.
1-6
Field
Description
Point-to-point
Indicates whether the port is connected to a point-to-point link.
Config indicates the configured value, and Active indicates the
actual value.
Transmit Limit
The maximum number of packets sent within each Hello time
Protection Type
Protection type on the port, including Root guard and Loop
guard
MST BPDU format
Format of the MST BPDUs that the port can send, which can be
legacy or 802.1s. Config indicates the configured value, and
Active indicates the actual value.
Port Config
Digest Snooping
Num of Vlans Mapped
Indicates whether digest snooping is enabled on the port.
Number of VLANs mapped to the current MSTI
Major parameters for the port:
Hello: Hello timer
MaxAge: Max Age timer
FwDly: Forward delay timer
MsgAge: Message Age timer
Remain Hop: Remaining hops
z
z
PortTimes
z
z
z
BPDU Sent
The number of BPDUs sent since MSTP was enabled on the
device
BPDU Received
The number of BPDUs received since MSTP was enabled on
the device
display stp abnormalport
Syntax
display stp abnormalport
View
Any view
Parameters
None
Description
Use the display stp abnormalport command to display the ports that are blocked by STP guard
functions.
Examples
# Display the ports that are blocked by STP guard functions.
<Sysname> display stp abnormalport
MSTID
Port
--------- --------------------
Block Reason
-------------
0
Ethernet1/0/20
Root-Protection
1
Ethernet1/0/21
Loop-Protection
1-7
Table 1-4 Description on the fields of the display stp abnormalport command
Field
Description
MSTID
MSTI ID in the MST region
Port
Port that has been blocked
The function blocking the port:
z
Block Reason
z
z
Root-Protected: root guard function
Loop-Protected: loop guard function
Formatcompatibility-Protected:
MSTP
incompatibility protection function
BPDU
format
display stp portdown
Syntax
display stp portdown
View
Any view
Parameters
None
Description
Use the display stp portdown command to display the ports that are shut down by STP guard
functions.
Examples
# Display the ports that are shut down by STP guard functions.
<Sysname> display stp portdown
Port
Down Reason
---------------------
------------
Ethernet1/0/20
BPDU-Protection
Table 1-5 Description on the fields of the display stp portdown command
Field
Description
Port
Port that has been shut down
Down Reason
z
Reason that caused the port to be blocked.
z
BPDU-Protected: BPDU attack guard function
Formatfrequency-Protected: MSTP BPDU format frequent change
protection function
display stp region-configuration
Syntax
display stp region-configuration
1-8
View
Any view
Parameters
None
Description
Use the display stp region-configuration command to display the activated MST region configuration,
including the region name, region revision level, and VLAN-to-instance mappings configured for the
switch.
Related commands: stp region-configuration.
Examples
# Display the configuration of the MST region.
<Sysname> display stp region-configuration
Oper Configuration
Format selector :0
Region name
:hello
Revision level
:0
Instance
Vlans Mapped
0
21 to 4094
1
1 to 10
2
11 to 20
Table 1-6 Description on the fields of the display stp region-configuration command
Field
Description
Format selector
The selector specified by MSTP
Region name
The name of the MST region
Revision level
Revision level of the MST region, which can be configured
using the revision-level command and defaults to 0.
Instance Vlans Mapped
VLAN-to-instance mappings in the MST region
display stp root
Syntax
display stp root
View
Any view
Parameters
None
1-9
Description
Use the display stp root command to display information about the root ports in the MSTP region
where the switch resides.
Examples
# Display information about the root ports in the MSTP region where the switch resides.
<Sysname> display stp root
MSTID Root Bridge ID
-------0
ExtPathCost IntPathCost Root Port
-------------------- ------------
32768.00e0-fc53-d908
0
------------- -----------
200
Ethernet1/0/18
Table 1-7 Description on the fields of the display stp root command
Field
Description
MSTID
MSTI ID in the MST region
Root Bridge ID
ID of the root bridge
ExtPathCost
Cost of the external path from the switch to the root bridge. The device
can automatically calculate the default path cost of a port, or
alternatively, you can use the stp cost command to configure the path
cost of a port.
IntPathCost
Cost of the internal path from the switch to the root bridge. The device
can automatically calculate the default path cost of a port, or
alternatively, you can use the stp cost command to configure the path
cost of a port.
Root Port
Root port (If a port on the current device is an MSTI root port, the port
type and port number is displayed. Otherwise, the root port name is not
displayed.)
instance
Syntax
instance instance-id vlan vlan-list
undo instance instance-id [ vlan vlan-list ]
View
MST region view
Parameters
instance-id: ID of an MSTI ranging from 0 to 16. The value of 0 refers to the CIST.
vlan-list: List of VLANs. You need to provide this argument in the form of vlan-list = { vlan-id [ to
vlan-id ] }&<1-10>, where &<1-10> means that you can provide up to 10 VLAN IDs/VLAN ID ranges for
this argument. Normally, a VLAN ID can be a number ranging from 1 to 4094.
Description
Use the instance command to map specified VLANs to a specified MSTI.
1-10
Use the undo instance command to remove the mappings from the specified VLANs to the specified
MSTI and remap the specified VLANs to the CIST (MSTI 0). If you specify no VLAN in the undo
instance command, all VLANs that are mapped to the specified MSTI are remapped to the CIST.
By default, all VLANs are mapped to the CIST.
VLAN-to-instance mappings are recorded in the VLAN-to-instance mapping table of an MSTP-enabled
switch. So these two commands are actually used to manipulate the VLAN-to-instance mapping table.
You can add/remove a VLAN to/from the VLAN-to-instance mapping table of a specific MSTI by using
these two commands.
Note that a VLAN cannot be mapped to multiple MSTIs at the same time. A VLAN-to-instance mapping
is automatically removed if you map the VLAN to another MSTI.
Related
commands:
region-name,
revision-level,
vlan-mapping
modulo,
check
region-configuration, active region-configuration.
Examples
# Map VLAN 2 to MSTI 1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp region-configuration
[Sysname-mst-region] instance 1 vlan 2
region-name
Syntax
region-name name
undo region-name
View
MST region view
Parameters
name: MST region name to be set for the switch, a string of 1 to 32 characters.
Description
Use the region-name command to set an MST region name for a switch.
Use the undo region-name command to restore the MST region name to the default value.
The default MST region name of a switch is its MAC address.
MST region name, along with VLAN-to-instance mapping table and MSTP revision level, determines
the MST region which a switch belongs to.
Related commands: instance, revision-level, check region-configuration, vlan-mapping modulo,
active region-configuration.
Examples
# Set the MST region name of the switch to hello.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
1-11
[Sysname] stp region-configuration
[Sysname-mst-region] region-name hello
reset stp
Syntax
reset stp [ interface interface-list ]
View
User view
Parameters
interface-list: Ethernet port list. You can specify multiple Ethernet ports by providing this argument in the
form of interface-list = { interface-type interface-number [ to interface-type interface-number ] } &<1-10>,
where &<1-10> means that you can provide up to 10 port indexes/port index ranges for this argument.
Description
Use the reset stp command to clear spanning tree statistics.
The spanning tree statistics includes the numbers of TCN BPDUs, configuration BPDUs, RST BPDUs,
and MST BPDUs sent/received through one or more specified ports or all ports (note that BPDUs and
TCN BPDUs are counted only for CISTs.)
Note that:
z
If you specify the interface-list argument, this command clears the spanning tree statistics on
specified ports.
z
If you do not specify the interface-list argument, this command clears the spanning tree statistics
on all ports.
Related commands: display stp.
Examples
# Clear the spanning tree statistics on Ethernet 1/0/1 through Ethernet 1/0/3.
<Sysname> reset stp interface Ethernet 1/0/1 to Ethernet 1/0/3
revision-level
Syntax
revision-level level
undo revision-level
View
MST region view
Parameters
level: MSTP revision level to be set for the switch. This argument ranges from 0 to 65,535.
Description
Use the revision-level command to set the MSTP revision level for a switch.
1-12
Use the undo revision-level command to restore the revision level to the default value.
By default, the MSTP revision level of a switch is 0.
MSTP revision level, along with MST region name and VLAN-to-instance mapping table, determines
the MST region which a switch belongs to. When the MST region name and VLAN-to-instance mapping
table are both the same for two MST regions, you can still tell them apart by their MSTP revision levels.
Related commands: instance, region-name, check region-configuration, vlan-mapping modulo,
active region-configuration.
Examples
# Set the MSTP revision level of the MST region to 5.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp region-configuration
[Sysname-mst-region] revision-level 5
stp
Syntax
z
System view, Ethernet port view:
stp { enable | disable }
undo stp
z
System view:
stp interface interface-list { enable | disable }
View
System view, Ethernet port view
Parameters
enable: Enables MSTP.
disable: Disables MSTP.
interface-list: Ethernet port list. You can specify multiple Ethernet ports by providing this argument in the
form of interface-list = { interface-type interface-number [ to interface-type interface-number ] } &<1-10>,
where &<1-10> means that you can provide up to 10 port indexes/port index ranges for this argument.
Description
z
Use the stp command in system view to enable/disable MSTP globally. Use the undo stp
command in system view to restore the MSTP state to the default globally.
z
Use the stp command in Ethernet port view to enable/disable MSTP on a port. Use the undo stp
command in Ethernet port view to restore the MSTP state to the default on a port.
z
Use the stp interface command in system view to enable or disable MSTP on specified ports.
By default, MSTP is enabled both globally and on ports.
Note that:
z
After you enable MSTP, the device works in STP-compatible mode, RSTP mode or MSTP mode
depending on the MSTP mode setting, which is configurable with the stp mode command.
1-13
z
To control MSTP flexibly, you can use the undo stp enable command to disable MSTP on ports
that are not intended to take part in spanning tree calculation and thus to save CPU resources.
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.
Disabling MSTP on ports may result in data loops that can destabilize a network.
Related commands: stp mode.
Examples
# Enable MSTP globally.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp enable
# Disable MSTP on Ethernet 1/0/1.
z
Disable MSTP on Ethernet 1/0/1 in Ethernet port view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] stp disable
z
Disable MSTP on Ethernet 1/0/1 in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/1 disable
# Disable MSTP on Ethernet 1/0/1 to Ethernet 1/0/4 in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/1 to Ethernet 1/0/4 disable
stp bpdu-protection
Syntax
stp bpdu-protection
undo stp bpdu-protection
View
System view
Parameters
None
1-14
Description
Use the stp bpdu-protection command to enable the BPDU guard function on the switch.
Use the undo stp bpdu-protection command to restore to the default state of the BPDU guard
function.
By default, the BPDU guard function is disabled.
Normally, the access ports of the devices operating on the access layer are directly connected to
terminals (such as PCs) or file servers. These ports are usually configured as edge ports to implement
rapid transition. But they resume non-edge ports automatically upon receiving configuration BPDUs,
which causes spanning trees recalculation and network topology jitter.
Normally, no configuration BPDU will reach edge ports. But malicious users can attack a network by
sending configuration BPDUs deliberately to edge ports to cause network jitter. You can prevent such
attacks by enabling the BPDU guard function. With this function enabled on a switch, the switch shuts
down the edge ports that receive configuration BPDUs and then reports these cases to the
administrator. If an edge port is shut down, only the administrator can restore it.
You are recommended to enable BPDU guard for devices with edge ports configured.
As Gigabit ports of a 3Com switch 4500 cannot be shut down, the BPDU guard function is not
applicable to these ports even if you enable the BPDU guard function and specify these ports to be
MSTP edge ports.
Examples
# Enable the BPDU guard function.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp bpdu-protection
stp bridge-diameter
Syntax
stp bridge-diameter bridgenum
undo stp bridge-diameter
View
System view
1-15
Parameters
bridgenum: Network diameter to be set for a switched network. This argument ranges from 2 to 7.
Description
Use the stp bridge-diameter command to set the network diameter of a switched network. The
network diameter of a switched network is represented by the maximum possible number of switches
between any two terminal devices in a switched network.
Use the undo stp bridge-diameter command to restore the network diameter to the default value.
By default, the network diameter is 7.
After you configure the network diameter of a switched network, MSTP adjusts its hello time, forward
delay, and max age settings accordingly. With the network diameter set to the default value 7, the three
time-relate settings, including hello time, forward delay, and max age, are set to their default values as
well.
The stp bridge-diameter command only applies to CIST. It is invalid for MSTIs.
Related commands: stp timer forward-delay, stp timer hello, stp timer max-age.
Examples
# Set the network diameter to 5.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp bridge-diameter 5
stp compliance
Syntax
z
Ethernet port view:
stp compliance { auto | legacy | dot1s }
undo stp compliance
z
System view:
stp interface interface-list compliance { auto | legacy | dot1s }
undo stp interface interface-list compliance
View
System view, Ethernet port view
Parameters
auto: Configures the port(s) to recognize the MSTP BPDU format automatically and accordingly
determine the format of MSTP BPDUs to send.
legacy: Configures the port(s) to receive and send only compatible-format MSTP BPDUs.
dot1s: Configures the port(s) to receive and send only standard-format (802.1s-compliant) MSTP
BPDUs.
interface-list: Ethernet port list. You can specify multiple Ethernet ports by providing this argument in the
format of interface-list ={ interface-type interface-number [ to interface-type interface-number ] }
1-16
&<1-10>, where &<1-10> means that you can provide up to 10 port indexes/port index ranges for this
argument.
Description
z
Use the stp compliance command in interface view to configure the mode the port(s) will use to
recognize and send MSTP BPDUs. Use the undo stp compliance command to restore the
system default.
z
Use the stp interface compliance command in system view to set the mode in which a port
recognizes and sends MSTP packets. Use the undo stp interface compliance command to
restore the default.
The default mode is auto, namely all ports recognize the BPDU format automatically.
Note that:
z
If the mode is set to auto on a port, the port automatically recognizes and resolves the received
compatible-format
BPDUs
or
802.1s-compliant
BPDUs,
and
sends,
when
needed,
compatible-format or 802.1s-compliant BPDUs.
z
If the mode is set to legacy or dot1s on a port, the port can only receive and send BPDUs of the
specified format. If the port is configured not to detect the packet format automatically while it works
in the MSTP mode, and if it receives a packet in the format other than the configured format, it will
become a designated port and remain in the discarding state to prevent the occurrence of a loop.
Examples
# Configure Ethernet 1/0/1 to recognize and send MSTP BPDUs in dot1s format.
z
In Ethernet port view.
<Sysname> system-view
Enter system view, return to user view with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] stp compliance dot1s
z
In system view.
<Sysname> system-view
Enter system view, return to user view with Ctrl+Z.
[Sysname] stp interface Ethernet1/0/1 compliance dot1s
# Configure Ethernet 1/0/2 to Ethernet 1/0/4 to recognize and send MSTP BPDUs in dot1s format.
<Sysname> system-view
[Sysname] stp interface Ethernet 1/0/2 to Ethernet1/0/4 compliance dot1s
stp config-digest-snooping
Syntax
z
System view, Ethernet port view:
stp config-digest-snooping
undo stp config-digest-snooping
z
System view:
stp interface interface-list config-digest-snooping
undo stp interface interface-list config-digest-snooping
1-17
View
System view, Ethernet port view
Parameters
interface-list: Ethernet port list. You can specify multiple Ethernet ports by providing this argument in the
form of interface-list = { interface-type interface-number [ to interface-type interface-number ] } &<1-10>,
where &<1-10> means that you can provide up to 10 port indexes/port index ranges for this argument.
Description
z
Use the stp config-digest-snooping command to enable the digest snooping feature. Use the
undo stp config-digest-snooping command to disable the digest snooping feature. Configured
in system view, the setting takes effect globally; configured in interface view, the setting takes
effect on the current port only.
z
Use the stp interface config-digest-snooping command in system view to enable the digest
snooping feature on specific ports. Use the undo stp interface config-digest-snooping
command in system view to disable the digest snooping feature on specific ports.
The digest snooping feature is disabled by default.
To enable the digest snooping feature successfully, you must first enable it on all the switch ports that
connect to the other manufacturer’s switches adopting proprietary spanning tree protocols and then
enable it globally.
According to IEEE 802.1s, two interconnected switches can interwork with each other through MSTIs in
an MST region only when the two switches have the same MST region-related configuration. With
MSTP enabled, interconnected switches determine whether or not they are in the same MST region by
checking the configuration IDs of the BPDUs between them. (A configuration ID contains information
such as region ID and configuration digest.)
As some other manufacturers' switches adopt proprietary spanning tree protocols, they cannot
interwork with other switches in an MST region even if they are configured with the same MST
region-related settings as other switches in the MST region.
This kind of problem can be overcome by implementing the digest snooping feature. If a switch port is
connected to another manufacturer’s switch that has the same MST region-related settings but adopts
a proprietary spanning tree protocol, you can enable the digest snooping feature on the port that will be
receiving BPDU packets from another manufacturer's switch. Then the switch considers these BPDU
packets to be from its own MST region and records the configuration digests carried in the BPDU
packets received from the switch, which will be put in the BPDU packets to be sent to another
manufacturer’s switch. In this way, the switch can interwork with another manufacturer’s switches in an
MST region.
1-18
z
When the digest snooping feature is enabled on a port, the port turns to the discarding state. That is,
the port stops sending BPDU packets. The port is not involved in the STP calculation until it
receives BPDU packets from the peer port.
z
The digest snooping feature is needed only when your switch is connected to another
manufacturer’s switches adopting proprietary spanning tree protocols.
z
To enable the digest snooping feature, the interconnected switches and another manufacturer’s
switch adopting proprietary spanning tree protocols must be configured with exactly the same MST
region-related configurations (including region name, revision level, and VLAN-to-instance
mapping).
z
The digest snooping feature must be enabled on all the switch ports that connect to another
manufacturer’s switches adopting proprietary spanning tree protocols in the same MST region.
z
When the digest snooping feature is enabled globally, the VLAN-to-instance mapping table cannot
be modified.
z
The digest snooping feature is not applicable to boundary ports in an MST region.
z
The digest snooping function is not applicable to edge ports in an MST region.
Examples
# Enable the digest snooping feature on Ethernet 1/0/1.
z
Enable the digest snooping feature on Ethernet 1/0/1 in Ethernet port view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] stp config-digest-snooping
[Sysname-Ethernet1/0/1] quit
[Sysname] stp config-digest-snooping
z
Enable the digest snooping feature on Ethernet 1/0/1 in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/1 config-digest-snooping
[Sysname] stp config-digest-snooping
# Enable the digest snooping feature on Ethernet 1/0/2 to Ethernet 1/0/4.
<Sysname> system-view
[Sysname] stp interface Ethernet 1/0/2 to Ethernet1/0/4 config-digest-snooping
[Sysname] stp config-digest-snooping
stp cost
Syntax
z
Ethernet port view:
stp [ instance instance-id ] cost cost
undo stp [ instance instance-id ] cost
1-19
z
System view:
stp interface interface-list [ instance instance-id ] cost cost
undo stp interface interface-list [ instance instance-id ] cost
View
System view, Ethernet port view
Parameters
instance-id: ID of an MSTI ranging from 0 to 16. The value of 0 refers to the CIST.
cost: Path cost to be set for the port. STP uses path costs to indicate the quality of links. A smaller path
cost indicates a higher link quality. The range of the cost argument varies with the standard used for
calculating the default path cost of a port as follows:
z
With the IEEE 802.1D-1998 standard selected, the path cost of an Ethernet port ranges from 1 to
65535.
z
With the IEEE 802.1t standard selected, the path cost of an Ethernet port ranges from 1 to
200000000.
z
With the proprietary standard selected, the path cost of an Ethernet port ranges from 1 to 200000.
interface-list: Ethernet port list. You can specify multiple Ethernet ports by providing this argument in the
form of interface-list = { interface-type interface-number [ to interface-type interface-number ] } &<1-10>,
where &<1-10> means that you can provide up to 10 port indexes/port index ranges for this argument.
Description
z
Use the stp cost command to set the path cost of the current port in a specified MSTI in ethernet
port view. Use the undo stp cost command to restore the default path cost of the current port in
the specified MSTI in ethernet port view.
z
Use the stp interface cost command to set the path cost(s) of the specified port(s) in a specified
MSTI in system view. Use the undo stp interface cost command to restore the default value of
the path cost(s) of the specified port(s) in the specified MSTI in system view.
By default, a switch automatically calculates the path costs of a port in different MSTIs based on a
specified standard.
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.
Note that:
z
If you specify the instance-id argument to be 0 or do not specify this argument, the stp cost
command sets the path cost of the port in CIST.
z
Changing the path cost of a port in an MSTI may change the role of the port in the instance and put
it in state transition.
z
Ports with different rates have different default path costs. For details, see Table 1-8.
Examples
# Set the path cost of Ethernet 1/0/1 in MSTI 2 to 200.
z
Set the path cost of Ethernet 1/0/1 in MSTI 2 to 200 in Ethernet port view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
1-20
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] stp instance 2 cost 200
z
Set the path cost of Ethernet 1/0/1 in MSTI 2 to 200 in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/1 instance 2 cost 200
# Set the path cost of Ethernet 1/0/2 to Ethernet 1/0/4 in MSTI 2 to 400 in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/2 to Ethernet 1/0/4 instance 2 cost 400
stp dot1d-trap
Syntax
stp dot1d-[ instance instance-id ] trap [ newroot | topologychange ] enable
undo stp [ instance instance-id ] dot1d-trap [ newroot | topologychange ] enable
View
System view
Parameters
instance-id: MSTI ID ranging from 0 to 16. The value of 0 refers to CIST. With this argument specified,
the trap messages sent are only of the MSTI identified by this argument.
newroot: Sends trap messages conforming to 802.1d standard to the network management device
when the switch becomes the root bridge of an instance.
topologychange: Sends trap messages conforming to 802.1d standard to the network management
device when the switch detects network topology changes.
Description
Use the stp dot1d-trap command to enable a switch to send trap messages conforming to 802.1d
standard when MSTP network topology changes.
Use the undo stp dot1d-trap command to disable this function.
A switch sends trap messages conforming to 802.1d standard to the network management device
when:
z
The switch becomes the root bridge of an MSTI.
z
Network topology changes are detected.
Examples
# Enable a switch to send trap messages conforming to 802.1d standard to the network management
device when the switch becomes the root bridge of MSTI 1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp instance 1 dot1d-trap newroot enable
1-21
stp edged-port
Syntax
z
Ethernet port view:
stp edged-port { enable | disable }
undo stp edged-port
z
System view:
stp interface interface-list edged-port { enable | disable }
undo stp interface interface-list edged-port
View
System view, Ethernet port view
Parameters
enable: Configures the port as an edge port.
disable: Configures the port as a non-edge port.
interface-list: Ethernet port list. You can specify multiple Ethernet ports by providing this argument in the
form of interface-list = { interface-type interface-number [ to interface-type interface-number ] } &<1-10>,
where &<1-10> means that you can provide up to 10 port indexes/port index ranges for this argument.
Description
z
Use the stp edged-port enable command to configure the current Ethernet port as an edge port.
Use the stp edged-port disable command to configure the current Ethernet port as a non-edge
port. Use the undo stp edged-port command to restore the current Ethernet port to its default
state.
z
Use the stp interface edged-port enable command to configure the specified Ethernet ports as
edge ports in system view. Use the stp interface edged-port disable command to configure the
specified Ethernet ports as non-edge ports in system view. Use the undo stp interface
edged-port command to restore the specified Ethernet ports to the default state.
By default, all Ethernet ports of a switch are non-edge ports.
An edge port is a port that is directly connected to a user terminal instead of another switch or shared
network segment. Rapid transition to the forwarding state (sometimes referred to as “Fast Start”) is
applied to edge ports because on these ports no loops can be incurred by network topology changes.
You can enable a port to turn to the forwarding state rapidly by setting it to an edge port. And you are
recommended to configure the Ethernet ports directly connected to user terminals as edge ports to
enable them to turn to the forwarding state rapidly.
Normally, configuration BPDUs cannot reach an edge port because the port is not connected to another
switch. But when the BPDU guard function is disabled on an edge port, configuration BPDUs sent
deliberately by a malicious user may reach the port. If an edge port receives a BPDU, it turns to a
non-edge port.
1-22
Loop guard, root guard, and edge port settings are mutually exclusive. With one of these functions
enabled on a port, any of the other two functions cannot take effect even if you have configured it on the
port.
Examples
# Configure Ethernet 1/0/1 as an edge port.
z
Configure Ethernet 1/0/1 as an edge port in Ethernet port view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] stp edged-port enable
z
Configure Ethernet 1/0/1 as an edge port in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/1 edged-port enable
# Configure Ethernet 1/0/2 to Ethernet 1/0/4 as edge ports in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/2 to Ethernet 1/0/4 edged-port enable
stp loop-protection
Syntax
z
Ethernet port view:
stp loop-protection
undo stp loop-protection
z
System view:
stp interface interface-list loop-protection
undo stp interface interface-list loop-protection
View
System view, Ethernet port view
Parameters
interface-list: Ethernet port list. You can specify multiple Ethernet ports by providing this argument in the
form of interface-list = { interface-type interface-number [ to interface-type interface-number ] } &<1-10>,
where &<1-10> means that you can provide up to 10 port indexes/port index ranges for this argument.
1-23
Description
z
Use the stp loop-protection command to enable the loop guard function on the current port. Use
the undo stp loop-protection command to restore the loop guard function to the default state on
the current port.
z
Use the stp interface loop-protection command to enable the loop guard function on specified
ports in system view. Use the undo stp interface loop-protection command to restore the default
state of the loop guard function on specified ports in system view.
By default, the loop guard function is disabled on the port.
A switch maintains the states of the root port and other blocked ports by receiving and processing
BPDUs from the upstream switch. These BPDUs may get lost because of network congestion or
unidirectional link failures. If a switch does not receive BPDUs from the upstream switch for a certain
period, the switch selects a new root port; the original root port becomes a designated port; and the
blocked ports turn to the forwarding state. This may cause loops in the network.
The loop guard function suppresses loops. With this function enabled, if link congestions or
unidirectional link failures happen, a root port becomes a designated port, and the port turns to the
discarding state. The blocked port also becomes the designated port and the port turns to the
discarding state, that is, the port does not forward packets and thereby loops can be prevented.
z
You are recommended to enable loop guard on the root port and alternate port of a non-root bridge.
z
Loop guard, root guard, and edge port settings are mutually exclusive. With one of these functions
enabled on a port, any of the other two functions cannot take effect even if you have configured it
on the port.
Examples
# Enable the loop guard function on Ethernet 1/0/1.
z
Enable the loop guard function on Ethernet 1/0/1 in Ethernet port view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] stp loop-protection
z
Enable the loop guard function on Ethernet 1/0/1 in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/1 loop-protection
# Enable the loop guard function on Ethernet 1/0/2 to Ethernet 1/0/4 in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/2 to Ethernet 1/0/4 loop-protection
1-24
stp max-hops
Syntax
stp max-hops hops
undo stp max-hops
View
System view
Parameters
hops: Maximum hop count to be set. This argument ranges from 1 to 40.
Description
Use the stp max-hops command to set the maximum hop count for the MST region the current switch
belongs to.
Use the undo stp max-hops command to restore the maximum hop count to the default.
By default, the maximum hop count of an MST region is 20.
The maximum hop count configured on the region roots of an MST region limits the size of the MST
region.
A configuration BPDU contains a field that maintains the remaining hops of the configuration BPDU.
And a switch discards the configuration BPDUs whose remaining hops are 0. After a configuration
BPDU reaches a root bridge of a spanning tree in a MST region, the value of the remaining hops field in
the configuration BPDU is decreased by 1 every time the configuration BPDU passes one switch. Such
a mechanism disables the switches that are beyond the maximum hops from participating in spanning
tree calculation, and thus limits the size of an MST region.
With such a mechanism, the maximum hops configured on the switch operating as the root bridge of the
CIST or an MSTI in a MST region becomes the network diameter of the spanning tree, which limits the
size of the spanning tree in the current MST region. The switches that are not root bridges in an MST
region adopt the maximum hop settings of the root bridge.
Examples
# Set the maximum hop count of the current MST region to 35.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp max-hops 35
stp mcheck
Syntax
z
Ethernet port view:
stp mcheck
z
System view:
stp [ interface interface-list ] mcheck
1-25
View
System view, Ethernet port view
Parameters
interface-list: Ethernet port list. You can specify multiple Ethernet ports by providing this argument in the
form of interface-list = { interface-type interface-number [ to interface-type interface-number ] } &<1-10>,
where &<1-10> means that you can provide up to 10 port indexes/port index ranges for this argument.
Description
z
Use the stp mcheck command to perform the mCheck operation on the current port in Ethernet
port view.
z
Use the stp interface mcheck command to perform the mCheck operation on specified port(s) in
system view. If the value of interface interface-list is not specified, this command performs the
mCheck operation on all MSTP-enabled ports of the device.
When a port on an MSTP-enabled/RSTP-enabled upstream switch connects with an STP-enabled
downstream switch, the port operates in the STP-compatible mode automatically. But when the
STP-enabled downstream switch is then replaced by an MSTP-enabled switch, the port cannot
automatically transit to the MSTP mode but still remains in the STP-compatible mode. In this case, you
can force the port to transit to the MSTP mode by performing the mCheck operation on the port.
Related commands: stp mode.
Examples
# Perform the mCheck operation on Ethernet 1/0/1.
z
Perform the mCheck operation on Ethernet 1/0/1 in Ethernet port view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] stp mcheck
z
Perform the mCheck operation on Ethernet 1/0/1 in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/1 mcheck
# Perform the mCheck operation on Ethernet 1/0/2 to Ethernet 1/0/4 in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/2 to Ethernet 1/0/4 mcheck
# Perform the mCheck operation on all the MSTP-enabled ports of your switch in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp mcheck
1-26
stp mode
Syntax
stp mode { stp | rstp | mstp }
undo stp mode
View
System view
Parameters
stp: Specifies the STP-compatible mode.
mstp: Specifies the MSTP mode.
rstp: Specifies the RSTP-compatible mode.
Description
Use the stp mode command to set the operating mode of an MSTP-enabled switch.
Use the undo stp mode command to restore the default operating mode of an MSTP-enabled switch.
By default, an MSTP-enabled switch operates in MSTP mode.
To make a switch compatible with STP and RSTP, MSTP provides following three operating modes.
z
STP-compatible mode, where the ports of a switch send STP BPDUs to neighboring devices. If
STP-enabled switches exist in a switched network, you can use the stp mode stp command to
configure an MSTP-enabled switch to operate in STP-compatible mode.
z
RSTP-compatible mode, where the ports of a switch send RSTP BPDUs to neighboring devices. If
RSTP-enabled switches exist in a switched network, you can use the stp mode rstp command to
configure an MSTP-enabled switch to operate in RSTP-compatible mode.
z
MSTP mode, where the ports of a switch send MSTP BPDUs and STP BPDUs (if the switch is
connected to STP-enabled switches) to neighboring devices. In this case, the switch is
MSTP-capable.
Related commands: stp mcheck, stp, stp interface, stp interface mcheck.
Examples
# Configure the MSTP operation mode as STP-compatible.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp mode stp
stp no-agreement-check
Syntax
z
Ethernet port view:
stp no-agreement-check
undo stp no-agreement-check
z
System view:
stp interface interface-type interface-number no-agreement-check
1-27
undo stp interface interface-type interface-number no-agreement-check
View
System view, Ethernet port view
Parameters
interface-type: Port type.
interface-number: Port number.
Description
z
Use the stp no-agreement-check command to enable the rapid transition feature on the current
port in Ethernet port view. Use the stp no-agreement-check command to disable the rapid
transition feature on the current port in Ethernet port view.
z
Use the stp interface no-agreement-check command to enable the rapid transition feature on the
specified port in system view. Use the undo stp interface no-agreement-check command to
disable the rapid transition feature on the specified port in system view.
By default, the rapid transition feature is disabled on a port.
Some manufactures' switches adopt proprietary spanning tree protocols that are similar to RSTP in the
way to implement rapid transition on designated ports. When a switch of this kind operates as the
upstream switch of a 3Com switch 4500 running MSTP, the upstream designated port fails to change
their states rapidly.
The rapid transition feature aims to resolve this problem. When a 3Com switch 4500 running MSTP is
connected in the upstream direction to another manufacture's switch adopting proprietary spanning tree
protocols, you can enable the rapid transition feature on the ports of the switch 4500 operating as the
downstream switch. Among these ports, those operating as the root ports will then actively send
agreement packets to their upstream ports after they receive proposal packets from the upstream
designated ports, instead of waiting for agreement packets from the upstream switch. This enables
designated ports of the upstream switch to change their states rapidly.
z
The rapid transition feature can be enabled on only root ports or alternate ports.
z
You can enable the rapid transition feature on the designated port. However, the feature does not
take effect on the port.
Examples
# Enable the rapid transition feature on Ethernet 1/0/1.
z
Enable the rapid transition feature on Ethernet 1/0/1 in Ethernet port view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] stp no-agreement-check
z
Enable the rapid transition feature on Ethernet 1/0/1 in system view.
1-28
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname]stp interface Ethernet1/0/1 no-agreement-check
stp pathcost-standard
Syntax
stp pathcost-standard { dot1d-1998 | dot1t | legacy }
undo stp pathcost-standard
View
System view
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 set the standard to be used to calculate the default path
costs of the links connected to the switch.
Use the undo stp pathcost-standard command to specify to use the default standard.
By default, the device calculates the default path cost for ports based on a private standard. STP uses
path costs to indicate the quality of links. A smaller path cost indicates a higher link quality. The path
cost of a port is related to the rate of the link connecting the port. The higher the link rate, the smaller the
path cost. The path cost of a port may vary when different standards are used to calculate it. For details,
see Table 1-8.
Table 1-8 Link speeds and the corresponding path costs
Link speed
0
10 Mbps
100 Mbps
1,000 Mbps
Path cost in
802.1d-1998
standard
Duplex state
Path cost in
IEEE 802.1t
standard
Path cost in
private
standard
—
65,535
200,000,000
200,000
Half-duplex/Full-duplex
100
200,000
2,000
Aggregated link 2 ports
95
1,000,000
1,800
Aggregated link 3 ports
95
666,666
1,600
Aggregated link 4 ports
95
500,000
1,400
Half-duplex/Full-duplex
19
200,000
200
Aggregated link 2 ports
15
100,000
180
Aggregated link 3 ports
15
66,666
160
Aggregated link 4 ports
15
50,000
140
Full-duplex
4
200,000
20
Aggregated link 2 ports
3
10,000
18
Aggregated link 3 ports
3
6,666
16
Aggregated link 4 ports
3
5,000
14
1-29
Link speed
10 Gbps
Path cost in
802.1d-1998
standard
Duplex state
Path cost in
IEEE 802.1t
standard
Path cost in
private
standard
Full-duplex
2
200,000
2
Aggregated link 2 ports
1
1,000
1
Aggregated link 3 ports
1
666
1
Aggregated link 4 ports
1
500
1
Normally, when a port operates in full-duplex mode, the corresponding path cost is slightly less than that
when the port operates in half-duplex mode.
When the path cost of an aggregated link is calculated, the 802.1D-1998 standard does not take the
number of the ports on the aggregated link into account, whereas the 802.1T standard does. The
following formula is used to calculate the path cost of an aggregated link:
Path cost = 200,000,000 / link speed,
In this formula, the link speed is the sum of the speeds of the unblocked ports on the aggregated link,
which is measured in 100 Kbps.
You can use the stp cost command to manually configure the path cost of a port in a specified MSTI.
For details, see stp cost.
Examples
# Configure to use the IEEE 802.1D-1998 standard to calculate the default path costs of ports.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp pathcost-standard dot1d-1998
# Configure to use the IEEE 802.1t standard to calculate the default path costs of ports.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp pathcost-standard dot1t
stp point-to-point
Syntax
z
Ethernet port view:
stp point-to-point { force-true | force-false | auto }
undo stp point-to-point
z
System view:
stp interface interface-list point-to-point { force-true | force-false | auto }
undo stp interface interface-list point-to-point
View
System view, Ethernet port view
Parameters
force-true: Specifies that the link connected to the current Ethernet port is a point-to-point link.
1-30
force-false: Specifies that the link connected to the current Ethernet port is not a point-to-point link.
auto: Specifies to automatically determine whether or not the link connected to the current Ethernet port
is a point-to-point link.
interface-list: Ethernet port list. You can specify multiple Ethernet ports by providing this argument in the
form of interface-list = { interface-type interface-number [ to interface-type interface-number ] } &<1-10>,
where &<1-10> means that you can provide up to 10 port indexes/port index ranges for this argument.
Description
z
Use the stp point-to-point command to specify whether the link connected to the current Ethernet
port is a point-to-point link. Use the undo stp point-to-point command to restore the link
connected to the current Ethernet port to its default link type, which is automatically determined by
MSTP.
z
Use the stp interface point-to-point command to specify whether the links connected to the
specified Ethernet ports are point-to-point links in system view. Use the undo stp interface
point-to-point command to restore the links connected to the specified ports to their default link
types, which are automatically determined by MSTP.
The default setting is auto; namely the MSTP-enabled device automatically detects whether a port
connects to a point-to-point link.
If no keyword is specified in the stp point-to-point command, the auto keyword is used by default, and
so MSTP automatically determines the type of the link connected to the current port.
The rapid transition feature is not applicable to ports on non-point-to-point links.
If an Ethernet port is the master port of aggregation ports or operates in full-duplex mode, the link
connected to the port is a point-to-point link. You are recommended to let MSTP automatically
determine the link types of ports.
The two commands only apply to CISTs and MSTIs. If you configure the link to which a port is
connected is a point-to-point link (or a non-point-to-point link), the configuration applies to all MSTIs
(that is, the port is configured to connect to a point-to-point link (or a non-point-to-point link) in all MSTIs).
If the actual physical link is not a point-to-point link and you configure the link to which the port is
connected to be a point-to-point link, temporary loops may occur.
Examples
# Configure the link connected to Ethernet 1/0/1 as a point-to-point link.
z
Configure the link connected to Ethernet 1/0/1 as a point-to-point link in Ethernet port view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] stp point-to-point force-true
z
Configure the link connected to Ethernet 1/0/1 as a point-to-point link in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/1 point-to-point force-true
# Configure the links connected to Ethernet 1/0/2 to Ethernet 1/0/4 as point-to-point links in system
view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
1-31
[Sysname] stp interface Ethernet 1/0/2 to Ethernet 1/0/4 point-to-point force-true
stp port priority
Syntax
z
Ethernet port view:
stp [ instance instance-id ] port priority priority
undo stp [ instance instance-id ] port priority
z
System view:
stp interface interface-list instance instance-id port priority priority
undo stp interface interface-list instance instance-id port priority
View
System view, Ethernet port view
Parameters
instance-id: MSTI ID ranging from 0 to 16. The value of 0 refers to the CIST.
port priority priority: Sets the port priority. The priority argument ranges from 0 to 240 and must be a
multiple of 16 (such as 0, 16, and 32).
interface-list: Ethernet port list. You can specify multiple Ethernet ports by providing this argument in the
form of interface-list = { interface-type interface-number [ to interface-type interface-number ] } &<1-10>,
where &<1-10> means that you can provide up to 10 port indexes/port index ranges for this argument.
Description
z
Use the stp port priority command to set the port priority of the current port in the specified MSTI.
Use the undo stp port priority command to restore the default port priority of the current port in
the specified MSTI.
z
Use the stp interface port priority command to set a port priority for the specified ports in the
specified MSTI in system view. Use the undo stp interface port priority command to restore the
default priority of the specified ports in the specified MSTI in system view.
The default port priority of a port in any MSTI is 128.
If you specify the instance-id argument to 0 or do not specify the argument, the two commands apply to
the port priorities of ports on the CIST. The role a port plays in a MSTI is determined by the port priority
in the instance. A port on a MSTP-enabled switch can have different port priorities and play different
roles in different MSTIs. This enables packets of different VLANs to be forwarded along different
physical links, so as to implement VLAN-based load balancing. Changing port priorities result in port
role recalculation and state transition.
Examples
# Set the port priority of Ethernet 1/0/1 in MSTI 2 to 16.
z
Set the port priority of Ethernet 1/0/1 in MSTI 2 to 16 in Ethernet port view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] stp instance 2 port priority 16
1-32
z
Set the port priority of Ethernet 1/0/1 in MSTI 2 to 16 in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/1 instance 2 port priority 16
# Set the port priority of Ethernet 1/0/2 to Ethernet 1/0/4 in MSTI 2 to 16 in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/2 to Ethernet 1/0/4 instance 2 port priority 16
stp portlog
Syntax
stp [ instance instance-id ] portlog
undo stp [ instance instance-id ] portlog
View
System view
Parameters
instance instance-id: Specifies an MSTI ID, ranging from 0 to 16. The value of 0 indicates the CIST.
Description
Use the stp portlog command to enable log and trap message output for the ports of a specified
instance.
Use the undo stp portlog command to disable this function.
By default, log and trap message output is disabled.
Executing the stp portlog command (without using the instance instance-id parameters) will enable
log and trap message output for the ports of instance 0.
Examples
# Enable log and trap message output for the ports of instance 1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp instance 1 portlog
stp portlog all
Syntax
stp portlog all
undo stp portlog all
View
System view
1-33
Parameters
None
Description
Use the stp portlog all command to enable log and trap message output for the ports of all instances.
Use the undo stp portlog all command to disable this function.
By default, log and trap message output is disabled on the ports of all instances.
Examples
# Enable log and trap message output for the ports of all instances.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp portlog all
stp priority
Syntax
stp [ instance instance-id ] priority priority
undo stp [ instance instance-id ] priority
View
System view
Parameters
instance-id: MSTI ID ranging from 0 to 16. The value of 0 refers to the CIST.
priority: Switch priority to be set. This argument ranges from 0 to 61,440 and must be a multiple of 4,096
(such as 0, 4,096, and 8,192). There are totally 16 available switch priorities.
Description
Use the stp priority command to set the priority of the switch in the specified MSTI.
Use the undo stp priority command to restore the switch priority to the default priority in the specified
MSTI.
The default priority of a switch is 32,768.
The priorities of switches are used for spanning tree calculation. Switch priorities are spanning
tree-specific. That is, you can set different priorities for the same switch in different MSTIs.
If you do not specify the instance-id argument, the two commands apply to only the CIST.
Examples
# Set the bridge priority of the switch in MSTI 1 to 4,096.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp instance 1 priority 4096
1-34
stp region-configuration
Syntax
stp region-configuration
undo stp region-configuration
View
System view
Parameters
None
Description
Use the stp region-configuration command to enter MST region view.
Use the undo stp region-configuration command to restore the MST region-related settings to the
default.
MST region-related parameters include: region name, revision level, and VLAN-to-instance mapping
table. By default:
z
MST region name is the first MAC address of the switch
z
All VLANs are mapped to the CIST in the VLAN-to-instance mapping table
z
The MSTP revision level is 0
You can modify the three parameters after entering MST region view by using the stp
region-configuration command.
NTDP packets sent by devices in a cluster can be transmitted in only the instances where the
management VLAN of the cluster resides.
Examples
# Enter MST region view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp region-configuration
[Sysname-mst-region]
stp root primary
Syntax
stp [ instance instance-id ] root primary [ bridge-diameter bridgenum [ hello-time centi-seconds ] ]
undo stp [ instance instance-id ] root
1-35
View
System view
Parameters
instance-id: MSTI ID ranging from 0 to 16. The value of 0 refers to the CIST.
bridgenum: Network diameter of the specified spanning tree. This argument ranges from 2 to 7 and
defaults to 7.
centi-seconds: Hello time in centiseconds of the specified spanning tree. This argument ranges from
100 to 1,000 and defaults to 200.
Description
Use the stp root primary command to configure the current switch as the root bridge of a specified
MSTI.
Use the undo stp root command to cancel the current configuration.
By default, a switch is not configured as a root bridge.
If you do not specify the instance-id argument, these two commands apply to only the CIST.
You can specify the current switch as the root bridge of an MSTI regardless of the priority of the switch.
You can also specify the network diameter of the switched network by using the stp root primary
command. The switch will then figure out the following three time parameters: hello time, forward delay,
and max age. As the hello time figured out by the network diameter is not always the optimal one, you
can set it manually through the hello-time centi-seconds parameter. Generally, you are recommended
to obtain the forward delay and max age parameters through setting the network diameter.
z
You can configure only one root bridge for an MSTI and can configure one or more secondary root
bridges for an MSTI. Specifying multiple root bridges for an MSTI causes unpredictable spanning
tree calculation results.
z
Once a switch is configured as the root bridge or a secondary root bridge, its priority cannot be
modified.
Examples
# Configure the current switch as the root bridge of MSTI 1, set the network diameter of the switched
network to 4, and set the hello time to 500 centiseconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp instance 1 root primary bridge-diameter 4 hello-time 500
1-36
stp root secondary
Syntax
stp [ instance instance-id ] root secondary [ bridge-diameter bridgenum
[ hello-time
centi-seconds ] ]
undo stp [ instance instance-id ] root
View
System view
Parameters
instance-id: MSTI ID ranging from 0 to 16. The value of 0 refers to the CIST.
bridgenum: Network diameter of the specified spanning tree. This argument ranges from 2 to 7 and
defaults to 7.
centi-seconds: Hello time in centiseconds of the specified spanning tree. This argument ranges from
100 to 1,000 and defaults to 200.
Description
Use the stp root secondary command to configure the current switch as a secondary root bridge of a
specified MSTI.
Use the undo stp root command to cancel the current configuration.
By default, a switch does not operate as a secondary root bridge.
If you do not specify the instance-id argument, the two commands apply to only the CIST.
You can configure one or more secondary root bridges for an MSTI. If the switch operating as the root
bridge fails or is turned off, the secondary root bridge with the least MAC address becomes the root
bridge.
You can specify the network diameter and the hello time of the switch when you are configuring it as a
secondary root bridge. The switch will then figure out the other two time parameters: forward delay and
max age. If the instance-id argument is specified to 0 in this command, the current switch is configured
as the secondary root bridge of the CIST. You can configure only one root bridge for an MSTI but you
can configure one or more secondary root bridges for an MSTI.
Once a switch is configured as the root bridge or a secondary root bridge, its priority cannot be modified.
Examples
# Configure the current switch as a secondary root bridge of MSTI 4, setting the network diameter of the
switched network to 5 and the hello time of the current switch to 300 centiseconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp instance 4 root secondary bridge-diameter 5 hello-time 300
1-37
stp root-protection
Syntax
z
Ethernet port view:
stp root-protection
undo stp root-protection
z
System view:
stp interface interface-list root-protection
undo stp interface interface-list root-protection
View
System view, Ethernet port view
Parameters
interface-list: Ethernet port list. You can specify multiple Ethernet ports by providing this argument in the
form of interface-list = { interface-type interface-number [ to interface-type interface-number ] } &<1-10>,
where &<1-10> means that you can provide up to 10 port indexes/port index ranges for this argument.
Description
z
Use the stp root-protection command to enable the root guard function on the current port. Use
the undo stp root-protection command to restore the root guard function to the default state on
the current port.
z
Use the stp interface root-protection command to enable the root guard function on specified
port(s) in system view. Use the undo stp interface root-protection command to restore the root
guard function to the default state on specified port(s) in system view.
By default, the root guard function is disabled.
Because of configuration errors or malicious attacks, the valid root bridge in the network may receive
configuration BPDUs with their priorities higher than that of the root bridge, which causes new root
bridge to be elected and network topology jitter to occur. In this case, flows that should have traveled
along high-speed links are led to low-speed links, causing network congestion.
You can avoid this problem by utilizing the root guard function. Root-guard-enabled ports can only be
kept as designated ports in all MSTIs. When a port of this type receives configuration BPDUs with
higher priorities, it turns to the discarding state before it is specified as a non-designated port and stops
forwarding packets (as if it is disconnected from the link). It resumes the normal state if it does not
receive any configuration BPDUs with higher priorities for a specified period.
z
You are recommended to enable root guard on the designated ports of a root bridge.
z
Loop guard, root guard, and edge port settings are mutually exclusive. With one of these functions
enabled on a port, any of the other two functions cannot take effect even if you have configured it
on the port.
1-38
Examples
# Enable the root guard function on Ethernet 1/0/1.
z
Enable the root guard function on Ethernet 1/0/1 in Ethernet port view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] stp root-protection
z
Enable the root guard function on Ethernet 1/0/1 in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/1 root-protection
# Enable the root guard function on Ethernet 1/0/2 to Ethernet 1/0/4 in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/2 to Ethernet 1/0/4 root-protection
stp tc-protection
Syntax
stp tc-protection enable
stp tc-protection disable
View
System view
Parameters
None
Description
Use the stp tc-protection enable command to enable the TC-BPDU attack guard function.
Use the stp tc-protection disable command to disable the TC-BPDU attack guard function.
By default, the TC-BPDU guard attack function is enabled, and the MAC address table and ARP entries
can be removed for up to six times within 10 seconds.
Normally, a switch removes the MAC address table and ARP entries upon receiving TC-BPDUs. If a
malicious user sends a large amount of TC-BPDUs to a switch in a short period, the switch may be busy
in removing the MAC address table and ARP entries frequently, which may affect spanning tree
calculation, occupy large amount of bandwidth and increase switch CPU utilization.
With the TC-BPDU attack guard function enabled, a switch performs a removing operation upon
receiving a TC-BPDU and triggers a timer (set to 10 seconds by default) at the same time. Before the
timer expires, the switch only performs the removing operation for limited times (up to six times by
default) regardless of the number of the TC-BPDUs it receives. Such a mechanism prevents a switch
from being busy in removing the MAC address table and ARP entries.
Examples
# Enable the TC-BPDU attack guard function on the switch.
1-39
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp tc-protection enable
stp tc-protection threshold
Syntax
stp tc-protection threshold number
undo stp tc-protection threshold
View
System view
Parameters
number: Maximum number of times that a switch can remove the MAC address table and ARP entries
within each 10 seconds, in the range of 1 to 255.
Description
Use the stp tc-protection threshold command to set the maximum number of times that a switch can
remove the MAC address table and ARP entries within each 10 seconds.
Use the undo stp tc-protection threshold command to restore the default.
Normally, a switch removes the MAC address table and ARP entries upon receiving a TC-BPDU. If a
malicious user sends large amount of TC-BPDUs to a switch in a short period, the switch may be busy
in removing the MAC address table and ARP entries, which may affect spanning tree calculation,
occupy a large amount of bandwidth and increase switch CPU utilization.
With the TC-BPDU attack guard function enabled, a switch performs a removing operation upon
receiving a TC-BPDU and triggers a timer (set to 10 seconds by default) at the same time. Before the
timer expires, the switch only performs the removing operation for limited times (up to six times by
default) regardless of the number of the TC-BPDUs it receives. Such a mechanism prevents a switch
from being busy in removing the MAC address table and ARP entries.
You can use the stp tc-protection threshold command to set the maximum times for a switch to
remove the MAC address table and ARP entries in a specific period. When the number of the
TC-BPDUs received within a period is less than the maximum times, the switch performs a removing
operation upon receiving a TC-BPDU. After the number of the TC-BPDUs received reaches the
maximum times, the switch stops performing the removing operation. For example, if you set the
maximum times for a switch to remove the MAC address table and ARP entries to 100 and the switch
receives 200 TC-BPDUs in the period, the switch removes the MAC address table and ARP entries for
only 100 times within the period.
Examples
# Set the maximum times for a switch to remove the MAC address table and ARP entries within 10
seconds to 5.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp tc-protection threshold 5
1-40
stp timer forward-delay
Syntax
stp timer forward-delay centi-seconds
undo stp timer forward-delay
View
System view
Parameters
centi-seconds: Forward delay in centiseconds to be set. This argument ranges from 400 to 3,000.
Description
Use the stp timer forward-delay command to set the forward delay of the switch.
Use the undo stp timer forward-delay command to restore the forward delay to the default value.
By default, the forward delay of the switch is 1,500 centiseconds.
To prevent the occurrence of temporary loops, when a port changes its state from discarding to
forwarding, it undergoes an intermediate state and waits for a specific period to synchronize with the
state transition of the remote switches. This state transition period is determined by the forward delay
configured on the root bridge.
The forward delay setting configured on a root bridge applies to all non-root bridges.
As for the configuration of the three time-related parameters (namely, the hello time, forward delay, and
max age parameters), the following formulas must be met to prevent frequent network jitter.
2 x (forward delay – 1 second) >= max age
Max age >= 2 x (hello time + 1 second)
You are recommended to specify the network diameter of the switched network and the hello time by
using the stp root primary or stp root secondary command. After that, the three proper time-related
parameters are automatically calculated by MSTP.
Related commands: stp timer hello, stp timer max-age, stp bridge-diameter.
Examples
# Set the forward delay to 2,000 centiseconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp timer forward-delay 2000
stp timer hello
Syntax
stp timer hello centi-seconds
undo stp timer hello
View
System view
1-41
Parameters
centi-seconds: Hello time to be set, in the range of 100 to 1,000 (in centiseconds).
Description
Use the stp timer hello command to set the hello time of the switch.
Use the undo stp timer hello command to restore the hello time of the switch to the default value.
By default, the hello time of the switch is 200 centiseconds.
A root bridge regularly sends out configuration BPDUs to maintain the stability of existing spanning
trees. If the switch does not receive BPDU packets in a specified period, spanning trees will be
recalculated because BPDU packets time out. When a switch becomes a root bridge, it regularly sends
BPDUs at the interval specified by the hello time you have configured on it. The other none-root-bridge
switches adopt the interval specified by the hello time.
As for the configuration of the three time-related parameters (namely, the hello time, forward delay, and
max age parameters), the following formulas must be met to prevent frequent network jitter.
2 × (forward delay – 1 second) >= max age
Max age >= 2 × (hello time + 1 second)
You are recommended to specify the network diameter of the switched network and the hello time by
using the stp root primary or stp root secondary command. After that, the three proper time-related
parameters are automatically calculated by MSTP.
Related commands: stp timer forward-delay, stp timer max-age, stp bridge-diameter.
Examples
# Set the hello time to 400 centiseconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp timer hello 400
stp timer max-age
Syntax
stp timer max-age centi-seconds
undo stp timer max-age
View
System view
Parameters
centi-seconds: Max age to be set, in the range of 600 to 4,000 (in centiseconds).
Description
Use the stp timer max-age command to set the max age of the switch.
Use the undo stp timer max-age command to restore the default max age.
By default, the max age of a switch is 2,000 centiseconds.
1-42
MSTP is capable of detecting link failures and automatically restoring redundant links to the forwarding
state. In CIST, switches use the max age parameter to judge whether or not a received configuration
BPDU times out. Spanning trees will be recalculated if a configuration BPDU received by a port times
out.
The max age is meaningless to MSTIs. The max age configured for the root bridge of the CIST applies
to all switches operating on the CIST, including the root bridge.
As for the configuration of the three time-related parameters (namely, the hello time, forward delay, and
max age parameters), the following formulas must be met to prevent frequent network jitter:
2 × (forward delay – 1 second) >= max age,
Max age >= 2 × (hello time + 1 second).
You are recommended to specify the network diameter of the switched network and the hello time
parameter by using the stp root primary or stp root secondary command. After that, the three proper
time-related parameters are automatically determined by MSTP.
Related commands: stp timer forward-delay, stp timer hello, stp bridge-diameter.
Examples
# Set the max age to 1,000 centiseconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp timer max-age 1000
stp timer-factor
Syntax
stp timer-factor number
undo stp timer-factor
View
System view
Parameters
number: Hello time factor to be set, in the range of 1 to 10.
Description
Use the stp timer-factor command to set the timeout time of a switch in the form of a multiple of the
hello time.
Use the undo stp timer-factor command to restore the hello time factor to the default value.
By default, the hello time factor of the switch is 3.
A switch regularly sends protocol packets to its neighboring devices at the interval specified by the hello
time parameter to test the links. Generally, a switch regards its upstream switch faulty if the former does
receive any protocol packets from the latter in a period three times of the hello time and then initiates the
spanning tree recalculation process.
Spanning trees may be recalculated even in a steady network if an upstream switch is always busy. You
can configure the hello time factor to a larger number to avoid this problem. Normally, the timeout time
1-43
can be four (or more) times of the hello time. For a steady network, the timeout time can be five to seven
times of the hello time.
Examples
# Set the hello time factor to 7.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp timer-factor 7
stp transmit-limit
Syntax
z
Ethernet port view:
stp transmit-limit packetnum
undo stp transmit-limit
z
System view:
stp interface interface-list transmit-limit packetnum
undo stp interface interface-list transmit-limit
View
System view, Ethernet port view
Parameters
packetnum: Maximum number of configuration BPDUs a port can transmit in each hello time. This
argument ranges from 1 to 255.
interface-list: Ethernet port list. You can specify multiple Ethernet ports by providing this argument in the
form of interface-list = { interface-type interface-number [ to interface-type interface-number ] } &<1-10>,
where &<1-10> means that you can provide up to 10 port indexes/port index ranges for this argument.
Description
z
Use the stp transmit-limit command to set the maximum number of configuration BPDUs the
current port can transmit in each hello time. Use the undo stp transmit-limit command to restore
the maximum number to the default value on the current port.
z
Use the stp interface transmit-limit command to set the maximum number of configuration
BPDUs each specified port can send in each hello time. Use the undo stp interface
transmit-limit command to restore the maximum number to the default value for each specified
port.
By default, the maximum number of configuration BPDUs a port can transmit in each hello time is 10.
A larger number configured by the stp transmit-limit command allows more configuration BPDUs to be
transmitted in each hello time, which may occupy more switch resources. So you are recommended
configure it to a proper value to avoid network topology jitter and prevent MSTP from occupying too
many bandwidth resources.
1-44
Examples
# Set the maximum number of configuration BPDUs that can be transmitted through Ethernet 1/0/1 in
each hello time to 15.
z
In Ethernet port view:
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] stp transmit-limit 15
z
In system view:
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/1 transmit-limit 15
# Set the maximum number of configuration BPDUs that can be transmitted through Ethernet 1/0/2,
Ethernet 1/0/3 and Ethernet 1/0/4 in each hello time to 15 in system view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp interface Ethernet 1/0/2 to Ethernet 1/0/4 transmit-limit 15
vlan-mapping modulo
Syntax
vlan-mapping modulo modulo
View
MST region view
Parameters
modulo: Modulo by which VLANs are mapped to MSTIs, in the range of 1 to 16.
Description
Use the vlan-mapping modulo command to set the modulo by which VLANs are mapped to MSTIs.
By default, all VLANs in a network are mapped to the CIST (MSTI 0).
MSTP uses a VLAN-to-instance mapping table to describe VLAN-to-instance mappings. You can use
this command to establish the VLAN-to-instance mapping table and map VLANs to MSTIs in a specific
way.
Note that a VLAN cannot be mapped to multiple different MSTIs at the same time. A VLAN-to-instance
mapping becomes invalid when you map the VLAN to another MSTI.
1-45
You can map VLANs to the specific MSTIs rapidly by using the vlan-mapping modulo modulo
command. The ID of the MSTI to which a VLAN is mapped can be figured out by using the following
formula:
(VLAN ID-1) % modulo + 1.
In this formula, (VLAN ID-1) % modulo yields the module of (VLAN ID-1) with regards to the modulo
argument. For example, if you set the modulo argument to 16, then VLAN 1 is mapped to MSTI 1, VLAN
2 is mapped to MSTI 2, …, VLAN 16 is mapped to MSTI 16, VLAN 17 is mapped to MSTI 1, and so on.
Related
commands:
check
region-configuration,
revision-level,
region-name,
active
region-configuration.
Examples
# Map VLANs to MSTIs, with the modulo being 16.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] stp region-configuration
[Sysname-mst-region] vlan-mapping modulo 16
vlan-vpn tunnel
Syntax
vlan-vpn tunnel
undo vlan-vpn tunnel
View
System view
Parameters
None
Description
Use the vlan-vpn tunnel command to enable the VLAN-VPN tunnel function for a switch.
Use the undo vlan-vpn tunnel command to disable the VLAN-VPN tunnel function.
The VLAN-VPN tunnel function enables BPDUs to be transparently transmitted between geographically
dispersed user networks through specified VLAN VPNs in operator’s networks, through which spanning
trees can be calculated across these user networks and are independent of those of the operator’s
network.
By default, the VLAN-VPN tunnel function is disabled.
1-46
z
The VLAN-VPN tunnel function can only be enabled on STP-enabled devices.
z
To enable the VLAN-VPN tunnel function, make sure the links between operator’s networks are
trunk links.
z
If a fabric port exists on a switch, you cannot enable the VLAN-VPN function for any port of the
switch.
Examples
# Enable the VLAN-VPN tunnel function for the switch.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan-vpn tunnel
1-47
Table of Contents
1 IP Routing Table Commands····················································································································1-1
IP Routing Table Commands··················································································································1-1
display ip routing-table·····················································································································1-1
display ip routing-table acl···············································································································1-3
display ip routing-table ip-address···································································································1-5
display ip routing-table ip-address1 ip-address2·············································································1-7
display ip routing-table ip-prefix·······································································································1-7
display ip routing-table protocol·······································································································1-8
display ip routing-table radix············································································································1-9
display ip routing-table statistics····································································································1-10
display ip routing-table verbose·····································································································1-11
reset ip routing-table statistics protocol ·························································································1-12
2 Static Route Configuration Commands ··································································································2-1
Static Route Configuration Commands···································································································2-1
delete static-routes all······················································································································2-1
ip route-static ···································································································································2-2
3 RIP Configuration Commands ·················································································································3-1
RIP Configuration Commands ················································································································3-1
checkzero ········································································································································3-1
default cost ······································································································································3-2
display rip ········································································································································3-2
display rip interface··························································································································3-4
display rip routing ····························································································································3-4
filter-policy export ····························································································································3-5
filter-policy import ····························································································································3-6
host-route ········································································································································3-7
import-route ·····································································································································3-8
network ············································································································································3-9
peer··················································································································································3-9
preference ·····································································································································3-10
reset···············································································································································3-11
rip···················································································································································3-11
rip authentication-mode ·················································································································3-12
rip input··········································································································································3-13
rip metricin ·····································································································································3-14
rip metricout···································································································································3-14
rip output········································································································································3-15
rip split-horizon ······························································································································3-16
rip version ······································································································································3-16
rip work ··········································································································································3-17
summary········································································································································3-18
timers ·············································································································································3-19
i
traffic-share-across-interface·········································································································3-20
4 IP Routing Policy Configuration Commands··························································································4-1
IP Routing Policy Configuration Commands···························································································4-1
apply cost ········································································································································4-1
apply tag ··········································································································································4-2
display ip ip-prefix····························································································································4-2
display route-policy··························································································································4-3
if-match { acl | ip-prefix } ··················································································································4-4
if-match cost ····································································································································4-4
if-match interface ·····························································································································4-5
if-match ip next-hop ·························································································································4-6
if-match tag······································································································································4-6
ip ip-prefix ········································································································································4-7
route-policy ······································································································································4-8
ii
1
IP Routing Table Commands
The term router in this chapter refers to a router in a generic sense or an Ethernet switch running a
routing protocol.
IP Routing Table Commands
display ip routing-table
Syntax
display ip routing-table [ | { begin | exclude | include } regular-expression ]
View
Any view
Parameters
regular-expression: Regular expression, a string of 1 to 256 case-sensitive characters used for
specifying routing entries.
|: Uses the regular expression to match the output routing information.
begin: Displays the routing information from the route entry containing the specified character string.
include: Displays all routing information containing the specified character string.
exclude: Displays all routing information without the specified character string.
For details about regular expressions, refer to Configuration File Management Operation of this
manual.
Description
Use the display ip routing-table command to display the routing table summary.
This command displays the summary of the routing table. Each line represents one route, containing
destination address/mask length, protocol, preference, cost, next hop, and output interface.
This command displays only the currently used routes, that is, the optimal routes.
1-1
Examples
# Display the summary of the current routing table.
<Sysname> display ip routing-table
Routing Table: public net
Destination/Mask
Protocol
Pre Cost
Nexthop
Interface
1.1.1.0/24
DIRECT
0
0
1.1.1.1
Vlan-interface1
1.1.1.1/32
DIRECT
0
0
127.0.0.1
InLoopBack0
2.2.2.0/24
DIRECT
0
0
2.2.2.1
Vlan-interface2
2.2.2.1/32
DIRECT
0
0
127.0.0.1
InLoopBack0
3.3.3.0/24
DIRECT
0
0
3.3.3.1
Vlan-interface3
3.3.3.1/32
DIRECT
0
0
127.0.0.1
InLoopBack0
4.4.4.0/24
DIRECT
0
0
4.4.4.1
Vlan-interface4
4.4.4.1/32
DIRECT
0
0
127.0.0.1
InLoopBack0
127.0.0.0/8
DIRECT
0
0
127.0.0.1
InLoopBack0
127.0.0.1/32
DIRECT
0
0
127.0.0.1
InLoopBack0
# Display the routing information from the entry containing the character string interface4 in the current
routing table.
<Sysname> display ip routing-table | begin interface4
Routing Table: public net
4.4.4.0/24
DIRECT
0
0
4.4.4.1
Vlan-interface4
4.4.4.1/32
DIRECT
0
0
127.0.0.1
InLoopBack0
127.0.0.0/8
DIRECT
0
0
127.0.0.1
InLoopBack0
127.0.0.1/32
DIRECT
0
0
127.0.0.1
InLoopBack0
# Display the routing information containing the character string interface4 in the current routing table.
<Sysname> display ip routing-table | include interface4
Routing Table: public net
Destination/Mask
Protocol
4.4.4.0/24
DIRECT
Pre Cost
0
0
Nexthop
Interface
4.4.4.1
Vlan-interface4
# Display the routing information without the character string interface4 in the current routing table.
<Sysname> display ip routing-table | exclude interface4
Routing Table: public net
Destination/Mask
Protocol
Pre Cost
Nexthop
Interface
1.1.1.0/24
DIRECT
0
0
1.1.1.1
Vlan-interface1
1.1.1.1/32
DIRECT
0
0
127.0.0.1
InLoopBack0
2.2.2.0/24
2.2.2.1/32
DIRECT
0
0
2.2.2.1
Vlan-interface2
DIRECT
0
0
127.0.0.1
InLoopBack0
3.3.3.0/24
DIRECT
0
0
3.3.3.1
Vlan-interface3
3.3.3.1/32
DIRECT
0
0
127.0.0.1
InLoopBack0
4.4.4.1/32
DIRECT
0
0
127.0.0.1
InLoopBack0
127.0.0.0/8
DIRECT
0
0
127.0.0.1
InLoopBack0
127.0.0.1/32
DIRECT
0
0
127.0.0.1
InLoopBack0
Table 1-1 Description on the fields of the display ip routing-table command
Field
Description
Destination/Mask
Destination address/mask length
1-2
Field
Description
Protocol
Routing protocol
Pre
Route preference
Cost
Route cost
Nexthop
Next hop address
Interface
Output interface, through which the data packets
destined for the destination network segment are
sent
display ip routing-table acl
Syntax
display ip routing-table acl acl-number [ verbose ]
View
Any view
Parameters
acl-number: Basic access control list number, in the range of 2000 to 2999.
verbose: With this keyword specified, detailed information of routes in the active or inactive state that
match the ACL is displayed. With this keyword not specified, brief information of only the routes in the
active state that match the ACL is displayed.
Description
Use the display ip routing-table acl command to display the information of routes that match the
specified ACL.
Examples
# Display the information of ACL 2100.
<Sysname> display acl 2100
Basic ACL
2100, 1 rule
Acl's step is 1
rule 0 permit source 192.168.1.0 0.0.0.255
For details about the display acl command, refer to ACL Command.
# Display the information of routes that match ACL 2100.
<Sysname> display ip routing-table acl 2100
Routes matched by access-list 2100:
Summary count: 2
Destination/Mask
Protocol
Pre
Cost
Nexthop
192.168.1.0/24
DIRECT
0
0
192.168.1.2
Vlan-interface2
192.168.1.2/32
DIRECT
0
0
127.0.0.1
InLoopBack0
For descriptions of the above fields, refer to Table 1-1.
# Display the detailed information of routes that match ACL 2100.
1-3
Interface
<Sysname> display ip routing-table acl 2100 verbose
Routes matched by access-list 2100:
+ = Active Route, - = Last Active, # = Both
* = Next hop in use
Summary count: 3
**Destination: 192.168.1.0
Protocol: #DIRECT
*NextHop: 192.168.1.2
Mask: 255.255.255.0
Preference: 0
Interface: 192.168.1.2(Vlan-interface2)
State: <Int ActiveU Retain Unicast>
Age: 21:34:13
**Destination: 192.168.1.2
Protocol: #DIRECT
*NextHop: 127.0.0.1
Cost: 0/0
Mask: 255.255.255.255
Preference: 0
Interface: 127.0.0.1(InLoopBack0)
State: <NoAdvise Int ActiveU Retain Gateway Unicast>
Age: 21:34:13
Cost: 0/0
Table 1-2 Description on the fields of the display ip routing-table command
Field
Description
Destination
Destination address
Mask
Subnet mask
Protocol
Protocol that discovers the route
Preference
Route preference
Nexthop
Next hop to the destination
Interface
Outbound interface through which data packets are forwarded to the destination
network segment.
1-4
Field
Description
Description of route state:
State
ActiveU
An active unicast route, where “U” represents unicast.
Blackhole
A blackhole route is similar to a reject route, but no ICMP
unreachable message is sent to the source.
Delete
A route is to be deleted.
Gateway
An indirect route.
Hidden
An existing route that is temporarily unavailable for some reason (for
example, suppressed by a routing policy or down interface).
However, deletion is not expected. It is therefore hidden so that it
can recover later.
Holddown
Number of routes that are held down. Holddown is a route
advertisement policy that some D-V based routing protocols (for
example, RIP) use to avoid the spread of wrong routes but speed up
the correct spread of ICMP unreachable messages. A certain route
is advertised at intervals, no matter whether the currently discovered
route to the same destination changes. For details, refer to the
specific routing protocols.
Int
A route discovered by IGP.
NoAdvise
A routing protocol does not advertise any NoAdvise route when
advertising routes in accordance with a routing policy.
NotInstall
A NotInstall route cannot be added to the core routing table, but may
be advertised. A route with the highest priority is generally selected
from the routing table, added to the core routing table, and then
advertised.
Reject
The routes marked with reject do not guide the router to forward
packets as a normal route does. The router discards the packets
matching reject routes and sends an ICMP unreachable message to
the source.
Reject routes are usually used for network tests.
Retain
The routes marked with retain will not be deleted when you delete
routes in the core routing table. You can mark static routes with
retain to make them stay in the core routing table.
Static
The routes marked with static will not be deleted from the routing
table after you perform a save operation and restart the router. The
routes manually configured on a router are marked with static.
Unicast
A unicast route.
Age
Lifetime of a route in the routing table, in the format of HH:MM:SS.
Cost
Cost of a route.
display ip routing-table ip-address
Syntax
display ip routing-table ip-address [ mask | mask-length ] [ longer-match ] [ verbose ]
View
Any view
1-5
Parameters
ip-address: Destination IP address, in dotted decimal notation.
mask: Subnet mask, in dotted decimal notation.
mask-length: Length of a subnet mask, in the range of 0 to 32.
longer-match: Specifies all the routes that lead to the destination address and match the specified
mask. If you do not specify the mask argument, those that match the natural mask are specified.
verbose: Displays the detailed information of routes.
Description
Use the display ip routing-table ip-address command to display the routing information of the
specified destination address.
With different arguments provided, the command output is different. The following is the command
output with different arguments provided:
display ip routing-table ip-address
z
If the destination address ip-address corresponds to a route in the natural mask range, this command
displays the route that is the longest match of the destination address ip-address and is active.
display ip routing-table ip-address mask
z
This command only displays the routes exactly matching the specified destination address and mask.
display ip routing-table ip-address longer-match
z
This command displays all destination address routes matching the specified destination address in the
natural mask range.
display ip routing-table ip-address mask longer-match
z
This command displays all destination address routes matching the specified destination address in the
specified mask range.
Examples
# Display the brief information of routes with a natural mask.
<Sysname> display ip routing-table 169.0.0.0
Destination/Mask
Protocol Pre Cost
Nexthop
Interface
169.0.0.0/16
Static
2.1.1.1
LoopBack1
60
0
For descriptions of the above fields, see Table 1-1.
# Display the detailed information of routes with a natural mask.
<Sysname> display ip routing-table 169.253.0.0 verbose
Routing Tables:
+ = Active Route, - = Last Active, # = Both
* = Next hop in use
Summary count:1
**Destination: 169.0.0.0
Protocol: #Static
*NextHop: 2.1.1.1
Mask: 255.0.0.0
Preference: -60
Interface: 2.1.1.1(LoopBack1)
State: <Int ActiveU Static Unicast>
Age: 3:47
Cost: 0/0
For descriptions of the above fields, see Table 1-2.
1-6
display ip routing-table ip-address1 ip-address2
Syntax
display ip routing-table ip-address1 { mask1 | mask-length1 } ip-address2 { mask2 | mask-length2 }
[ verbose ]
View
Any view
Parameters
ip-address1, ip-address2: Destination IP address in dotted decimal notation. ip-address1 {mask1 |
mask-length1} and ip-address2 {mask2 | mask-length2} determine one address range together.
ip-address1 ANDed with {mask1 | mask-length1} specifies the start of the range, while ip-address2
ANDed with {mask2 | mask-length2} specifies the end. This command displays the route in this address
range.
mask1, mask2: Subnet mask, in dotted decimal notation.
mask-length1, mask-length2: Mask length, in the ranges of 0 to 32.
verbose: With the verbose argument provided, this command displays the verbose information of both
active and inactive routes. Without this argument provided, this command displays the summary of
active routes only.
Description
Use the display ip routing-table ip-address1 ip-address2 command to display the route information in
the specified destination address range.
Examples
# Display the routing information of destination addresses ranging from 1.1.1.0 to 2.2.2.0.
<Sysname>display ip routing-table 1.1.1.0 24 2.2.2.0 24
Routing tables:
Summary count: 3
Destination/Mask
Protocol
Pre Cost
1.1.1.0/24
DIRECT
0
0
1.1.1.1/32
DIRECT
0
0
2.2.2.0/24
DIRECT
0
0
Nexthop
Interface
1.1.1.1
127.0.0.1
InLoopBack0
2.2.2.1
For descriptions of the above fields, see Table 1-1.
display ip routing-table ip-prefix
Syntax
display ip routing-table ip-prefix ip-prefix-name [ verbose ]
View
Any view
Parameters
ip-prefix-name: IP prefix list name, a string of 1 to 19 characters.
1-7
Vlan-interface1
Vlan-interface2
verbose: With this keyword specified, detailed information of routes in the active or inactive state that
match the IP prefix list is displayed. With this keyword not specified, brief information of only the routes
in the active state that match the prefix list is displayed.
Description
Use the display ip routing-table ip-prefix command to display the information of routes matching the
specified IP prefix list.
Examples
# Display the brief information of routes in the active state that match the prefix list abc2.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] ip ip-prefix abc2 permit 10.1.1.0 24 less-equal 32
[Sysname] display ip routing-table ip-prefix abc2
Routes matched by ip-prefix abc2:
Summary count: 2
Destination/Mask
10.1.1.0/24
10.1.1.2/32
Protocol Pre
DIRECT
DIRECT
Cost
0
Nexthop
0
0
Interface
10.1.1.2
0
127.0.0.1
Vlan-interface1
InLoopBack0
For descriptions of the above fields, see Table 1-1.
# Display the detailed information of routes in the active or inactive state that match the prefix list abc2.
[Sysname] display ip routing-table ip-prefix abc2 verbose
Routes matched by ip-prefix abc2:
+ = Active Route, - = Last Active, # = Both
* = Next hop in use
Summary count: 2
**Destination: 10.1.1.0
Protocol: #DIRECT
*NextHop: 10.1.1.2
Mask: 255.255.255.0
Preference: 0
Interface: 10.1.1.2(Vlan-interface1)
State: <Int ActiveU Retain Unicast>
Age: 3:23:44
**Destination: 10.1.1.2
Protocol: #DIRECT
*NextHop: 127.0.0.1
Cost: 0/0
Mask: 255.255.255.255
Preference: 0
Interface: 127.0.0.1(InLoopBack0)
State: <NoAdvise Int ActiveU Retain Gateway Unicast>
Age: 3:23:44
Cost: 0/0
For descriptions of the above fields, see Table 1-2.
display ip routing-table protocol
Syntax
display ip routing-table protocol protocol [ inactive | verbose ]
View
Any view
1-8
Parameters
protocol: You can provide one of the following values for this argument.
z
direct: Displays direct-connect route information
z
rip: Displays RIP route information.
z
static: Displays static route information.
inactive: With this argument provided, this command displays the inactive route information. Without
this argument provided, this command displays both active and inactive route information.
verbose: With this keyword specified, detailed information of routes in the active or inactive state is
displayed. With this keyword not specified, brief information of only the routes in the active state is
displayed.
Description
Use the display ip routing-table protocol command to display the route information of a specific
protocol.
Examples
# Display the summary of all direct-connect routes.
<Sysname> display ip routing-table protocol direct
DIRECT Routing tables:
Summary count: 4
DIRECT Routing tables status:<active>:
Summary count: 3
Destination/Mask
Protocol
Pre Cost
Nexthop
Interface
20.1.1.1/32
DIRECT
0
0
127.0.0.1
InLoopBack0
127.0.0.0/8
DIRECT
0
0
127.0.0.1
InLoopBack0
127.0.0.1/32
DIRECT
0
0
127.0.0.1
InLoopBack0
Cost
Nexthop
Interface
0
127.0.0.1
InLoopBack0
DIRECT Routing tables status:<inactive>:
Summary count: 1
Destination/Mask
Protocol
210.0.0.1/32
DIRECT
Pre
0
For detailed description of the output information, see Table 1-1.
display ip routing-table radix
Syntax
display ip routing-table radix
View
Any view
Parameters
None
Description
Use the display ip routing-table radix command to display the route information in a tree structure.
1-9
Examples
<Sysname> display ip routing-table radix
Radix tree for INET (2) inodes 7 routes 5:
+-32+--{210.0.0.1
+--0+
| | +--8+--{127.0.0.0
| | | +-32+--{127.0.0.1
| +--1+
|
+--8+--{20.0.0.0
|
+-32+--{20.1.1.1
Table 1-3 Description on the fields of the display ip routing-table radix command
Field
Description
INET
Address suite
Inodes
Number of nodes
Routes
Number of routes
display ip routing-table statistics
Syntax
display ip routing-table statistics
View
Any view
Parameters
None
Description
Use the display ip routing-table statistics command to display the integrated routing information.
The integrated routing information includes the total number of routes, the number of active routes, the
number of routes added by protocols, and the number of routes deleted.
Examples
# Display the integrated route information.
<Sysname> display ip routing-table statistics
Routing tables:
Proto
route
active
added
deleted
DIRECT
24
4
25
1
STATIC
4
1
4
0
RIP
0
0
0
0
Total
28
5
29
1
1-10
Table 1-4 Description on the fields of the display ip routing-table statistics command
Field
Description
Proto
Routing protocol type
Route
Total number of routes
Active
Number of active routes
Added
Number of routes added after the router is rebooted or the routing table
is cleared last time.
Deleted
Number of routes deleted (Such routes will be freed in a period of time)
Total
Total number of the different kinds of routes
display ip routing-table verbose
Syntax
display ip routing-table verbose
View
Any view
Parameters
None
Description
Use the display ip routing-table verbose command to display the detailed information of a routing
table, including inactive routes and null routes. The information displayed includes route state descriptor,
statistics of the routing table, and detailed information of each route.
Examples
# Display the verbose routing table information.
<Sysname> display ip routing-table verbose
Routing Tables:
+ = Active Route, - = Last Active, # = Both
Destinations: 3
Holddown: 0
* = Next hop in use
Routes: 3
Delete: 62
**Destination: 1.1.1.0
Protocol: #DIRECT
*NextHop: 1.1.1.1
Hidden: 0
Mask: 255.255.255.0
Preference: 0
Interface: 1.1.1.1(Vlan-interface1)
State: <Int ActiveU Retain Unicast>
Age: 20:17:41
**Destination: 1.1.1.1
Protocol: #DIRECT
*NextHop: 127.0.0.1
Cost: 0/0
Mask: 255.255.255.255
Preference: 0
Interface: 127.0.0.1(InLoopBack0)
State: <NoAdvise Int ActiveU Retain Gateway Unicast>
Age: 20:17:42
**Destination: 2.2.2.0
Cost: 0/0
Mask: 255.255.255.0
1-11
Protocol: #DIRECT
*NextHop: 2.2.2.1
Preference: 0
Interface: 2.2.2.1(Vlan-interface2)
State: <Int ActiveU Retain Unicast>
Age: 20:08:05
Cost: 0/0
For descriptions of route states, see Table 1-2.
Table 1-5 lists the statistics of the routing table.
Table 1-5 Description on the fields of the display ip routing-table verbose command
Field
Description
Holddown
Number of suppressed routes
Delete
Number of deleted routes
Hidden
Number of hidden routes
reset ip routing-table statistics protocol
Syntax
reset ip routing-table statistics protocol { all | protocol }
View
User view
Parameters
all: Specifies all protocols.
protocol: Specifies a protocol, which can be direct, rip, or static.
Description
Use the reset ip routing-table statistics protocol command to clear the statistics of routes in a routing
table.
Examples
# Before executing the reset ip routing-table statistics protocol command, use the display ip
routing-table statistics command to display the routing statistics:
<Sysname> display ip routing-table statistics
Routing tables:
Proto
route
active
added
deleted
DIRECT
4
4
12
8
STATIC
0
0
0
0
RIP
0
0
0
0
Total
4
4
12
8
# Clear the routing statistics of all protocols from the IP routing table.
<Sysname> reset ip routing-table statistics protocol all
# Display the routing statistics in the IP routing table.
<Sysname> display ip routing-table statistics
1-12
Routing tables:
Proto
route
active
added
deleted
DIRECT
4
4
0
0
STATIC
0
0
0
0
RIP
0
0
0
0
Total
4
4
0
0
The above information shows that the routing statistics in the IP routing table is cleared.
1-13
2
Static Route Configuration Commands
The term router in this chapter refers to a router in a generic sense or an Ethernet switch running a
routing protocol.
Static Route Configuration Commands
delete static-routes all
Syntax
delete static-routes all
View
System view
Parameters
None
Description
Use the delete static-routes all command to delete all static routes.
The system will request your confirmation before it deletes all the configured static routes.
Related commands: ip route-static, display ip routing-table.
Examples
# Delete all the static routes in the router.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] delete static-routes all
Are you sure to delete all the unicast static routes?[Y/N]y
2-1
ip route-static
Syntax
ip route-static ip-address { mask | mask-length } { interface-type interface-number | next-hop }
[ preference preference-value ] [ reject | blackhole ] [ detect-group group number ] [ description
text ]
undo ip route-static ip-address { mask | mask-length } [ interface-type interface-number | next-hop ]
[ preference preference-value ]
View
System view
Parameters
ip-address: Destination IP address, in dotted decimal notation.
mask: Subnet mask, in dotted decimal notation.
mask-length: Mask length, in the range of 0 to 32.
interface-type interface-number: Next-hop outbound interface.
next-hop: Next hop IP address of the route, in dotted decimal notation.
preference preference-value: Preference level of a static route, in the range of 1 to 255. The default
preference is 60.
reject: Indicates the destination is unreachable. If a static route to a destination is marked with reject,
all IP packets destined for this destination will be discarded, and the source host will be informed that
the destination is unreachable.
blackhole: Indicates a blackhole route. If a static route to a destination is marked with blackhole, the
outbound interface of this route is the Null 0 interface regardless of the next hop address, and all the IP
packet addresses destined for this destination are dropped without the source host being notified.
description text: Provides a description for the current route, which is a string of 1 to 60 characters.
detect-group group number: Specifies a detect group number, which ranges from 1 to 25.
z
If you specify the next-hop outgoing interface when configuring a static route, the type of outgoing
interface can be Null only.
z
The packets sent to a Null interface, which is a virtual interface, will be discarded immediately. This
can decrease the system load.
z
For automatic detection information, refer to the part discussing Auto Detect.
Description
Use the ip route-static command to configure a static route.
Use the undo ip route-static command to delete a static route.
2-2
By default, the system can obtain the subnet route directly connected to the router. When you configure
a static route, if no preference is specified for the route, the preference defaults to 60, and if the route is
not specified as reject or blackhole, the route will be reachable by default.
When configuring a static route, note the following points:
z
If the destination IP address and the mask are both 0.0.0.0, what you are configuring is a default
route. All the packets that fail to find a routing entry will be forwarded through this default route.
z
You cannot configure an interface address of the local switch as the next hop address of a static
route.
z
You can configure a different preference to implement flexible route management policy.
Related commands: display ip routing-table.
Examples
# Configure the next hop of the default route as 129.102.0.2.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ip route-static 0.0.0.0 0.0.0.0 129.102.0.2
2-3
3
RIP Configuration Commands
The term router in this chapter refers to a router in a generic sense or an Ethernet switch running a
routing protocol.
RIP Configuration Commands
checkzero
Syntax
checkzero
undo checkzero
View
RIP view
Parameters
None
Description
Use the checkzero command to enable the must be zero field check for RIP-1 packets.
Use the undo checkzero command to disable the must be zero field check for RIP-1 packets.
By default, RIP-1 performs the must be zero field check.
According to the protocol (RFC 1058) specifications, some fields in RIP-1 packets must be zero and
these fields are called zero fields. You can use the checkzero command to enable/disable the must be
zero field check for RIP-1 packets. When the must be zero field check is enabled, if the must be zero
field in an incoming RIP-1 packet is non-zero, the packet will be rejected.
Examples
# Disable the must be zero field check for RIP-1 packets.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] undo checkzero
3-1
default cost
Syntax
default cost value
undo default cost
View
RIP view
Parameters
value: Default cost, in the range of 1 to 16.
Description
Use the default cost command to set the default cost for redistributed routes.
Use the undo default cost command to restore the default.
By default, the default cost of a redistributed route is 1.
If no cost is specified when you use the import-route command to redistribute routes from another
routing protocol, the routes will be redistributed with the default cost specified with the default cost
command.
Related commands: import-route.
Examples
# Redistribute static routes and set the default cost of the redistributed routes to 3.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] import-route static
[Sysname-rip] default cost 3
display rip
Syntax
display rip
View
Any view
Parameters
None
Description
Use the display rip command to display the current RIP operation state and RIP configuration.
Examples
# Display the current RIP operation state and configuration.
3-2
<Sysname> display rip
RIP is running
Checkzero is on
Default cost : 1
Summary is on
Preference : 100
Traffic-share-across-interface is off
Period update timer : 30
Timeout timer : 180
Garbage-collection timer : 120
No peer router
Network :
202.38.168.0
Table 3-1 Description on the fields of the display rip command
Field
Description
RIP is running
RIP is active.
State of the must be zero field check for RIP-1
packets
Checkzero
z
z
Default cost
on: Enabled
off: Disabled
Default cost for redistributed routes
State of the automatic route summarization
function:
Summary
z
z
on: Enabled
off: Disabled
Preference
RIP preference
Period update timer
Length of the period update timer in seconds
Timeout timer
Length of the timeout timer in seconds
Garbage-collection timer
Length of the garbage-collection timer in
seconds
No peer router
No destination address of a transmission is
specified
Network
Network segment on which RIP is enabled
State of load sharing among interfaces:
Traffic-share-across-interface
z
z
3-3
on: Enabled
off: Disabled
display rip interface
Syntax
display rip interface
View
Any view
Parameters
None
Description
Use the display rip interface command to display RIP interface information.
Examples
# Display RIP interface information.
<Sysname> display rip interface
RIP Interface: public net
Address
Interface
Ver
MetrIn/Out Input Output
1.0.0.1
Vlan-interface100
2
0/1
on
on
Split-horizon
on
Table 3-2 Description on the fields of the display rip interface command
Field
Description
Address
IP address of the interface running RIP (You
need to use the network command to enable the
network segment on which the address resides.)
Interface
Name of the interface running RIP. The IP
address of the interface corresponds to that in
the Address field.
Ver
Version of RIP running on the interface
MetrIn/Out
Additional metric added when a route is
received/sent
Input
Indicates whether to allow the interface to
receive RIP packets (on means yes; off means
no).
Output
Indicates whether to allow the interface to send
RIP packets (on means yes; off means no).
Split-horizon
Indicates whether split horizon is enabled (on
means yes; off means no)
display rip routing
Syntax
display rip routing
3-4
View
Any view
Parameters
None
Description
Use the display rip routing command to display RIP routing information.
Examples
# Display the information of the RIP routing table.
<Sysname> display rip routing
RIP routing table: public net
A = Active
I = Inactive
C = Change
T = Trigger RIP
G = Garbage collection
Destination/Mask
Cost
NextHop
Age
SourceGateway
Att
192.168.110.0/24
1
31.31.31.8
7s
31.31.31.8
A
200.1.1.0/24
1
31.31.31.8
7s
31.31.31.8
A
130.1.0.0/16
1
31.31.31.8
7s
31.31.31.8
A
Table 3-3 Description on the fields of the display rip routing command
Field
Description
Destination/Mask
Destination address/Mask
Cost
Cost
NextHop
Net hop address
Age
Time elapsed after the route is advertised
SourceGateway
Gateway originating the route
Attributes of a route:
z
z
Att
z
z
z
A: Active route
I: Inactive route
G: Working state of the garbage collection
timer
C: Change state
T: Triggered RIP
filter-policy export
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol ]
undo filter-policy { acl-number | ip-prefix ip-prefix-name } export [ protocol ]
filter-policy route-policy route-policy-name export
undo filter-policy route-policy route-policy-name export
3-5
View
RIP view
Parameters
acl-number: Number of the basic or advanced ACL used to filter routing information by destination
address, in the range of 2000 to 3999.
ip-prefix-name: Name of the address ip-prefix list used to filter routing information by destination
address, a string of 1 to 19 characters.
route-policy-name: Name of the route-policy used to filter routing information, a string of 1 to 19
characters.
protocol: Filters routing protocol redistributed from the protocol. Currently, this argument can be direct,
or static.
Description
Use the filter-policy export command to enable RIP to filter the outgoing routing information.
Use the undo filter-policy export command to disable RIP from filtering the outgoing routing
information.
Note that, if protocol is specified, RIP filters only the outgoing routes redistributed from the specified
routing protocol. Otherwise, RIP filters all routes to be advertised.
By default, RIP does not filter advertised routing information.
Related commands: acl, filter-policy import, ip ip-prefix.
For details about ACL, refer to ACL Operation.
Examples
# Apply ACL 2000 to filter the outgoing routing information.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] filter-policy 2000 export
filter-policy import
Syntax
filter-policy { acl-number | ip-prefix ip-prefix-name [ gateway ip-prefix-name ] | route-policy
route-policy-name } import
undo filter-policy { acl-number | ip-prefix ip-prefix-name [ gateway ip-prefix-name ] | route-policy
route-policy-name } import
filter-policy gateway ip-prefix-name import
undo filter-policy gateway ip-prefix-name import
View
RIP view
3-6
Parameters
acl-number: Number of the ACL used to filter routing information by destination address, in the range of
2000 to 3999.
ip-prefix-name: Name of the address prefix list used to filter routing information by destination address,
a string of 1 to 19 characters.
gateway ip-prefix-name: Name of the address prefix list used to filter routing information by the address
of the neighbor router advertising the information, a string of 1 to 19 characters.
route-policy-name: Name of the route-policy used to filter routing information, a string of 1 to 19
characters.
Description
Use the filter-policy gateway command to enable RIP to filter the routing information advertised by a
specified address.
Use the undo filter-policy gateway command to disable RIP from filtering the routing information
advertised by a specified address.
Use the filter-policy import command to enable RIP to filter the incoming routing information.
Use the undo filter-policy import command to disable RIP from filtering the incoming routing
information.
By default, RIP does not filter the received routing information.
Related commands: acl, filter-policy export, ip ip-prefix.
For details about ACL, refer to ACL Operation.
Examples
# Apply ACL 2000 to filter the incoming routing information.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] filter-policy 2000 import
host-route
Syntax
host-route
undo host-route
View
RIP view
Parameters
None
Description
Use the host-route command to enable RIP to receive host routes.
Use the undo host-route command to disable RIP from receiving host routes.
3-7
By default, RIP is enabled to receive host routes.
In some special cases, RIP receives a great number of host routes from the same network segment.
These routes are of little help to addressing but occupy a lot of resources. In this case, the undo
host-route command can be used to disable RIP from receiving host routes to save network resources.
Examples
# Disable RIP from receiving host routes.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] undo host-route
import-route
Syntax
import-route protocol [ cost value | route-policy route-policy-name ]*
undo import-route protocol [ process-id ]
View
RIP view
Parameters
protocol: Source routing protocol from which routes are redistributed by RIP. At present, RIP can
redistribute routes from protocols: direct, and static.
value: Cost for redistributed routes, in the range of 0 16. If no cost is specified when redistributing routes,
the default cost defined by the default cost command will be used.
route-policy-name: Name of a routing policy, a string of 1 to 19 characters.
Description
Use the import-route command to enable RIP to redistribute routes from other protocols.
Use the undo import-route command to disable RIP from redistributing routes from other protocols.
By default, RIP does not redistribute routes from other protocols.
If the value is not specified, routes will be redistributed with the default cost defined by the default cost
command. If the cost of a redistributed route is 16, RIP does not stop advertising the route to other
routers until the Garbage Collection timer expires (the timer length defaults to 120 seconds).
Related commands: default cost.
Examples
# Redistribute static routes with the cost of 4.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] import-route static cost 4
3-8
network
Syntax
network network-address
undo network network-address
View
RIP view
Parameters
network-address: Network/IP address of an interface, in dotted decimal notation.
Description
Use the network command to enable RIP on an interface attached to the specified network segment.
Use the undo network command to disable RIP on the interface attached to the specified network
segment.
RIP runs only on the interface attached to the specified network. For an interface not on the specified
network, RIP neither receives/sends routes on it nor forwards interface route through it. Therefore, you
need to specify the network after enabling RIP to validate RIP on a specific interface.
By default, RIP is disabled on all interfaces.
The differences between the network and rip work commands are as follows:
z
The network command enables RIP on an interface attached to the specified network segment.
z
The rip work command enables an interface to receive and send RIP packets.
Related commands: rip work.
Examples
# Enable RIP on the interface with the network address 129.102.0.0.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] network 129.102.0.0
peer
Syntax
peer ip-address
undo peer ip-address
View
RIP view
Parameters
ip-address: IP address of the interface receiving RIP packets in the unicast mode on the neighbor router,
in dotted decimal notation.
3-9
Description
Use the peer command to specify the IP address of a neighbor, where routing updates destined for the
peer are unicast, rather than multicast or broadcast.
Use the undo peer command to remove the IP address of a neighbor.
By default, no neighbor is specified.
This command is used for non-broadcast networks where the broadcast mode is not suitable. Generally
you are not recommended to use this command.
Examples
# Send RIP packets in the unicast mode to the destination 202.38.165.1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] peer 202.38.165.1
preference
Syntax
preference value
undo preference
View
RIP view
Parameters
value: Preference level, in the range of 1 to 255.
Description
Use the preference command to configure the preference of RIP routes.
Use the undo preference command to restore the default.
By default, the preference of RIP routes is 100.
Every routing protocol has its own preference. Its default value is determined by the specific routing
policy. The preferences of routing protocols will finally determine which routing algorithm's routes will be
selected as the optimal routes in the IP routing table. You can use the preference command to modify
the preference of RIP routes manually.
Examples
# Specify the RIP preference as 20.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] preference 20
3-10
reset
Syntax
reset
View
RIP view
Parameters
None
Description
Use the reset command to reset the system configuration parameters of RIP.
When you need to re-configure the parameters of RIP, you can use this command to restore the default.
Examples
# Reset the RIP system configuration.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] reset
% Reset RIP's configuration and restart RIP? [Y/N]y
rip
Syntax
rip
undo rip
View
System view
Parameters
None
Description
Use the rip command to enable RIP or enter RIP view.
Use the undo rip command to disable RIP.
By default, the system does not run RIP.
You must enable RIP and enter RIP view before configuring RIP global parameters. You can, however,
configure the interface-related parameters no matter whether RIP is enabled.
3-11
Note that the interface-related parameters configured previously would be invalid after RIP is disabled.
Examples
# Enable RIP and enter RIP view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip]
rip authentication-mode
Syntax
rip authentication-mode { simple password | md5 { rfc2082 key-string key-id | rfc2453 key-string } }
undo rip authentication-mode
View
Interface view
Parameters
simple: Specifies to use plain text authentication mode.
password: Plain text authentication key, containing 1 to 16 characters.
md5: Specifies to use MD5 cipher text authentication mode.
rfc2082: Specifies that MD5 cipher text authentication packets will use the packet format stipulated by
RFC2082.
rfc2453: Specifies that MD5 cipher text authentication packets will use the packet format stipulated by
RFC2453.
key-string: MD5 cipher text authentication key. If it is typed in the plain text mode, the length does not
exceed 16 characters. If it is typed in the cipher text mode, the length is 24 characters. The system will
display the MD5 cipher text authentication key with a length of 24 characters in the cipher text mode
when you execute the display current-configuration command.
key-id: MD5 cipher text authentication identifier, ranging from 1 to 255.
Description
Use the rip authentication-mode command to configure RIP-2 authentication mode and its
parameters.
Use the undo rip authentication-mode command to remove authentication.
Only one authentication key is supported each time authentication is performed. An authentication key
newly input overwrites an old one.
3-12
Related commands: rip version.
You can configure RIPv1 authentication mode in interface view, but the configuration will not take effect
because RIPv1 does not support authentication.
Examples
# Specify the interface VLAN-interface 10 to use the simple authentication with the authentication key
of aaa.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] rip authentication-mode simple aaa
# Specify VLAN-interface 10 to use the MD5 cipher text authentication, with the authentication key of
aaa and the packet format of rfc2453.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] rip authentication-mode md5 rfc2453 aaa
rip input
Syntax
rip input
undo rip input
View
Interface view
Parameters
None
Description
Use the rip input command to enable an interface to receive RIP packets.
Use the undo rip input command to disable an interface from receiving RIP packets.
By default, all interfaces, except loopback interfaces, can receive RIP packets.
Related commands: rip work.
Examples
# Disable the interface VLAN-interface 10 from receiving RIP packets.
<Sysname> system-view
3-13
System View: return to User View with Ctrl+Z.
[Sysname]interface Vlan-interface 10
[Sysname-Vlan-interface10] undo rip input
rip metricin
Syntax
rip metricin value
undo rip metricin
View
Interface view
Parameters
value: Additional metric of RIP routes received on an interface, in the range of 0 to 16.
Description
Use the rip metricin command to configure an additional metric for RIP routes received on an interface.
Use the undo rip metricin command to restore the default.
By default, the additional metric of RIP routes received on an interface is 0.
Before a valid RIP route received on an interface is added to the routing table, the additional metric will
be added to the route. Therefore, if you increase the additional metric, the metric of RIP routes received
on the interface will increase accordingly. If the sum of the additional metric and the original metric is
greater than 16, the metric of the route will be 16.
Related commands: rip metricout.
Examples
# Set the additional metric of RIP routes received on the interface VLAN-interface 10 to 2.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] rip metricin 2
rip metricout
Syntax
rip metricout value
undo rip metricout
View
Interface view
Parameters
value: Additional metric of RIP routes sent out of an interface, in the range of 1 to 16.
3-14
Description
Use the rip metricout command to configure an additional metric for RIP routes sent out of an
interface.
Use the undo rip metricout command to restore the default.
By default, the additional metric of RIP routes sent out of an interface is 1.
With the command configured on an interface, the metric of RIP routes sent on the interface will be
increased.
Related commands: rip metricin.
Examples
# Set the additional metric of RIP routes sent out of the interface VLAN-interface 10 to 2.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] rip metricout 2
rip output
Syntax
rip output
undo rip output
View
Interface view
Parameters
None
Description
Use the rip output command to enable an interface to transmit RIP packets.
Use the undo rip output command to disable an interface from transmitting RIP packets.
By default, all interfaces except loopback interfaces are enabled to transmit RIP packets.
Related commands: rip input, rip work.
Examples
# Disable the interface VLAN-interface 10 from transmitting RIP packets.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] undo rip output
3-15
rip split-horizon
Syntax
rip split-horizon
undo rip split-horizon
View
Interface view
Parameters
None
Description
Use the rip split-horizon command to enable the split horizon function.
Use the undo rip split-horizon command to disable the split horizon function.
By default, the split horizon function is enabled.
The split horizon function disables an interface from sending routes received from the interface to
prevent routing loops between adjacent routers. Therefore, normally, split horizon is necessary for
avoiding routing loops. Only in some special cases the split horizon function needs to be disabled to
ensure the correct execution of the protocol. So, disable the split horizon function only when necessary.
Examples
# Disable the split horizon function on the interface VLAN-interface 10.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] undo rip split-horizon
rip version
Syntax
rip version { 1 | 2 [ broadcast | multicast ] }
undo rip version
View
Interface view
Parameters
1: Specifies the version of RIP running on an interface as RIP-1.
2: Specifies the version of RIP running on an interface as RIP-2.
broadcast: Sends RIP-2 packets in the broadcast mode.
multicast: Sends RIP-2 packets in the multicast mode.
Description
Use the rip version command to specify the version of RIP running on an interface.
3-16
Use the undo rip version command to restore the default.
By default, the version of RIP running on an interface is RIP-1 and RIP-1 packets are sent in the
broadcast mode.
If RIP-2 runs on an interface, RIP packets are sent in the multicast mode by default, which reduces
resource consumption.
Table 3-4 Receive mode of RIP packets
RIP-1 broadcast
packet
RIP version
RIP-2 broadcast
packet
RIP-2 multicast
packet
RIP-1
√
√
—
RIP-2 broadcast mode
√
√
—
RIP-2 multicast mode
—
—
√
Table 3-5 Send mode of RIP packets
RIP-1 broadcast
packet
RIP version
RIP-2 broadcast
packet
RIP-2 multicast
packet
RIP-1
√
—
—
RIP-2 broadcast mode
—
√
—
RIP-2 multicast mode
—
—
√
Examples
# Run RIP-2 on the interface VLAN-interface 10 and send RIP packets in the broadcast mode.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] rip version 2 broadcast
rip work
Syntax
rip work
undo rip work
View
Interface view
Parameters
None
Description
Use the rip work command to enable the interface to receive and send RIP packets.
3-17
Use the undo rip work command to disable the interface from neither receiving nor sending RIP
packets.
By default, all interfaces except loopback interfaces are enabled to receive and send RIP packets.
The differences between the rip work, rip input, and rip output commands are as follows:
z
The rip work command controls the receiving and sending of RIP packets on an interface.
z
The rip input command controls only the receiving of RIP packets on an interface.
z
The rip output command controls only the sending of RIP packets on an interface.
Related commands: rip input, rip output.
Examples
# Disable the interface VLAN-interface 10 from receiving or sending RIP packets.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] undo rip work
summary
Syntax
summary
undo summary
View
RIP view
Parameters
None
Description
Use the summary command to enable RIP-2 automatic route summarization.
Use the undo summary command to disable RIP-2 automatic route summarization.
By default, RIP-2 automatic route summarization is enabled.
Route summarization can be used to reduce the routing traffic on the network as well as to reduce the
size of the routing table. The summary routes contain the natural masks when advertised.
If RIP-2 is used, route summarization can be disabled with the undo summary command when it is
necessary to broadcast subnet routes.
RIP-1 always uses automatic route summarization, but the undo summary command is invalid for
RIP-1.
Related commands: rip version.
Examples
# Set RIP version on the interface VLAN-interface 10 as RIP-2 and disable route summarization.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
3-18
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] rip version 2
[Sysname-Vlan-interface10] quit
[Sysname] rip
[Sysname-rip] undo summary
timers
Syntax
timers { update update-timer | timeout timeout-timer } *
undo timers { update | timeout } *
View
RIP view
Parameters
update-timer: Length of the Period Update timer in seconds, in the range of 1 to 3600.
timeout-timer: Length of the Timeout timer in seconds, in the range of 1 to 3600.
Description
Use the timers command to modify the lengths of the three RIP timers: Period Update, Timeout, and
Garbage-collection (which is usually set to a length four times that of the Period Update timer).
Use the undo timers command to restore the default settings.
By default, the lengths of the Period Update, Timeout, and Garbage-collection timers are 30 seconds,
180 seconds, and 120 seconds, respectively.
Generally, it is regarded that the value of the Garbage-collection timer is fixed at four times that of the
Period Update timer. Adjusting the Period Update timer will affect the Garbage-collection timer.
The modification of RIP timers is validated immediately.
As specified in RFC 1058, RIP is controlled by the above three timers:
z
The update timer defines the interval between routing updates.
z
The timeout timer defines the route aging time. If no routing update related to a route is received
within the aging time, the metric of the route is set to 16 in the routing table.
z
The garbage-collect timer defines the interval from when the metric of a route becomes 16 to when
it is deleted from the routing table. During the Garbage-Collect timer length, RIP advertises the
route with the routing metric set to 16. If no routing update is announced for that route after the
Garbage-Collect timer expires, the route will be deleted from the routing table.
Related commands: display rip.
Examples
# Set the values of the Period Update timer and the Timeout timer of RIP to 10 seconds and 30 seconds
respectively.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] timers update 10 timeout 30
3-19
traffic-share-across-interface
Syntax
traffic-share-across-interface
undo traffic-share-across-interface
View
RIP view
Parameters
None
Description
Use the traffic-share-across-interface command to enable traffic to be forwarded along multiple
equivalent RIP routes.
Use the undo traffic-share-across-interface command to disable this function.
By default, this function is disabled.
When the number of equivalent routes reaches the upper limit:
z
If this function is enabled, the newly learned equivalent route replaces the existing equivalent route
in the routing table.
z
If this function is disabled, the first aged route entry is replaced by the newly learned route. If no
route entry is aged, the newly learned equivalent route will be dropped.
Examples
# Enable traffic to be forwarded along multiple equivalent RIP routes.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] rip
[Sysname-rip] traffic-share-across-interface
3-20
4
IP Routing Policy Configuration Commands
The term router in this chapter refers to a router in a generic sense or an Ethernet switch running a
routing protocol.
IP Routing Policy Configuration Commands
apply cost
Syntax
apply cost value
undo apply cost
View
Route policy view
Parameters
value: Cost for matched routes, in the range of 0 to 4294967295.
Description
Use the apply cost command to apply a cost to routes satisfying matching rules.
Use the undo apply cost command to remove the configuration.
By default, no cost is applied to routes satisfying matching rules.
The apply clause is one that sets a cost for the routes satisfying matching rules in a routing policy.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop,
if-match cost, if-match tag, route-policy, apply tag.
Examples
# Create a routing policy named policy and node 1 with the matching mode being permit. Apply the
cost 120 to routes matching ACL 2000.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy permit node 1
%New sequence of this list
[Sysname-route-policy] if-match acl 2000
[Sysname-route-policy] apply cost 120
4-1
apply tag
Syntax
apply tag value
undo apply tag
View
Route policy view
Parameters
value: Tag value of a route, in the range of 0 to 4294967295.
Description
Use the apply tag command to configure a tag for a route.
Use the undo apply tag command to remove the configuration.
By default, no tag is configured for a route.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop,
if-match cost, if-match tag, route-policy, apply cost.
Examples
# Create a routing policy named policy and node 1 with the matching mode being permit. Apply the tag
100 to routes matching ACL 2000.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy permit node 1
%New sequence of this list
[Sysname-route-policy] if-match acl 2000
[Sysname-route-policy] apply tag 100
display ip ip-prefix
Syntax
display ip ip-prefix [ ip-prefix-name ]
View
Any view
Parameters
ip-prefix-name: Name of an IP-prefix, a string of up to 19 characters.
Description
Use the display ip ip-prefix command to display information about an IP-prefix(es).
When ip-prefix-name is not specified, information about all the configured IP-prefixes is displayed.
Related commands: ip ip-prefix.
4-2
Examples
# Display the information about the address prefix list named p1.
<Sysname> display ip ip-prefix p1
name
index
conditions
ip-prefix / mask
GE
LE
p1
10
permit
10.1.0.0/16
17
18
Table 4-1 Description on the fields of the display ip ip-prefix command
Field
Description
name
Name of an IP-prefix
index
Internal sequence number of an IP-prefix
Matching mode, including
conditions
z
z
permit
deny
ip-prefix / mask
IP prefix/mask length for matching IP prefixes
GE
Greater-equal, that is, lower limit of subnet mask
length of the matched IP address
LE
Less-equal, that is upper limit of subnet mask
length of the matched IP address
display route-policy
Syntax
display route-policy [ route-policy-name ]
View
Any view
Parameters
route-policy-name: Name of a routing policy, a string of up to 19 characters.
Description
Use the display route-policy command to display information about routing policies.
If you do not specify a route policy name, this command displays all route-policies configured.
Related commands: route-policy.
Examples
# Display information about routing policy named policy1.
<Sysname> display route-policy policy1
Route-policy : policy1
Permit 10 : if-match (ip-prefix) p1
apply cost 100
4-3
Table 4-2 Description on the fields of the display route-policy command
Field
Route-policy
Description
Name of a routing policy
Information about the routing policy with the matching mode configured as permit
and the node as 10.
Permit 10
if-match (ip-prefix) p1
Matching conditions
apply cost 100
Apply the cost 100 to the routes satisfying the
matching conditions.
if-match { acl | ip-prefix }
Syntax
if-match { acl acl-number | ip-prefix ip-prefix-name }
undo if-match { acl | ip-prefix }
View
Route policy view
Parameters
acl-number: Number of the ACL used for filtering, in the range of 2000 to 3999.
ip-prefix-name: Name of the IP prefix list used for filtering, a string of up to 19 characters.
Description
Use the if-match command to match routes permitted by an ACL or IP prefix list.
Use the undo if-match command to remove the configuration.
By default, the if-match clause is not configured.
Related commands: if-match interface, if-match ip next-hop, if-match cost, if-match tag,
route-policy, apply cost, apply tag.
Examples
# Define an if-match clause to match routing information permitted by IP-prefix p1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy permit node 1
%New sequence of this list
[Sysname-route-policy] if-match ip-prefix p1
if-match cost
Syntax
if-match cost value
undo if-match cost
4-4
View
Route policy view
Parameters
value: Route cost, in the range of 0 to 4294967295.
Description
Use the if-match cost command to configure a cost matching rule for routing information.
Use the undo if-match cost command to remove the configuration.
By default, no cost matching rule is defined.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop,
if-match tag, route-policy, apply cost, apply tag.
Examples
# Define an if-match clause to match routes with the cost of 8.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy permit node 1
%New sequence of this list
[Sysname-route-policy] if-match cost 8
if-match interface
Syntax
if-match interface interface-type interface-number
undo if-match interface
View
Route policy view
Parameters
interface-type interface-number: Specifies the interface type and interface number.
Description
Use the if-match interface command to match routes having the specified outgoing interface.
Use the undo if-match interface command to remove the match rule.
By default, no such a matching rule is configured.
This command matches routes having next hops pass through the specified interface.
Related commands: if-match acl, if-match ip-prefix, if-match ip next-hop, if-match cost, if-match
tag, route-policy, apply cost, apply tag.
Examples
# Define an if-match clause to match routes with the outbound interface VLAN-interface 1.
<Sysname> system-view
4-5
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy permit node 1
%New sequence of this list
[Sysname-route-policy] if-match interface Vlan-interface 1
if-match ip next-hop
Syntax
if-match ip next-hop { acl acl-number | ip-prefix ip-prefix-name }
undo if-match ip next-hop [ ip-prefix ]
View
Route policy view
Parameters
acl acl-number: Number of a basic ACL used for filtering, in the range of 2000 to 2999.
ip-prefix ip-prefix-name: Name of the IP address prefix list used for filtering, a string of 1 to 19
characters.
Description
Use the if-match ip next-hop command to match routes with next hops specified in an ACL or IP prefix
list.
Use the undo if-match ip next-hop command to remove the matching rule with an ACL.
Use the undo if-match ip next-hop ip-prefix command to remove the matching rule with an IP prefix
list.
By default, no next hop matching rule is defined.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match cost, if-match tag,
route-policy, apply cost, apply tag.
Examples
# Define an if-match clause to match routes with next hops specified in the IP address prefix list p1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy permit node 1
%New sequence of this list
[Sysname-route-policy] if-match ip next-hop ip-prefix p1
if-match tag
Syntax
if-match tag value
undo if-match tag
View
Route policy view
4-6
Parameters
value: Tag value, in the range of 0 to 4294967295.
Description
Use the if-match tag command to configure the tag matching rule for routing information.
Use the undo if-match tag command to remove the matching rule.
By default, no the tag matching rule for routing information is defined.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop,
if-match cost, route-policy, apply cost, apply tag.
Examples
# Define an if-match clause to match the routes having the tag value 8.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy permit node 1
%New sequence of this list
[Sysname-route-policy] if-match tag 8
ip ip-prefix
Syntax
ip ip-prefix ip-prefix-name [ index index-number ] { permit | deny } network len [ greater-equal
greater-equal | less-equal less-equal ] *
undo ip ip-prefix ip-prefix-name [ index index-number | permit | deny ]
View
System view
Parameters
ip-prefix-name: Name of an IP-prefix, a string of up to 19 characters. It identifies an address prefix list
uniquely.
index-number: Identifier of an entry in the IP address prefix list, in the range 1 to 2047. The entry with a
smaller index-number will be tested first.
permit: Specifies the match mode of the defined IP-prefix entries as permit mode. If the permit mode is
specified and the IP address to be filtered is in the ip-prefix range specified by the entry, the entry is
filtered through and the next entry is not tested. If the IP address to be filtered is not in the ip-prefix
range specified by the entry, the next entry is tested
deny: Specifies the match mode of the defined IP-prefix entries as deny mode. If the deny mode is
specified and the IP address to be filtered is in the ip-prefix range specified by the entry, the entry is not
filtered through and the next entry is not tested; otherwise, the next entry is tested.
network: IP address prefix (IP address), in dotted decimal notation.
len: IP address prefix length (mask length), in the range of 0 to 32.
greater-equal, less-equal: Address prefix range [greater-equal, less-equal] to be matched after the
address prefix network len has been matched. The meaning of greater-equal is "greater than or equal
4-7
to", and the meaning of less-equal is "less than or equal to". The range is len <= greater-equal <=
less-equal <= 32. When only greater-equal is used, it denotes the prefix range [greater-equal, 32].
When only less-equal is used, it denotes the prefix range [len, less-equal]. When both greater-equal
and less-equal are specified, the prefix range is [ less-equal,greater-equal ].
Description
Use the ip ip-prefix command to configure an IP-prefix list or one of its entries.
Use the undo ip ip-prefix command to delete an IP-prefix list or one of its entries.
By default, no IP-prefix list is configured.
An IP-prefix list is used for IP address filtering. An IP prefix list may contain several entries, and each
entry specifies one address prefix range. The inter-entry filtering relation is OR. That is, passing an
entry means filtering through this address prefix list. Not filtering through any entry means not filtering
through this IP-prefix.
The address prefix range may contain two parts, which are determined by len and [greater-equal,
less-equal], respectively. If the prefix ranges of these two parts are both specified, the IP to be filtered
must match the prefix ranges of these two parts.
If you specify network len as 0.0.0.0 0, it matches the default route only.
To match all the routes, use 0.0.0.0 0 less-equal 32.
Examples
# Define an ip-prefix named p1 to permit only the routes whose mask lengths are 17 or 18 on network
segment 10.0.192.0/8 to pass.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] ip ip-prefix p1 permit 10.0.192.0 8 greater-equal 17 less-equal 18
route-policy
Syntax
route-policy route-policy-name { permit | deny } node node-number
undo route-policy route-policy-name [ permit | deny | node node-number ]
View
System view
Parameters
route-policy-name: Name of a routing policy, a string of 19 characters. This argument identifies a routing
policy uniquely.
permit: Specifies the match mode of the defined routing policy node as permit. When a route entry
meets all the if-match clauses of the node, the entry is permitted to filter through the node and the apply
clause of the node will be performed. If a route entry does not meet the if-match clause of the node, the
next node of the route-policy will be tested.
deny: Specifies the match mode of the defined Route-policy node as deny mode. When a route entry
meets all the if-match clauses of the node, the entry is prohibited from filtering through the node and the
next node will not be tested.
4-8
node: Specifies a node index in a routing policy.
node-number: Index of the node in a routing policy, in the range 0 to 2047. When this routing policy is
used, the node with smaller node-number will be matched first.
Description
Use the route-policy command to create a routing policy or enter the Route-policy view.
Use the undo route-policy command to delete the created Route-policy.
By default, no Route-policy is defined.
Route-policy is used for route information filter. A Route-policy comprises some nodes and each node
comprises some if-match clauses and apply clauses.
An if-match clause defines the match rules of this node. An apply clause defines the actions after
filtering through this node. The filtering relationship between the if-match clauses of the node is AND.
That is, all if-match clauses of the node must be met.
The filtering relation between Route-policy nodes is OR. That is, filtering through one node means
filtering through this Route-policy. If the information does not filter through any node, it cannot filter
through this Route-policy.
Related commands: if-match interface, if-match acl, if-match ip-prefix, if-match ip next-hop,
if-match cost, if-match tag, apply cost, apply tag.
Examples
# Configure Route-policy policy1, with the node number of 10 and the match mode of permit, and enter
Route policy view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] route-policy policy1 permit node 10
%New sequence of this list
[Sysname-route-policy]
4-9
Table of Contents
1 Common Multicast Configuration Commands ·······················································································1-1
Common Multicast Configuration Commands ························································································1-1
display mac-address multicast static·······························································································1-1
display multicast-source-deny ·········································································································1-2
mac-address multicast interface······································································································1-2
mac-address multicast vlan ·············································································································1-3
multicast-source-deny ·····················································································································1-4
unknown-multicast drop enable·······································································································1-5
2 IGMP Snooping Configuration Commands ····························································································2-1
IGMP Snooping Configuration Commands·····························································································2-1
display igmp-snooping configuration ·······························································································2-1
display igmp-snooping group ··········································································································2-2
display igmp-snooping statistics······································································································2-3
igmp-snooping ·································································································································2-4
igmp-snooping fast-leave ················································································································2-5
igmp-snooping general-query source-ip··························································································2-6
igmp-snooping group-limit ···············································································································2-7
igmp-snooping group-policy ············································································································2-8
igmp-snooping host-aging-time ·····································································································2-10
igmp-snooping max-response-time ·······························································································2-10
igmp-snooping nonflooding-enable ·······························································································2-11
igmp-snooping querier···················································································································2-12
igmp-snooping query-interval ········································································································2-13
igmp-snooping router-aging-time ··································································································2-14
igmp-snooping query-pkt-deny······································································································2-14
igmp-snooping version ··················································································································2-15
igmp-snooping vlan-mapping ········································································································2-15
igmp host-join port ·························································································································2-16
igmp host-join ································································································································2-17
igmp-snooping special-query source-ip·························································································2-18
multicast static-group interface······································································································2-19
multicast static-group vlan ·············································································································2-20
multicast static-router-port ·············································································································2-21
multicast static-router-port vlan ·····································································································2-21
reset igmp-snooping statistics ·······································································································2-22
service-type multicast ····················································································································2-23
i
1
Common Multicast Configuration Commands
Common Multicast Configuration Commands
display mac-address multicast static
Syntax
display mac-address multicast static [ [mac-address ] vlan vlan-id ] [ count ]
View
Any view
Parameters
mac-address: Displays the static multicast MAC entry information for the specified MAC address.
Without this argument provided, this command displays the information of all static multicast MAC
entries in the specified VLAN.
vlan vlan-id: Displays the static multicast MAC entry information in the specified VLAN. Without a VLAN
specified, this command displays the static multicast MAC entry information in all VLANs.
count: Displays the number of static multicast MAC entries.
Description
Use the display mac-address multicast static command to display the information about the
multicast MAC address entry or entries manually configured on the switch.
Related commands: mac-address multicast interface, mac-address multicast vlan.
Examples
# Display the information of all static multicast MAC entries in VLAN 1.
<Sysname> display mac-address multicast static vlan 1
MAC ADDR
VLAN ID
STATE
PORT INDEX
AGING TIME(s)
0100-0001-0001
1
Config static
Ethernet1/0/1
NOAGED
Ethernet1/0/2
Ethernet1/0/3
Ethernet1/0/4
---
1 static mac address(es) found
---
Table 1-1 display mac-address multicast static command output description
Field
Description
MAC ADDR
MAC address
VLAN ID
The VLAN in which the MAC address is manually
added
1-1
Field
Description
STATE
State of the MAC address, which includes only
Config static, indicating that the table entry is
manually added.
PORT INDEX
Ports out which the multicast packets destined
for the multicast MAC address are forwarded
AGING TIME(s)
State of the aging timer. The aging timer for
static multicast MAC addresses has only one
state: NOAGED, indicating that the entry never
expires.
display multicast-source-deny
Syntax
display multicast-source-deny [ interface interface-type [ interface-number ] ]
View
Any view
Parameters
interface-type: Port type.
interface-number: Port number.
Description
Use the display multicast-source-deny command to display the multicast source port suppression
status.
z
With neither a port type nor a port number specified, the command displays the multicast source
port suppression status of all the ports on the switch.
z
With only a port type specified, the command displays the multicast source port suppression status
of all ports of that type.
z
With both a port type and a port number specified, the command displays the multicast source port
suppression status of the specified port.
Related commands: multicast-source-deny.
Examples
# Display the multicast source port suppression status of Ethernet 1/0/1.
<Sysname> display multicast-source-deny interface Ethernet 1/0/1
Ethernet1/0/1
Multicast-source-deny disabled.
The information above shows that multicast source port suppression is disabled on Ethernet 1/0/1.
mac-address multicast interface
Syntax
mac-address multicast mac-address interface interface-list vlan vlan-id
undo mac-address multicast [ mac-address [ interface interface-list ] vlan vlan-id ]
1-2
View
System view
Parameters
mac-address: Multicast MAC address, in the form of H-H-H.
interface interface-list: Specifies forwarding ports for the specified multicast MAC group address. With
the interface-list argument, you can define one or more individual ports (in the form of interface-type
interface-number) and/or one or more port ranges (in the form of interface-type interface-number1 to
interface-type interface-number2, where interface-number2 must be greater than interface-number1).
The total number of individual ports plus port ranges cannot exceed 10. For port types and port
numbers, refer to the parameter description in the “Port Basic Configuration” part in this manual.
vlan vlan-id: Specifies the VLAN to which the forwarding ports belong. The effective range for vlan-id is
1 to 4094.
Description
Use the mac-address multicast interface command to create a multicast MAC address entry.
Use the undo mac-address multicast interface command to remove the specified multicast MAC
address entry or all multicast MAC address entries.
Each multicast MAC address entry contains multicast address, forward port, VLAN ID, and so on.
Related commands: display mac-address multicast static.
Examples
# Create a multicast MAC address entry, with the multicast MAC address of 0100-5e0a-0805 and a
forwarding port of Ethernet 1/0/1 in VLAN 1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] mac-address multicast 0100-5e0a-0805 interface Ethernet 1/0/1 vlan 1
mac-address multicast vlan
Syntax
mac-address multicast mac-address vlan vlan-id
undo mac-address multicast [ [ mac-address ] vlan vlan-id ]
View
Ethernet port view
Parameters
mac-address: Multicast MAC address in the form of H-H-H.
vlan vlan-id: Specifies the VLAN the current port belongs to. The effective range for vlan-id is 1 to 4094.
Description
Use the mac-address multicast vlan command to create a multicast MAC address entry on the
current port.
1-3
Use the undo mac-address multicast vlan command to remove the specified multicast MAC address
entry or all multicast MAC address entries on the current port.
Each multicast MAC address entry contains the multicast address, forwarding port, and VLAN ID
information.
Related commands: display mac-address multicast static.
Examples
# Create a multicast MAC address entry on Ethernet 1/0/1 in VLAN 1, with the multicast address of
0100-1000-1000.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet1/0/1
[Sysname-Ethernet1/0/1] mac-address multicast 0100-1000-1000 vlan 1
multicast-source-deny
Syntax
multicast-source-deny [ interface interface-list ]
undo multicast-source-deny [ interface interface-list ]
View
System view, Ethernet port view
Parameters
interface interface-list: Enables the multicast source port suppression feature on the specified port or
ports. With the interface-list argument, you can define one or more individual ports (in the form of
interface-type interface-number) and/or one or more port ranges (in the form of interface-type
interface-number1 to interface-type interface-number2, where interface-number2 must be greater than
interface-number1). The total number of individual ports plus port ranges cannot exceed 10. For port
types and port numbers, refer to the parameter description in the “Port Basic Configuration” part in this
manual.
Description
Use the multicast-source-deny command to enable the multicast source port suppression feature.
Use the undo multicast-source-deny command to restore the default setting.
By default, the multicast source port suppression feature is disabled on all the ports.
With the multicast source port suppression feature enabled on a port, the port drops all multicast data
packets while it permits multicast protocol packets to pass. This feature is useful for rejecting multicast
traffic from unauthorized multicast source servers connected to the switch.
z
In system view, if no port or port list is specified, the multicast source port suppression feature is
enabled on all the ports of the switch; if one or more ports or port lists are specified, the multicast
source port suppression feature is enabled on the specified ports.
z
In Ethernet port view, you can use the command to enable the multicast source port suppression
feature on the current port only.
1-4
Examples
# Enable the multicast source port suppression feature on all the ports of the switch.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] multicast-source-deny
# Enable the multicast source port suppression feature on Ethernet 1/0/1 through Ethernet 1/0/10 and
on Ethernet 1/0/12.
[Sysname] multicast-source-deny interface Ethernet 1/0/1 to Ethernet 1/0/10 Ethernet 1/0/12
# Enable the multicast source port suppression feature on Ethernet 1/0/13.
[Sysname] interface Ethernet 1/0/13
[Sysname-Ethernet1/0/13] multicast-source-deny
unknown-multicast drop enable
Syntax
unknown-multicast drop enable
undo unknown-multicast drop enable
View
System view
Parameters
None
Description
Use the unknown-multicast drop enable command to enable the function of dropping unknown
multicast packets.
Use the undo unknown-multicast drop enable command to disable the function of dropping unknown
multicast packets.
By default, the function of dropping unknown multicast packets is disabled.
Examples
Enable the unknown multicast drop feature.
<Sysname> system-view
System view: return to user view with Ctrl+Z.
[Sysname] unknown-multicast drop enable
1-5
2
IGMP Snooping Configuration Commands
IGMP Snooping Configuration Commands
display igmp-snooping configuration
Syntax
display igmp-snooping configuration
View
Any view
Parameters
None
Description
Use the display igmp-snooping configuration command to display IGMP Snooping configuration
information.
If IGMP Snooping is disabled on this switch, this command displays a message showing that IGMP
Snooping is not enabled.
With IGMP Snooping enabled, this command displays the following information:
z
IGMP Snooping status
z
aging time of the router port
z
maximum response time in IGMP queries
z
aging time of multicast member ports
z
non-flooding feature status
Related
commands:
igmp-snooping,
igmp-snooping
router-aging-time,
igmp-snooping
max-response-time, igmp-snooping host-aging-time, igmp-snooping nonflooding-enable.
Examples
# Display IGMP Snooping configuration information on the switch.
<Sysname> display igmp-snooping configuration
Enable IGMP-Snooping.
The router port timeout is 105 second(s).
The max response timeout is 10 second(s).
The host port timeout is 260 second(s).
Enable IGMP-Snooping Non-Flooding.
The above-mentioned information shows: IGMP Snooping is enabled, the aging time of the router port
is 105 seconds, the maximum response time in IGMP queries is 10 seconds, the aging time of multicast
member ports is 260 seconds, and the IGMP Snooping non-flooding feature is enabled.
2-1
display igmp-snooping group
Syntax
display igmp-snooping group [ vlan vlan-id ]
View
Any view
Parameters
vlan vlan-id: Specifies the VLAN in which the multicast group information is to be displayed, where
vlan-id ranges from 1 to 4094.. If you do not specify a VLAN, this command displays the multicast group
information of all VLANs.
Description
Use the display igmp-snooping group command to display the IGMP Snooping multicast group
information.
Related commands: igmp-snooping, igmp host-join, multicast static-group vlan, multicast
static-group interface, multicast static-group vlan, multicast static-router-port, multicast
static-router-port vlan
Examples
# Display the information about the multicast groups in VLAN 100.
<Sysname> display igmp-snooping group vlan 100
Total 1 IP Group(s).
Total 1 MAC Group(s).
Vlan(id):100.
Total 1 IP Group(s).
Total 1 MAC Group(s).
Static Router port(s):
Ethernet1/0/11
Dynamic Router port(s):
Ethernet1/0/22
IP group(s):the following ip group(s) match to one mac group.
IP group address:228.0.0.1
Static host port(s):
Ethernet1/0/23
Dynamic host port(s):
Ethernet1/0/10
MAC group(s):
MAC group address:0100-5e00-0001
Host port(s):Ethernet1/0/10
Ethernet1/0/23
Table 2-1 display igmp-snooping group command output description
Field
Description
Total 1 IP Group(s).
Total number of IP multicast groups in all VLANs
2-2
Field
Description
Total 1 MAC Group(s).
Total number of MAC multicast groups in all
VLANs
Vlan(id):
ID of the VLAN whose multicast group
information is displayed
Total 1 IP Group(s).
Total number of IP multicast groups in VLAN 100
Total 1 MAC Group(s).
Total number of MAC multicast groups in VLAN
100
Static Router port(s):
Static router port
Dynamic Router port(s):
Dynamic router port
Static host port(s):
Static member port
Dynamic host port(s):
Dynamic member port
IP group address:
IP address of a multicast group
MAC group(s):
MAC multicast group
MAC group address:
Address of a MAC multicast group
Host port(s)
Member ports
display igmp-snooping statistics
Syntax
display igmp-snooping statistics
View
Any view
Parameters
None
Description
Use the display igmp-snooping statistics command to display IGMP Snooping statistics.
This command displays the following information: the numbers of the IGMP general query messages,
IGMP group-specific query messages, IGMPv1 report messages, IGMPv2 report messages, IGMP
leave messages and error IGMP packets received, and the number of the IGMP group-specific query
messages sent.
When IGMPv3 Snooping is enabled, the device makes statistics of IGMPv3 messages as IGMPv2
messages.
Related commands: igmp-snooping.
2-3
Examples
# Display IGMP Snooping statistics.
<Sysname> display igmp-snooping statistics
Received IGMP general query packet(s) number:1.
Received IGMP specific query packet(s) number:0.
Received IGMP V1 report packet(s) number:0.
Received IGMP V2 report packet(s) number:3.
Received IGMP leave packet(s) number:0.
Received error IGMP packet(s) number:0.
Sent IGMP specific query packet(s) number:0.
The information above shows that IGMP receives:
z
one IGMP general query messages
z
zero IGMP specific query messages
z
zero IGMPv1 report messages
z
three IGMPv2 report messages
z
zero IGMP leave messages
z
zero IGMP error packets
IGMP Snooping sends:
z
zero IGMP specific query messages
igmp-snooping
Syntax
igmp-snooping { enable | disable }
View
System view, VLAN view
Parameters
enable: Enables the IGMP Snooping feature.
disable: Disables the IGMP Snooping feature.
Description
Use the igmp-snooping enable command to enable the IGMP Snooping feature.
Use the igmp-snooping disable command to disable the IGMP Snooping feature.
By default, the IGMP Snooping feature is disabled.
2-4
z
Although both Layer 2 and Layer 3 multicast protocols can run on the same switch simultaneously,
they cannot run simultaneously in the same VLAN and on the corresponding VLAN interface.
z
Before enabling IGMP Snooping in a VLAN, be sure to enable IGMP Snooping globally in system
view; otherwise the IGMP Snooping setting will not take effect.
z
If IGMP Snooping and VLAN VPN are enabled on a VLAN at the same time, IGMP queries are
likely to fail to pass the VLAN. You can solve this problem by configuring VLAN tags for the IGMP
queries. For details, see igmp-snooping vlan-mapping.
Examples
# Enable the IGMP Snooping feature on the switch.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] igmp-snooping enable
Enable IGMP-Snooping ok.
igmp-snooping fast-leave
Syntax
igmp-snooping fast-leave [ vlan vlan-list ]
undo igmp-snooping fast-leave [ vlan vlan-list ]
View
System view, Ethernet port view
Parameters
vlan vlan-list: Specifies a VLAN list. With the vlan-list argument, you can provide one or more individual
VLAN IDs (in the form of vlan-id) and/or one or more VLAN ID ranges (in the form of vlan-id1 to vlan-id2,
where vlan-id2 must be greater than vlan-id1). The effective range for a VLAN ID is 1 to 4094 and the
total number of individual VLANs plus VLAN ranges cannot exceed 10.
Description
Use the igmp-snooping fast-leave command to enable fast leave processing.
With this function enabled, when the switch receives an IGMP leave message on a port, it directly
removes that port from the forwarding table entry for the specific group.
Use the undo igmp-snooping fast-leave command to disable fast leave processing.
By default, fast leave processing is disabled.
2-5
z
The fast leave processing function works for a port only if the host attached to the port runs IGMPv2
or IGMPv3.
z
The configuration performed in system view takes effect on all ports of the switch if no VLAN is
specified; if one or more VLANs are specified, the configuration takes effect on all ports in the
specified VLAN(s).
z
The configuration performed in Ethernet port view takes effect on the port no matter which VLAN it
belongs to if no VLAN is specified; if one or more VLANs are specified, the configuration takes
effect on the port only if the port belongs to the specified VLAN(s).
z
If fast leave processing and unknown multicast packet dropping or non-flooding are enabled on a
port to which more than one host is connected, when one host leaves a multicast group, the other
hosts connected to port and interested in the same multicast group will fail to receive multicast data
for that group.
Examples
# Enable fast leave processing on Ethernet 1/0/1 in VLAN 2.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] igmp-snooping fast-leave vlan 2
igmp-snooping general-query source-ip
Syntax
igmp-snooping general-query source-ip { current-interface | ip-address }
undo igmp-snooping general-query source-ip
View
VLAN view
Parameters
current-interface: Specifies the IP address of the current VLAN interface as the source address of
IGMP general queries. 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.
ip-address: Specifies the source address of IGMP general queries, which can be any legal IP address.
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.
This command can take effect only if the IGMP Snooping querier function is enabled on the switch.
2-6
By default, the Layer 2 multicast switch sends general query messages with the source IP address of
0.0.0.0.
Related commands: igmp-snooping querier, igmp-snooping query-interval.
Examples
# Configure the switch to send general query messages with the source IP address 2.2.2.2 in VLAN 3.
<Sysname> system-view
System view, return to user view with Ctrl+Z.
[Sysname] igmp-snooping enable
[Sysname] vlan 3
[Sysname-vlan3] igmp-snooping enable
[Sysname-vlan3] igmp-snooping querier
[Sysname-vlan3] igmp-snooping general-query source-ip 2.2.2.2
igmp-snooping group-limit
Syntax
igmp-snooping group-limit limit [ vlan vlan-list ] [ overflow-replace ]
undo igmp-snooping group-limit [ vlan vlan-list ]
View
Ethernet port view
Parameters
limit: Maximum number of multicast groups the port can join, in the range of 1 to 256.
overflow-replace: Allows a new multicast group to replace an existing multicast group with the lowest
IP address.
vlan vlan-list: Specifies a VLAN list. With the vlan-list argument, you can provide one or more individual
VLAN IDs (in the form of vlan-id) and/or one or more VLAN ID ranges (in the form of vlan-id1 to vlan-id2,
where vlan-id2 must be greater than vlan-id1). The effective range for a VLAN ID is 1 to 4094 and the
total number of individual VLANs plus VLAN ranges cannot exceed 10.
Description
Use the igmp-snooping group-limit command to define the maximum number of multicast groups the
port can join.
Use the undo igmp-snooping group-limit command to restore the default setting.
If you do not specify any VLAN, the command will take effect for all the VLANs to which the current port
belongs; if you specify a VLAN or multiple VLANs, the command will take effect for the port only if the
port belongs to the specified VLAN(s). It is recommended to specify a VLAN or multiple VLANs to save
memory.
By default, the maximum number of multicast groups the port can join is 256.
2-7
z
To prevent bursting traffic in the network or performance deterioration of the device caused by
excessive multicast groups, you can set the maximum number of multicast groups that the switch
should process.
z
When the number of multicast groups exceeds the configured limit, the switch removes its
multicast forwarding entries starting from the oldest one. In this case, the multicast packets for the
removed multicast group(s) will be flooded in the VLAN as unknown multicast packets. As a result,
non-member ports can receive multicast packets within a period of time.
z
To avoid this from happening, enable the function of dropping unknown multicast packets.
z
The keyword overflow-replace does not apply to IGMPv3 Snooping, that is, with IGMPv3
Snooping enabled, even if the keyword overflow-replace is configured, a new multicast group will
not replace an existing multicast group when the number of multicast groups reaches the maximum
value.
z
If an Ethernet port is a static member port for a multicast group, the configuration of the maximum
number of multicast groups that can be joined does not take effect on the port.
Examples
# Configure to allow Ethernet 1/0/1 in VLAN 2 to join a maximum of 200 multicast groups.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] igmp-snooping group-limit 200 vlan 2
igmp-snooping group-policy
Syntax
igmp-snooping group-policy acl-number [ vlan vlan-list ]
undo igmp-snooping group-policy [ vlan vlan-list ]
View
System view, Ethernet port view
Parameters
acl-number: Basic ACL number, in the range of 2000 to 2999.
vlan vlan-list: Specifies a VLAN list. With the vlan-list argument, you can provide one or more individual
VLAN IDs (in the form of vlan-id) and/or one or more VLAN ID ranges (in the form of vlan-id1 to vlan-id2,
where vlan-id2 must be greater than vlan-id1). The effective range for a VLAN ID is 1 to 4094 and the
total number of individual VLANs plus VLAN ranges cannot exceed 10.
Description
Use the igmp-snooping group-policy command to configure a multicast group filter.
Use the undo igmp-snooping group-policy command to remove the configured multicast group filter.
2-8
By default, no multicast group filter is configured.
The ACL rule defines a multicast address or a multicast address range (for example 224.0.0.1 to
239.255.255.255) and is used to:
z
Allow the port(s) to join only the multicast group(s) defined in the rule by a permit statement.
z
Inhibit the port(s) from joining the multicast group(s) defined in the rule by a deny statement.
z
A port can belong to multiple VLANs, you can configure only one ACL rule per VLAN on a port.
z
If no ACL rule is configured, all the multicast groups will be filtered.
z
Since most devices broadcast unknown multicast packets by default, this function is often used
together with the function of dropping unknown multicast packets to prevent multicast streams from
being broadcast as unknown multicast packets to a port blocked by this function.
z
The configuration performed in system view takes effect on all ports of the switch if no VLAN is
specified; if one or more VLANs are specified, the configuration takes effect on all ports in the
specified VLAN(s).
z
The configuration performed in Ethernet port view takes effect on the port no matter which VLAN it
belongs to if no VLAN is specified; if one or more VLANs are specified, the configuration takes
effect on the port only if the port belongs to the specified VLAN(s).
Examples
# Configure a multicast group filter to allow receivers attached to Ethernet 1/0/1 to access the multicast
streams for groups 225.0.0.0 to 225.255.255.255.
z
Configure ACL 2000.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] acl number 2000
[Sysname-acl-basic-2000] rule permit source 225.0.0.0 0.255.255.255
[Sysname-acl-basic-2000] quit
z
Create VLAN 2 and add Ethernet1/0/1 to VLAN 2.
[Sysname] vlan 2
[Sysname-vlan2] port Ethernet 1/0/1
[Sysname-vlan2] quit
z
Apply ACL 2000 on Ethernet1/0/1 to allow it to join only the IGMP multicast groups defined in the
rule of ACL 2000.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] igmp-snooping group-policy 2000 vlan 2
[Sysname-Ethernet1/0/1] quit
# Configure a multicast group filter to allow receivers attached to Ethernet 1/0/2 to access the multicast
streams for any groups except groups 225.0.0.0 to 225.0.0.255.
z
Configure ACL 2001.
[Sysname] acl number 2001
[Sysname-acl-basic-2001] rule deny source 225.0.0.0 0.0.0.255
2-9
[Sysname-acl-basic-2001] rule permit source any
[Sysname-acl-basic-2001] quit
z
Create VLAN 2 and add Ethernet1/0/2 to VLAN 2.
[Sysname] vlan 2
[Sysname-vlan2] port Ethernet 1/0/2
[Sysname-vlan2] quit
z
Configure ACL 2001 on Ethernet1/0/2 to it to join any IGMP multicast groups except those defined
in the deny rule of ACL 2001.
[Sysname] interface Ethernet 1/0/2
[Sysname-Ethernet1/0/2] igmp-snooping group-policy 2001 vlan 2
igmp-snooping host-aging-time
Syntax
igmp-snooping host-aging-time seconds
undo igmp-snooping host-aging-time
View
System view
Parameters
seconds: Aging time (in seconds) of multicast member ports, in the range of 200 to 1,000.
Description
Use the igmp-snooping host-aging-time command to configure the aging time of multicast member
ports.
Use the undo igmp-snooping host-aging-time command to restore the default aging time.
By default, the aging time of multicast member ports is 260 seconds.
The aging time of multicast member ports determines the refresh frequency of multicast group
members. In an environment where multicast group members change frequently, a relatively shorter
aging time is required.
Related commands: display igmp-snooping configuration.
Examples
# Set the aging time of multicast member ports to 300 seconds.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] igmp-snooping host-aging-time 300
igmp-snooping max-response-time
Syntax
igmp-snooping max-response-time seconds
undo igmp-snooping max-response-time
2-10
View
System view
Parameters
seconds: Maximum response time in IGMP general queries, in the range of 1 to 25.
Description
Use the igmp-snooping max-response-time command to configure the maximum response time in
IGMP general queries.
Use the undo igmp-snooping max-response-time command to restore the default.
By default, the maximum response time in IGMP general queries is 10 seconds.
An appropriate setting of the maximum response time in IGMP queries allows hosts to respond to
queries quickly and thus the querier can learn the existence of multicast members quickly.
Related commands: display igmp-snooping configuration.
Examples
# Set the maximum response time in IGMP queries to 15 seconds.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] igmp-snooping max-response-time 15
igmp-snooping nonflooding-enable
Syntax
igmp-snooping nonflooding-enable
undo igmp-snooping nonflooding-enable
View
System view
Parameters
None
Description
Use the igmp-snooping nonflooding-enable command to enable the IGMP Snooping non-flooding
function. With this function enabled, unknown multicast packets are passed to the router ports of the
switch rather than being flooded in the VLAN.
Use the undo igmp-snooping nonflooding-enable command to disable the IGMP Snooping
non-flooding function.
By default, the IGMP Snooping non-flooding function is disabled, namely unknown multicast packets
are flooded in the VLAN.
The difference between the IGMP Snooping non-flooding function and the function of dropping
unknown multicast packets is in that the former passes unknown multicast packets to the router ports
while the latter directly discards unknown multicast packets.
2-11
You can configure this command only after IGMP Snooping is enabled globally. When IGMP Snooping
is disabled globally, the configuration of the igmp-snooping nonflooding-enable command is also
removed.
z
If the function of dropping unknown multicast packets or the XRN fabric function is enabled, you
cannot enable the IGMP Snooping non-flooding function.
z
The IGMP Snooping non-flooding function and the multicast source port suppression function
cannot take effect at the same time. If both are configured, only the multicast source port
suppression function takes effect.
Related
commands:
unknown-multicast
drop
enable,
multicast-source-deny,
display
multicast-source-deny
Examples
# Enable IGMP Snooping non-flooding after you enable IGMP Snooping globally and disable both port
stacking and unknown-multicast dropping.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] igmp-snooping enable
[Sysname] igmp-snooping nonflooding-enable
igmp-snooping querier
Syntax
igmp-snooping querier
undo igmp-snooping querier
View
VLAN view
Parameters
None
Description
Use the igmp-snooping querier command to enable the IGMP Snooping querier feature on the
current VLAN.
Use the undo igmp-snooping querier command to restore the default.
By default, the IGMP Snooping querier feature is disabled.
This command takes effect only if IGMP Snooping is enabled globally and also enabled in the current
VLAN.
2-12
Related commands: igmp-snooping enable, igmp-snooping query-interval, igmp-snooping
general-query source-ip
Examples
# Enable the IGMP Snooping querier in VLAN 3.
<Sysname> system-view
System view, return to user view with Ctrl+Z.
[Sysname] igmp-snooping enable
[Sysname] vlan 3
[Sysname-vlan3] igmp-snooping enable
[Sysname-vlan3] igmp-snooping querier
igmp-snooping query-interval
Syntax
igmp-snooping query-interval seconds
undo igmp-snooping query-interval
View
VLAN view
Parameters
seconds: IGMP query interval, ranging from 1 to 300, in seconds.
Description
Use the igmp-snooping query-interval command to configure the IGMP query interval, namely the
interval at which the switch sends IGMP general queries.
Use the undo igmp-snooping query-interval command to restore the default.
By default, the IGMP query interval is 60 seconds.
These commands are effective only after the IGMP Snooping querier feature is enabled. Otherwise, the
switch will not send general queries. The configured query interval must be longer than the maximum
response time in general queries.
Related
commands:
igmp-snooping
enable,
igmp-snooping
max-response-time, igmp-snooping general-query source-ip
Examples
# Configure the IGMP query interval to 100 seconds in VLAN 3.
<Sysname> system-view
System view, return to user view with Ctrl+Z.
[Sysname] igmp-snooping enable
[Sysname] vlan 3
[Sysname-vlan3] igmp-snooping enable
[Sysname-vlan3] igmp-snooping querier
[Sysname-vlan3] igmp-snooping query-interval 100
2-13
querier,
igmp-snooping
igmp-snooping router-aging-time
Syntax
igmp-snooping router-aging-time seconds
undo igmp-snooping router-aging-time
View
System view
Parameters
seconds: Aging time of router ports, in the range of 1 to 1,000, in seconds.
Description
Use the igmp-snooping router-aging-time command to configure the aging time of router ports.
Use the undo igmp-snooping router-aging-time command to restore the default aging time.
By default, the aging time of router ports is 105 seconds.
The aging time of router ports should be about 2.5 times the IGMP query interval.
Related commands: igmp-snooping max-response-time, igmp-snooping.
Examples
# Set the aging time of the router port to 500 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] igmp-snooping router-aging-time 500
igmp-snooping query-pkt-deny
Syntax
igmp-snooping query-pkt-deny
undo igmp-snooping query-pkt-deny
View
Ethernet port view
Parameters
None
Description
Use the igmp-snooping query-pkt-deny command to disable a port from becoming a router port.
Use the undo igmp-snooping query-pkt-deny command to cancel the configuration.
By default, a port is not disabled from becoming a router port.
After you execute this command on a port of a switch, the switch does not forward IGMP query
messages received from the port nor maintains it as a router port. This feature is mainly used in MFF
networks to prevent user ports from forwarding IGMP membership report messages to other hosts, thus
protecting Layer 2 isolation.
2-14
Examples
# Disable Ethernet 1/0/1 from becoming a router port.
<Sysname> system-view
System view, return to user view with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] igmp-snooping query-pkt-deny
igmp-snooping version
Syntax
igmp-snooping version version-number
undo igmp-snooping version
View
VLAN view
Parameters
version-number: IGMP Snooping version, in the range of 2 to 3 and defaulting to 2.
Description
Use the igmp-snooping version command to configure the IGMP Snooping version in the current
VLAN.
Use the undo igmp-snooping version command to restore the default IGMP Snooping version.
This command can take effect only if IGMP Snooping is enabled in the VLAN.
Related commands: igmp-snooping enable.
Examples
# Set IGMP Snooping version to version 3 in VLAN 100.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] igmp-snooping enable
Enable IGMP-Snooping ok.
[Sysname] vlan 100
[Sysname -vlan100] igmp-snooping enable
[Sysname -vlan100] igmp-snooping version 3
igmp-snooping vlan-mapping
Syntax
igmp-snooping vlan-mapping vlan vlan-id
undo igmp-snooping vlan-mapping
View
System view
2-15
Parameters
vlan vlan-id: VLAN ID, in the range of 1 to 4094.
Description
Use the igmp-snooping vlan-mapping vlan command to configure to transmit IGMP general and
group-specific query messages in a specific VLAN.
Use the undo igmp-snooping vlan-mapping command to restore the default.
By default, the VLAN tag carried in IGMP general and group-specific query messages is not changed.
Examples
# Configure IGMP general and group-specific query messages to be transmitted in VLAN 2.
<Sysname>system-view
System View: return to User View with Ctrl+Z.
[Sysname] igmp-snooping enable
[Sysname] igmp-snooping vlan-mapping vlan 2
igmp host-join port
Syntax
igmp host-join group-address [ source-ip source-address ] port interface-list
undo igmp host-join group-address [ source-ip source-address ] port interface-list
View
VLAN interface view
Parameters
group-address: Address of the multicast group to join.
source-address: Address of the multicast source to join. You can specify a multicast source address
only when IGMPv3 Snooping is running in the VLAN.
port interface-list: Configures the specified port or ports under the current VLAN interface as simulated
member host(s) for the specified multicast group. With the interface-list argument, you can define one
or more individual ports (in the form of interface-type interface-number) and/or one or more port ranges
(in the form of interface-type interface-number1 to interface-type interface-number2, where
interface-number2 must be greater than interface-number1). The total number of individual ports plus
port ranges cannot exceed 10. For port types and port numbers, refer to the parameter description in
the “Port Basic Configuration” part in this manual.
Description
Use the igmp host-join port command to configure one or more ports under the current VLAN
interface as a multicast group or source and group member(s), namely configure the ports as a
simulated member hosts for a multicast group or source and group.
Use the undo igmp host-join port command to remove the specified port(s) as simulated member
hosts for the specified multicast group or source and group.
By default, simulated joining is disabled.
2-16
Unlike a static member port, a port configured as a simulated member host will age out like a dynamic
member port.
Related commands: igmp-snooping enable, multicast static-group interface, multicast
static-group vlan
Before configuring simulated joining, enable IGMP Snooping in the VLAN corresponding to the current
VLAN interface.
Examples
# Configure Ethernet 1/0/1 under VLAN-interface 10 as a simulated host member host to join multicast
group 225.0.0.1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] igmp-snooping enable
Enable IGMP-Snooping ok.
[Sysname] vlan 10
[Sysname-vlan10] igmp-snooping enable
[Sysname-vlan10] quit
[Sysname] interface Vlan-interface 10
[Sysname-Vlan-interface10] igmp host-join 225.0.0.1 port Ethernet 1/0/1
igmp host-join
Syntax
igmp host-join group-address [source-ip source-address] vlan vlan-id
undo igmp host-join group-address [source-ip source-address] vlan vlan-id
View
Ethernet port view
Parameters
group-address: Address of the multicast group to join.
source-address: Address of the multicast source to join. You can specify a multicast source address
only when IGMPv3 Snooping is running in a VLAN.
vlan vlan-id: ID of the VLAN to which the port belongs, in the range of 1 to 4094.
Description
Use the igmp host-join command to configure the current port as a specified multicast group or source
and group member, namely configure the port as simulated member host for a specified multicast group
or source and group member.
2-17
Use the undo igmp host-join command to remove the current port as a simulated member host for the
specified multicast group or source-group.
Unlike a static member port, a port configured as a simulated member host will age out like a dynamic
member port.
Related commands: igmp-snooping enable, multicast static-group interface, multicast
static-group vlan
z
Before configuring a port as a simulated host, enable IGMP Snooping in VLAN view first.
z
The current port must belong to the specified VLAN; otherwise this configuration does not take
effect.
Examples
# Configure Ethernet 1/0/1 in VLAN 1 as a simulated member host for multicast source 1.1.1.1 and
multicast group 225.0.0.1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname]igmp-snooping enable
Enable IGMP-Snooping ok.
[Sysname]vlan 1
[Sysname-vlan1]igmp-snooping enable
[Sysname-vlan1]igmp-snooping version 3
[Sysname-vlan1]quit
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] igmp host-join 225.0.0.1 source-ip 1.1.1.1 vlan 10
igmp-snooping special-query source-ip
Syntax
igmp-snooping special-query source-ip { current-interface | ip-address }
undo igmp-snooping special-query source-ip
View
VLAN view
Parameters
current-interface: Specifies the IP address of the current VLAN interface as the source address to be
carried in IGMP group-specific queries. 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.
ip-address: Specifies the source address to be carried in IGMP group-specific queries, which can be
any legal IP address.
2-18
Description
Use the igmp-snooping special-query source-ip command to configure the source address to be
carried in IGMP group-specific queries.
Use the undo igmp-snooping special-query source-ip command to restore the default.
By default, the Layer 2 multicast switch sends group-specific query messages with the source IP
address of 0.0.0.0.
Related commands: igmp-snooping querier.
Examples
# Configure the switch to send group-specific query messages with the source IP address 2.2.2.2 in
VLAN 3.
<Sysname> system-view
System view, return to user view with Ctrl+Z.
[Sysname] igmp-snooping enable
[Sysname] vlan 3
[Sysname-vlan3] igmp-snooping enable
[Sysname-vlan3] igmp-snooping special-query source-ip 2.2.2.2
multicast static-group interface
Syntax
multicast static-group group-address interface interface-list
undo multicast static-group group-address interface interface-list
View
VLAN interface view
Parameters
group-address: IP address of the multicast group to join, in the range of 224.0.0.0 to 239.255.255.255.
interface interface-list: Specifies a port list. With the interface-list argument, you can define one or more
individual ports (in the form of interface-type interface-number) and/or one or more port ranges (in the
form of interface-type interface-number1 to interface-type interface-number2, where interface-number2
must be greater than interface-number1). The total number of individual ports plus port ranges cannot
exceed 10. For port types and port numbers, refer to the parameter description in the “Port Basic
Configuration” part in this manual.
Description
Use the multicast static-group interface command to configure the specified port(s) under the current
VLAN interface as static member port(s) for the specified multicast group.
Use the undo multicast static-group interface command to remove the specified port(s) in the
current VLAN as static member port(s) for the specified multicast group.
By default, no port is configured as a static multicast group member port.
2-19
The ports configured with this command handle Layer 2 multicast traffic only, rather than Layer 3
multicast traffic.
Examples
# Configure ports Ethernet 1/0/1 to Ethernet 1/0/3 under VLAN-interface 1 as static members ports for
multicast group 225.0.0.1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Vlan-interface 1
[Sysname-Vlan-interface1] multicast static-group 225.0.0.1 interface Ethernet 1/0/1 to
Ethernet 1/0/3
multicast static-group vlan
Syntax
multicast static-group group-address vlan vlan-id
undo multicast static-group group-address vlan vlan-id
View
Ethernet port view
Parameters
group-address: IP address of the multicast group to join, in the range of 224.0.0.0 to 239.255.255.255.
vlan vlan-id: Specifies the VLAN the Ethernet port belongs to, where vlan-id ranges from 1 to 4094.
Description
Use the multicast static-group vlan command to configure the current port as a static member port for
the specified multicast group and specify the VLAN the port belongs to.
Use the undo multicast static-group vlan command to remove the current port in the specified VLAN
as a static member port for the specified multicast group.
By default, no port is configured as a static multicast group member port.
Note that:
The impact of the configuration depends on whether the current port belongs to a multicast VLAN and
whether the port belongs to the specified VLAN.
z
If the current port belongs to neither a multicast VLAN nor the specified VLAN, the configuration
does not take effect.
z
If the current port does not belong to any multicast VLAN but it belongs to the specified VLAN, the
configuration takes effect in the specified VLAN.
z
If the current port belongs to a multicast VLAN, the configuration takes effect only in the multicast
VLAN no matter the port belongs to the specified VLAN or not.
2-20
The port configured with this command handles Layer 2 multicast traffic only, rather than Layer 3
multicast traffic.
Examples
# Configure port Ethernet1/0/1 in VLAN 2 as a static member port for multicast group 225.0.0.1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname]interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] multicast static-group 225.0.0.1 vlan 2
multicast static-router-port
Syntax
multicast static-router-port interface-type interface-number
undo multicast static-router-port interface-type interface-number
View
VLAN view
Parameters
interface-type interface-number: Specifies a port by its type and number.
Description
Use the multicast static-router-port command to configure the specified port in the current VLAN as a
static router port.
Use the undo multicast static-router-port command to remove the specified port in the current VLAN
as a static router port.
By default, a port is not a static router port.
Examples
# Configure Ethernet 1/0/1 in VLAN 10 as a static router port.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] vlan 10
[Sysname-vlan10] multicast static-router-port Ethernet1/0/1
multicast static-router-port vlan
Syntax
multicast static-router-port vlan vlan-id
2-21
undo multicast static-router-port vlan vlan-id
View
Ethernet port view
Parameters
vlan-id: VLAN ID the port belongs to, in the range of 1 to 4094.
Description
Use the multicast static-router-port vlan command to configure the current port in the specified VLAN
as a static router port and specify the VLAN the port belongs to.
Use the undo multicast static-router-port vlan command to restore the default.
By default, no port is configured as a static router port.
Note that:
The impact of the configuration depends on whether the current port belongs to a multicast VLAN and
whether the port belongs to the specified VLAN.
z
If the current port belongs to neither a multicast VLAN nor the specified VLAN, the configuration
does not take effect.
z
If the current port does not belong to any multicast VLAN but it belongs to the specified VLAN, the
configuration takes effect in the specified VLAN.
z
If the current port belongs to a multicast VLAN, the configuration takes effect only in the multicast
VLAN no matter the port belongs to the specified VLAN or not.
Examples
# Configure Ethernet 1/0/1 in VLAN 10 as a static router port.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] multicast static-router-port vlan 10
reset igmp-snooping statistics
Syntax
reset igmp-snooping statistics
View
User view
Parameters
None
Description
Use the reset igmp-snooping statistics command to clear IGMP Snooping statistics.
Related commands: display igmp-snooping statistics.
2-22
Examples
# Clear IGMP Snooping statistics.
<Sysname> reset igmp-snooping statistics
service-type multicast
Syntax
service-type multicast
undo service-type multicast
View
VLAN view
Parameters
None
Description
Use the service-type multicast command to configure the current VLAN as a multicast VLAN.
Use the undo service-type multicast command to remove the current VLAN as a multicast VLAN.
By default, no VLAN is a multicast VLAN.
In an IGMP Snooping environment, by configuring a multicast VLAN and adding ports to the multicast
VLAN, you can allow users in different VLANs to share the same multicast VLAN. This saves bandwidth
because multicast streams are transmitted only within the multicast VLAN. In addition, because the
multicast VLAN is isolated from user VLANs, this method also enhances the information security.
z
One port belongs to only one multicast VLAN.
z
The port connected to a user terminal must be a hybrid port.
z
The multicast member port must be in the same multicast VLAN with the router port. Otherwise, the
port cannot receive multicast packets.
z
If a router port is in a multicast VLAN, the router port must be configured as a trunk port or a hybrid
port that allows tagged packets to pass for the multicast VLAN. Otherwise, all the multicast
member ports in this multicast VLAN cannot receive multicast packets.
z
If a multicast member port needs to receive multicast packets forwarded by a router port that does
not belong to any multicast VLAN, the multicast member port must be removed from the multicast
VLAN. Otherwise, the port cannot receive multicast packets.
Examples
# Configure VLAN 2 as a multicast VLAN.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
2-23
[Sysname] vlan 2
[Sysname-vlan2] service-type multicast
2-24
Table of Contents
1 802.1x Configuration Commands ············································································································1-1
802.1x Configuration Commands ···········································································································1-1
display dot1x····································································································································1-1
dot1x ················································································································································1-4
dot1x authentication-method ···········································································································1-5
dot1x dhcp-launch ···························································································································1-6
dot1x guest-vlan ······························································································································1-7
dot1x handshake ·····························································································································1-8
dot1x handshake secure ·················································································································1-9
dot1x max-user······························································································································1-10
dot1x port-control···························································································································1-11
dot1x port-method ·························································································································1-12
dot1x quiet-period··························································································································1-13
dot1x retry······································································································································1-13
dot1x retry-version-max·················································································································1-14
dot1x re-authenticate·····················································································································1-15
dot1x supp-proxy-check ················································································································1-16
dot1x timer·····································································································································1-17
dot1x timer reauth-period ··············································································································1-19
dot1x version-check·······················································································································1-20
reset dot1x statistics ······················································································································1-21
2 Quick EAD Deployment Configuration Commands ···············································································2-1
Quick EAD Deployment Configuration Commands ················································································2-1
dot1x free-ip·····································································································································2-1
dot1x timer acl-timeout ····················································································································2-2
dot1x url···········································································································································2-2
3 HABP Configuration Commands ·············································································································3-1
HABP Configuration Commands ············································································································3-1
display habp ····································································································································3-1
display habp table····························································································································3-2
display habp traffic···························································································································3-2
habp enable·····································································································································3-3
habp server vlan ······························································································································3-4
habp timer········································································································································3-4
4 System Guard Configuration Commands·······························································································4-1
System Guard Configuration Commands ·······························································································4-1
display system-guard ip state··········································································································4-1
display system-guard ip-record ·······································································································4-2
display system-guard l3err state ·····································································································4-2
display system-guard tcn state········································································································4-3
system-guard ip detect-maxnum ·····································································································4-3
system-guard ip detect-threshold ····································································································4-4
i
system-guard ip enable ···················································································································4-5
system-guard l3err enable···············································································································4-6
system-guard tcn enable ·················································································································4-7
system-guard tcn rate-threshold······································································································4-7
ii
1
802.1x Configuration Commands
802.1x Configuration Commands
display dot1x
Syntax
display dot1x [ sessions | statistics ] [ interface interface-list ]
View
Any view
Parameters
sessions: Displays the information about 802.1x sessions.
statistics: Displays the statistics on 802.1x.
interface: Display the 802.1x-related information about a specified port.
interface-list: Ethernet port list, in the form of interface-list= { interface-type interface-number [ to
interface-type interface-number ] } &<1-10>, in which interface-type specifies the type of an Ethernet
port and interface-number is the number of the port. The string “&<1-10>” means that up to 10 port lists
can be provided.
Description
Use the display dot1x command to display 802.1x-related information, such as configuration
information, operation information (session information), and statistics.
When the interface-list argument is not provided, this command displays 802.1x-related information
about all the ports.
The output information can be used to verify 802.1 x-related configurations and to troubleshoot.
Related commands: reset dot1x statistics, dot1x, dot1x retry, dot1x max-user, dot1x port-control,
dot1x port-method, dot1x timer.
Examples
# Display 802.1x-related information.
<Sysname> display dot1x
Global 802.1X protocol is enabled
CHAP authentication is enabled
DHCP-launch is disabled
Handshake is enabled
Proxy trap checker is disabled
Proxy logoff checker is disabled
EAD Quick Deploy is enabled
1-1
Configuration: Transmit Period
ReAuth Period
30 s,
3600 s,
Handshake Period
15 s
ReAuth MaxTimes
2
Quiet Period
60 s,
Quiet Period Timer is disabled
Supp Timeout
30 s,
Server Timeout
100 s
Interval between version requests is 30s
Maximal request times for version information is 3
The maximal retransmitting times
2
EAD Quick Deploy configuration:
Url: http: //192.168.19.23
Free-ip: 192.168.19.0 255.255.255.0
Acl-timeout:
30 m
Total maximum 802.1x user resource number is 1024
Total current used 802.1x resource number is 1
Ethernet1/0/1
is link-up
802.1X protocol is enabled
Proxy trap checker is disabled
Proxy logoff checker is disabled
Version-Check is disabled
The port is an authenticator
Authentication Mode is Auto
Port Control Type is Port-based
ReAuthenticate is disabled
Max number of on-line users is 256
Authentication Success: 4, Failed: 2
EAPOL Packets: Tx 7991, Rx 14
Sent EAP Request/Identity Packets : 7981
EAP Request/Challenge Packets: 0
Received EAPOL Start Packets : 5
EAPOL LogOff Packets: 1
EAP Response/Identity Packets : 4
EAP Response/Challenge Packets: 4
Error Packets: 0
1. Authenticated user : MAC address: 000d-88f6-44c1
Controlled User(s) amount to 1
Ethernet1/0/2
……
Table 1-1 Description on the fields of the display dot1x command
Field
Description
Equipment 802.1X protocol is enabled
802.1x protocol (802.1x for short) is enabled on
the switch.
CHAP authentication is enabled
CHAP authentication is enabled.
1-2
DHCP-launch is disabled
DHCP-triggered. 802.1x authentication is
disabled.
Handshake is enabled
The online user handshaking function is
enabled.
Whether or not to send Trap packets when
detecting a supplicant system logs in through a
proxy.
z
Proxy trap checker is disabled
z
Disable means the switch does not send Trap
packets when it detects that a supplicant
system logs in through a proxy.
Enable means the switch sends Trap packets
when it detects that a supplicant system logs
in through a proxy.
Whether or not to disconnect a supplicant
system when detecting it logs in through a proxy.
z
Proxy logoff checker is disabled
z
Disable means the switch does not
disconnect a supplicant system when it
detects that the latter logs in through a proxy.
Enable means the switch disconnects a
supplicant system when it detects that the
latter logs in through a proxy.
EAD Quick Deploy is enabled
Quick EAD deployment is enabled.
Transmit Period
Setting of the Transmission period timer (the
tx-period)
Handshake Period
Setting of the handshake period timer (the
handshake-period)
ReAuth Period
Re-authentication interval
ReAuth MaxTimes
Maximum times of re-authentications
Quiet Period
Setting of the quiet period timer (the
quiet-period)
Quiet Period Timer is disabled
The quiet period timer is disabled here. It can
also be configured as enabled when necessary.
Supp Timeout
Setting of the supplicant timeout timer
(supp-timeout)
Server Timeout
Setting of the server-timeout timer
(server-timeout)
The maximal retransmitting times
The maximum number of times that a switch can
send authentication request packets to a
supplicant system
Url
URL for HTTP redirection
Free-ip
Free IP range that users can access before
passing authentication
Acl-timeout
ACL timeout period
Total maximum 802.1x user resource number
The maximum number of 802.1x users that a
switch can accommodate
Total current used 802.1x resource number
The number of online supplicant systems
Ethernet1/0/1 is link-down
Ethernet 1/0/1 port is down.
802.1X protocol is disabled
802.1x is disabled on the port
1-3
Whether or not to send Trap packets when
detecting a supplicant system in logging in
through a proxy.
z
Proxy trap checker is disabled
z
Disable means the switch does not send Trap
packets when it detects that a supplicant
system logs in through a proxy.
Enable means the switch sends Trap packets
when it detects that a supplicant system logs
in through a proxy.
Whether or not to disconnect a supplicant
system when detecting it in logging in through a
proxy.
z
Proxy logoff checker is disabled
z
Disable means the switch does not
disconnect a supplicant system when it
detects that the latter logs in through a proxy.
Enable means the switch disconnects a
supplicant system when it detects that the
latter logs in through a proxy.
Whether or not the client version checking
function is enabled:
z
Version-Check is disabled
z
Disable means the switch does not checks
client version.
Enable means the switch checks client
version.
The port is an authenticator
The port acts as an authenticator system.
Authentication Mode is Auto
The port access control mode is Auto.
Port Control Type is Mac-based
The access control method of the port is
MAC-based. That is, supplicant systems are
authenticated based on their MAC addresses.
ReAuthenticate is disabled
802.1x re-authentication is disabled on the port.
Max number of on-line users
The maximum number of online users that the
port can accommodate
…
Information omitted here
dot1x
Syntax
dot1x [ interface interface-list ]
undo dot1x [ interface interface-list ]
View
System view, Ethernet port view
Parameters
interface-list: Ethernet port list, in the form of interface-list= { interface-type interface-number [ to
interface-type interface-number ] } &<1-10>, in which interface-type specifies the type of an Ethernet
port and interface-number is the number of the port. The string “&<1-10>” means that up to 10 port lists
can be provided.
1-4
Description
Use the dot1x command to enable 802.1x globally or for specified Ethernet ports.
Use the undo dot1x command to disable 802.1x globally or for specified Ethernet ports.
By default, 802.1x is disabled globally and also on all ports.
In system view:
z
If you do not provide the interface-list argument, the dot1x command enables 802.1x globally.
z
If you specify the interface-list argument, the dot1x command enables 802.1x for the specified
Ethernet ports.
In Ethernet port view, the interface-list argument is not available and the command enables 802.1x for
only the current Ethernet port.
802.1x-related configurations take effect on a port only after 802.1x is enabled both globally and on the
port.
z
The settings of 802.1x and MAC address learning limit are mutually exclusive. Enabling 802.1x on
a port will prevent you from setting the limit on MAC address learning on the port and vice versa.
z
The settings of 802.1x and aggregation group member are mutually exclusive. Enabling 802.1x on
a port will prevent you from adding the port to an aggregation group and vice versa.
Related commands: display dot1x.
Examples
# Enable 802.1x for Ethernet 1/0/1.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x interface Ethernet 1/0/1
# Enable 802.1x globally.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x
dot1x authentication-method
Syntax
dot1x authentication-method { chap | pap | eap }
undo dot1x authentication-method
View
System view
1-5
Parameters
chap: Authenticates using challenge handshake authentication protocol (CHAP).
pap: Authenticates using password authentication protocol (PAP).
eap: Authenticates using extensible authentication protocol (EAP).
Description
Use the dot1x authentication-method command to set the 802.1x authentication method.
Use the undo dot1x authentication-method command to revert to the default 802.1x authentication
method.
The default 802.1x authentication method is CHAP.
PAP applies a two-way handshaking procedure. In this method, passwords are transmitted in plain text.
CHAP applies a three-way handshaking procedure. In this method, user names are transmitted rather
than passwords. Therefore this method is safer.
In EAP authentication, a switch authenticates supplicant systems by encapsulating 802.1x
authentication information in EAP packets and sending the packets to the RADIUS server, instead of
converting the packets into RADIUS packets before forwarding to the RADIUS server. You can use EAP
authentication in one of the four sub-methods: PEAP, EAP-TLS, EAP-TTLS and EAP-MD5.
Related commands: display dot1x.
When the current device operates as the authentication server, EAP authentication is unavailable.
Examples
# Specify the authentication method to PAP.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x authentication-method pap
dot1x dhcp-launch
Syntax
dot1x dhcp-launch
undo dot1x dhcp-launch
View
System view
Parameters
None
1-6
Description
Use the dot1x dhcp-launch command to specify an 802.1x-enabled switch to launch the process to
authenticate a supplicant system when the supplicant system applies for a dynamic IP address through
DHCP.
Use the undo dot1x dhcp-launch command to disable an 802.1x-enabled switch from authenticating
a supplicant system when the supplicant system applies for a dynamic IP address through DHCP.
By default, an 802.1x-enabled switch does not authenticate a supplicant system when the latter applies
for a dynamic IP address through DHCP.
Related commands: display dot1x.
Examples
# Configure to authenticate a supplicant system when it applies for a dynamic IP address through
DHCP.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x dhcp-launch
dot1x guest-vlan
Syntax
dot1x guest-vlan vlan-id [ interface interface-list ]
undo dot1x guest-vlan [ interface interface-list ]
View
System view, Ethernet port view
Parameters
vlan-id: VLAN ID of a guest VLAN, in the range 1 to 4094.
interface-list: Ethernet port list, in the form of interface-list= { interface-type interface-number [ to
interface-type interface-number ] } &<1-10>, in which interface-type specifies the type of an Ethernet
port and interface-number is the number of the port. The string “&<1-10>” means that up to 10 port lists
can be provided.
Description
Use the dot1x guest-vlan command to enable the guest VLAN function for ports.
Use the undo dot1x guest-vlan command to disable the guest VLAN function for ports.
After 802.1x and guest VLAN are properly configured on a port:
z
If the switch receives no response from the port after sending EAP-Request/Identity packets to the
port for the maximum number of times, the switch will add the port to the guest VLAN.
z
Users in a guest VLAN can access the guest VLAN resources without 802.1x authentication.
However, they have to pass the 802.1x authentication to access the external resources.
In system view,
z
If you do not provide the interface-list argument, these two commands apply to all the ports of the
switch.
1-7
z
If you specify the interface-list argument, these two commands apply to the specified ports.
In Ethernet port view, the interface-list argument is not available and these two commands apply to only
the current Ethernet port.
z
The guest VLAN function is available only when the switch operates in the port-based
authentication mode.
z
Only one guest VLAN can be configured on a switch.
z
The guest VLAN function is unavailable when the dot1x dhcp-launch command is executed on
the switch, because the switch does not send authentication request packets in this case.
Examples
# Configure the switch to operate in the port-based authentication mode.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x port-method portbased
# Enable the guest VLAN function for all the ports.
[Sysname] dot1x guest-vlan 1
dot1x handshake
Syntax
dot1x handshake enable
undo dot1x handshake enable
View
System view
Parameters
None
Description
Use the dot1x handshake enable command to enable the online user handshaking function.
Use the undo dot1x handshake enable command to disable the online user handshaking function.
By default, the online user handshaking function is enabled.
1-8
z
To enable the proxy detecting function, you need to enable the online user handshaking function
first.
z
With the support of H3C proprietary clients, handshaking packets can be used to test whether or
not a user is online.
z
As clients that are not of H3C do not support the online user handshaking function, switches cannot
receive handshaking acknowledgement packets from them in handshaking periods. To prevent
users being falsely considered offline, you need to disable the online user handshaking function in
this case.
Examples
# Enable the online user handshaking function.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x handshake enable
dot1x handshake secure
Syntax
dot1x handshake secure
undo dot1x handshake secure
View
Ethernet port view
Parameters
None
Description
Use the dot1x handshake secure command to enable the handshaking packet protection function,
protecting the device against attacks from fake clients.
Use the undo dot1x handshake secure command to disable the handshaking packet protection
function.
By default, the handshaking packet protection function is disabled.
The handshaking packet protection function requires the cooperation of the client and the
authentication server. If either of the two ends does not support the function, you need to disable it on
the other one.
1-9
Examples
# Enable the handshaking packet protection function.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] dot1x handshake secure
dot1x max-user
Syntax
dot1x max-user user-number [ interface interface-list ]
undo dot1x max-user [ interface interface-list ]
View
System view, Ethernet port view
Parameters
user-number: Maximum number of users a port can accommodate, in the range 1 to 256.
interface-list: Ethernet port list, in the form of interface-list= { interface-type interface-number [ to
interface-type interface-number ] } &<1-10>, in which interface-type specifies the type of an Ethernet
port and interface-number is the number of the port. The string “&<1-10>” means that up to 10 port lists
can be provided.
Description
Use the dot1x max-user command to set the maximum number of users an Ethernet port can
accommodate.
Use the undo dot1x max-user command to revert to the default maximum user number.
By default, a port can accommodate up to 256 users.
In system view:
z
If you do not provide the interface-list argument, these two commands apply to all the ports of the
switch.
z
If you specify the interface-list argument, these two commands apply to the specified ports.
In Ethernet port view, the interface-list argument is not available and the commands apply to only the
current port.
Related commands: display dot1x.
Examples
# Configure the maximum number of users that Ethernet 1/01 port can accommodate to be 32.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x max-user 32 interface Ethernet 1/0/1
1-10
dot1x port-control
Syntax
dot1x port-control { auto | authorized-force | unauthorized-force } [ interface interface-list ]
undo dot1x port-control [ interface interface-list ]
View
System view, Ethernet port view
Parameters
auto: Specifies to operate in auto access control mode. When a port operates in this mode, all the
unauthenticated hosts connected to it are unauthorized. In this case, only EAPoL packets can be
exchanged between the switch and the hosts. And the hosts connected to the port are authorized to
access the network resources after the hosts pass the authentication. Normally, a port operates in this
mode.
authorized-force: Specifies to operate in authorized-force access control mode. When a port
operates in this mode, all the hosts connected to it can access the network resources without being
authenticated.
unauthorized-force: Specifies to operate in unauthorized-force access control mode. When a port
operates in this mode, the hosts connected to it cannot access the network resources.
interface-list: Ethernet port list, in the form of interface-list= { interface-type interface-number [ to
interface-type interface-number ] } &<1-10>, in which interface-type specifies the type of an Ethernet
port and interface-number is the number of the port. The string “&<1-10>” means that up to 10 port lists
can be provided.
Description
Use the dot1x port-control command to specify the access control mode for specified Ethernet ports.
Use the undo dot1x port-control command to revert to the default access control mode.
The default access control mode is auto.
Use the dot1x port-control command to configure the access control mode for specified
802.1x-enabled ports.
In system view:
z
If you do not provide the interface-list argument, these two commands apply to all the ports of the
switch.
z
If you specify the interface-list argument, these commands apply to the specified ports.
In Ethernet port view, the interface-list argument is not available and the commands apply to only the
current Ethernet port.
Related commands: display dot1x.
Examples
# Specify Ethernet 1/0/1 to operate in unauthorized-force access control mode.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x port-control unauthorized-force interface Ethernet 1/0/1
1-11
dot1x port-method
Syntax
dot1x port-method { macbased | portbased } [ interface interface-list ]
undo dot1x port-method [ interface interface-list ]
View
System view, Ethernet port view
Parameters
macbased: Performs MAC-based authentication.
portbased: Performs port-based authentication.
interface-list: Ethernet port list, in the form of interface-list= { interface-type interface-number [ to
interface-type interface-number ] } &<1-10>, in which interface-type specifies the type of an Ethernet
port and interface-number is the number of the port. The string “&<1-10>” means that up to 10 port lists
can be provided.
Description
Use the dot1x port-method command to specify the access control method for specified Ethernet
ports.
Use the undo dot1x port-method command to revert to the default access control method.
By default, the access control method is macbased.
This command specifies the way in which the users are authenticated.
z
In MAC-based authentication mode, the users connected to the port are authenticated separately.
Thus, log-off of a user will not affect other users.
z
In port-based authentication mode, all the users connected to the port can access the network
without being authenticated if a user among them passes the authentication. When the user logs
off, the network is inaccessible to all other supplicant systems too.
z
Changing the access control method on a port by the dot1x port-method command will forcibly log
out the online 802.1x users on the port.
In system view:
z
If you do not provide the interface-list argument, these two commands apply to all the ports of the
switch.
z
If you specify the interface-list argument, these commands apply to the specified ports.
In Ethernet port view, the interface-list argument is not available and the commands apply to only the
current Ethernet port.
Related commands: display dot1x.
Examples
# Specify to authenticate users connected to Ethernet 1/0/1 by port numbers.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x port-method portbased interface Ethernet 1/0/1
1-12
dot1x quiet-period
Syntax
dot1x quiet-period
undo dot1x quiet-period
View
System view
Parameters
None
Description
Use the dot1x quiet-period command to enable the quiet-period timer.
Use the undo dot1x quiet-period command to disable the quiet-period timer.
When a user fails to pass the authentication, the authenticator system (such as a 3Com switch) will stay
quiet for a period (determined by the quiet-period timer) before it performs another authentication.
During the quiet period, the authenticator system performs no 802.1x authentication of the user.
By default, the quiet-period timer is disabled.
Related commands: display dot1x, dot1x timer.
Examples
# Enable the quiet-period timer.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x quiet-period
dot1x retry
Syntax
dot1x retry max-retry-value
undo dot1x retry
View
System view
Parameters
max-retry-value: Maximum number of times that a switch sends authentication request packets to a
user. This argument ranges from 1 to 10.
Description
Use the dot1x retry command to specify the maximum number of times that a switch sends
authentication request packets to a user.
Use the undo dot1x retry command to revert to the default value.
By default, a switch sends authentication request packets to a user for up to 2 times.
1-13
After a switch sends an authentication request packet to a user, it sends another authentication request
packet if it does not receive response from the user after a specific period of time. If the switch still
receives no response when the configured maximum number of authentication request transmission
attempts is reached, it stops sending requests to the user. This command applies to all ports.
Related commands: display dot1x.
Examples
# Specify the maximum number of times that the switch sends authentication request packets to be 9.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x retry 9
dot1x retry-version-max
Syntax
dot1x retry-version-max max-retry-version-value
undo dot1x retry-version-max
View
System view
Parameters
max-retry-version-value: Maximum number of times that a switch sends version request packets to a
user. This argument ranges from 1 to 10.
Description
Use the dot1x retry-version-max command to set the maximum number of times that a switch sends
version request packets to a user.
Use the undo dot1x retry-version-max command to revert to the default value.
By default, a switch sends version request packets to a user for up to 3 times.
After a switch sends a version request packet to a user, it sends another version request packet if it
does receive response from the user after a specific period of time (as determined by the client version
request timer). When the number set by this command has reached and there is still no response from
the user, the switch continues the following authentication procedures without sending version requests.
This command applies to all the ports with the version checking function enabled.
Related commands: display dot1x, dot1x timer.
1-14
Examples
# Configure the maximum number of times that the switch sends version request packets to 6.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x retry-version-max 6
dot1x re-authenticate
Syntax
dot1x re-authenticate [ interface interface-list ]
undo dot1x re-authenticate [ interface interface-list ]
View
System view, Ethernet port view
Parameters
interface-list: Ethernet port list, in the form of interface-list= { interface-type interface-number [ to
interface-type interface-number ] } &<1-10>, in which interface-type specifies the type of an Ethernet
port and interface-number is the number of the port. The string “&<1-10>” means that up to 10 port lists
can be provided.
Description
Use the dot1x re-authenticate command to enable 802.1x re-authentication on specific ports or on all
ports of the switch.
Use the undo dot1x re-authenticate command to disable 802.1x re-authentication on specific ports or
on all ports of the switch.
By default, 802.1x re-authentication is disabled on all ports.
In system view:
z
If you do not specify the interface-list argument, this command will enable 802.1x re-authentication
on all ports.
z
If you specify the interface-list argument, the command will enable 802.1x on the specified ports.
In Ethernet port view, the interface-list argument is not available and 8021.x re-authentication is
enabled on the current port only.
802.1x must be enabled globally and on the current port before 802.1x re-authentication can be
configured on a port.
Examples
# Enable 802.1x re-authentication on port Ethernet 1/0/1.
<Sysname> system-view
1-15
System View: return to User View with Ctrl+Z.
[Sysname] dot1x
802.1X is enabled globally.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] dot1x
802.1X is enabled on port Ethernet1/0/1 already.
[Sysname-Ethernet1/0/1] dot1x re-authenticate
Re-authentication is enabled on port Ethernet1/0/1
dot1x supp-proxy-check
Syntax
dot1x supp-proxy-check { logoff | trap } [ interface interface-list ]
undo dot1x supp-proxy-check { logoff | trap } [ interface interface-list ]
View
System view, Ethernet port view
Parameters
logoff: Disconnects a user upon detecting it logging in through a proxy or through multiple network
adapters.
trap: Sends Trap packets upon detecting a user logging in through a proxy or through multiple network
adapters.
interface-list: Ethernet port list, in the form of interface-list= { interface-type interface-number [ to
interface-type interface-number ] } &<1-10>, in which interface-type specifies the type of an Ethernet
port and interface-number is the number of the port. The string “&<1-10>” means that up to 10 port lists
can be provided.
Description
Use the dot1x supp-proxy-check command to enable 802.1x proxy checking for specified ports.
Use the undo dot1x supp-proxy-check command to disable 802.1x proxy checking for specified
ports.
By default, 802.1x proxy checking is disabled on all Ethernet ports.
In system view:
z
If you do not specify the interface-list argument, the configurations performed by these two
commands are global.
z
If you specify the interface-list argument, these two commands apply to the specified Ethernet
ports.
In Ethernet port view, the interface-list argument is not available and the commands apply to only the
current Ethernet port.
The proxy checking function takes effect on a port only when the function is enabled both globally and
on the port.
802.1x proxy checking checks for:
z
Users logging in through proxies
z
Users logging in through IE proxies
1-16
z
Whether or not a user logs in through multiple network adapters (that is, when the user attempts to
log in, it contains more than one active network adapters.)
A switch can optionally take the following actions in response to any of the above three cases:
z
Only disconnects the user but sends no Trap packets, which can be achieved by using the dot1x
supp-proxy-check logoff command.
z
Sends Trap packets without disconnecting the user, which can be achieved by using the dot1x
supp-proxy-check trap command.
This function needs the cooperation of 802.1x clients and the CAMS server:
z
Multiple network adapter checking, proxy checking, and IE proxy checking are enabled on the
802.1x client.
z
The CAMS server is configured to disable the use of multiple network adapters, proxies, and IE
proxy.
By default, proxy checking is disabled on 802.1x client. In this case, if you configure the CAMS server to
disable the use of multiple network adapters, proxies, and IE proxy, it sends messages to the 802.1x
client to ask the latter to disable the use of multiple network adapters, proxies, and IE proxy after the
user passes the authentication.
z
The 802.1x proxy checking function needs the cooperation of H3C's 802.1x client program.
z
The proxy checking function takes effect only after the client version checking function is enabled
on the switch (using the dot1x version-check command).
Related commands: display dot1x.
Examples
# Configure to disconnect the users connected to Ethernet 1/0/1 through Ethernet 1/0/8 ports if they are
detected logging in through proxies.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x supp-proxy-check logoff
[Sysname] dot1x supp-proxy-check logoff interface Ethernet 1/0/1 to Ethernet 1/0/8
# Configure the switch to send Trap packets if the users connected to Ethernet 1/0/9 port is detected
logging in through proxies.
[Sysname] dot1x supp-proxy-check trap
[Sysname] dot1x supp-proxy-check trap interface Ethernet 1/0/9
dot1x timer
Syntax
dot1x timer { handshake-period handshake-period-value | quiet-period quiet-period-value |
server-timeout server-timeout-value | supp-timeout supp-timeout-value | tx-period tx-period-value |
ver-period ver-period-value }
1-17
undo dot1x timer { handshake-period | quiet-period | server-timeout | supp-timeout | tx-period |
ver-period }
View
System view
Parameters
handshake-period handshake-period-value: Sets the handshake timer. This timer sets the
handshake-period and is triggered after a supplicant system passes the authentication. It sets the
interval for a switch to send handshake request packets to online users. If you set the number of retries
to N by using the dot1x retry command, an online user is considered offline when the switch does not
receive response packets from it in a period N times of the handshake-period.
The handshake-period-value argument ranges from 5 to 1,024 (in seconds). By default, the handshake
timer is set to 15 seconds.
quiet-period quiet-period-value: Sets the quiet-period timer. This timer sets the quiet-period. When a
supplicant system fails to pass the authentication, the switch quiets for the set period (set by the
quiet-period timer) before it processes another authentication request re-initiated by the supplicant
system. During this quiet period, the switch does not perform any 802.1x authentication-related actions
for the supplicant system.
The quiet-period-value argument ranges from 10 to 120 (in seconds). By default, the quiet-period timer
is set to 60 seconds.
server-timeout server-timeout-value: Sets the RADIUS server timer. This timer sets the server-timeout
period. After sending an authentication request packet to the RADIUS server, a switch sends another
authentication request packet if it does not receive the response from the RADIUS server when this
timer times out.
The server-timeout-value argument ranges from 100 to 300 (in seconds). By default, the RADIUS
server timer is set to 100 seconds.
supp-timeout supp-timeout-value: Sets the supplicant system timer. This timer sets the supp-timeout
period and is triggered by the switch after the switch sends a request/challenge packet to a supplicant
system (The packet is used to request the supplicant system for the MD5 encrypted string.) The switch
sends another request/challenge packet to the supplicant system if the switch does not receive the
response from the supplicant system when this timer times out..
The supp-timeout-value argument ranges from 10 to 120 (in seconds). By default, the supplicant
system timer is set to 30 seconds.
tx-period tx-period-value: Sets the transmission timer. This timer sets the tx-period and is triggered in
two cases. The first case is when the client requests for authentication. The switch sends a unicast
request/identity packet to a supplicant system and then triggers the transmission timer. The switch
sends another request/identity packet to the supplicant system if it does not receive the reply packet
from the supplicant system when this timer times out. The second case is when the switch
authenticates the 802.1x client who cannot request for authentication actively. The switch sends
multicast request/identity packets periodically through the port enabled with 802.1x function. In this
case, this timer sets the interval to send the multicast request/identity packets.
The tx-period-value argument ranges from 1 to 120 (in seconds). By default, the transmission timer is
set to 30 seconds.
1-18
ver-period ver-period-value: Sets the client version request timer. This timer sets the version period
and is triggered after a switch sends a version request packet. The switch sends another version
request packet if it does receive version response packets from the supplicant system when the timer
expires.
The ver-period-value argument ranges from 1 to 30 (in seconds). By default, the client version request
timer is set to 30 seconds.
Description
Use the dot1x timer command to set a specified 802.1x timer.
Use the undo dot1x timer command to restore a specified 802.1x timer to the default setting.
During an 802.1x authentication process, multiple timers are triggered to ensure that the supplicant
systems, the authenticator systems, and the Authentication servers interact with each other in an
orderly way. To make authentications being processed in the desired way, you can use the dot1x timer
command to set the timers as needed. This may be necessary in some special situations or in tough
network environments. Normally, the defaults are recommended. (Note that some timers cannot be
adjusted.)
Related commands: display dot1x.
Examples
# Set the RADIUS server timer to 150 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x timer server-timeout 150
dot1x timer reauth-period
Syntax
dot1x timer reauth-period reauth-period-value
undo dot1x timer reauth-period
View
System view
Parameters
reauth-period reauth-period-value: Specifies re-authentication interval, in seconds. After this timer
expires, the switch initiates 802.1x re-authentication. The value of the reauth-period-value argument
ranges from 60 to 7,200.
Description
Use the dot1x timer reauth-period command to configure the interval for 802.1x re-authentication.
Use the undo dot1x timer reauth-period command to restore the default 802.1x re-authentication
interval.
By default, the 802.1x re-authentication interval is 3,600 seconds.
1-19
Examples
# Set the 802.1x re-authentication interval to 150 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x timer reauth-period 150
dot1x version-check
Syntax
dot1x version-check [ interface interface-list ]
undo dot1x version-check [ interface interface-list ]
View
System view, Ethernet port view
Parameters
interface-list: Ethernet port list, in the form of interface-list= { interface-type interface-number [ to
interface-type interface-number ] } &<1-10>, in which interface-type specifies the type of an Ethernet
port and interface-number is the number of the port. The string “&<1-10>” means that up to 10 port lists
can be provided.
Description
Use the dot1x version-check command to enable 802.1x client version checking for specified Ethernet
ports.
Use the undo dot1x version-check command to disable 802.1x client version checking for specified
Ethernet ports.
By default, 802.1x client version checking is disabled on all the Ethernet ports.
In system view:
z
If you do not provide the interface-list argument, these two commands apply to all the ports of the
switch.
z
If you specify the interface-list argument, these commands apply to the specified ports.
In Ethernet port view, the interface-list argument is not available and the commands apply to only the
current Ethernet port.
Examples
# Configure Ethernet 1/0/1 to check the version of the 802.1x client upon receiving authentication
packets.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] interface Ethernet 1/0/1
[Sysname-Ethernet1/0/1] dot1x version-check
1-20
reset dot1x statistics
Syntax
reset dot1x statistics [ interface interface-list ]
View
User view
Parameters
interface-list: Ethernet port list, in the form of interface-list= { interface-type interface-number [ to
interface-type interface-number ] } &<1-10>, in which interface-type specifies the type of an Ethernet
port and interface-number is the number of the port. The string “&<1-10>” means that up to 10 port lists
can be provided.
Description
Use the reset dot1x statistics command to clear 802.1x-related statistics.
To retrieve the latest 802.1x-related statistics, you can use this command to clear the existing
802.1x-related statistics first.
When you execute this command,
If the interface-list argument is not specified, this command clears the global 802.1x statistics and the
802.1x statistics on all the ports.
If the interface-list argument is specified, this command clears the 802.1x statistics on the specified
ports.
Related commands: display dot1x.
Examples
# Clear 802.1x statistics on Ethernet 1/0/1.
<Sysname> reset dot1x statistics interface Ethernet 1/0/1
1-21
2
Quick EAD Deployment Configuration Commands
Quick EAD Deployment Configuration Commands
dot1x free-ip
Syntax
dot1x free-ip ip-address { mask-address | mask-length }
undo dot1x free-ip [ ip-address { mask-address | mask-length } ]
View
System view
Parameters
ip-address: Free IP address, in dotted decimal notation.
mask-address: Subnet mask of the free IP address, in dotted decimal notation.
mask-length: Length of the subnet mask of the free IP address, in the range 0 to 32.
Description
Use the dot1x free-ip command to configure a free IP range. A free IP range is an IP range that users
can access before passing 802.1x authentication.
Use the undo dot1x free-ip command to remove a specified free IP range or all free IP ranges.
By default, no free IP range is configured.
z
You must configure the URL for HTTP redirection before configuring a free IP range.
z
The device supports up to two free IP ranges.
Examples
# Configure a free IP range for users to access before passing authentication.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x free-ip 192.168.19.23 24
2-1
dot1x timer acl-timeout
Syntax
dot1x timer acl-timeout acl-timeout-value
undo dot1x timer acl-timeout
View
System view
Parameters
acl-timeout-value: ACL timeout period (in minutes), in the range of 1 to 1440.
Description
Use the dot1x timer acl-timeout command to configure the ACL timeout period.
Use the undo dot1x timer acl-timeout command to restore the default.
By default, the ACL timeout period is 30 minutes.
Related commands: dot1x configuration commands.
Examples
# Set the ACL timeout period to 40 minutes.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] dot1x timer acl-timeout 40
dot1x url
Syntax
dot1x url url-string
undo dot1x url
View
System view
Parameters
url-string: URL for HTTP redirection, in the format of http://x.x.x.x.
Description
Use the dot1x url command to configure the URL for HTTP redirection.
Use the undo dot1x url command to remove the configuration.
By default, no URL is configured for HTTP redirection.
Related commands: dot1x configuration commands.
Examples
# Configure the URL for HTTP redirection.
<Sysname> system-view
2-2
System View: return to User View with Ctrl+Z.
[Sysname] dot1x url http://192.168.19.23
2-3
3
HABP Configuration Commands
HABP Configuration Commands
display habp
Syntax
display habp
View
Any view
Parameters
None
Description
Use the display habp command to display HABP configuration and status.
Examples
# Display HABP configuration and status.
<Sysname> display habp
Global HABP information:
HABP Mode: Server
Sending HABP request packets every 20 seconds
Bypass VLAN: 2
Table 3-1 Description on the fields of the display habp command
Field
Description
HABP Mode
Indicates the HABP mode of the switch. A switch
can operate as an HABP server (displayed as
Server) or an HABP client (displayed as Client).
Sending HABP request packets every 20
seconds
The HABP request packet transmission interval
is 20 seconds.
Bypass VLAN
Indicates the IDs of the VLANs to which HABP
request packets are sent.
3-1
display habp table
Syntax
display habp table
View
Any view
Parameters
None
Description
Use the display habp table command to display the MAC address table maintained by HABP.
Examples
# Display the MAC address table maintained by HABP.
<Sysname> display habp table
MAC
Holdtime
Receive Port
001f-3c00-0030
53
Ethernet1/0/1
Table 3-2 Description on the fields of the display habp table command
Field
Description
MAC
MAC addresses contained in the HABP MAC address table.
Holdtime
Hold time of the entries in the HABP MAC address table. An entry
is removed from the table if it is not updated in a period determined
by the hold time.
Receive Port
The port from which a MAC address is learned
display habp traffic
Syntax
display habp traffic
View
Any view
Parameters
None
Description
Use the display habp traffic command to display the statistics on HABP packets.
Examples
# Display the statistics on HABP packets.
<Sysname> display habp traffic
3-2
HABP counters :
Packets output: 0, Input: 0
ID error: 0, Type error: 0, Version error: 0
Sent failed: 0
Table 3-3 Description on the fields of the display habp traffic command
Field
Description
Packets output
Number of the HABP packets sent
Input
Number of the HABP packets received
ID error
Number of the HABP packets with ID errors
Type error
Number of the HABP packets with type errors
Version error
Number of the HABP packets with version errors
Sent failed
Number of the HABP packets that failed to be
sent
habp enable
Syntax
habp enable
undo habp enable
View
System view
Parameters
None
Description
Use the habp enable command to enable HABP for a switch.
Use the undo habp enable command to disable HABP for a switch.
By default, HABP is enabled on a switch.
If an 802.1x-enabled switch does not have HABP enabled, it cannot manage the switches attached to it.
So, you need to enable HABP on specific switches in a network with 802.1x enabled.
Examples
# Enable HABP.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] habp enable
3-3
habp server vlan
Syntax
habp server vlan vlan-id
undo habp server
View
System view
Parameters
vlan-id: VLAN ID, ranging from 1 to 4094.
Description
Use the habp server vlan command to configure a switch to operate as an HABP server. This
command also specifies the VLAN where HABP packets are broadcast.
Use the undo habp server vlan command to revert to the default HABP mode.
By default, a switch operates as an HABP client.
To specify a switch to operate as an HABP server, you need to enable HABP (using the habp enable
command) for the switch first. When HABP is not enabled, the habp server vlan command cannot take
effect.
Examples
# Specify the switch to operate as an HABP server and the HABP packets to be broadcast in VLAN 2.
(Assume that HABP is enabled.)
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] habp server vlan 2
habp timer
Syntax
habp timer interval
undo habp timer
View
System view
Parameters
interval: Interval (in seconds) to send HABP request packets. This argument ranges from 5 to 600.
Description
Use the habp timer command to set the interval for a switch to send HABP request packets.
Use the undo habp timer command to revert to the default interval.
The default interval for a switch to send HABP request packets is 20 seconds.
Use these two commands on switches operating as HABP servers only.
3-4
Examples
# Configure the switch to send HABP request packets once in every 50 seconds <Sysname>
system-view
System View: return to User View with Ctrl+Z.
[Sysname] habp timer 50
3-5
4
System Guard Configuration Commands
System Guard Configuration Commands
display system-guard ip state
Syntax
display system-guard ip state
View
Any view
Parameters
None
Description
Use the display system-guard ip state command to view the monitoring result and parameter settings
of System Guard against IP attacks.
Examples
# View the monitoring result and parameter settings of System Guard against IP attacks.
<Sysname> display system-guard ip state
System-guard IP is running!
IP-record threshold: 30
Deny threshold: 1
Isolated times of aging time: 3
Number of suspicious hosts that can be detected: 30
Number of suspicious hosts detected: 0
Table 4-1 Description on the fields of the display system-guard ip state command
Field
Description
System-guard IP is running
System Guard against IP attacks is running
IP-record threshold
Threshold of the number of IP addresses that
can be learnt within 10 seconds
Deny threshold
The maximum number of times an address can
be learnt for it to be blocked
Isolated times of aging time
Isolation time (the number of multiples of MAC
address aging time)
Number of suspicious hosts that can be detected
The maximum number of hosts to be monitored
Number of suspicious hosts detected
The number of infected hosts detected
4-1
display system-guard ip-record
Syntax
display system-guard ip-record
View
Any view
Parameters
None
Description
Use the display system-guard ip-record command to view the information about IP packets received
by the CPU in the current monitoring cycle.
Examples
# View the information about IP packets received by the CPU in the current monitoring cycle.
<Sysname> display system-guard ip-record
'M':
Master port of link aggregation
Index
Source IP
Destination IP
Port
-------------------------------------------------1
000.000.000.000
000.000.000.000
0/0/0
2
000.000.000.000
000.000.000.000
0/0/0
3
000.000.000.000
000.000.000.000
0/0/0
4
000.000.000.000
000.000.000.000
0/0/0
5
000.000.000.000
000.000.000.000
0/0/0
……
Table 4-2 Description on the fields of the display system-guard ip-record command
Field
Description
Index
Index
Source IP
Source IP address
Destination IP
Destination IP address
Port
Incoming port
display system-guard l3err state
Syntax
display system-guard l3err state
View
Any view
4-2
Parameters
None
Description
Use the display system-guard l3err state command to view the status of Layer 3 error control.
Examples
# View the status of Layer 3 error control.
<Sysname> display system-guard l3err state
System-guard l3err status:
enabled
display system-guard tcn state
Syntax
display system-guard tcn state
View
Any view
Parameters
None
Description
Use the display system-guard tcn state command to view the status of TCN.
Examples
# View the status of TCN System Guard.
<Sysname> display system-guard tcn state
System-guard TCN state:
enabled
system-guard ip detect-maxnum
Syntax
system-guard ip detect-maxnum number
undo system-guard ip detect-maxnum
View
System view
Parameters
number: Maximum number of hosts that can be monitored, in the range of 1 to 100.
Description
Use the system-guard ip detect-maxnum command to set the maximum number of infected hosts
that can be monitored currently.
4-3
Use the undo system-guard ip detect-maxnum command to restore the maximum number of
infected hosts that can be monitored to the default setting.
By default, System Guard can monitor a maximum of 30 infected hosts.
Examples
# Set the maximum number of infected hosts that can be concurrently monitored to 50.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] system-guard ip detect-maxnum 50
system-guard ip detect-threshold
Syntax
system-guard ip detect-threshold ip-record-threshold record-times-threshold isolate-time
undo system-guard ip detect-threshold
View
System view
Parameters
ip-record-threshold: Maximum number of IP addresses that can be learnt within a 10-second cycle, in
the range of 1 to 100.
record-times-threshold: Maximum number of times an IP address must be hit before an action can be
taken, in the range of 1 to 10.
isolate-time: Isolation time, in the range of 3 to 100. After System Guard takes an action on an
suspected IP address, the system will wait isolate-time before it learns destination address(es) again for
that source IP address.
Description
Use the system-guard ip detect-threshold command to set the maximum number of addresses that
the system can learn, the maximum number of times an address can be hit and the address isolation
time.
Use the undo system-guard ip detect-threshold command to set the maximum number of addresses
that the system can learn, the maximum number of times an address can be hit and the address
isolation time to the default settings.
By default, ip-record-threshold, record-times-threshold and isolate-time are set to 30, 1 and 3
respectively.
4-4
The correlations among the arguments of the system-guard ip detect-threshold command can be
clearly described with this example: If you set ip-record-threshold, record-times-threshold and
isolate-time to 30, 1 and 3 respectively, when the system detects successively three times that over 50
IP packets (destined for an address other that an IP address of the switch) from a source IP address are
received within a period of 10 seconds, the system considers to be attacked — the system sorts out that
source IP address and waits a period of 5 times the MAC address aging time before learning the
destination IP address(es) of packets from that source IP address again.
Examples
# Set the maximum number of addresses that the system can learn to 50, set the maximum number of
times an address can be hit to 3, and set the address isolation time to 5 times the MAC address aging
time.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] system-guard ip detect-threshold 50 3 5
system-guard ip enable
Syntax
system-guard ip enable
undo system-guard ip enable
View
System view
Parameters
None
Description
Use the system-guard ip enable command to enable System Guard against IP attacks.
Use the undo system-guard ip enable command to disable System Guard against IP attacks.
By default, System Guard against IP attacks is disabled.
The System Guard feature monitors the IP packets delivered to the CPU within 10 seconds, finds out
the source IP addresses of the IP packets with attack characteristics within the 10 seconds and counts
these packets. Once the packets from such an IP address hit the predefined threshold, the switch with
System Guard enabled will take the following action: If the packets from the source IP address need to
be processed by the CPU, the switch decreases the precedence of delivering such packets to the CPU.
Examples
# Enable System Guard against IP attacks.
<Sysname> system-view
4-5
System View: return to User View with Ctrl+Z.
[Sysname] system-guard ip enable
system-guard l3err enable
Syntax
system-guard l3err enable
undo system-guard l3err enable
View
System view
Parameters
None
Description
Use the system-guard l3err enable command to enable Layer 3 error control.
Use the undo system-guard l3err enable command to disable Layer 3 error control.
By default, this feature is enabled.
The Layer 3 error control feature determines how the switch disposes of Layer packets which the switch
considers to be error packets:
With the Layer 3 error control feature disabled, the switch delivers all Layer 3 packets which the switch
considers to be error packets (including IP packets with the options field) to the CPU for further
processing;
With the Layer 3 error control feature enabled, the switch directly discards all Layer 3 packets which the
switch considers to be error packets without delivering them to the CPU.
In normal situations, we recommend that you enable this feature. Because the switch cannot forward
error packets and IP packets with the Options field set, delivering all these packets to the CPU will affect
the normal work of the CPU.
Examples
# Enable Layer 3 error control.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] system-guard l3err enable
4-6
system-guard tcn enable
Syntax
system-guard tcn enable
undo system-guard tcn enable
View
System view
Parameters
None
Description
Use the system-guard tcn enable command to enable System Guard against TCN attacks.
Use the undo system-guard tcn enable command to disable System Guard against TCN attacks.
With this feature enabled, System Guard monitors the TCN/TC packet receiving rate on the ports. If the
rate exceeds the preset threshold, the system will output trap and log information to notify the user and
starts to send only on TCN/TC packet to the CPU in a 10-second cycle. This can prevent MAC and ARP
entries from being frequently deleted by STP or RSTP; in addition, when the TCN/TC packet rate
exceeds the preset threshold, proper measures can be taken based on the output trap and log
information.
By default, this feature is disabled.
Examples
# Enable System Guard against TCN attacks.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] system-guard tcn enable
system-guard tcn rate-threshold
Syntax
system-guard tcn rate-threshold rate-threshold
undo system-guard tcn rate-threshold
View
System view
Parameters
rate-threshold: TCN/TC packet receiving rate in packets per second (pps), with an effective range of 1
to 20.
Description
Use the system-guard tcn rate-threshold command to set the threshold of TCN/TC packet receiving
rate, which will trigger the output of trap and log information.
4-7
Use the undo system-guard tcn rate-threshold command to restore the default threshold of TCN/TC
packet receiving rate.
By default, the default threshold of TCN/TC packet receiving rate is 1 pps.
As the system monitoring cycle is 10 seconds, the system sends trap or log information, by default, if
more than 10 TCN/TC packets are received within 10 seconds.
If the TCN/TC packet receiving rate is lower than the set threshold within a 10-second monitoring cycle,
the system will not send trap or log information in the next 10-second monitoring cycle.
Examples
# Sets the threshold of TCN/TC receiving rate to 20 pps.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] system-guard tcn rate-threshold 20
4-8
Table of Contents
1 AAA Configuration Commands················································································································1-1
AAA Configuration Commands ···············································································································1-1
access-limit······································································································································1-1
accounting ·······································································································································1-2
accounting optional··························································································································1-3
attribute············································································································································1-3
authentication ··································································································································1-5
authentication super ························································································································1-6
authorization ····································································································································1-7
authorization vlan ····························································································································1-8
cut connection ·································································································································1-9
display connection ·························································································································1-10
display domain·······························································································································1-11
display local-user···························································································································1-13
domain ···········································································································································1-14
domain delimiter ····························································································································1-15
idle-cut ···········································································································································1-16
level ···············································································································································1-17
local-user ·······································································································································1-18
local-user password-display-mode································································································1-19
messenger·····································································································································1-20
name··············································································································································1-20
password ·······································································································································1-21
radius-scheme ·······························································································································1-22
scheme ··········································································································································1-23
self-service-url ·······························································································································1-24
service-type ···································································································································1-25
state ···············································································································································1-26
vlan-assignment-mode ··················································································································1-27
RADIUS Configuration Commands·······································································································1-29
accounting optional························································································································1-29
accounting-on enable ····················································································································1-30
calling-station-id mode···················································································································1-31
data-flow-format·····························································································································1-32
display local-server statistics·········································································································1-33
display radius scheme ···················································································································1-33
display radius statistics··················································································································1-36
display stop-accounting-buffer ······································································································1-37
key ·················································································································································1-38
local-server ····································································································································1-39
local-server nas-ip ·························································································································1-40
i
nas-ip ·············································································································································1-41
primary accounting ························································································································1-42
primary authentication ···················································································································1-43
radius client ···································································································································1-44
radius nas-ip ··································································································································1-44
radius scheme ·······························································································································1-45
radius trap······································································································································1-46
reset radius statistics ·····················································································································1-47
reset stop-accounting-buffer··········································································································1-48
retry················································································································································1-48
retry realtime-accounting ···············································································································1-49
retry stop-accounting ·····················································································································1-51
secondary accounting····················································································································1-51
secondary authentication···············································································································1-52
server-type···························································&middo