3.4.3. switchport mode

Syntax

switchport mode ( access | hybrid | trunk [uplink] | tunnel )

Parameter

access

Specify the VLAN mode to Access port.

hybrid

Specify the VLAN mode to Hybrid port.

trunk

Specify the VLAN mode to Trunk port.

uplink

Specify the Uplink property on this Trunk port.

tunnel

Specify the VLAN mode to Dot1Q Tunnel port.

Default

Default is trunk mode of all interfaces

Mode

Port Configuration

Usage

The VLAN mode is used to configure the port for different port role. Access port: Accepts only untagged frames and join an untagged VLAN. Hybrid port: Support all functions as defined in IEEE 802.1Q specification. Trunk port: An untagged member of one VLAN at most, and is a tagged member of zero or more VLANs. If it is an uplink port, it can recognize double tagging on this port. Tunnel port: Port-based Q-in-Q mode. Use the switch mode port configuration command to set mode of interface You can verify your setting by entering the show interface switchport command.

Example

This example sets VLAN mode to Access port.

Switch(config)# interface gi12
Switch(config-if)# switchport mode access
Switch# show interfaces switchport gi12
Port : gi12
Port Mode : Access
Ingress Filtering : enabled
Acceptable Frame Type : untagged-only
Ingress UnTagged VLAN ( NATIVE ) : 1
Trunking VLANs Enabled:
Port is member in:
Vlan Name Egress rule
------- ----------------------- -----------------
1 default Untagged
Forbidden VLANs:
Vlan Name
------- -----------------------