cisco Catalyst 9300 — Assigning Static-Access Ports to a VLAN

Procedure Configuring VLANs Assigning Static-Access Ports to a VLAN Command or Action Purpose Step 1 enable Example: Device> enable Enables privileged EXEC mode. Enter your password if prompted. Step 2 configure terminal Example: Device# configure terminal Enters global configuration mode Step 3 interface interface-id Example: Device(config)# interface gigabitethernet2/0/1 Enters the interface to be added to the VLAN. Step 4 switchport mode access Example: Device(config-if)# switchport mode access Defines the VLAN membership mode for the port (Layer 2 access port). Step 5 switchport access vlan vlan-id Example: Device(config-if)# switchport access vlan 2 Assigns the port to a VLAN.

Valid VLAN IDs are 1 to 4094. Step 6 end Example: Device(config-if)# end Returns to privileged EXEC mode. Step 7 show running-config interface interface-id Example: Device# show running-config interface gigabitethernet2/0/1 Verifies the VLAN membership mode of the interface. VLAN Configuration Guide, Cisco IOS XE 17.16.x (Catalyst 9300 Switches) 31