Example
The following example forbids adding VLAN IDs 234 to 256 to Ethernet port 1/e16.
Console(config)# interface ethernet 1/e16
Console(config-if)# switchport forbidden vlan add 234-256
switchport mode
The switchport mode Interface Configuration mode command configures the VLAN membership mode
of a port. Use the no form of this command to reset the mode to the appropriate default for the device.
Syntax
switchport mode { access | trunk | general | customer }
•
•
no switchport mode
•
access — Untagged layer 2 VLAN interface
•
trunk — Trunking layer 2 VLAN interface
•
general — Full 802.1q support VLAN interface
•
customer — The port is connected to customer equipment. Used when the switch is in a provider
network
Default Configuration
Access mode.
Command Mode
Interface configuration (Ethernet, port-channel) mode.
User Guidelines
There are no user Guidelines for this command.
Example
The following example configures the VLAN membership mode of a port. Use the no form of this
command to reset the mode to the appropriate default for the device.
console# config
console(config)# interface ethernet g1 - 1/e1
console(config-if)# switchport mode customer
478
VLAN Commands