376 Switch Ports
Switch Ports
This section describes the commands used for switch port mode.
switchport mode Use this command to configure the mode of a switch port as access, trunk or
general.
In Trunk mode, the port becomes a member of all VLANs on switch unless
specified in the allowed list in the
switchport trunk allowed vlan
command.
The PVID of the port is set to the Native VLAN as specified in the
switchport
trunk native vlan
command. It means that trunk ports accept both tagged and
untagged packets, where untagged packets are processed on the native VLAN
and tagged packets are processed on the VLAN ID contained in the packet. MAC
learning is performed on both tagged and untagged packets. Tagged packets
received with a VLAN ID of which the port is not a member are discarded and
MAC learning is not performed. The Trunk ports always transmit packets
untagged on native VLAN.
In Access mode, the port becomes a member of only one VLAN. The port sends
and receives untagged traffic. It can also receive tagged traffic.The ingress
filtering is enabled on port. It means that when the VLAN ID of received packet
is not identical to Access VLAN ID, the packet is discarded.
In General mode, the user can perform custom configuration of VLAN
membership, PVID, tagging, ingress filtering etc. This is legacy FASTPATH
behavior of switch port configuration. Legacy FASTPATH CLI commands are
used to configure port in general mode.
no switchport mode This command resets the switch port mode to its default value.
Default General mode
Format
switchport mode {access | trunk | general}
Mode Interface Config
Format
no switchport mode
Mode Interface Config