1.4.2 Format Conventions ........................................................................................................... 19
1.4.3 Special Characters .............................................................................................................. 19
1.4.4 Parameter Format ................................................................................................................ 19
Chapter 2 Line Commands (Only for Certain Devices) ......................................... 20
2.1 line ...................................................................................................................................................... 20
3.7 end ..................................................................................................................................................... 26
3.9 history ............................................................................................................................................... 27
3.10 history clear .................................................................................................................................... 28
Chapter 4 User Management Commands ................................................................ 29
4.1 user name (password) ................................................................................................................. 29
4.2 user name (secret) ........................................................................................................................ 30
4.3 service password-recovery ...................................................................................................... 31
4.4 show user account-list................................................................................................................ 32
4.5 show user configuration ............................................................................................................. 33
II
Chapter 5 System Configuration Commands ......................................................... 34
5.9 led ....................................................................................................................................................... 41
5.10 ip address ........................................................................................................................................ 41
5.11 ip address-alloc ............................................................................................................................. 42
5.12 controller cloud-based (Only for Certain Devices)............................................................ 43
5.13 controller inform-url (Only for Certain Devices) ................................................................. 44
5.38 show system-info ......................................................................................................................... 60
5.39 show image-info ............................................................................................................................ 60
5.40 show boot ........................................................................................................................................ 61
5.41 show running-config .................................................................................................................... 61
5.42 show startup-config .................................................................................................................... 62
5.43 show system-time ........................................................................................................................ 63
5.44 show system-time dst ................................................................................................................. 63
5.45 show system-time ntp ................................................................................................................ 64
5.46 show cable-diagnostics interface........................................................................................... 64
5.47 show cpu-utilization ..................................................................................................................... 65
5.48 show memory-utilization ............................................................................................................ 65
5.49 show controller .............................................................................................................................. 66
5.50 show temperature ........................................................................................................................ 66
5.51 show voltage .................................................................................................................................. 67
8.6 show holiday ................................................................................................................................... 75
8.7 show time-range ........................................................................................................................... 76
Chapter 9 Port Configuration Commands ............................................................... 77
9.11 show fiber-ports ............................................................................................................................ 83
9.12 show interface status .................................................................................................................. 84
9.13 show interface counters ............................................................................................................ 84
9.14 show interface configuration .................................................................................................... 85
Chapter 10 Port Isolation Commands ......................................................................... 87
10.1 port isolation................................................................................................................................... 87
10.2 show port isolation interface .................................................................................................... 88
13.5 show etherchannel .................................................................................................................... 106
13.6 show etherchannel load-balance ......................................................................................... 107
13.7 show lacp ...................................................................................................................................... 108
13.8 show lacp sys-id ......................................................................................................................... 108
Chapter 14 MAC Address Commands ....................................................................... 110
14.1 mac address-table static ........................................................................................................ 110
14.2 no mac address-table dynamic ............................................................................................ 111
14.3 mac address-table aging-time .............................................................................................. 111
14.4 mac address-table filtering .................................................................................................... 112
14.5 mac address-table notification ............................................................................................. 113
14.6 mac address-table max-mac-count ................................................................................... 113
14.7 mac address-table notification (interface) ........................................................................ 115
14.8 mac address-table security ................................................................................................... 116
14.9 mac address-table vlan-security ......................................................................................... 117
14.10 show mac address-table ......................................................................................................... 118
14.11 clear mac address-table ......................................................................................................... 118
14.12 show mac address-table aging-time .................................................................................. 119
14.13 show mac address-table max-mac-count ........................................................................ 119
14.14 show mac address-table interface ...................................................................................... 120
14.15 show mac address-table count ............................................................................................ 121
14.16 show mac address-table address ....................................................................................... 121
14.17 show mac address-table vlan ................................................................................................ 122
14.18 show mac address-table notification ................................................................................. 122
14.19 show mac address-table security ........................................................................................ 123
15.2 name ............................................................................................................................................... 125
15.9 show vlan summary................................................................................................................... 129
15.10 show vlan brief ............................................................................................................................ 130
VI
15.11 show vlan ...................................................................................................................................... 130
15.12 show interface switchport ...................................................................................................... 131
21.20 range .............................................................................................................................................. 173
21.21 ip igmp filter ................................................................................................................................. 174
21.22 clear ip igmp snooping statistics ......................................................................................... 175
21.23 show ip igmp snooping ............................................................................................................ 175
21.24 show ip igmp snooping interface ......................................................................................... 176
21.25 show ip igmp snooping vlan ................................................................................................... 177
21.26 show ip igmp snooping groups ............................................................................................. 177
21.27 show ip igmp profile .................................................................................................................. 178
22.16 range .............................................................................................................................................. 192
23.2 mvr group ..................................................................................................................................... 197
23.7 mvr type ........................................................................................................................................ 201
23.10 show mvr ...................................................................................................................................... 203
23.11 show mvr interface .................................................................................................................... 204
23.12 show mvr members .................................................................................................................. 204
24.8 name ............................................................................................................................................... 211
25.14 show lldp ....................................................................................................................................... 235
25.15 show lldp interface .................................................................................................................... 235
25.16 show lldp local-information interface ................................................................................. 236
25.17 show lldp neighbor-information interface ......................................................................... 237
25.18 show lldp traffic interface ....................................................................................................... 237
Chapter 26 L2PT Commands (Only for Certain Devices) ..................................... 239
28.1 ip routing ....................................................................................................................................... 248
28.9 ip route .......................................................................................................................................... 253
28.12 show interface vlan ................................................................................................................... 255
28.13 show ip interface ........................................................................................................................ 255
XI
28.14 show ip interface brief .............................................................................................................. 256
28.15 show ip route ............................................................................................................................... 256
28.16 show ip route specify ............................................................................................................... 257
28.17 show ip route summary ........................................................................................................... 258
28.18 show ipv6 interface ................................................................................................................... 258
28.19 show ipv6 route .......................................................................................................................... 259
28.20 show ipv6 route summary ...................................................................................................... 259
30.9 ip proxy-arp.................................................................................................................................. 272
30.10 ip local-proxy-arp ...................................................................................................................... 272
30.11 show arp ........................................................................................................................................ 273
30.12 show ip arp (interface) .............................................................................................................. 274
30.13 show ip arp summary................................................................................................................ 274
30.14 show gratuitous-arp ................................................................................................................. 275
30.15 show ip proxy-arp ...................................................................................................................... 275
Chapter 31 DHCP Server Commands ........................................................................ 277
31.1 service dhcp server .................................................................................................................. 277
31.2 ip dhcp server extend-option capwap-ac-ip.................................................................... 277
31.3 ip dhcp server extend-option vendor-class-id ............................................................... 278
XII
31.4 ip dhcp server exclude-address ........................................................................................... 279
31.5 ip dhcp server pool ................................................................................................................... 279
31.6 ip dhcp server ping timeout ................................................................................................... 280
31.7 ip dhcp server ping packets ................................................................................................... 281
37.8 auto-voip data priority .............................................................................................................. 338
37.9 show auto-voip ........................................................................................................................... 338
Chapter 38 Access Control Commands ................................................................... 340
38.1 user access-control ip-based enable ................................................................................. 340
38.2 user access-control ip-based ............................................................................................... 340
38.3 user access-control mac-based enable ............................................................................ 341
38.4 user access-control mac-based .......................................................................................... 342
38.5 user access-control port-based enable ............................................................................ 343
38.6 user access-control port-based .......................................................................................... 343
Chapter 39 HTTP and HTTPS Commands ................................................................ 345
39.1 ip http server ............................................................................................................................... 345
39.2 ip http port .................................................................................................................................... 346
39.3 ip http max-users ....................................................................................................................... 346
39.4 ip http session timeout ............................................................................................................ 347
39.5 ip http secure-server ................................................................................................................ 348
39.6 ip http secure-port .................................................................................................................... 348
39.7 ip http secure-protocol............................................................................................................ 349
39.8 ip http secure-ciphersuite ...................................................................................................... 350
XV
39.9 ip http secure-max-users ....................................................................................................... 351
39.10 ip http secure-session timeout ............................................................................................. 352
39.11 ip http secure-server download certificate ...................................................................... 352
39.12 ip http secure-server download key ................................................................................... 353
39.13 show ip http configuration ...................................................................................................... 354
39.14 show ip http secure-server .................................................................................................... 355
40.1 ip ssh server ................................................................................................................................ 356
40.2 ip ssh port ..................................................................................................................................... 356
40.3 ip ssh version .............................................................................................................................. 357
40.4 ip ssh algorithm .......................................................................................................................... 358
40.5 ip ssh timeout .............................................................................................................................. 358
40.6 ip ssh max-client ........................................................................................................................ 359
40.7 ip ssh download .......................................................................................................................... 360
40.9 show ip ssh................................................................................................................................... 361
41.3 telnet port ..................................................................................................................................... 363
41.4 show telnet-status..................................................................................................................... 363
Chapter 42 Serial Port Commands ............................................................................. 365
43.4 show radius-server ................................................................................................................... 369
43.5 aaa group ...................................................................................................................................... 370
43.6 server ............................................................................................................................................. 370
43.7 show aaa group .......................................................................................................................... 371
43.12 show aaa authentication ......................................................................................................... 375
43.13 show aaa accounting ................................................................................................................ 376
43.14 line telnet ...................................................................................................................................... 376
43.16 line ssh ........................................................................................................................................... 377
43.18 line console .................................................................................................................................. 379
44.6 dot1x mab .................................................................................................................................... 392
47.4 access-list mac .......................................................................................................................... 410
47.5 access-list ip ............................................................................................................................... 411
57.7 show dldp ..................................................................................................................................... 485
57.8 show dldp interface................................................................................................................... 486
58.17 rmon history ................................................................................................................................ 503
62.12 show logging local-config....................................................................................................... 544
62.13 show logging loghost ............................................................................................................... 544
62.14 show logging buffer .................................................................................................................. 545
62.15 show logging flash ..................................................................................................................... 545
XXIII
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 JetStream Switch
without any explanation. Some models featured in this guide may be unavailable in your country
or region. For local sales information, visit https://www.tp-link.com.
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: Line Commands (Only for Certain Devices)
Provide information about the commands used to make related configurations for the desired
users and set the priority of the console media type.
Chapter 3: User Interface
Provide information about the commands used to switch between five CLI Command Modes.
Chapter 4: User Management Commands
Provide information about the commands used for user management.
Chapter 5: System Configuration 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 commands used for
cable test.
Chapter 6:EEE Configuration Commands
Provide information about the commands used for configuring EEE.
Chapter 7: SDM Template Commands
Provide information about the commands used for configuring the SDM templates.
Chapter 8: Time Range Commands
Provide information about the commands used for configuring the time range.
Chapter 9: Port Configuration Commands
Provide information about the commands used for configuring the Speed, Negotiation Mode,
and Flow Control for Ethernet ports.
Chapter 10: Port Isolation Commands
Provide information about the commands used for configuring Port Isolation function.
1
Chapter 11: Loopback Detection Commands
Provide information about the commands used for configuring the Loopback Detection
function.
Chapter 12: DDM Commands (Only for Certain Devices)
Provide information about the commands used for DDM (Digital Diagnostic Monitoring)
function.
Chapter 13: Etherchannel Commands
Provide information about the commands used for configuring LAG (Link Aggregation Group)
and LACP (Link Aggregation Control Protocol).
Chapter 14: MAC Address Commands
Provide information about the commands used for Address configuration.
Chapter 15:IEEE 802.1Q VLAN Commands
Provide information about the commands used for configuring IEEE 802.1Q VLAN.
Chapter 16: MAC-based VLAN Commands
Provide information about the commands used for configuring MAC-based VLAN.
Chapter 17: Protocol-based VLAN Commands
Provide information about the commands used for configuring Protocol VLAN.
Chapter 18: Private VLAN Commands (Only for Certain Devices)
Provide information about the commands used for configuring Private VLAN.
Chapter 19: VLAN-VPN Commands (Only for Certain Devices)
Provide information about the commands used for configuring VLAN-VPN (Virtual Private
Network) function.
Chapter 20: GVRP Commands
Provide information about the commands used for configuring GVRP (GARP VLAN registration
protocol).
Chapter 21: IGMP Snooping Commands
Provide information about the commands used for configuring the IGMP Snooping (Internet
Group Management Protocol Snooping).
Chapter 22: MLD Snooping Commands
Provide information about the commands used for configuring the MLD Snooping (Multicast
Listener Discovery Snooping).
Chapter 23: MVR Commands
Provide information about the commands used for configuring the MVR.
2
Chapter 24: MSTP Commands
Provide information about the commands used for configuring the MSTP (Multiple Spanning
Tree Protocol).
Chapter 25: LLDP Commands
Provide information about the commands used for configuring LLDP function.
Chapter 26: L2PT Commands (Only for Certain Devices)
Provide information about the commands used for configuring L2PT (Layer 2 Protocol
Tunneling).
Chapter 27: PPPoE ID-Insertion Commands (Only for Certain Devices)
Provide information about the commands used for configuring PPPoE ID-Insertion.
Chapter 28: Static Routes Commands
Provide information about the commands used for configuring the Static Route function.
Chapter 29: IPv6 Address Configuration Commands
Provide information about the commands used for configuring the System IPv6 addresses.
Chapter 30: ARP Commands
Provide information about the commands used for configuring the ARP (Address Resolution
Protocol) functions.
Chapter 31: DHCP Server Commands
Provide information about the commands used for configuring the DHCP Server function.
Chapter 32: DHCP Relay Commands
Provide information about the commands used for configuring the DHCP Relay function.
Chapter 33: DHCP L2 Relay Commands
Provide information about the commands used for configuring the DHCP L2 Relay function.
Chapter 34: QoS Commands
Provide information about the commands used for configuring the QoS function.
Chapter 35: Bandwidth Commands
Provide information about the commands used for configuring the Bandwidth Control.
Chapter 36: Voice VLAN Commands
Provide information about the commands used for configuring Voice VLAN.
Chapter 37 Auto VoIP Commands
Provide information about the commands used for configuring Auto VoIP.
Chapter 38: Access Control Commands
Provide information about the commands used for configuring Access Control.
3
Chapter 39: HTTP and HTTPS Commands
Provide information about the commands used for configuring the HTTP and HTTPS logon.
Chapter 40: SSH Commands
Provide information about the commands used for configuring and managing SSH (Security
Shell).
Chapter 41: Telnet Commands
Provide information about the commands used for configuring and managing SSH (Security
Shell).
Chapter 42: Serial Port Commands (Only for Certain Devices)
Provide information about the commands used for configuring and managing SSH (Security
Shell).
Chapter 43: AAA Commands
Provide information about the commands used for configuring AAA (authentication,
authorization and accounting).
Chapter 44: IEEE 802.1X Commands
Provide information about the commands used for configuring IEEE 802.1X function.
Chapter 45: Port Security Commands
Provide information about the commands used for configuring Port Security.
Chapter 46: Port Mirroring Commands
Provide information about the commands used for configuring the Port Mirror function.
Chapter 47: ACL Commands
Provide information about the commands used for configuring the ACL (Access Control List).
Chapter 48: IPv4 IMPB 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 49: IPv6 IMPB Commands
Provide information about the commands used for binding the IPv6 address, MAC address,
VLAN and the connected Port number of the Host together.
Chapter 50: IP Verify Source 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 51: IPv6 Verify Source Commands
Provide information about the commands used for guarding the IPv6 Source by filtering the IP
packets based on the IP-MAC Binding entries.
4
Chapter 52: DHCPv4 Filter Commands
Provide information about the commands used for configuring the DHCPv4 Filter.
Chapter 53: DHCPv6 Filter Commands
Provide information about the commands used for configuring the DHCPv6 Filter.
Chapter 54: DoS Defend Command
Provide information about the commands used for DoS defend and detecting the DoS attack.
Chapter 55: sFlow Commands (Only for Certain Devices)
Provide information about the commands used for configuring the Sampled Flow function.
Chapter 56: Ethernet OAM Commands (Only for Certain Devices)
Provide information about the commands used for configuring the Ethernet OAM (Operation,
Administration, and Maintenance) function.
Chapter 57: DLDP Commands
Provide information about the commands used for configuring the DLDP (Device Link
Detection Protocol).
Chapter 58: SNMP Commands
Provide information about the commands used for configuring the SNMP (Simple Network
Management Protocol) functions.
Chapter 59: PoE Commands (Only for Certain Devices)
Provide information about the commands used for configuring PoE function.
Chapter 60: ARP Inspection Commands
Provide information about the commands used for protecting the switch from the ARP
cheating or ARP Attack.
Chapter 61: ND Detection Commands
Provide information about the commands used for configuring ND detection.
Chapter 62: System Log Commands
Provide information about the commands used for configuring system log.
5
Chapter 1 Using the CLI
1.1 Accessing the CLI
You can log on to the switch and access the CLI by the following three methods:
1. Log on to the switch by the console port on the switch.
2. Log on to the switch remotely by a Telnet connection through an Ethernet port.
3. Log on to the switch remotely by an SSH connection through an Ethernet port.
1.1.1 Logon by a console port
Note: Console port is only available on certain devices.
■Console Port
The switch has two console ports: an RJ-45 console port and a Micro-USB console port.
Console output is active on devices connected to both console ports, but console input is only
active on one console port at a time.
The Micro-USB connector takes precedence over the RJ-45 connector. When the switch
detects a valid connection on the Micro-USB console port, input from the RJ-45 console port is
immediately disabled, and input from the Micro-USB console port is enabled. Removing the
Micro-USB connection immediately reenables input from the RJ-45 console connection.
■USB Console Driver
If you are using the USB port on the MAC OS X or Linux OS for console connection, there is no
need to run a USB driver.
If you are using the switch’s Micro-USB console port with the USB port of a Windows PC, a
driver for the USB port is required. The USB driver is provided on the resource CD. Follow the
InstallSheild Wizard to accomplish the installation.
The TP-Link USB Console Driver supports the following Windows operating systems:
■ 32-bit Windows XP SP3
■ 64-bit Windows XP
■ 32-bit Windows Vista
■ 64-bit Windows Vista
■ 32-bit Windows 7
6
■ 64-bit Windows 7
■ 32-bit Windows 8
■ 64-bit Windows 8
■ 32-bit Windows 8.1
■ 64-bit Windows 8.1
After the TP-Link USB Console Driver is installed, the PC’s USB port will act as RS-232 serial
port when the PC’s USB port is connected to the switch’s Micro-USB console port. And the
PC’s USB port will act as standard USB port when the PC’s USB port is unplugged from the
switch.
■Logon
Take the following steps to log on to the switch by the console port.
1. Connect the PCs or Terminals to the console port on the switch by the provided cable.
2. Start the terminal emulation program (such as the HyperTerminal) on the PC.
3. Specify the connection COM port in the terminal emulation program. If the Micro-USB
Console port is used, you can view which port is assigned to the USB serial port in the
following path:
Control Panel -> Hardware and Sound -> Device Manager -> Ports ->USB Serial Port.
Figure 1-1 USB Serial Port Number
4. Configure the terminal emulation program or the terminal to use the following settings:
7
■ Baud rate: 38400 bps
■ Data bits: 8
■ Parity: none
■ Stop bits: 1
■ Flow control: none
5. Type the Username and Password in the Hyper Terminal window. The default value for both
of them are admin. Press Enter in the main window and “Switch>” will appear indicating
that you have successfully logged in to the switch and you can use the CLI now.
Figure 1-2 Log in to the Switch
Note: The first time you log in, change the password to better protect your network and
devices.
1.1.2 Logon by Telnet
To log on to the switch by a Telnet connection, please take the following steps:
1. Click Start and type in cmd in the Search programs and files window and press the Enter
button.
8
Figure 1-1 Run Window
2. Type in telnet 192.168.0.1 in the cmd window and press Enter.
Figure 1-2 Type in the telnet command
3. Type in the login username and password (both admin by default). Press Enter and you will
enter User EXEC Mode.
Figure 1-2 Log in the Switch
Note: The first time you log in, change the password to better protect your network and
devices.
9
4. Type in enable command and you will enter Privileged EXEC Mode. By default, no
password is needed. Later you can set a password for users who want to access the
Privileged EXEC Mode.
Figure 1-3 Enter into Priviledged EXEC Mode
1.1.3 Logon by SSH
To log on by SSH, a Putty client software is recommended. There are two authentication modes
to set up an SSH connection:
Password Authentication Mode: It requires username and password, which are both admin by
default.
Key Authentication Mode: It requires a public key for the switch and a private key for the SSH
client software. You can generate the public key and the private key through Putty Key
Generator.
Note:
1. Before SSH login, please follow the steps shown in Figure 1-7 to enable the SSH function
through Telnet connection.
2. The first time you log in, change the password to better protect your network and devices.
Figure 1-4 Enable SSH function
10
■ Password Authentication Mode
1. Open the software to log on to the interface of PuTTY. Enter the IP address of the switch
into Host Name field; keep the default value 22 in the Port field; select SSH as the
Connection type.
Figure 1-5 SSH Connection Config
2. Click the Open button in the above figure to log on to the switch. Enter the login user name
and password to log on the switch, and then enter enable to enter Privileged EXEC Mode,
so you can continue to configure the switch.
Figure 1-6 Log on the Switch
11
■ Key Authentication Mode
2. Select the key type and key length, and generate SSH key.
Figure 1-7 Generate SSH Key
Note:
1. The key length is in the range of 512 to 3072 bits.
2. During the key generation, randomly moving the mouse quickly can accelerate the key
generation.
12
3. After the key is successfully generated, please save the public key and private key to a
TFTP server.
Figure 1-8 Save the Generated Key
4. Log on to the switch by Telnet and download the public key file from the TFTP server to the
switch, as the following figure shows:
Figure 1-9 Download the Public Key
13
Note:
1. The key type should accord with the type of the key file.
2. The SSH key downloading can not be interrupted.
5. After the public key is downloaded, please log on to the interface of PuTTY and enter the IP
address for login.
Figure 1-10 SSH Connection Config
14
6. Click Browse to download the private key file to SSH client software and click Open.
Figure 1-11 Download the Private Key
7. After successful authentication, please enter the login user name. If you log on to the
switch without entering password, it indicates that the key has been successfully
downloaded.
Figure 1-12 Log on 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 Configuration Mode.
15
mode.
VLAN Configuration mode.
port,
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 Path Prompt
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.
Switch(config)#
Switch>
Switch#
Logout or Access the next
mode
Use the exit command to
disconnect the switch.
Use the enable command to
access Privileged EXEC mode.
Enter the disable or the exit
command to return to User EXEC
mode.
Enter configure command to
access Global Configuration
Use the exit or the end
command or press Ctrl+Z to
return to Privileged EXEC mode.
Use the interface
port
gigabitEthernet
interface range gigabitEthernet
port-list
interface Configuration mode.
command to access
or
Interface
Configuration
Mode
Layer 2 Interface:
Use the interface
gigabitEthernet
interface
port-channel
port-channel-id
interface range
gigabitEthernet
port-list
enter this mode from
Global Configuration
or
command to
Switch(config-if)#
or
Switch(config-if-range)#
16
Use the vlan
Use the end command or press
Ctrl+Z to return to Privileged
EXEC mode.
Enter the exit or the # command
to return to Global Configuration
mode.
A port number must be specified
in the interface command.
vlan-list
to access
Configuration mode.
configuration mode.
Each command mode has its own set of specific commands. To configure some
a). Interface gigabitEthernet: Configure parameters for an Ethernet port, such as
Mode Accessing Path Prompt
Layer 3 Interface:
Use the no
switchport
command to enter
Routed Port mode
from Interface
Configuration mode.
Interface
Configuration
Mode
Use the interface
vlan-id
vlan
command to enter
VLAN Interface mode
from Global
Configuration mode.
Use the interface
loopback
command to enter
Loopback Interface
mode from Global
id
Switch (config-if)#
Switch(config-if-range)#
or
Logout or Access the next
mode
Use the switchport command to
switch to the Layer 2 interface
mode.
Use the end command or press
Ctrl+Z to return to Privileged
EXEC mode.
Enter the exit or the # command
to return to Global Configuration
mode.
Use the end command or press
Ctrl+Z to return to Privileged
EXEC mode.
Enter the exit command or the #
command to return to Global
VLAN
Configuration
Mode
Use the vlan
command to enter
this mode from
Global Configuration
mode.
vlan-list
Switch (config-vlan)#
Note:
1. The user is automatically in User EXEC Mode after the connection between the PC and the
switch is established by a Telnet/SSH connection.
2.
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
17
Display all information of switch, for example: statistic information, port
Duplex-mode, flow control status.
b). Interface range gigabitEthernet: 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:
information, VLAN information.
• history: Display the commands history.
1.3 Privilege Restrictions
This switch’s security is divided into four privilege levels: User level, Power User level, Operator
level and Admin level. You can define username and password pairs, and assign a specific
privilege level to each pair. Different privilege levels have access to specified commands,
which is illustrated in the Privilege Requirement in each command. For details about how to
configure usename and password pairs, please refer to user name (password) and
(secret).
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.
user name
1.4 Conventions
1.4.1 PoE Disclaimer
PoE budget calculations are based on laboratory testing. Actual PoE power budget is not
guaranteed and will vary as a result of client limitations and environmental factors.
18
1.4.2 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: mode {dynamic | static | permanent}
• Italic Font indicates a variable (an actual value must be assigned). For example: bridge
aging-time
aging-time
1.4.3 Special Characters
You should pay attentions to the description below if the variable is a character string:
• These six characters ” < > , \ & cannot 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.4 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/0/1, 1/0/3-5, 1/0/7 indicates
choosing port 1/0/1, 1/0/3, 1/0/4, 1/0/5, 1/0/7.
19
Chapter 2 Line Commands (Only for Certain Devices)
Note: Line Commands are only available on certain devices.
2.1 line
Description
The line command is used to enter the Line Configuration Mode and make
related configurations for the desired user(s).
Syntax
line { console linenum | vty startlinenum endlinenum }
Parameter
linenum —— The number of users allowed to login through console port. Its
value is 0 in general, for the reason that console input is only active on one
console port at a time.
startlinenum ——The start serial number of the login user selected to
configure the login mode and password, ranging from 0 to 15. 0 means the
first login user number, 1 means the second, and the rest can be done on the
same manner.
endlinenum —— The end serial number of the login user selected to
configure the login mode and password, ranging from 0 to 15. 0 means the
first login user number, 1 means the second, and the rest can be done on the
same manner.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Enter the Console port configuration mode and configure the console port 0:
T2600G-28TS(config)#line console 0
20
Enter the Virtual Terminal configuration mode so as to prepare further
configurations such as password and login mode for virtual terminal 0 to 5:
T2600G-28TS(config)#line vty 0 5
2.2 media-type rj45
Description
The media-type rj45 command is used to configure the console media type
as RJ-45 for input. The switch has two console ports available —— an RJ-45
console port and a micro-USB console port. Console input is active on only
one console port at a time. By default, the micro-USB connector takes
precedence over the RJ-45 connector, which means that, when both the
RJ-45 console connection and micro-USB console connection are valid,
input from the RJ-45 console is disabled, and input from the micro-USB
console is enabled. To return to the default configuration, please use no
media-type rj45 command.
Syntax
media-type rj45
no media-type rj45
Command Mode
Line Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Enable the RJ-45 console input:
T2600G-28TS(config)# line console 0
T2600G-28TS(config-line)# media-type rj45
Receive the micro-USB console input prior to the RJ-45 console input:
T2600G-28TS(config)# line console 0
T2600G-28TS(config-line)# no media-type rj45
21
Chapter 3 User Interface
3.1 enable
Description
The enable command is used to access Privileged EXEC Mode from User
EXEC Mode.
Syntax
enable
Command Mode
User EXEC Mode
Privilege Requirement
None.
Example
If you have set the password to access Privileged EXEC Mode from User
EXEC Mode:
Switch>enable
Enter password:
Switch#
3.2 service password-encryption
Description
The service password-encryption command is used to encrypt the
password when the password is defined or when the configuration is written,
using the symmetric encryption algorithm. Encryption prevents the password
from being readable in the configuration file. To disable the global encryption
Syntax
function, please use no service password-encryption command.
service password-encryption
no service password-encryption
22
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Enable the global encryption function:
Switch(config)# service password-encryption
3.3 enable password
Description
The enable password command is used to set or change the password for
users to access Privileged EXEC Mode from User EXEC Mode. To remove the
password, please use no enable password command. This command uses
the symmetric encryption.
Syntax
enable password { [ 0 ]
no enable password
Parameter
0 —— Specify the encryption type. 0 indicates that an unencrypted password
will follow. By default, the encryption type is 0.
password
English letters (case-sensitive), digits and 17 kinds of special characters. The
special characters are !$%’()*,-./[]_{|}. By default, it is empty.
7 —— Indicates a symmetric encrypted password with fixed length will follow.
encrypted-password
which you can copy from another switch’s configuration file. After the
password
—— A string with 31 characters at most, which can contain only
—— A symmetric encrypted password with fixed length,
| 7
encrypted-password
}
encrypted password is configured, you should use the corresponding
unencrypted password if you re-enter this mode.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
23
User Guidelines
If the password you configured here is unencrypted and the global
encryption function is enabled in service password-encryption
in the configuration file will be displayed in the symmetric encrypted form.
If both the enable password and enable secret are defined, only the latest
configured password will take effect.
Example
Set the super password as “admin” and unencrypted to access Privileged
EXEC Mode from User EXEC Mode:
Switch(config)#enable password 0 admin
3.4 enable secret
Description
The enable secret command is used to set a secret password, which is using
an MD5 encryption algorithm, for users to access Privileged EXEC Mode from
, the password
User EXEC Mode. To return to the default configuration, please use no enable
secret command. This command uses the MD5 encryption.
Syntax
enable secret { [ 0 ]
no enable secret
Parameter
0 —— Specify the encryption type. 0 indicates that an unencrypted password
will follow. By default, the encryption type is 0.
password
English letters (case-sensitive), digits and 17 kinds of special characters. The
special characters are !$%’()*,-./[]_{|}. By default, it is empty. The password in
the configuration file will be displayed in the MD5 encrypted form.
5 —— Indicates an MD5 encrypted password with fixed length will follow.
encrypted-password
password
—— A string with 31 characters at most, which can contain only
—— An MD5 encrypted password with fixed length,
| 5
encrypted-password
}
which you can copy from another switch’s configuration file. After the
encrypted password is configured, you should use the corresponding
unencrypted password if you re-enter this mode.
24
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
User Guidelines
If both the enable password and enable secret are defined, only the latest
configured password will take effect.
Example
Set the secret password as “admin” and unencrypted to access Privileged
EXEC Mode from User EXEC Mode. The password will be displayed in the
encrypted form.
Switch(config)#enable secret 0 admin
3.5 configure
Description
The configure command is used to access Global Configuration Mode from
Privileged EXEC Mode.
Syntax
configure
Command Mode
Privileged EXEC Mode
Privilege Requirement
Only Admin, Operator and Power User level users have access to these
commands.
Example
Access Global Configuration Mode from Privileged EXEC Mode:
Switch# configure
Switch (config)#
25
3.6 exit
Description
The exit command is used to return to the previous Mode from the current
Mode.
Syntax
exit
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Return to Global Configuration Mode from Interface Configuration Mode, and
then return to Privileged EXEC Mode:
Switch (config-if)# exit
Switch (config)#exit
Switch#
3.7 end
Description
The end command is used to return to Privileged EXEC Mode.
Syntax
end
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
Only Admin level users have access to these commands.
Example
Return to Privileged EXEC Mode from Interface Configuration Mode:
Switch (config-if)#end
Switch #
26
3.8 clipaging
Description
The clipaging command is used to enable the pause function for the screen
display. If you want to display all the related information of the switch at once
when using the show command, please use no clipaging command.
Syntax
clipaging
no clipaging
Command Mode
Privileged EXEC Mode and Any Configuration Mode
Privilege Requirement
None.
Example
Disable the pause function for the screen display:
Switch (config)#no clipaging
3.9 history
Description
The history command is used to show the latest 20 commands you entered
in the current mode since the switch is powered.
Syntax
history
Command Mode
Privileged EXEC Mode and any Configuration Mode
Privilege Requirement
None.
Example
Show the commands you have entered in the current mode:
Switch (config)# history
1 history
27
3.10 history clear
Description
The history clear command is used to clear the commands you have entered
in the current mode; therefore, these commands will not be shown next time
you use the history command.
Syntax
history clear
Command Mode
Privileged EXEC Mode and any Configuration Mode
Privilege Requirement
Only Admin, Operator and Power User level users have access to these
commands.
Example
Clear the commands you have entered in the current mode:
Switch (config)#history clear
28
Chapter 4 User Management Commands
User Management commands are used to manage the user’s logging information by Web,
Telnet or SSH, so as to protect the settings of the switch from being randomly changed.
4.1 user name (password)
Description
The user name command is used to add a new user or modify the existed
users’ information. To delete the existed users, please use no user name
command. This command uses the symmetric encryption.
Syntax
user name
{ [ 0 ]
no user name
Parameter
name
composed of digits, English letters and symbols. No spaces, question marks
and double quotation marks are allowed.
admin | operator | power_user | user —— Access level. “admin” means that
you can edit, modify and view all the settings of different functions. “operator”
means that you can edit, modify and view most of the settings of different
functions. “power-user” means that you can edit, modify and view some of
the settings of different functions. “user” means that you can only view some
of the settings of different functions without the right to edit or modify. It is
“admin” by default. For more details about privilege restrictions, please refer
to the Privilege Requirement part in each command.
The system-time ntp command is used to configure the time zone and the IP
address for the NTP Server. The switch will get UTC automatically if it has
connected to an NTP Server.
Syntax
system-time ntp {
fetching-rate
{
Parameter
timezone
UTC+13:00.
timezone
}
—— Your local time-zone, and it ranges from UTC-12:00 to
34
} {
ntp-server
} {
backup-ntp-server
}
The detailed information that each time-zone means are displayed as follow:
UTC-12:00 —— TimeZone for International Date Line West.
UTC-11:00 —— TimeZone for Coordinated Universal Time-11.
UTC-10:00 —— TimeZone for Hawaii.
UTC-09:00 —— TimeZone for Alaska.
UTC-08:00 —— TimeZone for Pacific Time(US Canada).
UTC-07:00 —— TimeZone for Mountain Time(US Canada).
UTC-06:00 —— TimeZone for Central Time(US Canada).
UTC-05:00 —— TimeZone for Eastern Time(US Canada).
UTC-04:30 —— TimeZone for Caracas.
UTC-04:00 —— TimeZone for Atlantic Time(Canada).
UTC-03:30 —— TimeZone for Newfoundland.
UTC-03:00 —— TimeZone for Buenos Aires, Salvador, Brasilia.
UTC-02:00 —— TimeZone for Mid-Atlantic.
UTC-01:00 —— TimeZone for Azores, Cape Verde Is.
UTC —— TimeZone for Dublin, Edinburgh, Lisbon, London.
UTC+01:00 —— TimeZone for Amsterdam, Berlin, Bern, Rome, Stockholm,
Vienna.
UTC+02:00 —— TimeZone for Cairo, Athens, Bucharest, Amman, Beirut,
Jerusalem.
UTC+03:00 —— TimeZone for Kuwait, Riyadh, Baghdad.
UTC+03:30 —— TimeZone for Tehran.
UTC+04:00 —— TimeZone for Moscow, St.Petersburg, Volgograd, Tbilisi,
Port Louis.
UTC+04:30 —— TimeZone for Kabul.
UTC+05:00 —— TimeZone for Islamabad, Karachi, Tashkent.
UTC+05:30 —— TimeZone for Chennai, Kolkata, Mumbai, New Delhi.
UTC+05:45 —— TimeZone for Kathmandu.
UTC+06:00 —— TimeZone for Dhaka,Astana, Ekaterinburg.
UTC+06:30 —— TimeZone for Yangon (Rangoon).
UTC+07:00 —— TimeZone for Novosibrisk, Bangkok, Hanoi, Jakarta.
UTC+08:00—— TimeZone for Beijing, Chongqing, Hong Kong, Urumqi,
Singapore.
UTC+09:00
—— TimeZone for Seoul, Irkutsk, Osaka, Sapporo, Tokyo.
UTC+09:30 —— TimeZone for Darwin, Adelaide.
UTC+10:00 —— TimeZone for Canberra, Melbourne, Sydney, Brisbane.
UTC+11:00 —— TimeZone for Solomon Is., New Caledonia, Vladivostok.
UTC+12:00 —— TimeZone for Fiji, Magadan, Auckland, Welington.
UTC+13:00 —— TimeZone for Nuku'alofa, Samoa.
ntp-server
—— The IP address for the Primary NTP Server.
35
backup-ntp-server
fetching-rate
—— The IP address for the Secondary NTP Server.
—— Specify the rate fetching time from NTP server.
Command Mode
Global Configuration Mode
Privilege Requirement
Only Admin and Operator level users have access to these commands.
Example
Configure the system time mode as NTP, the time zone is UTC-12:00, the
primary NTP server is 133.100.9.2 and the secondary NTP server is