13
Syntax
switchport mode { access | trunk | general }
Parameter
access | trunk | general —— Link Types. There are three Link Types for the
ports.
Command Mode
Interface Configuration Mode (interface gigabitEthernet / interface range
gigabitEthernet)
Example
Specify the Link Type of port 3 as trunk:
TL-SG2424P(config)# interface gigabitEthernet 1/0/3
TL-SG2424P(config-if)# switchport mode trunk
switchport access vlan
Description
The switchport access vlan command is used to add the desired Access port
to IEEE 802.1Q VLAN. To remove the specified port/ports from the
corresponding VLAN, please use no switchport access vlan command.
Syntax
switchport access vlan vlan-id
no switchport access vlan
Parameter
vlan-id —— Specify IEEE 802.1Q VLAN ID, ranging from 2 to 4094.
Command Mode
Interface Configuration Mode (interface gigabitEthernet / interface range
gigabitEthernet)
Example
Specify the Link Type of port 3 as access and add it to VLAN 2:
TL-SG2424P(config)# interface gigabitEthernet 1/0/3
TL-SG2424P(config-if)# switchport mode access
TL-SG2424P(config-if)# switchport access vlan 2