show lldp global...................................................................................................................202
show lldp interface............................................................................................................... 202
show lldp local-information .................................................................................................. 203
show lldp neighbor-information............................................................................................ 203
show lldp statistics............................................................................................................... 203
XI
Preface
This Guide is intended for network administrator to provide referenced information about CLI
(Command Line Interface). The device mentioned in this Guide stands for
TL-SG5428/TL-SG5412F JetStream L2 Managed Switch.
Overview of this Guide
Chapter 1: Using the CLI
Provide information about how to use the CLI, CLI Command Modes, Security Levels and some
Conventions.
Chapter 2: User Interface
Provide information about the commands used to switch between five CLI Command Modes.
Chapter 3:IEEE 802.1Q VLAN Commands
Provide information about the commands used for configuring IEEE 802.1Q VLAN.
Chapter 4: Protocol VLAN Commands
Provide information about the commands used for configuring Protocol VLAN.
Chapter 5: VLAN-VPN Commands
Provide information about the commands used for configuring VLAN-VPN (Virtual Private Network)
function.
Chapter 6: V
Provide information about the commands used for configuring Voice VLAN.
Chapter 7: Private VLAN Commands
Provide information about the commands used for configuring Private VLAN.
Chapter 8: GVRP Commands
Provide information about the commands used for configuring GVRP (GARP VLAN registration
protocol).
Chapter 9: L
oice VLAN Commands
AG Commands
Provide information about the commands used for configuring LAG (Link Aggregation Group).
Chapter 10
Provide information about the commands used for configuring LACP (Link Aggregation Control
Protocol).
Chapter 1
Provide information about the commands used for user management.
: LACP Commands
1: User Manage Commands
1
Chapter 12: Binding Table Commands
Provide information about the commands used for binding the IP address, MAC address, VLAN
and the conn
ected Port number of the Host together.
Chapter 13: ARP Inspection Commands
Provide information about the commands used for protecting the switch from the ARP
cheating or
ARP Attack.
Chapter 14: IP Source Guard Commands
Provide information about the commands used for guarding the IP Source by filtering the IP
packets based on the IP-MAC Binding entries.
Chapter 15: DoS Defend Command
Provide information about the commands used for DoS defend and detecting the DoS attack.
Chapter 16
: IEEE 802.1X Commands
Provide information about the commands used for configuring IEEE 802.1X function.
Chapter 17: Log Comma
nds
Provide information about the commands used for configuring system log.
Chapter 18: SSH Commands
Provide information about the commands used for configuring and managing SSH (Security
Shell).
Chapter 19: SSL Commands
Provide information about the commands used for configuring and managing SSL (Secure
Sockets Layer).
Chapter 20: Address Commands
Provide information about the commands used for Address configuration.
Chapter 21: System Commands
Provide information about the commands used for configuring the System information and System
IP, reboot and reset the switch, upgrade the switch system and other operations.
Chapter 22: Ethernet Configuration Commands
Provide information about the commands used for configuring the Bandwidth Control, Negotiation
Mode, and Storm Control for Ethernet ports.
Chapter 23: QoS Commands
Provide information about the commands used for configuring the QoS function.
Chapter 24: Port Mirror Commands
Provide information about the commands used for configuring the Port Mirror function.
Chapter 25: Port isolation Commands
Provide information about the commands used for configuring the Port isolation function.
2
Chapter 26: ACL Commands
Provide information about the commands used for configuring the ACL (Access Control List).
Chapter 27: MSTP Commands
Provide information about the commands used for configuring the MSTP (Multiple Spanning Tree
Protocol).
Chapter 28: IGMP Commands
Provide information about the commands used for configuring the IGMP Snooping (Internet Group
Management Protocol Snooping).
Chapter 29: SNMP Commands
Provide information about the commands used for configuring the SNMP (Simple Network
Management Protocol) functions.
Chapter 30: Cluster Commands
Provide information about the commands used for configuring the Cluster Management function.
Chapter 31: LLDP Commands
Provide information about the commands used for configuring the LLDP function.
3
Chapter 1 Using the CLI
1.1 Accessing the CLI
You can log on to the switch and access the CLI by the following two methods:
1. Log on to the switch by the console port on the switch.
2. Log on to the switch remotely by a Telnet or SSH connection through an Ethernet port.
1.1.1 Logon by a console port
To log on to the switch by the console port on the switch, please take the following steps:
1. Connect the PCs or Terminals to the console port on the switch by a provided cable.
2. Click Start →
open the Hyper Terminal as the figure 1-1 shown.
All Programs→Accessories→Communications→Hyper Terminal to
Figure 1-1 Open
3. The Connection Description Window will prompt as figure1-2. Enter a name into the
Name field and click OK.
Hyper Terminal
4
Figure 1-2 Connection Description
4. Select the port to connect in figure 1-3, and click OK.
Figure 1-3 Select the port to connect
5. Configure the port selected in the step above as the following figure1-4 shown. Configure Bits
per second as 38400, Data bits as 8, Parity as None, Stop bits as 1, Flow control as None,
and then click OK.
5
Figure 1-4 Port Settings
6. Type the User name and Password in the Hyper Terminal window, the factory default value for
both of them is admin. The DOS prompt” TP-LINK>” will appear after pressing the Enter
button as figure1-5 shown. It indicates that you can use the CLI now.
Figure 1-5 Log in the Switch
1.1.2 Logon by Telnet
To log on to the switch by a Telnet connection, please take the following steps:
1. Make sure the switch and the PC are in the same LAN.
2. Click Start → Run to open the Run window.
6
Figure 1-6 Open the Run window
3. Type cmd in the prompt Run window as figure 1-7 and click OK.
Figure 1-7 Run Window
4. Type telnet 192.168.0.1 in the command prompt shown as figure1-8, and press the Enter
button.
Figure 1-8 Connecting to the Switch
7
5. Type the User name and Password (the factory default value for both of them is admin) and
press the Enter button, then you can use the CLI now, which is shown as figure1-9.
Figure 1-9 Log in the Switch
1.2 CLI Command Modes
The CLI is divided into different command modes: User EXEC Mode, Privileged EXEC Mode,
Global Configuration Mode, Interface Configuration Mode and VLAN Database (VLAN
Configuration Mode). Interface Configuration Mode can also be divided into Interface Ethernet,
Interface link-aggregation and some other modes, which is shown as the following diagram.
The following table gives detailed information about the Accessing path, Prompt of each mode and
how to exit the current mode and access the next mode.
8
Mode Accessing Path Prompt
Primary mode once
User EXEC
Mode
Privileged
EXEC Mode
Global
Configuration
it is connected with
the switch.
Use the enable
command to enter
this mode from User
EXEC mode.
Use the configure
command to enter
this mode from
Privileged EXEC
mode.
TP-LINK>
TP-LINK#
TP-LINK(config)#
Mode
Logout or Access the next
mode
Use the exit command to disconnect
the switch (except that the switch is
connected through the Console port).
Use the enable command to access
Privileged EXEC mode.
Use the exit command to disconnect
the switch (except that the switch is
connected through the Console port).
Enter the disable command to return
to User EXEC mode.
Enter configure command to access
Global Configuration mode.
Use the exit or the end command or
press Ctrl+Z to return to Privileged
EXEC mode.
Use the interface type number
command to access interface
Configuration mode.
Use the vlan database to access
VLAN Configuration mode.
Interface
Configuration
Mode
VLAN
Configuration
Mode
Use the interface
type number
command to enter
this mode from
Global Configuration
mode.
Use the vlan database command
to enter this mode
from Global
Configuration mode.
TP-LINK(config-if)#
TP-LINK(config-vlan)#
Use the end command or press Ctrl+Z
to return to Privileged EXEC mode.
Enter exit command to return to
Global Configuration mode.
A port number must be specified in the
interface command.
Use the end command or press Ctrl+Z
to return to Privileged EXEC mode.
Enter the exit command to return to
Global configuration mode.
Note:
1. The user is automatically in User EXEC Mode after the connection between the PC and the
switch is established by a console port or by a telnet connection.
2. Each command mode has its own set of specific commands. To configure some commands,
you should access the corresponding command mode firstly.
Global Configuration Mode: In this mode, global commands are provided, such as the
Spanning Tree, Schedule Mode and so on.
Interface Configuration Mode: In this mode, users can configure one or several ports,
different ports corresponds to different commands
9
a). Interface Ethernet: Configure parameters for an Ethernet port, such as Duplex-mode,
flow control status.
b). Interface range Ethernet: The commands contained are the same as that of the
Interface Ethernet. Configure parameters for several Ethernet ports.
c). Interface link-aggregation: Configure parameters for a link-aggregation, such as
broadcast storm.
d). Interface range link-aggregation: Configure parameters for multi-trunks.
e). Interface vlan: Configure parameters for the vlan-port.
Vlan Configuration Mode: In this mode, users can create a VLAN and add a specified
port to the VLAN.
3. Some commands are global, that means they can be performed in all modes:
show: display all information of switch, for example: statistic information, port information,
VLAN information.
history: Display the commands history.
1.3 Security Levels
This switch’s security is divided into two levels: User level and Admin level.
User level only allows users to do some simple operations in User EXEC Mode; Admin level
allows you to monitor, configure and manage the switch in Privileged EXEC Mode, Global
Configuration Mode, Interface Configuration Mode and VLAN Configuration Mode.
Users get the privilege to the User level once connecting console port with the switch or logging in
by Telnet. However, Guest users are restricted to access the CLI.
Users can enter Privileged EXEC mode from User EXEC mode by using the enable command. In
default case, no password is needed. In Global Configuration Mode, you can configure password
for Admin level by enable password command. Once password is configured, you are required to
enter it to access Privileged EXEC mode.
1.4 Conventions
1.4.1 Format Conventions
The following conventions are used in this Guide:
Items in square brackets [ ] are optional
10
Items in braces { } are required
Alternative items are grouped in braces and separated by vertical bars. For example: speed
{10 | 100 | 1000 }
Bold indicates an unalterable keyword. For example: show logging
Normal Font indicates a constant (several options are enumerated and only one can be
selected). For example: switchport type { access | trunk | general }
Italic Font indicates a variable (an actual value must be assigned). For example: bridge
aging-time aging-time
1.4.2 Special Characters
You should pay attentions to the description below if the variable is a character string:
These six characters ” < > , \ & can not be input.
If a blank is contained in a character string, single or double quotation marks should be used,
for example ’hello world’, ”hello world”, and the words in the quotation marks will be identified
as a string. Otherwise, the words will be identified as several strings.
1.4.3 Parameter Format
Some parameters must be entered in special formats which are shown as follows:
MAC Address must be enter in the format of xx:xx:xx:xx:xx:xx
One or several values can be typed for a port-list or a vlan-list using comma to separate. Use
a hyphen to designate a range of values, for instance, 1,3-5,7 indicates choosing 1,3,4,5,and
7.
11
Chapter 2 User Interface
enable
Description
The enable command is used to access Privileged EXEC Mode from User
EXEC Mode.
Syntax
enable
Command Mode
User EXEC Mode
Example
If you have set the password to access Privileged EXEC Mode from User EXEC
Mode:
TP-LINK>enable
Enter password:
TP-LINK#
enable password
Description
The enable password command is used to set the password for users to
access Privileged EXEC Mode from User EXEC Mode. To return to the default
configuration, please use no enable password command.
Syntax
enable password password
no enable password
Parameter
password —— super password , which contains 16 characters at most,
composing digits, English letters and underdashes only. By default, it is empty.
Command Mode
Global Configuration Mode
Example
Set the super password as admin to access Privileged EXEC Mode from User
EXEC Mode:
TP-LINK(config)# enable password admin
12
disable
Description
Syntax
Command Mode
Example
The disable command is used to return to User EXEC Mode from Privileged
EXEC Mode.
disable
Privileged EXEC Mode
Return to User EXEC Mode from Privileged EXEC Mode:
TP-LINK# disable
TP-LINK>
configure
Description
Syntax
Command Mode
Example
The configure command is used to access Global Configuration Mode from
Privileged EXEC Mode.
configure
Privileged EXEC Mode
Access Global Configuration Mode from Privileged EXEC Mode:
TP-LINK# configure
TP-LINK(config)#
exit
Description
The exit command is used to return to the previous Mode from the current
Mode.
Syntax
exit
13
end
Command Mode
Any Configuration Mode
Example
Return to Global Configuration Mode from Interface Configuration Mode, and
then return to Privileged EXEC Mode:
TP-LINK(config-if)# exit
TP-LINK(config)#exit
TP-LINK#
Description
The end command is used to return to Privileged EXEC Mode.
Syntax
end
Command Mode
Any Configuration Mode
Example
Return to Privileged EXEC Mode from Interface Configuration Mode:
TP-LINK(config-if)#end
TP-LINK#
14
Chapter 3 IEEE 802.1Q VLAN Commands
VLAN (Virtual Local Area Network) technology is developed for the switch to divide the LAN into
multiple logical LANs flexibly. Hosts in the same VLAN can communicate with each other,
regardless of their physical locations. VLAN can enhance performance by conserving bandwidth,
and improve security by limiting traffic to specific domains.
vlan database
Description
The vlan database command is used to access VLAN Configuration Mode for
creating, deleting 802.1Q VLAN and other operations.
Syntax
vlan database
vlan
Command Mode
Global Configuration Mode
Example
Access VLAN Configuration Mode:
TP-LINK(config)# vlan database
TP-LINK(config-vlan)#
Description
The vlan command is used to create IEEE 802.1Q VLAN. To delete the IEEE
802.1Q VLAN, please use no vlan command.
Syntax
vlan vlan-id-list
no vlan vlan-id-list
Parameter
vlan-id-list ——VLAN ID, ranging from 2 to 4094.
Command Mode
VLAN Configuration Mode
15
Example
Create a VLAN, the vid of which is 12:
TP-LINK(config)# vlan database
TP-LINK(config-vlan)#vlan 12
interface vlan
Description
The interface vlan command is used to access VLAN Interface Mode to
configure the specified VLAN.
Syntax
interface vlan vlan-id
Parameter
vlan-id ——VLAN ID, ranging from 1 to 4094.
Command Mode
Global Configuration Mode
Example
Configure the VLAN2:
TP-LINK(config)# interface vlan 2
TP-LINK(config-if)#
description
Description
The description command is used to assign a description string to a VLAN. To
clear the description, please use no description command.
Syntax
description descript
no description
Parameter
descript ——String to describe the VLAN, which contains 16 characters at most.
Command Mode
Interface Configuration Mode(interface vlan)
16
Example
Specify the description string of the VLAN 2 as “vlan2”:
TP-LINK(config)# interface vlan 2
TP-LINK(config-if)#description vlan2
switchport type
Description
The switchport type command is used to configure the Link Types for the
ports.
Syntax
switchport type { access | trunk | general }
Parameter
access | trunk | general —— Link Types. There are three Link Types for the
ports.