- Table of Contents
-
- H3C S9500 Series Routing Switches Command Manual-(V1.01)
- 00-1Cover
- 01-Getting Started Command
- 02-Port Command
- 03-VLAN-QinQ Command
- 04-Network Protocol Command
- 05-Routing Protocol Command
- 06-Multicast Protocol Command
- 07-QACL Command
- 08-MPLS Command
- 09-STP Command
- 10-Security Command
- 11-Reliability Command
- 12-System Management Command
- 13-PoE Command
- 14-NAT-URPF-VPLS Command
- 15-Integrated Management Command
- 16-Appendix
- Related Documents
-
Title | Size | Download |
---|---|---|
15-Integrated Management Command | 200 KB |
Table of Contents
Chapter 1 HGMP V1 Configuration Commands
1.1 HGMP Server Common Command Set
1.2 Configuration Commands for S2403F Series Switches
1.3 Configuration Commands for S2008B/S2016B/S2026B/S3026 Series Switches
1.3.9 query active-configuration
1.3.18 query saved-configuration
1.3.32 set mirror monitor-port
Chapter 1 HGMP V1 Configuration Commands
1.1 HGMP Server Common Command Set
& Note:
Commands in the common command set are used to configure switches connected to the management device.
& Note:
To enable you to perform the same operation to multiple objects using one command and administrate Ethernet switches by their physical positions, two types of newly added arguments are available for HGMP configuration commands, as described as follows:
l List. An argument of this type (such as port-list, vlan-id-list and vlan-list) in a command identifies one or multiple objects. You can input a single number for the argument, which identifies one object. You can input a character string in such format as 3-7, which identifies objects 3 through 7. You can also use commas to connect single numbers and character strings. You can perform the same operation to all objects that are identifies by the list-type argument.
For example, with a value of “3,6,10-14”, the port-list parameter identifies ports numbered 3, 6, 10, 11, 12, 13 and 14.
As the size of a system packet is limited, a list-typed argument can identify no more than 40 objects.
l Ethernet switch position parameters. It is necessary to recognize the Ethernet switches connected to a management device. This is achieved by using arguments of the lanswitch-loc type. An argument of this type takes the form of slot/subslot/port-/p1/p2/, among which:
port is a port number, which identifies a port of the management device, through which an Ethernet switch operating as a HGMP Client is connected to the management device.
p1 is a port number, which identifies the port of the layer 1 Ethernet switch connecting to the Ethernet switch operating as the HGMP Client.
p2 is a port number, which identifies the port of the layer 2 Ethernet switch connecting to the Ethernet switch operating as the HGMP Client.
For example, lanswitch-loc of 3/1/3-/ identifies the layer 1 Ethernet switch connected directly to the port 3/1/3 of the management device.
Whereas 3/1/3-/2/ identifies a Layer 2 Ethernet switch connected to port 2 of layer 1 Ethernet switch. Its root node is the port 3/1/3.
A value of 3/1/3-/2/1/ identifies a layer 3 Ethernet switch connected to port 1 of a layer 2 Ethernet switch. Its root node is the port 3/1/3.
1.1.1 auto config
Syntax
auto config default port-start-vlanid
View
lanswitch view
Parameter
port-start-vlanid: Starting ID of the VLAN the port belongs to.
Note that as VLAN 2047 is reserved, it is automatically skipped if it is among those to be automatically configured.
Description
Use the auto config command to configure switches using the default configuration settings. You can use the set lswconfig command to specify the default configuration settings. If the default configuration settings do not exist, this command configures the connected switches using the factory settings.
Related command: query port, query vlan.
Example
# Configure the switches using the factory settings with VLAN2000 as the starting VLAN ID.
[H3C-lanswitch3/1/6-/] auto config default 2000
Auto config will clean previous configuration, are you sure? [n]y
Waiting......
Auto config LANSWITCH[3/1/6-/] successfully!
1.1.2 backup lswconfig
Syntax
backup lswconfig
View
HGMP view
Parameter
None
Description
Use the backup lswconfig command to save the configuration information retrieved by the save lswconfig command to the flash memory. As data saved in the flash memory does not get lost even if the management device reboots, you can restore the configuration of an Ethernet using the configuration information previously saved in the flash memory.
Related command: save lswconfig.
Example
# Save the configuration information retrieved by the save lswconfig command to the flash memory.
[H3C-hgmp] backup lswconfig
Write lanswitch configuration to flash......
1.1.3 close port
Syntax
close port port-list
undo close port port-list
View
lanswitch view
Parameter
port-list: List of ports to be set. Be sure to provide a valid port number if you want to specify a single port. You can input a single number for the argument, which identifies one object. You can input a character string in such format as 3-7, which identifies objects 3 through 7. You can also use commas to connect single numbers and character strings.
Description
Use the close port command to close the specified ports of the Ethernet switch.
Use the undo close port command to enable the specified ports of the Ethernet switch.
You can use the query port command to verify these two commands.
The close port command may cause the communication between Ethernet switches and the management device being terminated. To avoid this, the upstream ports are not allowed to be closed. By default, upstream ports are enabled.
Related command: query port.
Example
# Close port 1 and port 2 of the Ethernet switch.
[H3C-lanswitch3/1/6-/] close port 1,2
Waiting.....
Operating LANSWITCH[3/1/6-/]'s ports successfully!
1.1.4 display hgmpserver
Syntax
display hgmpserver
View
Any view
Parameter
None
Description
Use the display hgmpserver command to display configuration information about an HGMP server.
Example
# Display information about the HGMP server.
<H3C> display hgmpserver
===============================================================
Hgmp Server Cfg Info
===============================================================
Hgmp Server Global Enable
===============================================================
Hgmp Server Ports Enable Info
-------------------------------------------------------------
Port Hgmp status('X': Hgmp enable)
Port Hgmp status('-': Hgmp disable)
-------------------------------------------------------------
SlotNo: 0
SubSlotNo: 1
-------------------------------------------------------------
|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|1|1|2|
|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|
-------------------------------------------------------------
0 |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
20 |
--------------------------------------------------------------
SlotNo: 1
SubSlotNo: 1
-------------------------------------------------------------
|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|1|1|2|
|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|
-------------------------------------------------------------
0 |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
20 |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
40 |-|-|-|-|-|-|-|-|
--------------------------------------------------------------
SlotNo: 2
SubSlotNo: 1
-------------------------------------------------------------
|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|1|1|2|
|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|
-------------------------------------------------------------
0 |-|
--------------------------------------------------------------
SlotNo: 3
SlotNo: 4
SlotNo: 5
SlotNo: 6
SlotNo: 7
Table 1-1 Description on the fields of the display hgmpserver command
Field |
Description |
Hgmp Server Cfg Info |
Configuration information of Hgmp Server on the switch |
Hgmp Server Global Enable |
The HGMP Server is enabled globally |
Hgmp Server Ports Enable Info |
The list of ports on which HGMP Server is enabled |
l Port Hgmp status ('X': Hgmp enable) |
The state of Hgmp on the port of the switch ('X': Hgmp enabled) |
l Port Hgmp status ('-': Hgmp disable) |
The state of Hgmp on the port of the switch ('-': Hgmp disabled) |
SlotNo: 1 SubSlotNo: 0 |
Slot and subslot numbers of the port |
|0|0|0|0….|1|1|1|1|1|1|1|2| |1|2|3|4….|3|4|5|6|7|8|9|0| |
Port numbers presented in columns. Numbers of the same column form a port number, reading in a top-down order. For example, the combinations 01 and 12 stand for port 1 and port 12 respectively. |
1.1.5 display lanswitch
Syntax
display lanswitch { all | port slot subslot port | position lanswitch-loc } [ error ] [ inactive ]
View
Any view
Parameter
all: Specifies to display all registered Ethernet switches.
port slot subslot port: Specifies an Ethernet port of the management device to display the Ethernet switches registering with the management device through the Ethernet port. Argument of slot, subslot, and port are slot number, subslot number and port number respectively.
position lanswitch-loc: Specifies to display the Ethernet switch at a specified position. The lanswitch-loc argument is the position parameter for the Ethernet switch.
error: Displays the Ethernet switches that operate improperly after registering.
inactive: Specifies to display Ethernet switches that are inactive after registering.
Description
Use the display lanswitch command to display the information about specified registered Ethernet switches. The information includes those about the Ethernet switches connected to the port. If the Ethernet switches are connected to the port and registered successfully, information about the management MAC address, device ID, state and so on is displayed.
Example
# Display the information about all registered Ethernet switches.
<H3C> display lanswitch all
Lanswitch list.........
------------------
No. 1
------------------
Position : LANSWITCH[3/1/6-/]
PortMode : TREE-MODE
Lanswitch Name :
Model : H3C S2403F
Device ID : V43.f.2
MacAddr : 00-e0-fc-01-01-01
Status : NORMAL
Table 1-2 Description on the fields of the display lanswitch command
Field |
Description |
Position |
The position of the switch connected to management device |
PortMode |
The mode of the ports the switch connected to |
Lanswitch Name |
The name of the switch |
Model |
The model of the switch |
Device ID |
The device ID of the switch |
MacAddr |
The MAC address of the switch |
Status |
The state of the switch |
1.1.6 hgmpport
Syntax
hgmpport { enable | disable }
View
Ethernet port view
Parameter
enable: Specifies to enable HGMP on the Ethernet switch port.
disable: Specifies to disable HGMP on the Ethernet switch port.
Description
Use the hgmpport command to enable/disable HGMP on an Ethernet switch port. After enabling HGMP globally, you must enable HGMP on an Ethernet switch port to collect information about it.
Example
# Enable HGMP on Ethernet3/1/3 port of the management device.
[H3C-Ethernet3/1/3] hgmpport enable
1.1.7 hgmpserver
Syntax
hgmpserver { enable | disable }
undo hgmpserver
View
System view
Parameter
enable: Specifies to enable HGMP Server.
disable: Specifies to disable HGMP Server.
Description
Use the hgmpserver command to enable/disable HGMP Server.
Use the undo hgmpserver command to restore the default HGMP Server configuration.
By default, the HGMP Server is disabled on a switch.
After HGMP Server is enabled normally, the system enters HGMP view. The hgmp server command can only be executed in HGMP view or lanswitch view.
Example
# Enable HGMP Server on an Ethernet switch.
[H3C] hgmpserver enable
Start HGMP protocol successfully!
1.1.8 lanswitch
Syntax
lanswitch { lanswitch-loc }
View
HGMP view
Parameter
lanswitch-loc: Ethernet switch position parameter, a string that comprises slot number, subslot number, port number and sequence number. This argument does not indicate the actual physical position.
Description
Use the lanswitch command to enter lanswitch view.
You can configure an Ethernet switch after you enter the corresponding lanswitch view.
To enter the lanswitch view of a specified switch through the management device, you must have the switch register successfully with the management device and operate properly. The management device automatically retrieves the position parameters of Ethernet switches. You can obtain the position parameter of an Ethernet switch by using the display lanswitch command.
Related command: display lanswitch.
Example
# Enter the lanswitch view of the switch directly connected to the 1/1/6- port of the management device.
[H3C-hgmp] lanswitch 1/1/6-/
1.1.9 load lswprogram
Syntax
load lswprogram filename
View
HGMP view
Parameter
filename: File name of the upgrade program.
Description
Use the load lswprogram command to load the specified file saved in the flash memory of the management device to the upgrade memory of the management device.
To execute this command, make sure the specified file is downloaded to the flash memory of the management device through trivial file transfer protocol (TFTP) or file transfer protocol (FTP).
Before upgrading an Ethernet switch connected to the management device, you must use the load lswprogram command to load the file saved in the flash memory of the management device to the upgrade memory of the management device.
Related command: upgrade lanswitch.
Example
# Load the file named switch.app and saved in the flash memory of the management device to the upgrade memory of the management device.
[H3C-hgmp] load lswprogram switch.app
Download Lanswitch upgrade program to RAM, Are you sure? [y/n]y
Loading program successfully!
1.1.10 query hgmpport-mode
Syntax
query hgmpport-mode
View
HGMP view
Parameter
None
Description
Use the query hgmpport-mode command to display topology information about the networks connected to ports of the management device.
To enable the management device to automatically collect information about the Ethernet switches attached to it, you need configure the networks connected to the ports of the management device to adopt star topology by using the spanning-hub command on the management device.
Example
# Display topology information about the networks connected to the ports of the management device.
[H3C-hgmp] query hgmpport-mode
===============================================================
port mode('X': spanning-hub mode)
port mode('-': tree mode)
===============================================================
SlotNo: 0
SlotNo: 1
SlotNo: 2
SlotNo: 3
SubSlotNo: 1
-------------------------------------------------------------
|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|1|1|2|
|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|
-------------------------------------------------------------
0 |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|
20 |-|-|-|-|-|-|-|-|-|-|-|-|
--------------------------------------------------------------
SubSlotNo: 2
-------------------------------------------------------------
|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|1|1|2|
|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|
-------------------------------------------------------------
0 |-|-|-|-|
--------------------------------------------------------------
SlotNo: 4
SlotNo: 5
SlotNo: 6
Table 1-3 Description on the fields of the query hgmpport-mode command
Field |
Description |
port mode |
Port mode |
SlotNo: 1 SubSlotNo: 0 |
Slot number and subslot number of the port |
|0|0|0|0….|1|1|1|1|1|1|1|2| |1|2|3|4….|3|4|5|6|7|8|9|0| |
Port numbers presented in columns. Numbers of the same column form a port number, reading in a top-down order. For example, the combinations 01 and 12 stand for port 1 and port 12 respectively. |
|-| |
|-| indicates the corresponding port has a network that is of tree topology connected. |X| indicates the corresponding port has a network that is of star topology connected. |
1.1.11 query port
Syntax
query port [ port-list | lockstate ]
View
lanswitch view
Parameter
port-list: List of ports to be queried. Be sure to provide a valid port number if you want to specify a single port. You can input a single number for the argument, which identifies one object. You can input a character string in such format as 3-7, which identifies objects 3 through 7. You can also use commas to connect single numbers and character strings.
lockstate: Specifies to display the lock states of the specified ports.
Description
Use the query port command to display the states of specified ports of the Ethernet switch, including port number, VLAN ID, tag state, lock state, duplex state, link status (Up/Down) and rate (10M, 100M, and so on). If you do not provide the port-list argument, information about all ports is displayed.
Example
# Display information about the state of lanswitch1/1/33 port.
[H3C-lanswitch1/1/33-/]query port lockstate
Waiting.....
==================Result of Inquire Lock State=============
Port LockState | Port LockState
1 UnLock | 2 UnLock
3 UnLock | 4 UnLock
5 UnLock | 6 UnLock
7 UnLock | 8 UnLock
9 UnLock | 10 UnLock
11 UnLock | 12 UnLock
13 UnLock | 14 UnLock
15 UnLock | 16 UnLock
17 UnLock | 18 UnLock
19 UnLock | 20 UnLock
21 UnLock | 22 UnLock
23 UnLock | 24 UnLock
25 MNoIns | 26 UnLock
============================== Explain=======================
MNIns mean port module isn't inserted
===============================End===========================
1.1.12 query vlan
Syntax
query vlan { index vlan-index-list | vlanid vlan-id-list }
View
lanswitch view
Parameter
index vlan-index-list: Specifies a list of VLAN indexes. Each VLAN has a VLAN Index in the system. The vlan-index-list parameter is optional. VLAN Index object ranges from 0 to 31.
vlanid vlan-id-list: Specifies a list of VLAN IDs. You must input VLAN ID list parameter. A VLAN ID ranges from 1 to 4095.
Description
Use the query vlan command to display the broadcast domain the specified VLAN Indexes or VLAN IDs correspond to. Arguments of list of VLANs are required for this command.
This command displays the broadcast domains in an intuitive way. Port numbers (1 through 27 for example) are listed at the top. The symbol “—” indicates the corresponding port is not in the VLAN broadcast domain; the symbol “x” indicates the corresponding port is in the VLAN broadcast domain.
For VLANs with their VLAN IDs the vlan-id-list argument specifies beyond the VLAN Index, the corresponding information cannot be displayed.
Related command: set vlan.
Example
# Display information about the broadcast domains to which VLAN Index 1 through 10 correspond.
[H3C-lanswitch3/1/6-/] query vlan index 1-10
Waiting.......
===================================================================
Result of inquiring LANSWITCH[6/0-/]'s Vlan
====================================================================
VlanIndex VlanId Including ports of Vlan broadcast
--------------------------------------------------------------------
|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|
|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|
--------------------------------------------------------------------
1 2001 |- X - - -|- - - - -|- - - - -|- - - - -|- - - - X|X X
2 2002 |- - X - -|- - - - -|- - - - -|- - - - -|- - - - X|X X
3 2003 |- - - X -|- - - - -|- - - - -|- - - - -|- - - - X|X X
4 2004 |- - - - X|- - - - -|- - - - -|- - - - -|- - - - X|X X
5 2005 |- - - - -|X - - - -|- - - - -|- - - - -|- - - - X|X X
6 2006 |- - - - -|- X - - -|- - - - -|- - - - -|- - - - X|X X
7 2007 |- - - - -|- - X - -|- - - - -|- - - - -|- - - - X|X X
8 2008 |- - - - -|- - - X -|- - - - -|- - - - -|- - - - X|X X
9 2009 |- - - - -|- - - - X|- - - - -|- - - - -|- - - - X|X X
10 2010 |- - - - -|- - - - -|X - - - -|- - - - -|- - - - X|X X
--------------------------------------------------------------------
Table 1-4 Description on the fields of the query vlan command
Field |
Description |
|0|0|0|0….|1|1|1|1|1|1|1|2| |1|2|3|4….|3|4|5|6|7|8|9|0| |
Port numbers presented in columns. Numbers of the same column form a port number, reading in a top-down order. For example, the combinations 01 and 12 stand for port 1 and port 12 respectively. |
1 2001 |- X - - -|- - - - -|- - - - -|- - - - -|- - - - X|X X |
The numbers 1 and 2001 stand for the VLAN Index and VLAN ID respectively. The symbol |- X - - -|- - - - -|- - - - -|- - - - -|- - - - X|X X indicates the states of the corresponding ports. As mentioned above, the symbol “—” indicates a port is not in the corresponding VLAN broadcast domain. The symbol “x” indicates a port is in the corresponding VLAN broadcast domain. |
# Display information about VLAN broadcast domains to which VLAN ID 2000 through 2005 correspond.
[H3C-lanswitch3/1/6-/] query vlan vlanid 2000-2005
Waiting.......
====================================================================
Result of inquiring LANSWITCH[6/0-/]'s VlanId
====================================================================
VlanId VlanIndex Including ports of Vlan broadcast
--------------------------------------------------------------------
|0|0|0|0|0|0|0|0|0|1|1|1|1|1|1|1|1|1|1|2|2|2|2|2|2|2|2|
|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|
--------------------------------------------------------------------
2000 0 |X - - - -|- - - - -|- - - - -|- - - - -|- - - - X|X X
2001 1 |- X - - -|- - - - -|- - - - -|- - - - -|- - - - X|X X
2002 2 |- - X - -|- - - - -|- - - - -|- - - - -|- - - - X|X X
2003 3 |- - - X -|- - - - -|- - - - -|- - - - -|- - - - X|X X
2004 4 |- - - - X|- - - - -|- - - - -|- - - - -|- - - - X|X X
2005 5 |- - - - -|X - - - -|- - - - -|- - - - -|- - - - X|X X
Table 1-5 Description on the fields of the query vlan command
Field |
Description |
|0|0|0|0….|1|1|1|1|1|1|1|2| |1|2|3|4….|3|4|5|6|7|8|9|0| |
Port numbers presented in columns. Numbers of the same column form a port number, reading in a top-down order. For example, the combinations 01 and 12 stand for port 1 and port 12 respectively. |
2000 0 |X - - - -|- - - - -|- - - - -|- - - - -|- - - - X|X X |
The numbers 0 and 2000 stand for VLAN Index and VLAN ID respectively. The symbol |- X - - -|- - - - -|- - - - -|- - - - -|- - - - X|X X indicates the states of the corresponding ports. As mentioned above, the symbol “—” indicates a port is not in the corresponding VLAN broadcast domain. The symbol “x” indicates a port is in the corresponding VLAN broadcast domain |
1.1.13 reset lanswitch
Syntax
reset lanswitch { lanswitch-loc }
View
HGMP view
Parameter
lanswitch-loc: Ethernet switch position parameter, a string that comprises slot number, subslot number, port number, and sequence number.
Description
Use the reset lanswitch command to reset the Ethernet switches connected to the management device. As all the services provided by an Ethernet switch are terminated when you reset the Ethernet switch, use this command with caution.
Only Ethernet switches that register with the management device successfully and operate properly can be reset.
You can use the display lanswitch command to obtain register information about an Ethernet switch registration.
Related command: display lanswitch.
Example
# Reset the Ethernet switch with a position parameter of 0/1/6-/.
[H3C-hgmp] reset lanswitch 0/1/6-/
Reset lanswitch will break service, are you sure? [y/n]y
Waiting....
Resetting LANSWITCH[3/1/6-/] successfully!
1.1.14 save lanswitch
Syntax
save lswconfig lanswitch-loc
View
HGMP view
Parameter
lanswitch-loc: Ethernet switch position parameter, a string that comprises slot number, subslot number, port number, and sequence number. This argument does not identify the physical position of an Ethernet switch.
Description
Use the save lanswitch command to save the configuration settings of a specified Ethernet switch to the memory of the management device. Note that data stored in the memory of the management device gets lost after the management device reboots.
Related command: backup lswconfig.
Example
# Save the configuration settings of the Ethernet switch with a position parameter of 0/1/6-/ to the memory of the management device.
[H3C-hgmp] save lswconfig 0/1/6-/
Waiting.....
1.1.15 set lanswitch
Syntax
set lanswitch lanswitch-loc { inactive | active }
View
HGMP view
Parameter
lanswitch-loc: Ethernet switch position parameter, a string that comprises slot number, subslot number, port number, and sequence number.
Description
Use the set lanswitch command to turn a faulty Ethernet switch to inactive, or turn an inactive Ethernet switch to active.
Turning a faulty Ethernet switch to inactive can prevent its information from being displayed, making the output information more clear.
Normally, only faulty Ethernet switches can be turned to inactive.
Related command: display lanswitch.
Example
# Turn the Ethernet switch connected to the 0/1/6 port to active.
[H3C-hgmp] set lanswitch 0/1/6-/ active
1.1.16 set lswconfig
Syntax
set lswconfig lanswitch-loc asdefault
View
HGMP view
Parameter
lanswitch-loc: Ethernet switch position parameter.
Description
Use the set lswconfig command to specify the configuration settings of an Ethernet switch to be the default settings of the Ethernet switches that are of the same model. You can use the auto config command to configure other Ethernet switches that are of the same model using the default settings.
Related command: auto config.
Example
# Specify the configuration settings of the Ethernet switch connected to 0/1/6-/ port as the default configuration settings of the Ethernet switches that are of the same model.
[H3C-lanswitch0/1/6-/] set lswconfig 0/1/6-/ asdefault
1.1.17 set lswname
Syntax
set lswname lanswitch-loclist name-list
undo set lswname lanswitch-loclist
View
HGMP view
Parameter
lanswitch-loclist: List of position parameters of the Ethernet switches to be configured. An Ethernet switch position parameter is a string that comprises slot number, subslot number, port number, and sequence number.
name-list: List of Aliases to be set for the Ethernet switches.
Description
Use the set lswname command to configure aliases for specified Ethernet switches.
Use the undo set lswname command to remove the aliases of specified Ethernet switches.
HGMP identifies each Ethernet switch by the corresponding position parameter. However, it is infeasible for users to locate a managed Ethernet switch in time using its position parameters. An alternative is to assign aliases to Ethernet switches. Note that the position parameters specified by the lanswitch-loclist argument and the aliases specified by the name-list argument are one-to-one mapped.
Example
# Assign alias of “1#S3526” to the Ethernet switch with a position parameter of 0/1/6-/.
[H3C-hgmp] set lswname 0/1/6-/ 1#S3526
Config lanswtich name successfully,please run backup lswconfig for save configuration to flash!
1.1.18 spanning-hub
Syntax
spanning-hub { enable | disable } slotno subslot port-list
View
HGMP view
Parameter
enable: Specifies the network connected to the port to be of star topology.
disable: Specifies the network connected to the port not to be of star topology..
slotno: Slot number.
subslot: Subslot number.
port-list: Port list.
Description
Use the spanning-hub command to specify the network connected to the specified port of the management device to be of star topology.
As mentioned earlier, HGMP identifies each Ethernet switch using the corresponding switch position parameter. You can enable a management device to automatically retrieve the position parameters of the Ethernet switches in the network connected to a port of the management device by specifying the network to be of star topology.(A position parameter is a string that comprises slot number, subslot number, port number, and sequence number. It does not identify the physical position of an Ethernet switch.)
Example
# Specify the network connected to the 1/1/1 port of the management device to be of star topology.
[H3C-hgmp] spanning-hub enable 1 1 1
Changing port mode will cause lanswitch data to be lost, are you sure? [n]y
[H3C-hgmp]
1.1.19 upgrade lanswitch
Syntax
upgrade lanswitch lanswitch-loc { app | bootrom }
View
HGMP view
Parameter
lanswitch-loc: Ethernet switch position parameter, a string that comprises slot number, subslot number, port number, and sequence number. This argument does not identify the physical position of an Ethernet switch.
app: Specifies to upgrade the applications of an Ethernet switch.
bootrom: Specifies to upgrade the Boot ROM of an Ethernet switch.
Description
Use the upgrade lanswitch command to upgrade a specified Ethernet switch.
It is a heavy burden for maintainers to upgrade Ethernet switches manually. This command enables them to upgrade specified Ethernet switches remotely, which improves the maintenance efficiency and eases workload remarkably.
Before upgrading an Ethernet switch connected to the management device, you need to load the corresponding upgrade program to the management device using the load lswprogram command.
Related command: load lswprogram.
Example
# Upgrade the layer 1 Ethernet switch directly connected to 0/1/6 port of the management device.
[H3C-hgmp] upgrade lanswitch 0/1/6-/ app
Upgrade lanswitch, maybe make some fatal mistake on service, are you sure[y/n]?y
Waiting.....
[H3C-hgmp]
1.2 Configuration Commands for S2403F Series Switches
& Note:
The following commands are only applicable to S2403F series Ethernet switches.
1.2.1 loop port
Syntax
loop port port-list
undo loop port port-list
View
lanswitch view
Parameter
port-list: List of ports to be set. Be sure to provide a valid port number if you want to specify a single port. You can input a single number for the argument, which identifies one object. You can input a character string in such format as 3-7, which identifies objects 3 through 7. You can also use commas to connect single numbers and character strings.
Description
Use the loop port command to enable loopback test on specified ports.
Use the undo loop port command to disable loopback test on specified ports.
This command is only supported on S2403FV1.2 or later. And the number of ports can be no more than 6.
Example
# Enable loopback test on port 2 of the Ethernet switch with a position parameter of 3/1/6-/.
[H3C-lanswitch3/1/6-/] loop port 2
Lanswitch model error, only S3526(ver higher than1.2)can config looped!
1.2.2 query ip address
Syntax
query ip address
View
lanswitch view
Parameter
None
Description
Use the query ip address command to display the IP address, subnet mask and the IP address of the default gateway. If nothing displayed, the management VLAN of the Ethernet switch has no IP address configured.
Related command: set ip address.
Example
# Display the IP address, subnet mask and the IP address of the default gateway.
[H3C-lanswitch3/1/6-/] query ip address
Inquiring ip address of LANSWITCH[3/1/6-/] successfully!
Ip address : 1.1.3.5
SubMask : 255.255.0.0
Gateway-address : 0.0.0.0
Table 1-6 Description on the fields of the query ip address command
Field |
Description |
Ip address |
The IP address of the management VLAN of the Ethernet switch |
SubMask |
The subnet mask |
Gateway-address |
The IP address of the default gateway |
1.2.3 set ip address
Syntax
set ip address ip-address mask [ gateway-address ]
undo set ip address
View
lanswitch view
Parameter
ip-address: IP address to be assigned to the management VLAN of an Ethernet switch.
mask: Subnet mask of the management VLAN of an Ethernet switch.
gateway-address: IP address of the default gateway of the management VLAN.
Description
Use the set ip address command to set the IP address, subnet mask and the IP address of the default gateway.
Use the undo set ip address command to remove the configuration.
Related command: query ip address.
Example
# Set the IP address of the management VLAN of the Ethernet switch to 1.3.4.2.
[H3C-lanswitch3/1/6-/] set ip address 1.3.4.2 255.255.0.0 1.3.2.1
Waiting.....
Set ip address of LANSWITCH[3/1/6-/] successfully!
New ip address : 1.3.4.2
New SubMask : 255.255.0.0
New gateway-address : 1.3.2.1
1.2.4 set mac
Syntax
set mac mac-address
View
lanswitch view
Parameter
mac-address: MAC address to be assigned to the management VLAN of an Ethernet switch. The MAC address must begin with 00-e0-fc.
Description
Use the set mac command to set the MAC address of the management VLAN of an Ethernet switch.
You need to configure the last six hexadecimal digits of the MAC address only. The first six hexadecimal digits are fixed to 00-e0-fc.
Example
# Set the MAC address of the management VLAN of the Ethernet switch to 00e0-fc00-1111.
[H3C-lanswitch3/1/6-/] set mac 00e0-fc00-1111
Waiting.........
Set Mac-address of LANSWITCH[6/0-/] successfully!
New MAC address : 00-e0-fc-00-11-11
1.2.5 set port
Syntax
set port port-list vlanid vlan-id-list [ tagged | untagged ]
View
lanswitch view
Parameter
port-list: List of ports to be set. Be sure to provide a valid port number if you want to specify a single port. You can input a single number for the argument, which identifies one object. You can input a character string in such format as 3-7, which identifies objects 3 through 7. You can also use commas to connect single numbers and character strings.
vlanid vlan-id-list [ tagged | untagged ]: Specifies a list of VLAN IDs to be assigned to the ports specified by the port-list argument and whether or not these ports are tagged. The value of a VLAN ID ranges from 0 to 4,095, of which value of 0 means the corresponding port is not assigned a VLAN ID. As the VLAN IDs specified by the vlan-id-list argument are one-to-one mapped to the port numbers specified by the port-list argument, the number of the ports specified by the port-list argument must be the same as that of the VLAN IDs specified by the vlan-id-list argument.
Description
Use the set port command to assign VLAN IDs to ports of an Ethernet switch and specify whether or not these ports are tagged.
To avoid communication between a management device and the Ethernet switches connected to it being unexpectedly terminated, the VLAN ID of an upstream port cannot be set to 2047, which is reserved by the system, and an upstream port cannot be set to be an untagged port.
Related command: query port.
Example
# Configure the port 3 of the Ethernet switch with a position parameter of 3/1/6-/.
[H3C-lanswitch3/1/6-/] set port 3 vlanid 4 untagged
Waiting....
Operating LANSWITCH[3/1/6-/]'s ports successfully!
1.2.6 set vlan
Syntax
set vlan vlan-index-list { vlanid vlan-id-list [ port-list ] | broadcast port-list [ vlan-id-list ] }
View
lanswitch view
Parameter
vlan-index-list: List of VLAN indexes. The value of a VLAN Index ranges from 0 to 31.
vlanid vlan-id-list [ port-list ]: Specifies a list of VLAN IDs. The port-list argument is optional. The value of a VALN ID ranges from 0 to 4,095. Value of 0 indicates no VLAN ID is configured for the corresponding VLAN Index.
port-list: Broadcast domain of the specified VLAN. The legal value for individual port ranges from 1 to 27. Value of 0 specifies the corresponding VLAN has no broadcast domain.
broadcast port-list [ vlan-id-list ]: Sets the specified VLAN. The vlan-id-list argument is optional. The port-list argument specifies the ports which the corresponding VLAN contains. The legal value for individual port ranges from 1 to 27. The value of 0 specifies the corresponding VLAN has no broadcast domain. The value of a VLAN ID ranges from 1 to 4,095. Value of 0 indicates a port is not configured with a VLAN ID.
Description
Use the set vlan command to configure VLANs of an Ethernet switch.
To avoid communication between a management device and the Ethernet switches connected to it being unexpectedly terminated, the VLAN ID to which a VLAN index corresponds cannot be set 2047, which is reserved by the system.
As VLAN indexes specified by the vlan-index-list argument are one-to-one mapped to VLAN IDs specified by the vlan-id-list argument, the number of the specified ports must be the same as that of the specified VLAN IDs.
Related command: query vlan.
Example
# Configure VLANs for the Ethernet switch with a position parameter of 3/1/6-/ as follows: Map VLAN Index 1 to VLAN3. The VLAN 3 contains port 1, 3 and 4.
[H3C-lanswitch3/1/6-/] set vlan vlanid 3 1,3,4
Waiting.....
Modifying LANSWITCH[3/1/6-/]'s VlanIndex successfully!
1.2.7 set workmode
Syntax
set workmode port-list { auto | 10m-full | 10m-half | 100m-full | 100m-half }
View
lanswitch view
Parameter
port-list: List of ports to be set. Be sure to provide a valid port number if you want to specify a single port. You can input a single number for the argument, which identifies one object. You can input a character string in such format as 3-7, which identifies objects 3 through 7. You can also use commas to connect single numbers and character strings.
10m-full: Specifies to operate at a speed of 10 Mbps and in full duplex mode.
10m-half: Specifies to operate at a speed of 10 Mbps and in half duplex mode.
100m-full: Specifies to operate at a speed of 100 Mbps and in full duplex mode.
100m-half: Specifies to operate at a speed of 100 Mbps and in half duplex mode.
Description
Use the set workmode command to set work mode for specified ports of an Ethernet switch. Following modes are available: automatic adaptation, 10M full duplex, 10M half duplex, 100M full duplex, and 100M half duplex.
To avoid communication between a management device and the connected Ethernet switches being unexpectedly terminated, the work mode of an upstream port defaults to auto and cannot be changed.
Check the actual rate on the physical port during modification. If the Ethernet switch does not support the modified port rate, the configuration fails.
Related command: query port.
Example
# Configure the port 1 of the Ethernet switch with a position parameter of 3/1/6-/ to operate at a speed of 10 Mbps and in full duplex mode.
[H3C-lanswitch3/1/6-/]set workmode 1 10m-full
Waiting.....
Operating LANSWITCH[3/1/6-/]'s ports successfully!
1.3 Configuration Commands for S2008B/S2016B/S2026B/S3026 Series Switches
& Note:
The following commands are only applicable to S2008B/S2016B/S2026B/S3026 series switches.
1.3.1 add addritem
Syntax
add addritem mac-addr { unicast port [ aged | noaged | permanent ] | multicast vlanid port-list mctype }
View
lanswitch view
Parameter
mac-addr: MAC address to be added.
unicast: Specifies the address as a unicast address.
port: Port used to unicast.
aged: Specifies to delete the address if it is aged.
noaged: Specifies the address is not aged.
permanent: Specifies the address can be written to the flash memory.
multicast: Specifies the address is a multicast address.
vlanid: VLAN ID of the multicast group.
port-list: Port list of the multicast group.
mctype: Specifies how the multicast group forward data to the CPU.
l no: Specifies not to forward data to the CPU.
l trans: Specifies to forward data to the CPU.
l igmp: Specifies to forward IGMP packets to the CPU.
Description
Use the add addritem command to add a unicast MAC address entry or a multicast MAC address entry for an Ethernet switch. An S2008B, S2016B, or S2026B series Ethernet switch can have only one multicast MAC address added.
Related command: search uniaddr and search multicast.
Example
# Add a unicast MAC address entry with a MAC address of 0e0-fc01-1000 for the Ethernet switch with a position parameter of 3/1/6-/, specifying the entry as an aging entry.
[H3C-lanswitch3/1/6-/] add addritem 00e0-fc01-1000 unicast 1 aged
Waiting.....
Add address item successfully, MAC Addr:00-e0-fc-01-10-00
1.3.2 delete multicast
Syntax
delete multicast mac-addr vlanid vlanid
View
lanswitch view
Parameter
mac-addr: MAC address of the multicast entry to be deleted.
vlanid: VLAN ID of the VLAN containing the multicast entry.
Description
Use the delete multicast command to remove a multicast address entry.
Related command: search multicast.
Description
# Remove the multicast entry with a MAC address of 0100-5e00-0001 of the Ethernet switch with a position parameter of 3/1/3-/.
[H3C-lanswitch3/1/3-/] delete multicast 0100-5e00-0001 vlanid 1
1.3.3 delete uniaddr
Syntax
delete uniaddr mac-addr
View
lanswitch view
Parameter
mac-addr: MAC address of the unicast entry to be deleted.
Description
Use the delete uniaddr command to remove a unicast address entry of an Ethernet switch.
Related command: search uniaddr.
Example
# Remove the unicast address entry with a MAC address of 00e0-fc01-1001 on the Ethernet switch with a position parameter of 3/1/3-/.
[H3C-lanswitch3/1/3-/] delete uniaddr 00e0-fc01-1001
Waiting.....
==============Deleting Mac Result============
No. ErrId Mac-Addr VlanId
0 0 00-e0-fc-01-10-01 -
=======================End===================
ErrId Mean:0-Success,1-Invalid Mac,2-vlanId out range
2-vlanId out range(1-4095)
5-No Found AddrTab,other-Unkown Cause
Table 1-7 Description on the fields of the delete uniaddr command
Field |
Description |
No |
MAC address entry number |
ErrId |
The error number of this operation, which can be the following: l 0: The operation is successful. l 1: Error caused by the VLAN ID and MAC address. l 2: The VLAN ID out of range. l 5: Other errors. |
Mac-Addr |
The MAC address involved. |
VlanId |
The VLAN ID the MAC address corresponds to. |
1.3.4 duplex port
Syntax
duplex port port-list { auto | half | full }
View
lanswitch view
Parameter
port-list: Port list.
auto: Specifies to operate in automatic negotiation mode.
half: Specifies to operate in half duplex mode.
full: Specifies to operate in full duplex mode.
Description
Use the duplex port command to set whether or not an Ethernet switch port operates in full duplex/half duplex mode.
A port operating in full duplex mode can send/receive packets while it is receiving/sending packets. A port operating in half duplex mode can either receive or send packets at a certain moment. If you set a port with the auto keyword, the port negotiates with its peer to determine the mode it operates in.
Note that the 100M optical ports of an Ethernet switch are fixed to operate at a speed of 100Mbit/s and in full duplex mode.
Example
# Set the port 1 of the Ethernet switch with a position parameter of 3/1/3-/ to operate in auto state.
[H3C-lanswitch3/1/3-/] duplex port 1 auto
Waiting.....
operating LANSWITCH[3/1/3-/]'s ports successfully!
1.3.5 flow port
Syntax
flow port port-list { both | none }
View
lanswitch view
Parameter
port-list: Port list.
both: Specifies to perform flow control.
none: Specifies not to perform flow control.
Description
Use the flow port command to specify whether or not an Ethernet switch performs flow control when the Ethernet switch sends or receives data through specified ports.
To avoid congestion and packets being dropped, flow control is necessary if the flow that passes a port is relatively large.
Example
# Specify to perform flow control on port 3 of the Ethernet switch with a position parameter of 3/1/3-/.
[H3C-lanswitch3/1/3-/] flow port 3 both
Waiting.....
operating LANSWITCH[3/1/3-/]'s ports successfully!
1.3.6 Lock port
Syntax
lock port port-list
View
Lanswitch view
Parameter
port-list: The port list that requires configuring.
Description
Use the lock port command to disable address learning on the port of the switch.
Example
# Disable address learning on port 1 of the Ethernet switch with the position parameter of “8/1/1-/”
[H3C-lanswitch8/1/1-/] lock port 1
Waiting.....
==================Result of Lock port=============
No. Result Port LockState
1 0 1 Lock
============================Notes===============================
Result Val:0-operation success,1-not insert port module,2-port is out of range
0xFF-doesn't change port stats, other-no support operation
================================End===================================
& Note:
This command does not support configuring S2403F and S2403 Ethernet switches on NMS.
1.3.7 modify multiaddr
Syntax
modify multiaddr mac-addr vlanid port-list mctype
View
lanswitch view
Parameter
mac-addr: MAC address of the multicast address entry to be modified.
vlanid: VLAN ID of the multicast group.
port-list: Port list for the multicast group.
mctype: Specifies how the multicast group forward data to the CPU.
no: Specifies not to forward to the CPU.
trans: Specifies to forward data to the CPU.
igmp: Specifies to forwards IGMP packets to the CPU.
Description
Use the modify multiaddr command to modify the multicast address entry of an Ethernet switch.
Related command: search multicast.
Example
# Modify the multicast address entry of the Ethernet switch with a position parameter of 3/1/3-/.
[H3C-lanswitch3/1/3-/] modify multiaddr 0111-2233-4455 10 5 no
Waiting.....
Modify addr item successfully, Mac addr: 01-11-22-33-44-55
1.3.8 modify uniaddr
Syntax
modify uniaddr mac-addr { aged | noaged | permanent }
View
lanswitch view
Parameter
mac-addr: MAC address of the unicast address entry to be modified.
aged: Specifies to delete the address if it is aged.
noaged: Specifies the address is not aged.
Permanent: Specifies the address can be written to the flash memory.
Description
Use the modify uniaddr command to modify the unicast address entry for an Ethernet switch.
Related command: search uniaddr.
Example
# Modify the unicast address entry of the Ethernet switch with a position parameter of 3/1/3-/.
[H3C-lanswitch3/1/3-/] modify uniaddr 0e0-fc11-1001 noaged
Waiting.....
Modify addr item successfully, Mac addr:00-e0-fc-11-10-01
1.3.9 query active-configuration
Syntax
query active-configuration
View
lanswitch view
Parameter
None
Description
Use the query active-configuration command to display information about the current configuration of the Ethernet switch.
Example
# Display information about the current configuration of the Ethernet switch.
[H3C-lanswitch3/1/3-/] query active-configuration
Waiting......
Inquire running configuration successfully,Current configuration is :
Building running configuration...
Current configuration is :
#
hostname H3C
#
hgmp enable
#
no qos
#
line aux
speed 9600
Table 1-8 Description on the fields of the query active-configuration command
Field |
Description |
Current configuration is |
The information that follows is the items of the current configuration separated by the symbol #. |
1.3.10 query address
Syntax
query address agedtime
View
Lanswitch view
Parameter
None.
Description
Use the query address agedtime command to query the address aged time of the device.
Example
# Query the address aged time of the Ethernet switch with the position parameter of “8/1/1-/”
[H3C-lanswitch8/1/1-/] query address agedtime
Waiting.....
Address item aged time:100
& Note:
This command is only applicable to the configuration S2008B, S2026B and S2016B Ethernet switches on the NMS.
1.3.11 query gatewayip
Syntax
query gatewayip
View
lanswitch view
Parameter
None.
Description
Use the query gatewayip command to query the gateway IP address of the switch.
Example
# Query the gateway IP address of the Ethernet switch with the position parameter of “8/1/1-/”.
[H3C-lanswitch8/1/1-/] query gatewayip
Waiting.....
Inquire gateway IP address of LANSWITCH[8/1/1-/] successfully!
Gateway IP address : 1.1.1.1
& Note:
This command is only applicable to the configuration of S2008, S2016 and S3026 Ethernet switches on the NMS.
1.3.12 query link-aggregation
Syntax
query link-aggregation
View
lanswitch view
Parameter
None
Description
Use the query link-aggregation command to display information about port aggregation of the Ethernet switch.
If you have configured port aggregation on the Ethernet switch, this command displays the port aggregation settings, including port numbers; if you have not configured port aggregation, the command displays “—”.
Related command: set link-aggregation.
Example
# Query information about port aggregation of the Ethernet switch with a position parameter of 3/1/6-/.
[H3C-lanswitch3/1/6-/] query link-aggregation
Waiting.....
--------------------Link-aggregation Group-------------------
Lk-ag Num Type Port1 port2 port3 port4
- - - - - -
----------------------End--------------------------
Waiting.....
--------------------Link-aggregation Group-------------------
Link-aggregation Num Type Port1 port2 port3 port4
0 sa 1 2 3 4
----------------------End--------------------------
Table 1-9 Description on the fields of the query link-aggregation command
Field |
Description |
Link-aggregation Num |
Port aggregation group number |
Type |
Aggregation type (sa or dasa) |
Port1 port2 port3 port4 |
Port numbers of the aggregated ports. As for low-end Ethernet switches, each aggregation group can contain up to four ports |
1.3.13 query manageip
Syntax
query manageip vlan-id
View
lanswitch view
Parameter
vlan-id: VLAN ID.
Description
Use the query manageip command to query the management IP address of the switch.
Example
# Query the management IP address of the Ethernet switch with the position parameter of ”8/1/1-/”
[H3C-lanswitch8/1/1-/] query manageip vlan 1
Waiting.....
Inquire IP address of LANSWITCH[8/1/1-/] successfully!
VlanId :[ 172]
ManageIp address : 172.172.172.172
NetMask : 172.172.172.172
& Note:
This command is only applicable to the configuration of S2008, S2016 and S3026 Ethernet switches on the NMS.
1.3.14 query mirror
Syntax
query mirror
View
lanswitch view
View
None
Description
Use the query mirror command to query information about the Ethernet port mirroring.
Example
# Query information about the Ethernet port mirroring.
[H3C-lanswitch3/1/3-/] query mirror
Waiting.....
Monitor port NO. is : 1.
The mirrored ports list : 5-10 .
Table 1-10 Description on the fields of the query mirror command
Field |
Description |
Monitor port NO. is |
Port number of the monitor port |
The mirrored ports list |
List of mirrored ports |
1.3.15 query multiaddr
Syntax
query multiaddr vlanid vlanid
View
lanswitch view
Parameter
vlanid vlanid: Specifies the IDs of the VLANs to be queried, in the range of 1 to 4,095.
Description
Use the query multiaddr command to query the multicast address entries of a specified VLAN of the Ethernet switch.
Example
# Query the multicast address entries of the VLAN 2 of the Ethernet switch with a position parameter of 3/1/3-/.
[H3C-lanswitch3/1/3-/] query multiaddr vlanid 1
Waiting.....
================Result of Inquire AddrTable================
Index Mac-addr PortMask McType
0 01-80-c2-00-00-20 0 0
1 01-80-c2-00-00-00 1 1
2 01-80-c2-00-00-21 0 0
3 01-80-c2-00-00-22 1 1
4 ff-ff-ff-ff-ff-ff 1 1
5 01-00-0c-cc-cc-cc 1 1
========================Some Explain===============================
1 PortMask Val:Mask of the Multicast Group,if include the port, set this bit 1,
or not 0
2 McType Val:0-No Trans to cpu,1-trans to CPU,2-IGMP trans to CPU
3 Total Number of the addrtable : 6
================================End=================================
Table 1-11 Description on the fields of the query multiaddr command
Field |
Description |
Index |
Multicast group number |
Mac-addr |
Multicast address |
PortMask |
Port mask, which indicates the ports in a multicast group. For example, value of 0 indicates the multicast group contains no port; value of 10 indicates the multicast group contains port 2; value of 110 indicates the multicast group contains ports 2 and 3; value of 10101 indicates the multicast group contains ports 1, 3 and 5; and so on. |
McType |
Indicates how a multicast group forwards data to CPU. The meanings of its value are: l 0: Do not forward to CPU l 1: Forward to CPU l 2: Forward IGMP packets to the CPU |
1.3.16 query port lockstate
Syntax
query port lockstate
View
lanswitch view
Parameter
None.
Description
Use the query port lockstate command to query the lock state of the port of the switch.
Example
# Query the lock state of the port of the switch with the position parameter of “8/1/1-/”.
[H3C-lanswitch8/1/1-/]query port lockstate
Waiting.....
==================Result of Inquire Lock State=============
Port LockState | Port LockState
1 Lock | 2 UnLock
3 UnLock | 4 UnLock
5 UnLock | 6 UnLock
7 UnLock | 8 UnLock
9 UnLock | 10 UnLock
11 UnLock | 12 UnLock
13 UnLock | 14 UnLock
15 UnLock | 16 UnLock
17 UnLock | 18 UnLock
19 UnLock | 20 UnLock
21 UnLock | 22 UnLock
23 UnLock | 24 UnLock
25 MNoIns | 26 MNoIns
============================== Explain=======================
MNIns mean port module isn't inserted
===============================End===========================
& Note:
This command does not support configuring S2403F and S2403 Ethernet switches on the NMS.
1.3.17 query rmon
Syntax
query rmon port port-list { forward | trans | recv | err | all }
View
lanswitch view
Parameter
port port-list: Specifies a list of ports to be queried.
forward: Specifies to display statistics information about forwarded packets.
recv: Specifies to display statistics information about received packets.
trans: Specifies to display statistics information about transmitted packets.
err: Specifies to display statistics information about error packets.
all: Specifies to display all statistics information.
Description
Use the query rmon command to display the rmon statistics information about an Ethernet switch. If you specify the all keyword, this command can query up to five ports at one time. If you provide a keyword other than all, this command can query 10 ports.
Related command: reset rmon.
Example
# Query all the rmon statistics information about port 1 of the Ethernet switch with a position parameter of 3/1/6-/.
[H3C-lanswitch3/1/6-/] query rmon port 1 all
Waiting.....
Result of Inquiring RMON
=============PortNum: 1 Forward Packet Count=====================
<=64Byte : 0 65-127Byte : 0 128-255Byte : 0
256-511Byte : 0 512-1023Byte: 0 1024-1518Byte: 0
>1518Byte : 0 PKT Sum : 0
===============PortNum: 1 Receive Count============================
RxCount : 0 BrdCast : 0 MultiCast : 0
UniCast : 0 Pause : 0 UnKnow : 0
OverFlow : 0 Drop : 0
============PortNum: 1 Trans Count==============================
TxCount : 0 BrdCast : 0 MultiCast : 0
UniCast : 0 Pause : 0 UnderRun : 0
============PortNum: 1 Error Count==============================
Symbol Err : 0 CRCErr : 0 UnderSizeErr : 0
OversizeErr : 0 JabberErr : 0 FragmentErr : 0
FalseCarrErr: 0 DribbleErr : 0 TxDeferErr : 0
TxLateColErr: 0 SingleColErr: 0 MultiColErr : 0
XsiveColErr : 0 TotalColErr: 0
Table 1-12 Description on the fields of the query rmon command
Field |
Description |
PortNum: 1 Forward Packet Count |
Statistics information about forwarded packets |
PortNum: 1 Receive Count |
Statistics information about received packets |
PortNum: 1 Trans Count |
Statistics information about transmitted packets |
PortNum: 1 Error Count |
Statistics information about error packets |
1.3.18 query saved-configuration
Syntax
query saved-configuration
View
lanswitch view
Parameter
None
Description
Use the query saved-configuration command to display the startup configuration of an Ethernet switch.
Example
# Display the startup configuration of the Ethernet switch.
[H3C-lanswitch3/1/3-/] query saved-configuration
Waiting......
Inquire saved configuration successfully,saved configuration is
sysname H3C
Current configuration is :
#
hostname H3C
#
hgmp enable
#
no qos
#
line aux
speed 9600
Table 1-13 Description on the fields of the query saved-configuration command
Field |
Description |
saved configuration is |
The configuration items of the Ethernet switch, which are separated by the symbol #. |
1.3.19 query system
Syntax
query system info
View
lanswitch view
Parameter
None.
Description
Use the query system info command to query the system information of the switch.
Example
#Query the system information of the Ethernet switch with the position parameter of “8/1/1-/”
[H3C-lanswitch8/1/1-/] query system info
Waiting.....
Inquire system info failed!
& Note:
This command is only applicable to configuration of S2008B, S2016B and S2026B Ethernet switches on the NMS.
1.3.20 query uniaddr port
Syntax
query uniaddr port spec-port index shownum
View
lanswitch view
Parameter
spec-port: Port number of the port to be queried.
index: Index for the address entry, in the range of 1 to 4,095.
shownum: Number of entries to be queried, in the range of 1 to 100. For output information with more than 100 entries, only the first 100 entries are displayed.
Description
Use the query uniaddr port command to query the unicast address entries of a specified port of an Ethernet switch.
Example
# Query the unicast address entries of the port 2 of the Ethernet switch with a position parameter of 3/1/3-/.
[H3C-lanswitch3/1/3-/] query uniaddr port 2 1 50
Waiting.....
================Result of Inquire AddrTable=======================
Index Mac-addr Aged | Index Mac-addr Aged
0 00-e0-fc-01-10-00 1 | 1 00-00-00-00-00-00 0
=======================Some Explain===============================
1 Aged mean:0-No aged,other value- aged to delete
2 Total Number of the addrtable : 1
=========================End===================================
Table 1-14 Description on the fields of the query uniaddr port command
Field |
Description |
Index |
Index of an address entry |
Mac-addr |
Unicast MAC address |
Aged |
Indicates whether an address entry can be aged. The value of 0 indicates the entry is not aged. Other values indicate the address entry can be aged. An aged address entry is removed by the system. |
1.3.21 query used addrnum
Syntax
query used addrnum
View
lanswitch view
Parameter
None
Description
Use the query used addrnum command to query the number of the occupied address entries of the Ethernet switch.
Example
# Query the occupied address entries of the Ethernet switch with a position parameter of 3/1/3-/.
[H3C-lanswitch3/1/3-/] query used addrnum
Waiting.....
Unicast addrItem:7 ,Multicast AddrItem :6
Table 1-15 Description on the fields of the query used addrnum command
Field |
Description |
Unicast addrItem |
Number of occupied unicast MAC address entries |
Multicast AddrItem |
Number of occupied multicast MAC address entries |
1.3.22 query vdsllink
Syntax
query vdsllink [ port-list ]
View
lanswitch view
Parameter
port-list: The port list that requires configuring.
Description
Use the query vdsllink command to query the VDSL link rate of the port.
Example
# Query the VDSL link rate of port 1 of the Ethernet switch with the position parameter of “8/1/1-/”
[H3C-lanswitch3/1/3-/] query vdsllink 1
Waiting.....
======================Result of Inquiring VDSL Link======================
------------------------------LinkNo:1--------------------------------
ErrNo :0 Status :0 CfgUsRate:0M
CfgDsRate:0M ActUsRate:0M ActDsRate:0M
FailCont :0 LtRxSNR :0 LtRsCount:0
LtTxPsd :0dBm/hz RtRxSNR :0 RtRsCount:0
RtTxPSD :0dBm/hz RtHVer :0 RtSVer :0
----------------------------------End------------------------------
& Note:
This command is only applicable to the configuration of S3026V Ethernet switches on the NMS.
1.3.23 query vlanstate
Syntax
query vlanstate
View
lanswitch view
Parameter
None.
Description
Use the query vlanstate command to query the VLAN state of the switch.
Example
# Query the VLAN state of the Ethernet switch with the position parameter of “8/1/1-/”
[H3C-lanswitch8/1/1-/] query vlanstate
Waiting.....
the lanswtich's vlan state :Enable
& Note:
This command is not applicable to the configuration of S2008B, S2026B, S2016B, S2403F and S2403 switches on the NMS.
1.3.24 search multiaddr
Syntax
search multiaddr mac-addr-list vlanid vlanid-list
View
lanswitch view
Parameter
mac-addr-list: List of MAC addresses to be searched. This argument can contain up to four MAC addresses.
vlanid-list: List of VLAN IDs corresponding to those specified by the mac-addr-list argument.
Description
Use the search multiaddr command to search specified multicast addresses in the address table of an Ethernet switch.
Example
# Search an address entry in the multicast address table of the Ethernet switch with a position parameter of 3/1/3-/.
[H3C-lanswitch3/1/3-/] search multiaddr 01e0-fc01-0001 vlanid 2
Waiting.....
==================Search addrTab result========================
No ErrNo Mac-Address VlanId Port Aged PortMask mcType
0 0 01-e0-fc-01-00-01 1 - - 0 -
===================================================================
ErrNo Mean:0-Success,1-invalid Mac,2-Vlanid out rang 5-not found addrTab
Table 1-16 Description on the fields of the search multiaddr command
Field |
Description |
No |
Multicast group number |
ErrNo |
Error number, which are described as follows: l 0: The operation is successful l 1: MAC address error l 2: VLAN ID out of range l 5: No address table found |
Mac-Address |
Multicast address |
Port |
Port number |
Aged |
Indicates whether the entry can be aged |
PortMask |
Port mask, which indicates the ports in a multicast group. For example, value of 0 indicates the multicast group contains no port; value of 10 indicates the multicast group contains port 2; value of 110 indicates the multicast group contains ports 2 and 3; value of 10101 indicates the multicast group contains ports 1, 3 and 5; and so on.. |
McType |
Indicates how a multicast group forwards data to CPU. The meanings of its value are: l 0: Do not forward to CPU l 1: Forward to CPU l 2: Forward IGMP packets to the CPU |
1.3.25 search uniaddr
Syntax
search uniaddr mac-addr-list
View
lanswitch view
Parameter
mac-addr-list: List of MAC addresses to be searched. This argument can contain up to four MAC addresses.
Description
Use the search uniaddr command to search specified unicast address entries in the address table of an Ethernet switch.
Example
# Search an address entry in the unicast address table of the Ethernet switch with position parameter of 3/1/3-/.
[H3C-lanswitch3/1/3-/] search uniaddr 0e0-fc11-1001
Waiting.....
=================Search addrTab result========================
No ErrNo Mac-Address VlanId Port Aged PortMask mcType
0 0 00-e0-fc-11-10-01 - 1 Aged - -
================================================================
ErrNo Mean:0-Success,1-invalid Mac,2-Vlanid out rang 5-not found addrTab
Table 1-17 Description on the fields of the search uniaddr command
Field |
Description |
Index |
Unicast MAC address entry number |
ErrNo |
Error number, which are described as follows: l 0: The operation is successful l 1: MAC address error l 2: VLAN ID out of range l 5: No address table found |
Mac-Address |
Unicast address |
Port |
Port number |
Aged |
Indicates whether this entry can be aged. |
PortMask |
Port mask, which indicates the ports in a unicast group. For example, value of 0 indicates the multicast group contains no port; value of 10 indicates the multicast group contains port 2; value of 110 indicates the multicast group contains ports 2 and 3; value of 10101 indicates the multicast group contains ports 1, 3 and 5; and so on. |
McType |
Indicates how a multicast group forwards data to CPU. The meanings of its value are: l 0: Do not forward to CPU l 1: Forward to CPU l 2: Forward IGMP packets to the CPU |
1.3.26 set address agedtime
Syntax
set address agedtime agedtimevalue
View
lanswitch view
Parameter
agedtimevalue: the address aged time in seconds. If the value is 0, it means the address will not be aged.
Description
Use the set address agedtime command to set the address aged time of the switch.
Example
# Set the address aged time of the Ethernet switch with the position parameter of “8/1/1-/” as 100 seconds.
[H3C-lanswitch8/1/1-/] set address agedtime 100
Waiting.....
Config address aged time successfully!
& Note:
This command is only applicable to the configuration of S2008B, S2026B and S2016B Ethernet switches on the NMS.
1.3.27 set config-flash
Syntax
set config-flash { write | erase }
View
lanswitch view
Parameter
write: Specifies to write the configuration file to the flash memory.
erase: Specifies to remove the configuration file saved in the flash memory.
Description
Use the set config-flash command to save/remove the configuration file in/from the flash memory.
Example
# Write the current configuration file to the flash memory.
[H3C-lanswitch3/1/3-/] set config-flash write
1.3.28 set gatewayip
Syntax
set gatewayip ip-address
undo set gatewayip ip-address
View
lanswitch view
Parameter
ip-address: the IP address of the gateway.
Description
Use the set gatewayip command to set the IP address of the gateway of the switch. Use the undo set gatewayip command to undo the set.
Example
# Set the IP address of the gateway of the Ethernet switch with the position parameter of “8/1/1-/” as 1.1.1.1.
[H3C-lanswitch8/1/1-/]set gatewayip 1.1.1.1
Waiting.....
Add gateway IP address of LANSWITCH[8/1/1-/] successfully!
# Cancel the IP address 1.1.1.1 of the gateway of the Ethernet switch with the position parameter of “8/1/1-/”.
[H3C-lanswitch8/1/1-/]undo set gatewayip 1.1.1.1
Waiting.....
Cancel gateway IP address of LANSWITCH[8/1/1-/] successfully!
& Note:
This command is only applicable to the configuration of S2008, S2016 and S3026 Ethernet switches on the NMS.
1.3.29 set link-aggregation
Syntax
set link-aggregation port-list { sa | dasa } groupid
undo set link-aggregation
View
lanswitch view
Parameter
port-list: List of ports to be aggregated.
sa: Specifies to enable port aggregating only for source addresses.
dasa: Specifies to enable port aggregating for both source and destination addresses.
groupid: Link-aggregation number. This argument can only be 1 at present.
Description
Use the set link-aggregation command to aggregate multiple ports of an Ethernet switch to an aggregation port, through which a larger capacity can be obtained.
Use the undo set link-aggregation command to remove the configuration.
An S2008B series switch does not support port aggregation; an S2016B series switch can only has its Ethernet0/15 and Ethernet0/16 port aggregated in the dasa mode; an S2026B series switch can only has its Ethernet0/23 and Ethernet0/24 port aggregated in the dasa mode. You can use the query link-aggregation command to verify the set link-aggregation command.
Related command: query link-aggregation.
Example
# Set the ports 15 and 16 of the Ethernet switch with a position parameter of 3/1/3-/ as an aggregation port.
[H3C-lanswitch3/1/3-/] set link-aggregation 15-16 sa 1
1.3.30 set loop-test
Syntax
set loop-test { internal | external } port-list
View
lanswitch view
Parameter
internal | external: Specifies the way to perform loopback test. The internal and external keywords stand for internal loopback test and external loopback test respectively.
port-list: List of ports the specified loopback test method applies to.
Description
Use the set loop-test command to perform specified type of loopback test on specified ports.
Example
# Specify to perform internal loopback test on the port of switch 3/1/3-/.
[H3C-lanswitch3/1/3-/] set loop-test internal 1
1.3.31 set manageip
Syntax
set manageip ip-address netmask [ vlan-id ]
undo set mangeip ip-address netmask [ vlan-id ]
View
lanswitch view
Parameter
ip-address: IP address.
netmask: subnet mask.
vlan-id:the ID of VLAN.
Description
Use the set manageip command to set the management IP address of the switch.
Use the undo set mangeip command to cancel the setting.
Example
# Set the management IP address of the Ethernet switch with the position parameter of “8/1/1-/” to 1.1.1.1.
[H3C-lanswitch8/1/1-/]set manageip 1.1.1.1 255.255.255.0
Waiting.....
Add management IP address of LANSWITCH[8/1/1-/] successfully!
# Cancel the management IP address 1.1.1.1 of the Ethernet switch with the position parameter of “8/1/1-/”.
[H3C-lanswitch8/1/1-/]undo set manageip 1.1.1.1 255.255.255.0 1
Waiting.....
Cancel management IP address of LANSWITCH[8/1/1-/] successfully!
& Note:
This command is only applicable to the configuration of S2008, S2016 and S3026 Ethernet switches on the NMS.
1.3.32 set mirror monitor-port
Syntax
set mirror monitor-port monitor-port [ port-list ]
undo set mirror
View
lanswitch view
Parameter
monitor-port: Monitor port.
port-list: List of ports to be mirrored.
Description
Use the set mirror monitor -port command to set Ethernet port mirroring.
Use the undo set mirror command to remove the configuration.
You cannot specify a trunk port as a monitor port. The existing monitor port is automatically removed if you set a new monitor port. But the mirroring port remains unchanged.
Related command: query mirror.
Example
# Set the port 1 of the Ethernet switch with a position parameter of 3/1/3-/ to be a monitor port.
[H3C-lanswitch3/1/3-/] set mirror monitor-port 1
1.3.33 set port
Syntax
set port port-list vlanid vlan-id-list [ tagged | untagged ]
View
lanswitch view
Parameter
port-list: List of ports to be set. Be sure to provide a valid port number if you want to specify a single port. You can input a single number for the argument, which identifies one object. You can input a character string in such format as 3-7, which identifies objects 3 through 7. You can also use commas to connect single numbers and character strings.
vlanid vlan-id-list [ tagged | untagged ]: Specifies a list of VLAN IDs to be assigned to ports specified by the port-list argument and whether or not these ports are tagged. The VLAN ID values range from 0 to 4,095, of which value of 0 means no VLAN ID is set for the corresponding port. As the VLAN IDs specified by the vlan-id-list argument are one-to-one mapped to the port numbers specified by the port-list argument,, the number of the ports specified by the port-list argument must be the same as that of the VLAN IDs specified by the vlan-id-list argument.
Description
Use the set port command to assign VLAN IDs to ports of an Ethernet switch and specify whether or not these ports are tagged.
To avoid communication between a management device and the Ethernet switches connected to it being unexpectedly terminated, the VLAN ID of an upstream port cannot be set to 2047, which is reserved by the system, and an upstream port cannot be set to be an untagged port.
Related command: query port.
Example
# Configure the port 3 of the Ethernet switch with a position parameter of 3/1/6-/.
[H3C-lanswitch3/1/6-/] set port 3 vlanid 4 untagged
Waiting....
Operating LANSWITCH[3/1/6-/]'s ports successfully!
1.3.34 set priority
Syntax
set priority { high | low } port-list
View
lanswitch view
Parameter
high | low: Sets the priorities of ports to be high or low.
port-list: List of ports to be set.
Description
Use the set priority command to set the priorities of specifies ports.
Related command: set qos-weight.
Example
# Set the port 1 of the Ethernet switch with a position parameter of 3/1/3-/ to be of high priority.
[H3C-lanswitch3/1/3-/] set priority high 1
1.3.35 set qos_weight
Syntax
set qos_weight weight
undo set qos_weight
View
lanswitch view
Parameter
weight: QoS weights of the ports with high priority, in the range of 1 to 10.
Description
Use the set qos_weight command to set the QoS weights of the ports of an Ethernet switch with high priority.
Use the undo set qos_weight command to remove the setting.
The QoS weights of the ports with low priority are fixed to 1. By executing the set qos_weight command, you can have the ratio of the number of packets forwarded by ports with high priority to those with low priority ports is weight : 1.
Related command: set priority.
Example
# Set the QoS weight of ports with high priority of the Ethernet switch to 10.
[H3C-lanswitch3/1/3-/] set qos_weight 10
1.3.36 set superview_password
Syntax
set superview_password password
undo set superview_password
View
lanswitch view
Parameter
password: Password. It is a clear password that is of 1 to 16 characters in length.
Description
Use the set superview_password command to set a password.
Use the undo set superview_password command to remove the setting.
Example
# Set the authentication password of the Ethernet switch with a position parameter of 3/1/3-/ to darling.
[H3C-lanswitch3/1/3-/] set superview_password darling
1.3.37 set sysname
Syntax
set sysname name-word
View
lanswitch view
Parameter
name-word: Domain name, a string that is of no more than 30 characters in length.
Description
Use the set sysname command to set the domain name of an Ethernet switch.
Example
# Set the domain name of the Ethernet switch with a position parameter of 3/1/3-/ to host1.
[H3C-lanswitch3/1/3-/] set sysname host1
1.3.38 set vdsllink
Syntax
set vdsllink port-list uprate uprate-list downrate downrate-list
View
lanswitch view
Parameter
port-list: List of ports to be set.
uprate-list: The uplink rate to be configured, ranging from 1.5 to 12.5. The number of uplink rate values must be consistent with the number of ports.
downrate-list: The downlink rate to be configured, ranging from 4 to 12.5. The number of downlink rates must be consistent with the number of ports.
Description
Use the set vdsllink command to set the VDSL link rate of the port of the switch.
Example
# Set the VDSL link uplink rate and downlink rate of the port 1 of the Ethernet switch with the position parameter of “8/1/1-/” to 2 and 2.
[H3C-lanswitch8/1/1-/] set vdsllink 1 uprate 2 downrate 2
Waiting.....
Config VDSL link successfully!
& Note:
This command is only applicable to configuration of S3026 Ethernet switch on the NMS.
1.3.39 set vlanid
Syntax
set vlanid vlanid port-list
undo set vlanid vlanlist
View
lanswitch view
Parameter
vlanid: VLAN ID.
port-list: List of ports.
vlanlist : List of VLAN IDs.
Description
Use the set vlanid command to set the VLAN attribute for the Ethernet switch and add the specified ports to a specified VLAN.
Use the undo set vlanid command to remove VLAN configuration.
Example
# Add to the VLAN 2 the port 1 through 4 of the Ethernet switch 3/1/3-/.
[H3C-lanswitch3/1/3-/] set vlanid 2 1-4
Waiting.....
Modifying LANSWITCH[3/1/3-/]'s VlanID successfully!
1.3.40 speed port
Syntax
speed port port-list { auto | 10m | 100m| 1000m }
View
lanswitch view
Parameter
port-list: List of ports.
auto: Specifies to operate in automatic negotiation mode.
10m: Specifies to operate at a speed of 10 Mbps.
100m: Specifies to operate at a speed of 100 Mbps.
1000m: Specifies to operate at a speed of 1000 Mbps.
Description
Use the speed port command to set a port rate for specified ports of an Ethernet switch.
Ethernet ports that are of 10/100Base-T can operate at a speed of 10 Mbps or 100 Mbps. Whereas Ethernet optical ports that are of 100M can operate at a speed of 100 Mbps and 1000 Mbps..
Example
# Set the port rate to 10Mbit/s for the port 1 through 4 of the Ethernet switch with a position parameter of 3/1/3-/.
[H3C-lanswitch3/1/3-/] speed port 1-4 10m
Waiting.....