cisco Catalyst 9300 — Configuring a Trunk Port

Configuring VLAN Trunks Configuring a Trunk Port Command or Action Purpose Device# configure terminal Step 3 interface interface-id Example: Device(config)# interface gigabitethernet 1/0/2 Specifies the port to be configured for trunking, and enters interface configuration mode. Step 4 switchport mode {dynamic {auto | desirable} | trunk} Example: Device(config-if)# switchport mode dynamic desirable Configures the interface as a Layer 2 trunk (required only if the interface is a Layer 2 access port or tunnel port or to specify the trunking mode). • dynamic auto—Sets the interface to a trunk link if the neighboring interface is set to trunk or desirable mode. This is the default.

• dynamic desirable—Sets the interface to a trunk link if the neighboring interface is set to trunk, desirable, or auto mode. • trunk—Sets the interface in permanent trunking mode and negotiate to convert the link to a trunk link even if the neighboring interface is not a trunk interface. Step 5 switchport access vlan vlan-id Example: Device(config-if)# switchport access vlan 200 (Optional) Specifies the default VLAN, which is used if the interface stops trunking. Step 6 switchport trunk native vlan vlan-id Example: Device(config-if)# switchport trunk native vlan 200 Specifies the native VLAN for IEEE 802.1Q trunks. Step 7 end Example: Device(config)# end Returns to privileged EXEC mode.

VLAN Configuration Guide, Cisco IOS XE 17.16.x (Catalyst 9300 Switches) 50