TP-Link Switch Commands
TP-Link managed switch CLI commands and configuration.
Switch Startup Procedure
Step 1: Power on switchConnect power to boot the TP-Link switch
Step 2: Wait for bootWait 1-2 minutes for system to load
Step 3: Verify systemCheck system status after boot
show versionDisplay system version and hardware info
show system-infoDisplay system information
Step 4: Check interfacesVerify interface states
show interface statusDisplay interface status
Step 5: Verify configurationEnsure configuration is loaded
show running-configDisplay running configuration
Switch Shutdown Procedure
Step 1: Save configurationEnsure configuration is saved before shutdown
copy running-config startup-configSave running configuration
Step 2: Verify configuration savedConfirm configuration is saved
show startup-configDisplay startup configuration
Step 3: Graceful shutdown/rebootReboot or power off the switch
reloadReboot the switch
Step 4: Factory reset (if needed)Reset to factory defaults
erase startup-configErase startup configuration
factory-defaultReset to factory defaults
Basic Configuration
enableEnter privileged EXEC mode
configureEnter configuration mode
show running-configDisplay running configuration
show startup-configDisplay startup configuration
copy running-config startup-configSave configuration
hostname <name>Set switch hostname
exitExit current mode
endReturn to privileged EXEC mode
reloadReboot the switch
show versionDisplay system version and hardware info
Interface Configuration
interface gigabitEthernet <port>Enter interface configuration mode
interface range gigabitEthernet <start>-<end>Configure multiple interfaces
description <text>Set interface description
shutdownDisable interface
no shutdownEnable interface
speed <10|100|1000|auto>Set interface speed
duplex <auto|full|half>Set duplex mode
switchport mode accessSet port to access mode
switchport mode trunkSet port to trunk mode
switchport access vlan <vlan_id>Assign VLAN to access port
switchport trunk allowed vlan <vlan_list>Set allowed VLANs on trunk
show interface statusDisplay interface status summary
show interface gigabitEthernet <port>Display detailed interface info
VLAN Configuration
vlan <vlan_id>Create VLAN and enter VLAN config mode
name <vlan_name>Set VLAN name
no vlan <vlan_id>Delete VLAN
show vlanDisplay VLAN information
show vlan id <vlan_id>Display specific VLAN details
switchport general allowed vlan <vlan_list>Set VLANs on general mode port
switchport pvid <vlan_id>Set port VLAN ID (PVID)
Link Aggregation (LAG)
interface port-channel <id>Create/configure LAG group
channel-group <id> mode onAdd port to static LAG
channel-group <id> mode activeAdd port to LACP LAG (active)
channel-group <id> mode passiveAdd port to LACP LAG (passive)
lacp timeout shortSet LACP timeout to 1 second
show etherchannel summaryDisplay LAG summary
show lacp neighborDisplay LACP neighbor information
Spanning Tree Protocol
spanning-treeEnable spanning tree globally
spanning-tree mode stpSet STP mode to classic STP
spanning-tree mode rstpSet STP mode to RSTP
spanning-tree mode mstpSet STP mode to MSTP
spanning-tree priority <value>Set bridge priority
spanning-tree mst configurationEnter MST configuration mode
spanning-tree portfastEnable portfast on interface
spanning-tree bpduguard enableEnable BPDU guard on interface
show spanning-treeDisplay spanning tree status
show spanning-tree interface <port>Display STP info for interface
IP Configuration
interface vlan <vlan_id>Create/configure VLAN interface
ip address <ip> <netmask>Set IP address
ip address dhcpObtain IP via DHCP
ip default-gateway <gateway>Set default gateway
ip route <network> <netmask> <gateway>Add static route
show ip interfaceDisplay IP interface configuration
show ip routeDisplay routing table
ping <ip>Ping IP address
Quality of Service (QoS)
qosEnable QoS globally
qos mode port-basedSet QoS mode to port-based
qos mode dscp-basedSet QoS mode to DSCP-based
qos trust cosTrust CoS values
qos trust dscpTrust DSCP values
qos queue-mode wrrSet queue scheduling to WRR
show qosDisplay QoS configuration
Security Features
username <name> privilege <level> password <password>Create user account
enable password <password>Set enable mode password
port security enableEnable port security on interface
port security max <num>Set maximum MAC addresses
port security mode <mode>Set port security mode
storm-control broadcast enableEnable broadcast storm control
storm-control broadcast level <percentage>Set storm control threshold
show port securityDisplay port security status
show usersDisplay user accounts
Monitoring & Diagnostics
show mac address-tableDisplay MAC address table
show arpDisplay ARP table
show system-infoDisplay system information
show power inlineDisplay PoE status
show loggingDisplay system logs
show cpuDisplay CPU utilization
show memoryDisplay memory usage
show cable-diagnostics interface <port>Run cable diagnostics
show transceiver interface <port>Display SFP module information
show lldp neighborDisplay LLDP neighbors
SNMP Configuration
snmp-server enableEnable SNMP
snmp-server community <string> roSet read-only community
snmp-server community <string> rwSet read-write community
snmp-server host <ip> version <version> <community>Set SNMP trap receiver
snmp-server location <text>Set SNMP location
snmp-server contact <text>Set SNMP contact
show snmpDisplay SNMP configuration
System Maintenance
copy tftp startup-configRestore config from TFTP
copy startup-config tftpBackup config to TFTP
firmware upgrade <tftp_server> <filename>Upgrade firmware from TFTP
boot system <filename>Set boot image
show bootDisplay boot configuration
clock set <time> <date>Set system clock
ntp server <ip>Configure NTP server
ntp enableEnable NTP client
show clockDisplay system time
show ntp statusDisplay NTP status
erase startup-configErase startup configuration
factory-defaultReset to factory defaults