// This command is used to enter the vlan1 interface mode from the global
mode, and the exit command is used to exit the vlan1 interface mode.
1.2 System information
Function Brief
This module is used to display the device name, software version,
hardware version, MAC address, compile time, run time, and current system
time.
1.2.1 show version
Command Description
This command is used to display the version information, including
the device name, software version, hardware version, MAC address,
compile time, system run time, current version information, and
backup version information.
Parameter
None
Default
None
Command Mode
Privileged mode(To enter the privileged mode, connect a serial port,
and enter the user name and password. To exit the privileged mode, run the
exit command.)
Example
username: admin
password: admin(The password is hidden.)
switch# show version
1.2.2 show clock
Command Description
This command is used to display the current system time.
Parameter
None
Default
None
Command Mode
Privileged mode
Example
switch# show clock
1.3 Log information
Function Brief
This module is used to display system logs when the system is
running, so that maintenance staff can conveniently analyze relevant
problems.
1.3.1 show logging
Command Description
This command is used to display the current log of the switch.
Parameter
None
Default
None
Command Mode
Privileged mode
Example
switch# show logging
1.4 Port statistics
Function Brief
The port statistics module is used to display the number of
sent/received packets, sent/received bytes, and number of sent/received
error packets on every port.
<cr>
It is used to display data statistics of all ports.
G<1-24>
It is used to display data statistics
1.4.1 show interface
Command Description
This command is used to display the packet statistics of one or more
ports.
Parameter
Default
None
Command Mode
Privileged mode
Example
switch# show interface G1
1.5 LACP status
Function Brief
This function module is used to display the LACP port configurations.
1.5.1 lacp state
Command Description
This command is used to display the status of the LACP system.
Parameter
None
Default
None
Command Mode
bgp
View the BGP routing information
connected
View the connected routing information
ospf
View the ospf routing information
rip
View the rip routing information
static
View the static routing information
A.B.C.D
View contains specific IP routing information
A.B.C.D/M
View of a routing information
summary
View all routing summary information
Global configuration mode
Example
switch(config)# lacp state
1.6 View route
Function Brief
The function module is used to display switch routing information.
1.6.1 show ip route
Command Description
This command is used to display the router information.
Parameter
Default
Command Mode
Example
switch# show ip route connected
None
Privileged mode
1.7 ERPS-RING status
Function Brief
The function module is used to display erps information.
1.7.1 show erps
Command Description
This command is used to display the erps information.
Parameter
None
Default
None
Command Mode
Privileged mode
Example
switch# show erps
1.8 Power status
Function Brief
The function module is used to display power supply information.
1.8.1 show power
Command Description
This command is used to display the power supply information.
Parameter
None
Default
None
Command Mode
Privileged mode
Example
switch# show power
2. System Setting Commands
2.1 IP config
IP address configuration commands include:
ip address
ip address dhcp
ip address old_ip A.B.C.D/M new_ip A.B.C.D/M
show ip interface
notice:A.B.C.D/M,Example:192.168.1.1/24
Function Brief
The IP configuration module is used to add, delete or display the
interface IP information of a switch.
2.1.1 ip address
Command Description
Configure IP port for A.B.C.D/M
no ip address A.B.C.D/M
//Delete ports IP A.B.C.D/M
Parameter
None
Default
VLAN 1 interface
Command Mode
VLAN interface configuration mode
Example
switch(config)# interface vlanif1
switch(config-vlanif1)#ip address 192.168.100.1/24
switch(config-vlanif1)#no ip address 192.168.100.1/24
2.1.2 ip address dhcp
Command Description
Configure IP port for automatic access (network DHCP server will
assign a dynamic IP) for the switch port.
no ip address dhcp
//Disables the IP of the interface to access automatically.
Parameter
None
Default
Open port
Command Mode
Interface configuration mode
Example
switch(config)# interface vlanif1
switch(config-vlanif1)#ip address dhcp
switch(config-vlanif1)#no ip address dhcp
2.1.3 ip address old_ip
Command Description
ip address old_ip A.B.C.D/M new_ip A.B.C.D/M
Change the IP configuration of the interface (amend the old_ip to
new_ip)
Parameter
None
Default
None
Command Mode
Interface configuration mode
Example
switch(config)# interface vlanif1
switch(config-vlanif1)#ip address old_ip 192.168.255.1/24 new_ip
192.168.10.1/24
2.1.4 show interface
Command Description
This command is used to display the interface IP information.
Parameter
None
Default
Enabled port
Command Mode
Privileged mode and Global configuration mode
guest
permissions for all users of the guest is limited to check the
system status information under the menu bar
admin
permissions for the admin user, you can add, modify, delete
all configuration
Example
switch(config)#show interface vlanif1
switch#show interface vlanif1
2.2 User config
User configuration commands include:
username name
show user
Note: name indicates the user name, which is a string of 1 to 32
characters. password indicates the password, which is a string of 1 -
32 characters.level indicates the user level, which ranges from 1
(lowest management rights) to 15 (highest management rights).
Function Brief
This function module is used to display, modify or add user
information so as to protect the switch configurations.
2.2.1 username name
Command Description
username name password passwd privilege level
//This command is used to add a user, modify the password of an existing
user, modify the management rights of an existing user, or modify the
password and management rights of an existing user.
no username name
//This command is used to delete a known user.
Parameter
Default
admin
Command Mode
Global configuration mode
Example
switch(config)#username test password test
//Add a user "test", it is the default password is testing and rights: the
guest.
switch(config)#username test password test privilege admin
//This command is used to select the SNTP server to connect.
Parameter
None
Default
None
Command Mode
Global configuration mode
Example
switch(config)#sntp connect 210.21.196.6
2.3.5 sntp timezone set
Command Description
switch(config)# sntp timezone set<0-39>
//This command is used to select the time zone.
Parameter
Default
0
Command Mode
Global configuration mode
Example
switch(config)#sntp timezone set 32
/ /Modify the time zone east eight area.
2.3.6 local-time date
Command Description
local-time date YYYY-MM-DD time HH:MM:SS
//Set the local time year - month - day hours: minutes: seconds
Parameter
None
Default
None
Command Mode
Global configuration mode
Example
switch(config)# local-time date 2015-3-18 time 12:12:12
// Note: due to the chip is limited, can only be set after January 1,1970.
parameter
Parameters of the command mode
auto
Automatic negotiation.
full
Full duplex
half
Half duplex
3. Port configuration commands
3.1 Port config
Port configuration commands include:
duplex
speed
flow-control
shutdown
description
Function Brief
This module is used to configure basic parameters related to ports of
a switch. These basic parameters directly influence the port working mode.
3.1.1 duplex
Command Description
duplex {auto | full | half }
no duplex
//These commands are used to set the port rate mode.
Parameter
Default
By default, the duplex modes of all ports are Auto. For an optical port,
the duplex mode is always set to full.
Command Mode
Interface configuration mode
Note: Light port duplex is fixed, is a full-duplex mode (full).
Example
// This command is used to modify the duplex mode of the G1 port.
By default, the speed mode is set to auto for an electric port,
10000M for a f-port fiber port
Command Mode
Interface configuration mode
Note:
Port speed of light is coerced into 1000M and 10000M.
Electricity mouth can only set auto, 10M and 100M
Example
// The port rate of G1 is set to 100M.
switch(config)# interface G1
switch(config-G1)# speed 100
3.1.3 flow-control
Command Description
flowctrl
no flowctrl
//This command is used to enable or disable the flow control function of a
port.
Parameter
None
Default
The flow control function is enable by default
Command Mode
Interface configuration mode
Example
//enable the function.
switch(config-G1)# flowctrl
3.1.4 shutdown
Command Description
shutdown
no shutdown
//This command is port switch.
Parameter
None
Default
The port is enabled by default.
Command Mode
Interface configuration mode
Example
//This command is used to disable a port.
switch(config)#interface G1
switch(config-G1)# shutdown
3.1.5 description
Command Description
This command is to configure the port description information,
convenient for management (composed of letters, Numbers and
underscore).
Parameter
None
Default
None
Command Mode
Interface configuration mode
Example
switch(config)#interface G1
switch(config-G1)# description A1_1
3.2 Rate limit
Function Brief
It is used to configure the speed limiting policy of a port to limit the
ingress and egress rates of all packets of the port.
1-10000000
Port speed range is 1-10000000kbps
Parameter
Parameters of the command mode
3.2.1 rate-limit
Command Description
rate-limit {1-10000000 } egress/ingress
no rate-limit egress/ingress
//Configure port egress / ingress speed limit function, use the no form, port restore
default settings .
Parameter
Default
0
Command Mode
Interface configuration mode
Example
//The speed limit exports 10000 Kbps
switch(config)#interface G1
switch(config-G1)# rate-limit 10000 egress
3.3 Port mirroring
Function Brief
Port mirroring is also called port monitoring. Port monitoring is a data
packet acquisition technology. It can be configured on a switch to copy data
packets from one or more ports (mirror source ports) to a specified port
(mirror destination port). The destination port is connected to a host installed
with the packet analysis software. The software analyzes the collected
packets to implement network monitoring and eliminating network faults.
Link aggregation is used to form a logical port using multiple physical
ports of a switch. Multiple links within the same aggregation group are
deemed as a larger bandwidth logical link.
By link aggregation, the communication traffic is shared among
member ports of the aggregation group, and thus the bandwidth is increased.
Besides, member ports of the same aggregation share dynamic backups
with each other, and thus the link reliability is improved.
3.4.1 trunk
Member ports of the same aggregation group shall have the same
configurations. The configurations mainly include STP, QoS, VLAN, port
attribute, MAC address learning, ERPS configuration, loop protection
configuration, mirror, 802.1x, IP filtering, MAC filtering, port isolation, etc.
Global configuration mode
Example
switch(config)# interface trunk 1
switch(config)# interface G1
switch(config-G1)# trunk 1
3.4.2 load-balance
Command Description
load-balance
//This command is to set up static aggregation of load balance mode.
Parameter
Default
Disable
Command Mode
Interface configuration mode
Example
//This command is to set up load balancing model based on source and
destination MAC.
switch(config)# load-balance both-mac
3.4.3 lacp enable | disable
Command Description
lacp enable
//This command is used to enable dynamic aggregation of ports.
lacp disable
//This command is used to disable dynamic aggregation of ports.
Parameter
None
Default
Disable
Command Mode
Interface configuration mode
Example
switch(config)#interface G1
switch(config-G1)# lacp disable
3.4.4 lacp active | passive
Command Description
lacp active
lacp passive
//This command is used to configure the role of an LACP port.
//It specifies the role of a port, which is active or passive.
Parameter
None
Default
active
Command Mode
Interface configuration mode
Example
switch(config)#interface G1
switch(config-G1)# lacp active
3.4.5 lacp key
Command Description
LACP key refers to the management key value of a dynamic
aggregation port and determines whether the port can be added into
an aggregation port. LACP protocol generates an operation key
based on the port configuration (that is, the rate, duplex, basic
configuration and management key). Members of a dynamic
aggregation group can only be aggregated when they have the
same operation key.
Parameter
<1-65535>: The key value is manually specified. The value ranges
from 1 to 65535.
auto: The key value is automatically negotiated.
Default
auto
Command Mode
Interface configuration mode
Example
switch(config)# interface G1
switch(config-G1)# lacp key 100
3.4.6 lacp port-priority
Command Description
lacp port-priority <1-32768>
//This command is used to configure the priority of an LACP port.
Parameter
<1-32768>: It specifies the priority range. A smaller value indicates a
higher priority.
Default
0
Command Mode
Interface configuration mode
Example
switch(config)# interface G1
switch(config-G1)# lacp port-priority 100
3.4.7 example
The link aggregation is used to increase the bandwidth of device-level serial
ports and share loads based on the source/destination MAC address.
After aggregation, two links form one logical link and thus the
bandwidth is doubled. Besides, the load is shared based on the source or
destination MAC address. When one link in the aggregation group is
disconnected, the packet is sent through another link, and thus the
communication is not interrupted.
Ethernet is a shared communication media based on the Carrier
Sense Multiple Access/Collision Detect (CSMA/CD) technology. A LAN built
using the Ethernet technology is not only a collision domain, but also a
broadcast domain. When the number of hosts on the network is large, the
collision becomes serious, broadcast flooding occurs, and the performance
is significantly degraded. Even worse, the network is unavailable.
Deployment of bridges or L2 switches on the Ethernet can resolve the
problem of serous collision, but still cannot isolate broadcast packets. To
address this issue, the Virtual Local Area Network (VLAN) technology
emerges. This technology can divide a physical LAN into multiple logical
LANs, that is, VLANs. Hosts located in the same VLAN can directly
communicate with each other, but hosts located in different VLANs cannot
communicate with each other. In this way, broadcast packets are confined in
the same VLAN. That is, each VLAN is a broadcast domain.
Advantages of VLAN are as follows:
1) Improve network performance. Broadcast packets are confined in the
VLAN, which effectively controls broadcast storms of the network, saves the
network bandwidth, and improves the network processing capability.
2) Enhance network security. Devices in different VLANs cannot access
each other, and hosts in different VLANs cannot directly communicate with
each other. Packets must be forwarded at L3 through network layer devices,
such as routers or L3 switches.
3) Simplify network management. Hosts in the same virtual work group are
not limited to a certain physical range, which simplifies network management,
and makes it convenient for people in different areas to set up work groups.
Parameter
Parameters of the command mode
access
Access mode
trunk
Trunk mode
Hybrid
Hybrid mode
Parameter
Parameters of the command mode
Vlan-id
Vlan id.Value range:1-4094.
4.1.1 switchport mode
Command Description
switchport mode {access | trunk | hybrid }
//This command is to configure the port mode.
Parameter
Default
Access mode
Command Mode
Interface configuration mode
A switch port supports the following modes:
Access mode: The port belongs to only one VLAN, and only
sends and receives untagged Ethernet frames.
Trunk mode: The port is connected with other switches, and can
receive and send tagged Ethernet frames.
Hybrid mode: The port can be connected to a PC or a switch and
router. (The hybrid mode is the combination of the access mode
and the trunk mode.)
Example
//The port is configured to VLAN trunk /hybrid/access.