H3C S9500 Command Manual-Release1648[v1.24]-08 System Volume

HomeSupportSwitchesH3C S9500 Series SwitchesReference GuidesCommand ReferencesH3C S9500 Command Manual-Release1648[v1.24]-08 System Volume
14-Cluster Management Commands
Title Size Download
14-Cluster Management Commands 218.93 KB

Table of Contents

Chapter 1 HGMP V1 Configuration Commands. 1-1

1.1 HGMP Server Common Command Set 1-1

1.1.1 auto config. 1-2

1.1.2 backup lswconfig. 1-2

1.1.3 close port 1-3

1.1.4 display hgmpserver 1-4

1.1.5 display lanswitch. 1-6

1.1.6 hgmpport 1-8

1.1.7 hgmpserver 1-8

1.1.8 lanswitch. 1-9

1.1.9 load lswprogram.. 1-10

1.1.10 query hgmpport-mode. 1-10

1.1.11 query port 1-13

1.1.12 query vlan. 1-14

1.1.13 reset lanswitch. 1-17

1.1.14 save lanswitch. 1-18

1.1.15 set lanswitch. 1-18

1.1.16 set lswconfig. 1-19

1.1.17 set lswname. 1-19

1.1.18 spanning-hub. 1-20

1.1.19 upgrade lanswitch. 1-21

1.2 Configuration Commands for S2403F Series Switches. 1-22

1.2.1 loop port 1-22

1.2.2 query ip address. 1-23

1.2.3 set ip address. 1-24

1.2.4 set mac. 1-24

1.2.5 set port 1-25

1.2.6 set vlan. 1-26

1.2.7 set workmode. 1-27

1.3 Configuration Commands for S2008B/S2016B/S2026B/S3026 Series Switches. 1-28

1.3.1 add addritem.. 1-28

1.3.2 delete multicast 1-29

1.3.3 delete uniaddr 1-30

1.3.4 duplex port 1-31

1.3.5 flow port 1-31

1.3.6 lock port 1-32

1.3.7 modify multiaddr 1-33

1.3.8 modify uniaddr 1-34

1.3.9 query active-configuration. 1-34

1.3.10 query address. 1-35

1.3.11 query gatewayip. 1-36

1.3.12 query link-aggregation. 1-36

1.3.13 query manageip. 1-38

1.3.14 query mirror 1-38

1.3.15 query multiaddr 1-39

1.3.16 query port lockstate. 1-40

1.3.17 query rmon. 1-41

1.3.18 query saved-configuration. 1-43

1.3.19 query system.. 1-44

1.3.20 query uniaddr port 1-44

1.3.21 query used addrnum.. 1-45

1.3.22 query vdsllink. 1-46

1.3.23 query vlanstate. 1-47

1.3.24 search multiaddr 1-48

1.3.25 search uniaddr 1-49

1.3.26 set address agedtime. 1-50

1.3.27 set config-flash. 1-51

1.3.28 set gatewayip. 1-51

1.3.29 set link-aggregation. 1-52

1.3.30 set loop-test 1-53

1.3.31 set manageip. 1-54

1.3.32 set mirror monitor-port 1-55

1.3.33 set port 1-55

1.3.34 set priority. 1-56

1.3.35 set qos_weight 1-57

1.3.36 set superview_password. 1-57

1.3.37 set sysname. 1-58

1.3.38 set vdsllink. 1-58

1.3.39 set vlanid. 1-59

1.3.40 speed port 1-60

Chapter 2 NDP Configuration Commands. 2-1

2.1 NDP Configuration Commands. 2-1

2.1.1 display ndp. 2-1

2.1.2 ndp enable. 2-2

2.1.3 ndp timer aging. 2-3

2.1.4 ndp timer hello. 2-4

2.1.5 reset ndp statistics. 2-5

2.1.6 debugging ndp packet 2-5

 


Chapter 1  HGMP V1 Configuration Commands

1.1  HGMP Server Common Command Set

 

&  Note:

l      Commands in the common command set are used to configure switches connected to the management device.

l      To enable you to perform the same operation to multiple objects using one command and administrate switches by their physical positions, two types of newly added arguments are available for HGMP configuration commands, as described as follows:

1         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 identified 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.

2         Switch position parameters. It is necessary to recognize the 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/, where:

port is a port number, which identifies a port of the management device, through which the 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 switch connecting to the switch operating as the HGMP Client.

p2 is a port number, which identifies the port of the layer 2 switch connecting to the switch operating as the HGMP Client.

For example, lanswitch-loc of 3/1/3-/ identifies the layer 1 switch connected directly to the port 3/1/3 of the management device.

Whereas 3/1/3-/2/ identifies a Layer 2 switch connected to port 2 of layer 1 switch. Its root node is the port 3/1/3.

A value of 3/1/3-/2/1/ identifies a layer 3 switch connected to port 1 of a layer 2 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

Parameters

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 commands: query port, query vlan.

Examples

# Configure the switches using the factory settings with VLAN 2000 as the starting VLAN ID.

[H3C-lanswitch3/1/3-/] auto config default 2000

Auto config will clean previous configuration, are you sure? [y/n]y

Waiting......

Auto config LANSWITCH[3/1/3-/] successfully!

1.1.2  backup lswconfig

Syntax

backup lswconfig

View

HGMP view

Parameters

None

Description

Use the backup lswconfig command to save the switch 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 the switch using the configuration information previously saved in the flash memory.

Related commands: set lswconfig.

Examples

# Save the switch configuration information retrieved by the save lswconfig command to the flash memory.

[H3C-hgmp] backup lswconfig

Writing lanswitch configuration to flash......

1.1.3  close port

Syntax

close port port-list

undo close port port-list

View

lanswitch view

Parameters

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

Use the undo close port command to enable the specified ports of the switch.

You can use the query port command to verify these two commands.

Note that the close port command may terminate the communication between the switches and the management device. To avoid this, closing the upstream ports is not allowed. By default, upstream ports are enabled.

Related commands: query port.

Examples

# Close port 1 and port 2 of the switch.

[H3C-lanswitch3/1/3-/] close port 1, 2

Waiting.....

Operate LANSWITCH[3/1/3-/]'s ports successfully!

1.1.4  display hgmpserver

Syntax

display hgmpserver

View

Any view

Parameters

None

Description

Use the display hgmpserver command to display configuration information about an HGMP server.

Examples

# 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

  SlotNo: 1

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

--------------------------------------------------------------

       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  |-|-|-|X|

--------------------------------------------------------------

       SubSlotNo: 3

 -------------------------------------------------------------

                    |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

       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  |-|X|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|

                20  |-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|

                40  |-|-|-|-|-|-|-|X|

--------------------------------------------------------------

  SlotNo: 4

  SlotNo: 5

       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: 6

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

--------------------------------------------------------------

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

--------------------------------------------------------------

       SubSlotNo: 3

 -------------------------------------------------------------

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

The above-mentioned section shows the HGMP server configuration of the switch.

Table 1-1 display hgmpserver command output description

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

Port Hgmp status ('X': Hgmp enable)

The state of Hgmp on the port of the switch ('X': Hgmp enabled)

Port Hgmp status ('-': Hgmp disable)

The state of Hgmp on the port of the switch ('-': Hgmp disabled)

SlotNo: 1

SubSlotNo: 1

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

Parameters

all: Specifies to display all registered switches.

port slot subslot port: Specifies an Ethernet port of the management device to display the 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 switch at a specified position. The lanswitch-loc argument is the position parameter for the switch.

error: Optional; displays the switches that operate improperly after registering.

inactive: Optional; specifies to display switches that are inactive after registering.

Description

Use the display lanswitch command to display the information about specified registered switches. The information includes those about the switches connected to the port. If the switches are connected to the port and registered successfully, information about the management MAC address, device ID, state and so on is displayed.

Examples

# Display the information about all registered switches.

<H3C> display lanswitch all

Lanswitch list.........

------------------                   

No. 1                     

------------------                                          

Position        : LANSWITCH[3/1/3-/]      

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 display lanswitch command output description

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

Parameters

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 a switch port to collect information about it.

Examples

# Enable HGMP on Ethernet 3/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

Parameters

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.

Examples

# Enable HGMP Server on a switch.

[H3C] hgmpserver enable

Start HGMP protocol successfully!

[H3C-hgmp]

1.1.8  lanswitch

Syntax

lanswitch { lanswitch-loc }

View

HGMP view

Parameters

lanswitch-loc: 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 a 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 switches. You can obtain the position parameter of a switch by using the display lanswitch command.

Related commands: display lanswitch.

Examples

# Enter the lanswitch view of the switch directly connected to the 1/1/6- port of the management device.

[H3C-hgmp] lanswitch 1/1/3-/ 

1.1.9  load lswprogram

Syntax

load lswprogram filename

View

HGMP view

Parameters

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 a 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 commands: upgrade lanswitch.

Examples

# 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

Loading program successfully!

1.1.10  query hgmpport-mode

Syntax

query hgmpport-mode

View

HGMP view

Parameters

None

Description

Use the query hgmpport-mode command to display the star topology information about the networks connected to ports of the management device.

To enable the management device to automatically collect information about the switches attached to it, 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.

Use this command to display the star networking information about the switches connected to the ports of the management device. To display a summary of spanning-hub enable, enter the display this command in HGMP view or the display current-configuration command in any other view.

Examples

# 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

       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  |-|X|-|-|

--------------------------------------------------------------

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

--------------------------------------------------------------

       SubSlotNo: 3

 -------------------------------------------------------------

                    |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

       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: 4

  SlotNo: 5

       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: 6

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

--------------------------------------------------------------

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

--------------------------------------------------------------

       SubSlotNo: 3

 -------------------------------------------------------------

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

--------------------------------------------------------------

Table 1-3 query hgmpport-mode command output description

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.

|-|, |X|

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

Parameters

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

Examples

# Display information about the state of lanswitch 1/1/33 port.

[H3C-lanswitch3/1/3-/] 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

Parameters

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 commands: set vlan.

Examples

# Display information about the broadcast domains to which VLAN Index 1 through 10 correspond.

[H3C-lanswitch3/1/3-/] query vlan index 1-10

Waiting.......

===================================================================

Result of inquiring LANSWITCH[[3/1/3-/]'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 query vlan command output description

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/3-/] query vlan vlanid 2000-2005

Waiting.....                                                                  

 ============================================================================  

  Result of inquiring LANSWITCH[3/1/47-/]'s VlanId                              

 ============================================================================  

   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|             

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

 ----------------------------------------------------------------------------  

     2000    |- - - - -|- - - - -|- - - - -|- - - - -|- - - - -|-              

     2001    |- - - - -|- - - - -|- - - - -|- - - - -|- - - - -|-              

     2002    |- - - - -|- - - - -|- - - - -|- - - - -|- - - - -|-              

     2003    |- - - - -|- - - - -|- - - - -|- - - - -|- - - - -|-              

     2004    |- - - - -|- - - - -|- - - - -|- - - - -|- - - - -|-              

     2005    |- - - - -|- - - - -|- - - - -|- - - - -|- - - - -|-              

 ----------------------------------------------------------------------------

Table 1-5 query vlan command output description

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

Parameters

lanswitch-loc: 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 switches connected to the management device. As all the services provided by a switch are terminated when you reset the 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 a switch registration.

Related commands: display lanswitch.

Examples

# Reset the Ethernet switch with a position parameter of 3/1/3-/.

[H3C-hgmp] reset lanswitch 0/1/3-/

1.1.14  save lanswitch

Syntax

save lswconfig lanswitch-loc

View

HGMP view

Parameters

lanswitch-loc: 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 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 commands: backup lswconfig.

Examples

# Save the configuration settings of the switch with a position parameter of 3/1/3-/ to the memory of the management device.

[H3C-hgmp] save lswconfig 3/1/3-/

Waiting.....

1.1.15  set lanswitch

Syntax

set lanswitch lanswitch-loc { inactive | active }

View

HGMP view

Parameters

lanswitch-loc: 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 switch to inactive, or turn an inactive switch to active.

Turning a faulty switch to inactive can prevent its information from being displayed, making the output information more clear.

Normally, only faulty switches can be turned to inactive.

Related commands: display lanswitch.

Examples

# Turn the Ethernet switch connected to the 3/1/3 port to active.

[H3C-hgmp] set lanswitch 3/1/3-/ active

1.1.16  set lswconfig

Syntax

set lswconfig lanswitch-loc asdefault

View

HGMP view

Parameters

lanswitch-loc: 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 commands: auto config.

Examples

# Specify the configuration settings of the Ethernet switch connected to 3/1/3-/ port as the default configuration settings of the Ethernet switches that are of the same model.

[H3C-lanswitch3/1/3-/] set lswconfig 3/1/3-/ asdefault

1.1.17  set lswname

Syntax

set lswname lanswitch-loclist name-list

undo set lswname lanswitch-loclist

View

HGMP view

Parameters

lanswitch-loclist: List of position parameters of the switches to be configured. A 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 switches.

Description

Use the set lswname command to configure aliases for specified switches.

Use the undo set lswname command to remove the aliases of specified switches.

HGMP identifies each switch by the corresponding position parameter. However, it is infeasible for users to locate a managed switch in time using its position parameters. An alternative is to assign aliases to 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.

Examples

# Assign alias of “1#S3526” to the Ethernet switch with a position parameter of 3/1/3-/.

[H3C-hgmp] set lswname 3/1/3-/ 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

Parameters

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 switch using the corresponding switch position parameter. You can enable a management device to automatically retrieve the position parameters of the 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 a switch.)

Examples

# 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? [y/n]y

[H3C-hgmp]

1.1.19  upgrade lanswitch

Syntax

upgrade lanswitch lanswitch-loc { app | bootrom }

View

HGMP view

Parameters

lanswitch-loc: 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 a switch.

app: Specifies to upgrade the applications of a switch.

bootrom: Specifies to upgrade the Boot ROM of a switch.

Description

Use the upgrade lanswitch command to upgrade a specified switch.

It is a heavy burden for maintainers to upgrade switches manually. This command enables them to upgrade specified switches remotely, which improves the maintenance efficiency and eases workload remarkably.

Before upgrading a switch connected to the management device, you need to load the corresponding upgrade program to the management device using the load lswprogram command.

Related commands: load lswprogram.

Examples

# Upgrade the layer 1 Ethernet switch directly connected to 3/1/3 port of the management device.

[H3C-hgmp] upgrade lanswitch 3/1/3-/ app

Upgrade lanswitch, maybe make some fatal mistakes, are you sure?[y/n]n

 Waiting.....

[H3C-hgmp]

1.2  Configuration Commands for S2403F Series Switches

 

&  Note:

The following commands are only applicable to S2403F series switches.

 

1.2.1  loop port

Syntax

loop port port-list

undo loop port port-list

View

lanswitch view

Parameters

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.

Examples

# Enable loopback test on port 2 of the Ethernet switch with a position parameter of 3/1/3-/.

[H3C-lanswitch3/1/3-/] 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

Parameters

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 is displayed, the management VLAN of the switch has no IP address configured.

Related commands: set ip address.

Examples

# Display the IP address, subnet mask and the IP address of the default gateway.

[H3C-lanswitch3/1/3-/] query ip address

Waiting....                                       

Inquiring ip address of LANSWITCH[3/1/3-/] successfully!   

Ip address      : 1.1.3.5                        

          SubMask         : 255.255.0.0          

          Gateway-address : 0.0.0.0                  

Table 1-6 query ip address command output description

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

Parameters

ip-address: IP address to be assigned to the management VLAN of a switch.

mask: Subnet mask of the management VLAN of a 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 commands: query ip address.

Examples

# Set the IP address of the management VLAN of the switch to 1.3.4.2.

[H3C-lanswitch3/1/3-/] set ip address 1.3.4.2 255.255.0.0 1.3.2.1

 Waiting.....                                                     

  Set ip address of LANSWITCH[3/1/3-/] 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

Parameters

mac-address: MAC address to be assigned to the management VLAN of a 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 a switch.

You need to configure the last three hexadecimal digits of the MAC address only. The first three hexadecimal digits are fixed to 00-e0-fc.

Examples

# Set the MAC address of the management VLAN of the switch to 00e0-fc00-1111.

[H3C-lanswitch3/1/3-/] set mac 00e0-fc00-1111

 Waiting.........

  Set Mac-address of LANSWITCH[3/1/3-/] 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

Parameters

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 a switch and specify whether or not these ports are tagged.

To avoid communication between a management device and the 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 commands: query port.

Examples

# Configure the port 3 of the switch with a position parameter of 3/1/3-/.

[H3C-lanswitch3/1/3-/] set port 3 vlanid 4 untagged

 Waiting....

  Operating LANSWITCH[3/1/3-/]'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

Parameters

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 VLAN 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 a switch.

To avoid communication between a management device and the 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 commands: query vlan.

Examples

# Configure VLANs for the switch with a position parameter of 3/1/3-/ as follows: Map VLAN Index 1 to VLAN 3. The VLAN 3 contains port 1, 3 and 4.

[H3C-lanswitch3/1/3-/] set vlan  vlanid 3 1,3,4

 Waiting.....

 Modifying LANSWITCH[3/1/3-/]'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

Parameters

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 a 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 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 switch does not support the modified port rate, the configuration fails.

Related commands: query port.

Examples

# Configure the port 1 of the switch with a position parameter of 3/1/3-/ to operate at a speed of 10 Mbps and in full duplex mode.

[H3C-lanswitch3/1/3-/]set workmode 1 10m-full

 Waiting.....

  Operating LANSWITCH[3/1/3-/]'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

Parameters

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 a switch. An S2008B, S2016B, or S2026B series switch can have only one multicast MAC address added.

Related commands: search uniaddr, search multiaddr.

Examples

# 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/3-/, specifying the entry as an aging entry.

[H3C-lanswitch3/1/3-/] 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

Parameters

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 commands: search multiaddr.

Examples

# Remove the multicast entry with a MAC address of 0100-5e00-0001 of the 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

Parameters

mac-addr: MAC address of the unicast entry to be deleted.

Description

Use the delete uniaddr command to remove a unicast address entry of a switch.

Related commands: search uniaddr.

Examples

# Remove the unicast address entry with a MAC address of 00e0-fc01-1001 on the 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       5     00e0-fc01-1001           -

=======================End===================

ErrId Mean:0-Success

           1-Wrong Mac

           2-VlanId is out of range

           5-Not Found in AddrTab

           other-Unknown Cause

Table 1-7 delete uniaddr command output description

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

Parameters

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 100M bps and in full duplex mode.

Examples

# Set the port 1 of the 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

Parameters

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 a switch performs flow control when the 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.

Examples

# Specify to perform flow control on port 3 of the 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

Parameters

port-list: The port list that requires configuring.

Description

Use the lock port command to disable address learning on the port of the switch.

Examples

# Disable address learning on port 1 of the switch with the position parameter of “3/1/3-/”

[H3C-lanswitch3/1/3-/] 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 switches on NMS.

 

1.3.7  modify multiaddr

Syntax

modify multiaddr mac-addr vlanid port-list mctype

View

lanswitch view

Parameters

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 a switch.

Related commands: search multiaddr.

Examples

# Modify the multicast address entry of the 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

Parameters

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 a switch.

Related commands: search uniaddr.

Examples

# Modify the unicast address entry of the 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

Parameters

None

Description

Use the query active-configuration command to display information about the current configuration of the Ethernet switch.

Examples

# 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 query active-configuration command output description

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

Parameters

None.

Description

Use the query address agedtime command to query the address aged time of the device.

Examples

# Query the address aged time of the switch with the position parameter of “3/1/3-/”

[H3C-lanswitch3/1/3-/] query address agedtime

Waiting.....

  Address item aged time:100

 

&  Note:

This command is only applicable to the configuration S2008B, S2026B and S2016B switches on the NMS.

 

1.3.11  query gatewayip

Syntax

query gatewayip

View

lanswitch view

Parameters

None.

Description

Use the query gatewayip command to query the gateway IP address of the switch.

Examples

# Query the gateway IP address of the switch with the position parameter of “3/1/3-/”.

[H3C-lanswitch3/1/3-/] query gatewayip

Waiting.....

  Inquire gateway IP address of LANSWITCH[3/1/3-/] successfully!

  Gateway IP address : 1.1.1.1

 

&  Note:

This command is only applicable to the configuration of S2008, S2016 and S3026 switches on the NMS.

 

1.3.12  query link-aggregation

Syntax

query link-aggregation

View

lanswitch view

Parameters

None

Description

Use the query link-aggregation command to display information about link aggregation of the switch.

If you have configured link aggregation on the switch, this command displays the link aggregation settings, including port numbers; if you have not configured link aggregation, the command displays “—”.

Related commands: set link-aggregation.

Examples

# Query information about link aggregation of the Ethernet switch with a position parameter of 3/1/3-/.

[H3C-lanswitch3/1/3-/] 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 query link-aggregation command output description

Field

Description

Link-aggregation Num

Link 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

Parameters

vlan-id: VLAN ID.

Description

Use the query manageip command to query the management IP address of the switch.

Examples

# Query the management IP address of the switch with the position parameter of ”3/1/3-/”

[H3C-lanswitch3/1/3-/] query manageip vlan 1

Waiting.....

  Inquire IP address of LANSWITCH[3/1/3-/] successfully!

  VlanId            :[     172]

  ManageIp address  : 172.172.172.172

  NetMask           : 255.255.255.0

 

&  Note:

This command is only applicable to the configuration of S2008, S2016 and S3026 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.

Examples

# 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 query mirror command output description

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

Parameters

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

Examples

# Query the multicast address entries of the VLAN 2 of the 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 query multiaddr command output description

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

Parameters

None.

Description

Use the query port lockstate command to query the lock state of the port of the switch.

Examples

# Query the lock state of the port of the switch with the position parameter of “3/1/3-/”.

[H3C-lanswitch3/1/3-/]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 switches on the NMS.

 

1.3.17  query rmon

Syntax

query rmon port port-list { forward | trans |recv | err | all }

View

lanswitch view

Parameters

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

Examples

# Query all the rmon statistics information about port 1 of the switch with a position parameter of 3/1/3-/.

[H3C-lanswitch3/1/3-/] 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 query rmon command output description

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

Parameters

None

Description

Use the query saved-configuration command to display the startup configuration of an Ethernet switch.

Examples

# 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 query saved-configuration command output description

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

Parameters

None.

Description

Use the query system info command to query the system information of the switch.

Examples

#Query the system information of the switch with the position parameter of “3/1/3-/”

[H3C-lanswitch3/1/3-/] query system info

Waiting.....

  Inquire system info failed!

 

&  Note:

This command is only applicable to configuration of S2008B, S2016B and S2026B switches on the NMS.

 

1.3.20  query uniaddr port

Syntax

query uniaddr port spec-port index shownum

View

lanswitch view

Parameters

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 a switch.

Examples

# Query the unicast address entries of the port 2 of the 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 query uniaddr port command output description

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

Parameters

None

Description

Use the query used addrnum command to query the number of the occupied address entries of the switch.

Examples

# Query the occupied address entries of the 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 query used addrnum command output description

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

Parameters

port-list: The port list that requires configuring.

Description

Use the query vdsllink command to query the VDSL link rate of the port.

Examples

# Query the VDSL link rate of port 1 of the switch with the position parameter of “3/1/3-/”

[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 switches on the NMS.

 

1.3.23  query vlanstate

Syntax

query vlanstate

View

lanswitch view

Parameters

None.

Description

Use the query vlanstate command to query the VLAN state of the switch.

Examples

# Query the VLAN state of the switch with the position parameter of “3/1/3-/”

[H3C-lanswitch3/1/3-/] 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

Parameters

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 a switch.

Examples

# Search an address entry in the multicast address table of the 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 search multiaddr command output description

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

Parameters

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 a switch.

Examples

# Search an address entry in the unicast address table of the 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 search uniaddr command output description

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

Parameters

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.

Examples

# Set the address aged time of the switch with the position parameter of “3/1/3-/” as 100 seconds.

[H3C-lanswitch3/1/3-/] set address agedtime 100

Waiting.....

  Config address aged time successfully!

 

&  Note:

This command is only applicable to the configuration of S2008B, S2026B and S2016B switches on the NMS.

 

1.3.27  set config-flash

Syntax

set config-flash { write | erase }

View

lanswitch view

Parameters

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.

Examples

# 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

Parameters

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.

Examples

# Set the IP address of the gateway of the switch with the position parameter of “3/1/3-/” as 1.1.1.1.

[H3C-lanswitch3/1/3-/]set gatewayip 1.1.1.1

 Waiting.....

  Add gateway IP address of LANSWITCH[3/1/3-/] successfully!

# Cancel the IP address 1.1.1.1 of the gateway of the switch with the position parameter of “3/1/3-/”.

[H3C-lanswitch3/1/3-/]undo set gatewayip 1.1.1.1

 Waiting.....

  Cancel gateway IP address of LANSWITCH[3/1/3-/] successfully!

 

&  Note:

This command is only applicable to the configuration of S2008, S2016 and S3026 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

Parameters

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 a 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 link 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 commands: query link-aggregation.

Examples

# Set the ports 15 and 16 of the 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

Parameters

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.

Examples

# 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

Parameters

ip-address: IP address.

netmask: Subnet mask.

vlan-id: VLAN ID.

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.

Examples

# Set the management IP address of the switch with the position parameter of “3/1/3-/” to 1.1.1.1.

[H3C-lanswitch3/1/3-/]set manageip 1.1.1.1 255.255.255.0

 Waiting.....

  Add management IP address of LANSWITCH[3/1/3-/] successfully!

# Cancel the management IP address 1.1.1.1 of the switch with the position parameter of “3/1/3-/”.

[H3C-lanswitch3/1/3-/]undo set manageip 1.1.1.1 255.255.255.0 1

 Waiting.....

Cancel management IP address of LANSWITCH[3/1/3-/] successfully!

 

&  Note:

This command is only applicable to the configuration of S2008, S2016 and S3026 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

Parameters

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 commands: query mirror.

Examples

# Set the port 1 of the 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

Parameters

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 a switch and specify whether or not these ports are tagged.

To avoid communication between a management device and the 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 commands: query port.

Examples

# Configure the port 3 of the switch with a position parameter of 3/1/3-/.

[H3C-lanswitch3/1/3-/] set port 3 vlanid 4 untagged

 Waiting....

  Operate LANSWITCH[3/1/3-/]'s ports successfully!

1.3.34  set priority

Syntax

set priority { high | low } port-list

View

lanswitch view

Parameters

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 commands: set qos_weight.

Examples

# Set the port 1 of the 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

Parameters

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 commands: set priority.

Examples

# Set the QoS weight of ports with high priority of the 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

Parameters

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.

Examples

# Set the authentication password of the 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

Parameters

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.

Examples

# 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

Parameters

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.

Examples

# Set the VDSL link uplink rate and downlink rate of the port 1 of the switch with the position parameter of “3/1/3-/” to 2 and 2.

[H3C-lanswitch3/1/3-/] set vdsllink 1 uprate 2 downrate 2

Waiting.....

 Config VDSL link successfully!

 

&  Note:

This command is only applicable to configuration of S3026 switch on the NMS.

 

1.3.39  set vlanid

Syntax

set vlanid vlanid port-list

undo set vlanid vlanlist

View

lanswitch view

Parameters

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 switch and add the specified ports to a specified VLAN.

Use the undo set vlanid command to remove VLAN configuration.

Examples

# Add to the VLAN 2 the port 1 through 4 of the 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

Parameters

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 a 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 1,000 Mbps.

Examples

# Set the port rate to 10M bps for the port 1 through 4 of the switch with a position parameter of 3/1/3-/.

[H3C-lanswitch3/1/3-/] speed port 1-4 10m

Waiting.....

  operating LANSWITCH[3/1/3-/]'s ports successfully

 


Chapter 2  NDP Configuration Commands

2.1  NDP Configuration Commands

2.1.1  display ndp

Syntax

display ndp [ interface port-list ]

View

Any view

Parameters

interface port-list: Specified port list, which can be a list of sequentially-numbered ports, or a single port, or a combination of the two. It takes the form of { interface-type interface-number [ to interface-type interface-number ] } &<1-10>, where interface-type is the port type, interface-number is the port number in the format of slot number/port number, and to indicates the port range.

Description

Use the display ndp command to display the global NDP configuration, including the interval at which NDP packets are sent, the aging timer for the NDP information, and the neighbor information of the specified port. If you do not specify any port number, neighbor information of all ports will be displayed.

Examples

# Display NDP configuration on Ethernet 1/1/1.

<H3C> display ndp interface Ethernet1/1/1

Interface: Ethernet1/1/1

    Status: Enabled, Pkts Snd: 1, Pkts Rvd: 1, Pkts Err: 0

    Neighbor 1:  Aging Time: 177(s)

       MAC Address : 00e0-fc38-e8b6

       Host Name   : H3C

       Port Name   : Ethernet1/1/1

       Software Ver: 3.10

      Device Name : H3C S9500

       Port Duplex : AUTO

       Product Ver : S9500-CMW310-r1271

       BootROM Ver : 201

Table 2-1 display ndp command output description

Field

Description

Interface: Ethernet1/1/1

Port number

Status: Enabled

The NDP of a specific port is enabled.

Pkts Snd:

Number of NDP packets sent on the port

Pkts Rvd:

Number of NDP packets received on the port

Pkts Err:

Number of erroneous NDP packets received on the port

Neighbor 1: Aging Time: 177(s)

NDP aging time of the neighbor device connected to the current port

MAC Address

MAC address of the neighbor device

Host name

Host name

Port Name

Port name of the neighbor device

Software Ver

Software version of the neighbor device

Device Name

Device name of the neighbor device

Port Duplex

Simplex/duplex port on the neighbor device

Product Ver

Product version of the neighbor device

BootROM Ver

Boot ROM version of the neighbor device

 

2.1.2  ndp enable

Syntax

In system view:

ndp enable [ interface port-list | all ]

undo ndp enable [ interface port-list | all ]

In Ethernet port view:

ndp enable

undo ndp enable

View

System view, Ethernet port view

Parameters

interface port-list: Specified port list, which can be a list of sequentially-numbered ports, or a single port, or a combination of the two. It takes the form of { interface-type interface-number [ to interface-type interface-number ] } &<1-10>, where interface-type is the interface type, interface-number is the port number in the format of slot number/port number, to indicates the port range, and all indicates the ports on all interface boards that support NDP on the switch.

Description

Use the ndp enable command in system view to enable NDP in the system. With NDP enabled globally, specifying a port number directly enables NDP on the port.

Use the undo ndp enable command in system view to disable NDP in the system.

Use the ndp enable command in Ethernet port view to enable NDP on the port.

Use the undo ndp enable command in Ethernet port view to disable NDP on the port.

You must enable NDP in system view before you can enable NDP on the port. Alternatively, you can use the ndp enable { interface port-list | all } command in system view to enable NDP on the specified port or all ports.

By default, NDP is disabled in the system and on all ports.

Examples

# Enable NDP configuration in the system.

<H3C>system-view

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

[H3C] ndp enable

# Enable NDP configuration on Ethernet port Ethernet 1/1/1.

<H3C>system-view

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

[H3C] interface Ethernet1/1/1

[H3C-Ethernet1/1/1] ndp enable

2.1.3  ndp timer aging

Syntax

ndp timer aging aging-in-secs

undo ndp timer aging

View

System view

Parameters

aging-in-secs: Specifies the aging timer, in seconds, for NDP information; that is, how often the neighbor device information of the port is updated. By default, the aging timer for NDP information is 180 seconds.

Description

Use the ndp timer aging command to specify the period during which the receiving device will hold the NDP packets sent by the current device, namely, the NDP information aging timer, after which the receiving device discards the NDP information.

Use the undo ndp timer aging command to restore the default aging timer of NDP information.

By default, the aging timer for NDP information is 180 seconds.

Upon receipt of NDP packets, from the aging timer information carried in the packets, the device can learn about the aging timer for the NDP information of the neighbor device that sent the packets and discards the NDP information once the aging timer is exceeded.

The aging timer for NDP information must be greater than the interval at which NDP packets are sent; otherwise, the NDP information table will be unstable.

Examples

# Configure the aging timer for NDP information as 60 seconds.

<H3C>system-view

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

[H3C] ndp timer aging 60

2.1.4  ndp timer hello

Syntax

ndp timer hello seconds

undo ndp timer hello

View

System view

Parameters

seconds: Interval, in seconds, at which NDP packets are sent. By default, NDP packets are sent every 60 seconds.

Description

Use the ndp timer hello command to specify the interval at which NDP packets are sent.

Use the undo ndp timer hello command to restore the default interval at which NDP packets are sent.

By default, NDP packets are sent every 60 seconds.

The NDP information of the adjacent node must be updated in real time to ensure that the locally reserved information can be updated in time after the adjacent node is changed. You can change how often NDP information is updated by configuring the command.

The interval at which NDP packets are sent must be less than the aging timer for NDP information; otherwise, the NDP information table will be unstable.

Examples

# Configure NDP packets to be sent every 80 seconds.

<H3C>system-view

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

[H3C] ndp timer hello 80

2.1.5  reset ndp statistics

Syntax

reset ndp statistics [ interface port-list ]

View

User view

Parameters

interface port-list: Specified port list, which can be a list of sequentially-numbered ports, or a single port, or a combination of the two. It takes the form of { interface-type interface-number [ to interface-type interface-number ] } &<1-10>, where interface-type is the interface type, interface-number is the port number in the format of slot number/port number, and to indicates the port range.

Description

Use the reset ndp statistics command to clear NDP statistics and reset the NDP counter.

Examples

# Clear NDP statistics.

<H3C> reset ndp statistics

2.1.6  debugging ndp packet

Syntax

debugging ndp packet [ interface port-list ]

undo debugging ndp packet [ interface port-list ]

View

User view

Parameters

interface port-list: Specified port list, which can be a list of sequentially-numbered ports, or a single port, or a combination of the two. It takes the form of { interface-type interface-number [ to interface-type interface-number ] } &<1-10>, where interface-type is the interface type, interface-number is the port number in the format of slot number/port number, and to indicates the port range.

Description

Use the debugging ndp packet command to enable debugging for NDP packets in the system so that the system outputs packet debugging information when receiving/sending packets.

Use the undo debugging ndp packet command to disable debugging for NDP packets in the system.

Use the debugging ndp packet [ interface port-list ] command to enable NDP packet debugging for the specified port list so that the system outputs packet debugging information when receiving/sending packets on the ports on the list.

Use the undo debugging ndp packet [ interface port-list ] command to disable NDP packet debugging for the specified port list.

By default, NDP packet debugging is disabled in the system and on all ports.

Examples

# Enable packet debugging in the system.

<H3C> debugging ndp packet

# Enable packet debugging on the specified interface.

<H3C> debugging ndp packet interface GigabitEthernet 1/1/1

# Disable packet debugging in the system.

<H3C>undo debugging ndp packet

# Disable packet debugging on the specified interface.

<H3C> undo debugging ndp packet interface GigabitEthernet 1/1/1

 

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