TP-LINK TL-SG3216, TL-SG3424 User Manual

TL-SG3216/TL-SG3424
JetStream L2 Lite Managed Switch
Rev: 1.0.2
1910010511
COPYRIGHT & TRADEMARKS
Specifications are subject to change without notice. is a registered trademark of
TP-LINK TECHNOLOGIES CO., LTD. Other brands and product names are trademarks or
registered trademarks of their respective holders.
No part of the specifications may be reproduced in any form or by any means or used to make any
derivative such as translation, transformation, or adaptation without permission from TP-LINK
TECHNOLOGIES CO., LTD. Copyright © 2011 TP-LINK TECHNOLOGIES CO., LTD. All rights
reserved.
http://www.tp-link.com
CONTENTS
Preface .............................................................................................................. 1
Chapter 1 Using the CLI ....................................................................................... 4
1.1 Accessing the CLI ...........................................................................................................4
1.1.1 Logon by a console port .......................................................................................4
1.1.2 Logon by Telnet ....................................................................................................6
1.2 CLI Command Modes .....................................................................................................8
1.3 Security Levels .............................................................................................................10
1.4 Conventions.................................................................................................................. 11
1.4.1 Format Conventions ........................................................................................... 11
1.4.2 Special Characters.............................................................................................. 11
1.4.3 Parameter Format............................................................................................... 11
Chapter 2 User Interface .................................................................................... 12
enable....................................................................................................................................12
enable password ...................................................................................................................12
disable ...................................................................................................................................13
configure................................................................................................................................13
exit.........................................................................................................................................13
end ........................................................................................................................................14
Chapter 3 IEEE 802.1Q VLAN Commands ........................................................ 15
vlan database ........................................................................................................................15
vlan........................................................................................................................................15
interface vlan .........................................................................................................................16
description .............................................................................................................................16
switchport type ......................................................................................................................17
switchport allowed vlan..........................................................................................................17
switchport pvid.......................................................................................................................18
switchport general egress-rule ..............................................................................................18
show vlan ..............................................................................................................................19
show interface switchport ...................................................................................................... 19
Chapter 4 MAC VLAN Commands ..................................................................... 20
mac-vlan add.........................................................................................................................20
mac-vlan remove...................................................................................................................20
mac-vlan modify ....................................................................................................................21
II
show mac-vlan ......................................................................................................................21
Chapter 5 Protocol VLAN Commands............................................................... 22
protocol-vlan template ........................................................................................................... 22
protocol-vlan vlan ..................................................................................................................22
show protocol-vlan template..................................................................................................23
show protocol-vlan vlan .........................................................................................................23
Chapter 6 Voice VLAN Commands.................................................................... 25
voice-vlan enable ..................................................................................................................25
voice-vlan aging-time ............................................................................................................25
voice-vlan priority ..................................................................................................................26
voice-vlan oui ........................................................................................................................26
switchport voice-vlan mode ...................................................................................................27
switchport voice-vlan security................................................................................................28
show voice-vlan global ..........................................................................................................28
show voice-vlan oui ...............................................................................................................28
show voice-vlan switchport....................................................................................................29
Chapter 7 GVRP Commands.............................................................................. 30
gvrp .......................................................................................................................................30
gvrp (interface) ......................................................................................................................30
gvrp registration.....................................................................................................................31
gvrp timer ..............................................................................................................................31
show gvrp global ...................................................................................................................32
show gvrp interface ...............................................................................................................33
Chapter 8 LAG Commands ................................................................................ 34
interface link-aggregation ......................................................................................................34
interface range link-aggregation ............................................................................................34
link-aggregation.....................................................................................................................35
link-aggregation hash-algorithm ............................................................................................36
description .............................................................................................................................36
show interfaces link-aggregation ...........................................................................................37
Chapter 9 LACP Commands .............................................................................. 38
lacp........................................................................................................................................38
lacp (interface).......................................................................................................................38
lacp admin-key ......................................................................................................................39
III
lacp system-priority ...............................................................................................................39
lacp port-priority.....................................................................................................................40
show lacp ..............................................................................................................................40
show lacp interface................................................................................................................41
Chapter 10 User Manage Commands.................................................................. 42
user add ................................................................................................................................42
user remove ..........................................................................................................................43
user modify status .................................................................................................................43
user modify type ....................................................................................................................44
user modify password............................................................................................................44
user access-control disable ...................................................................................................45
user access-control ip-based.................................................................................................45
user access-control mac-based.............................................................................................46
user access-control port-based .............................................................................................46
user max-number ..................................................................................................................47
user idle-timeout....................................................................................................................47
show user account-list...........................................................................................................48
show user configuration.........................................................................................................48
Chapter 11 Binding Table Commands................................................................. 50
binding-table user-bind ..........................................................................................................50
binding-table remove .............................................................................................................51
dhcp-snooping.......................................................................................................................51
dhcp-snooping global ............................................................................................................52
dhcp-snooping information enable ........................................................................................53
dhcp-snooping information strategy ......................................................................................53
dhcp-snooping information user-defined ...............................................................................54
dhcp-snooping information remote-id .................................................................................... 54
dhcp-snooping information circuit-id......................................................................................55
dhcp-snooping trusted ...........................................................................................................55
dhcp-snooping mac-verify .....................................................................................................56
dhcp-snooping rate-limit ........................................................................................................ 56
dhcp-snooping decline...........................................................................................................57
show binding-table.................................................................................................................57
show dhcp-snooping global ...................................................................................................58
show dhcp-snooping information...........................................................................................58
show dhcp-snooping interface...............................................................................................59
IV
Chapter 12 ARP Inspection Commands.............................................................. 60
arp detection (global)............................................................................................................. 60
arp detection trust-port ..........................................................................................................60
arp detection (interface).........................................................................................................61
arp detection limit-rate...........................................................................................................61
arp detection recover............................................................................................................. 62
show arp detection global......................................................................................................63
show arp detection interface..................................................................................................63
show arp detection statistic ...................................................................................................63
show arp detection statistic reset ..........................................................................................64
Chapter 13 DoS Defend Command...................................................................... 65
dos-prevent ...........................................................................................................................65
dos-prevent type.................................................................................................................... 65
show dos-prevent ..................................................................................................................66
Chapter 14 IEEE 802.1X Commands ................................................................... 67
dot1x......................................................................................................................................67
dot1x authentication-method .................................................................................................67
dot1x guest-vlan ....................................................................................................................68
dot1x quiet-period.................................................................................................................. 69
dot1x timer.............................................................................................................................69
dot1x retry .............................................................................................................................70
dot1x(interface) .....................................................................................................................70
dot1x guest-vlan ....................................................................................................................71
dot1x port-control ..................................................................................................................71
dot1x port-method .................................................................................................................72
radius authentication primary-ip ............................................................................................73
radius authentication secondary-ip ........................................................................................73
radius authentication port ...................................................................................................... 74
radius authentication key.......................................................................................................74
radius accounting enable.......................................................................................................75
radius accounting primary-ip .................................................................................................76
radius accounting secondary-ip.............................................................................................76
radius accounting port ........................................................................................................... 77
radius accounting key............................................................................................................ 77
radius response-timeout ........................................................................................................78
show dot1x global.................................................................................................................. 78
V
show dot1x interface .............................................................................................................79
show radius authentication ....................................................................................................79
show radius accounting.........................................................................................................80
Chapter 15 Log Commands ................................................................................. 81
logging local buffer ................................................................................................................81
logging local flash..................................................................................................................81
logging clear ..........................................................................................................................82
logging loghost ......................................................................................................................83
show logging local-config ......................................................................................................83
show logging loghost.............................................................................................................84
show logging buffer level .......................................................................................................84
show logging flash level.........................................................................................................85
Chapter 16 SSH Commands................................................................................. 86
ssh server enable ..................................................................................................................86
ssh version ............................................................................................................................ 86
ssh idle-timeout .....................................................................................................................87
ssh max-client .......................................................................................................................87
ssh download ........................................................................................................................88
show ssh ...............................................................................................................................88
Chapter 17 SSL Commands ................................................................................. 89
ssl enable .............................................................................................................................. 89
ssl download certificate .........................................................................................................89
ssl download key ...................................................................................................................90
show ssl.................................................................................................................................90
Chapter 18 Address Commands.......................................................................... 92
bridge address port-security ..................................................................................................92
bridge address static .............................................................................................................93
bridge aging-time................................................................................................................... 93
bridge address filtering .......................................................................................................... 94
show bridge port-security ......................................................................................................95
show bridge address .............................................................................................................95
show bridge aging-time .........................................................................................................96
Chapter 19 System Commands ........................................................................... 97
system-descript .....................................................................................................................97
VI
system-time gmt ....................................................................................................................97
system-time manual ..............................................................................................................98
ip address..............................................................................................................................98
ip dhcp-alloc ..........................................................................................................................99
ip bootp-alloc .........................................................................................................................99
reset ....................................................................................................................................100
reboot ..................................................................................................................................100
user-config backup ..............................................................................................................101
user-config load...................................................................................................................101
user-config save ..................................................................................................................102
firmware upgrade ................................................................................................................102
ping .....................................................................................................................................103
tracert ..................................................................................................................................103
loopback ..............................................................................................................................104
show system-info................................................................................................................. 104
show ip address ..................................................................................................................105
Chapter 20 Ethernet Configuration Commands ................................................106
interface ethernet ................................................................................................................106
interface range ethernet ......................................................................................................106
description ...........................................................................................................................107
shutdown .............................................................................................................................107
flow-control ..........................................................................................................................108
negotiation...........................................................................................................................108
storm-control .......................................................................................................................109
storm-control disable bc-rate ............................................................................................... 110
storm-control disable mc-rate .............................................................................................. 110
storm-control disable ul-rate ................................................................................................ 111
port rate-limit ....................................................................................................................... 111
port rate-limit disable ingress............................................................................................... 112
port rate-limit disable egress ............................................................................................... 112
show interface configuration................................................................................................112
show interface status........................................................................................................... 113
show interface counters....................................................................................................... 113
show storm-control ethernet ................................................................................................ 114
show port rate-limit .............................................................................................................. 114
Chapter 21 QoS Commands................................................................................116
VII
qos ...................................................................................................................................... 116
qos dot1p config .................................................................................................................. 116
qos dscp enable .................................................................................................................. 117
qos dscp config ...................................................................................................................118
qos scheduler ...................................................................................................................... 119
show qos port-based ........................................................................................................... 120
show qos dot1p ...................................................................................................................120
show qos dscp.....................................................................................................................120
show qos scheduler............................................................................................................. 121
Chapter 22 Port Mirror Commands ....................................................................122
mirror add ............................................................................................................................122
mirror remove group............................................................................................................123
mirror remove mirrored........................................................................................................123
show mirror..........................................................................................................................124
Chapter 23 ACL Commands................................................................................125
acl time-segment .................................................................................................................125
acl holiday ...........................................................................................................................126
acl create.............................................................................................................................126
acl rule mac-acl ...................................................................................................................127
acl rule std-acl .....................................................................................................................128
acl policy policy-add ............................................................................................................129
acl policy action-add............................................................................................................130
acl bind to-port..................................................................................................................... 131
acl bind to-vlan ....................................................................................................................131
show acl time-segment........................................................................................................132
show acl holiday ..................................................................................................................132
show acl config....................................................................................................................133
show acl bind.......................................................................................................................133
Chapter 24 MSTP Commands.............................................................................134
spanning-tree global............................................................................................................134
spanning-tree common-config .............................................................................................135
spanning-tree region............................................................................................................136
spanning-tree msti...............................................................................................................137
spanning-tree msti...............................................................................................................138
spanning-tree tc-defend.......................................................................................................138
spanning-tree security .........................................................................................................139
VIII
spanning-tree mcheck ......................................................................................................... 140
show spanning-tree global-info............................................................................................ 140
show spanning-tree global-config........................................................................................141
show spanning-tree port-config ...........................................................................................141
show spanning-tree region ..................................................................................................142
show spanning-tree msti config ...........................................................................................142
show spanning-tree msti port ..............................................................................................142
show spanning-tree security tc-defend................................................................................143
show spanning-tree security port-defend.............................................................................143
Chapter 25 IGMP Commands..............................................................................145
igmp-snooping global ..........................................................................................................145
igmp-snooping config ..........................................................................................................145
igmp-snooping vlan-config-add ...........................................................................................146
igmp-snooping vlan-config...................................................................................................147
igmp-snooping multi-vlan-config..........................................................................................148
igmp-snooping static-entry-add ...........................................................................................149
igmp-snooping filter-add ......................................................................................................150
igmp-snooping filter-config ..................................................................................................150
igmp-snooping filter ............................................................................................................. 151
show igmp-snooping global-config ......................................................................................152
show igmp-snooping port-config.......................................................................................... 152
show igmp-snooping vlan-config .........................................................................................153
show igmp-snooping multi-vlan ...........................................................................................153
show igmp-snooping multi-ip-list .........................................................................................153
show igmp-snooping filter-ip-addr .......................................................................................154
show igmp-snooping port-filter ............................................................................................154
show igmp-snooping packet-stat .........................................................................................155
show igmp-snooping packet-stat-clear ................................................................................ 155
Chapter 26 SNMP Commands.............................................................................156
snmp global .........................................................................................................................156
snmp view-add ....................................................................................................................157
snmp group-add ..................................................................................................................157
snmp user-add ....................................................................................................................159
snmp community-add .......................................................................................................... 160
snmp notify-add...................................................................................................................161
snmp-rmon history sample-cfg ............................................................................................162
IX
snmp-rmon history owner ....................................................................................................163
snmp-rmon history enable ...................................................................................................163
snmp-rmon event user.........................................................................................................164
snmp-rmon event description ..............................................................................................164
snmp-rmon event type.........................................................................................................165
snmp-rmon event owner......................................................................................................166
snmp-rmon event enable.....................................................................................................166
snmp-rmon alarm config......................................................................................................167
snmp-rmon alarm owner......................................................................................................168
snmp-rmon alarm enable.....................................................................................................169
show snmp global-config .....................................................................................................169
show snmp view ..................................................................................................................170
show snmp group ................................................................................................................170
show snmp user ..................................................................................................................170
show snmp community........................................................................................................171
show snmp destination-host ................................................................................................171
show snmp-rmon history .....................................................................................................171
show snmp-rmon event ....................................................................................................... 172
show snmp-rmon alarm .......................................................................................................172
Chapter 27 Cluster Commands...........................................................................174
cluster ndp...........................................................................................................................174
cluster ntdp..........................................................................................................................175
cluster explore .....................................................................................................................176
cluster..................................................................................................................................176
cluster manage role-change ................................................................................................177
show cluster ndp global .......................................................................................................177
show cluster ndp port-status................................................................................................178
show cluster neighbour........................................................................................................178
show cluster ntdp global ......................................................................................................178
show cluster ntdp port-status...............................................................................................179
show cluster ntdp device ..................................................................................................... 179
show cluster manage role....................................................................................................180
X

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-SG3216/TL-SG3424 JetStream L2 Lite 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: MAC VLAN Commands
Provide information about the commands used for configuring MAC-Based VLAN.
Chapter 5: Protocol VLAN Commands
Provide information about the commands used for configuring Protocol VLAN.
Chapter 6: Voice VLAN Commands
Provide information about the commands used for configuring Voice VLAN.
Chapter 7: GVRP Commands
Provide information about the commands used for configuring GVRP (GARP VLAN registration
protocol).
Chapter 8: LAG Commands
Provide information about the commands used for configuring LAG (Link Aggregation Group).
Chapter 9: LACP Commands
Provide information about the commands used for configuring LACP (Link Aggregation Control
Protocol).
Chapter 10: User Manage Commands
Provide information about the commands used for user management.
Chapter 11: Binding Table Commands
Provide information about the commands used for binding the IP address, MAC address, VLAN
and the connected Port number of the Host together.
Chapter 12: ARP Inspection Commands
1
Provide information about the commands used for protecting the switch from the ARP cheating or
ARP Attack.
Chapter 13: DoS Defend Command
Provide information about the commands used for DoS defend and detecting the DoS attack.
Chapter 14: IEEE 802.1X Commands
Provide information about the commands used for configuring IEEE 802.1X function.
Chapter 15: Log Commands
Provide information about the commands used for configuring system log.
Chapter 16: SSH Commands
Provide information about the commands used for configuring and managing SSH (Security
Shell).
Chapter 17: SSL Commands
Provide information about the commands used for configuring and managing SSL (Secure
Sockets Layer).
Chapter 18: Address Commands
Provide information about the commands used for Address configuration.
Chapter 19: 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 20: Ethernet Configuration Commands
Provide information about the commands used for configuring the Bandwidth Control, Negotiation
Mode, and Storm Control for enthernet ports.
Chapter 21: QoS Commands
Provide information about the commands used for configuring the QoS function.
Chapter 22: Port Mirror Commands
Provide information about the commands used for configuring the Port Mirror function.
Chapter 23: ACL Commands
Provide information about the commands used for configuring the ACL (Access Control List).
Chapter 24: MSTP Commands
Provide information about the commands used for configuring the MSTP (Multiple Spanning Tree
Protocol).
Chapter 25: IGMP Commands
Provide information about the commands used for configuring the IGMP Snooping (Internet Group
Management Protocol Snooping).
Chapter 26: SNMP Commands
2
Provide information about the commands used for configuring the SNMP (Simple Network
Management Protocol) functions.
Chapter 27 Cluster Commands
Provide information about the commands used for configuring the Cluster Management 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.
Mode
Accessing
Prompt
Path
8
Logout or Access the next
mode
User EXEC
Mode
Privileged
EXEC Mode
Global
Configuration
Mode
Primary mode once 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)#
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
Use the interface type
number command to
enter this mode from
Global Configuration
mode.
Use the vlan database
TP-LINK(config-if
)#
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
VLAN
command to enter this
TP-LINK(config-
to return to Privileged EXEC mode.
Configuration
Mode
mode from Global
Configuration mode.
vlan)#
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,
9
you should access the corresponding command mode firstly.
z Global Configuration Mode: In this mode, global commands are provided, such as the
Spanning Tree, Schedule Mode and so on.
z Interface Configuration Mode: In this mode, users can configure one or several ports,
different ports corresponds to different commands
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.
z 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:
z show: display all information of switch, for example: statistic information, port information,
VLAN information.
z 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.
10

1.4 Conventions

1.4.1 Format Conventions

The following conventions are used in this Guide:
¾ Items in square brackets [ ] are optional
¾ 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 describtion 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,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 creat IEEE 802.1Q VLAN. To delete the IEEE
802.1Q VLAN, please use no vlan command.
Syntax
vlan vlan-id
no vlan vlan-id
Parameter
vlan-id ——VLAN ID, ranging from 2 to 4094.
Command Mode
VLAN Configuration Mode
Example
15
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
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 descriotion
Parameter
descript ——String to describe the VLAN, which contains 16 characters at most.
Command Mode
Interface Configuration Modeinterface vlan
Example
Specify the description string of the VLAN 2 as “vlan 2”:
TP-LINK(config)# interface vlan 2
16
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.
Command Mode
Interface Configuration Mode ( interface ethernet / interface range ethernet )
Example
Specify the Link Type of port 5 as general:
TP-LINK(config)# interface ethernet 5
TP-LINK(config-if)#switchport type general

switchport allowed vlan

Description
The switchport allowed vlan command is used to add the desired port to IEEE
802.1Q VLAN,or to remove a port from the correspounding VLAN.
Syntax
switchport allowed vlan add vlan-list
switchport allowed vlan remove vlan-list
Parameter
vlan-list —— VLAN ID list, it is multi-optional.
Command Mode
Interface Configuration Mode ( interface ethernet / interface range ethernet )
Example
Add port 2 to IEEE 802.1Q VLAN:
TP-LINK(config)# interface ethernet 2
17
TP-LINK(config-if)# switchport allowed vlan add 2

switchport pvid

Description
The switchport pvid command is used to configure the PVID for the switch ports.
Syntax
switchport pvid vlan-id
Parameter
vlan-id —— VLAN ID, ranging from 1 to 4094.
Command Mode
Interface Configuration Mode (interface ethernet / interface range ethernet )
Example
Specify the PVID of port 2 as 2:
TP-LINK(config)# interface ethernet 2
TP-LINK(config-if)# switchport pvid 2

switchport general egress-rule

Description
The switchport general egress-rule command is used to configure the egress-rule of the general port.
Syntax
switchport general egress-rule [vlan-id]{ untagged | tagged }
Parameter
vlan-id —— VLAN ID, ranging from 1 to 4094. By default , display all the information of IEEE 802.1Q VLAN.
untagged | tagged ——egress-ruleuntagged or tagged
Command Mode
Interface Configuration Mode ( interface ethernet / interface range ethernet )
Example
Specify the egress-rule of port 2 in vlan 3as tagged:
TP-LINK(config)# interface ethernet 2
18

show vlan

Description
Syntax
Parameter
Command Mode
TP-LINK(config-if)# switchport general egress-rule 3 tagged
The show vlan command is used to display the information of IEEE 802.1Q VLAN .
show vlan [vlan-id]
vlan-id —— VLAN ID, ranging from 1 to 4094. By default , display all the
information of IEEE 802.1Q VLAN.
Any Configuration Mode
Example
Display the information of vlan 5:
TP-LINK(config)# show vlan 5

show interface switchport

Description
The show interface switchport command is used to display the IEEE 802.1Q VLAN configuration information of the specified port.
Syntax
show interface switchport [port-num]
Parameter
port-num —— The port number. By default, display the VLAN configuration information of all ports.
Command Mode
Any Configuration Mode
Example
Display the VLAN configuration information of all ports:
TP-LINK(config)# show interface switchport
19
Loading...
+ 161 hidden pages