TP-Link TL-SG3210 JetStream 8-Port Gigabit L2 Managed Switch
I have one TP-LINK TL-SG3210 JetStream 8-Port Gigabit L2 Managed Switch with 2 SFP Slots. Initially I had to connect via serial cable as it defaults to a static ip address of 192.168.0.1 which conflicts.
The CLI manual for the switch is hard to find online.
Connecting
Using screen screen /dev/ttyUSB1 38400
or with cu cu -l /dev/ttyS2 -s 38400
.
Default username and password are admin and admin.
Useful commands
List all VLANs and configured ports
show vlan
Enable and configure modes
TP-LINK>enable
TP-LINK#configure
TP-LINK(config)#
Setting the password (configure mode)
The general form is user modify password <user> <old password> <new password> <confirm new password
, for example:
TP-LINK(config)#user modify password admin admin newpass newpass`
TP-LINK(config)#
Switch to DHCP for ip address (configure mode)
TP-LINK(config)#ip dhcp-alloc
Enable DHCP protocol.
TP-LINK(config)#
Enable SSH access
TP-LINK(config)#ssh server enable
VLANs
Adding the VLANS
TP-LINK(config)#vlan database
TP-LINK(config-vlan)#vlan 5,10,12
TP-LINK(config-vlan)#exit
TP-LINK(config)#
Adding descriptions to the VLANs
TP-LINK(config)#interface vlan 5
TP-LINK(config-if)#description 'Internet VLAN'
TP-LINK(config-if)#exit
TP-LINK(config)#interface vlan 10
TP-LINK(config-if)#description 'Desktop VLAN'
TP-LINK(config-if)#exit
TP-LINK(config)#interface vlan 12
TP-LINK(config-if)#description 'Switch Mgmt VLAN'
TP-LINK(config-if)#exit
Configuring ports into the VLANs
TP-LINK(config)#interface ethernet 1
TP-LINK(config-if)#switchport type access
TP-LINK(config-if)#switchport allowed vlan add 5
TP-LINK(config-if)#switchport pvid 5
TP-LINK(config-if)#exit
TP-LINK(config)#interface ethernet 2
TP-LINK(config-if)#switchport type general
TP-LINK(config-if)#switchport allowed vlan add 10
TP-LINK(config-if)#switchport allowed vlan add 12
TP-LINK(config-if)#switchport pvid 10
TP-LINK(config-if)#switchport general egress-rule 10 untagged
TP-LINK(config-if)#switchport general egress-rule 12 tagged
TP-LINK(config-if)#exit
TP-LINK(config)#interface ethernet 3
TP-LINK(config-if)#switchport type access
TP-LINK(config-if)#switchport allowed vlan add 10
TP-LINK(config-if)#switchport pvid 10
TP-LINK(config-if)#exit
TP-LINK(config)#interface ethernet 8
TP-LINK(config-if)#switchport type trunk
TP-LINK(config-if)#switchport allowed vlan add 5,10,22
TP-LINK(config-if)#exit
TP-LINK(config)#
Setting the management VLAN
TP-LINK(config)#ip management-vlan 12
Save the configuration
TP-LINK#user-config save
Start to save user config......
Saving user config OK!
TP-LINK#