VLAN Port Assignment
How to assign ports to a VLAN
Assigning access ports to a VLAN
Enter interface configuration for the port to be assigned to the VLAN
S1(config)# interface [interface-id]
Set the port to access mode
S1(config-if)# switchport mode access S1(config-if)# switchport nonegotiate
[NOTE] Obviously since this port will be an access port there is no need for Trunk Negotiation (DTP) so it’s better to switch it off for security reasons
Assign the port to a VLAN
Switch(config-if)# switchport access vlan [vlan-id]
Assigning an access port to a VLAN on a Switch Complete Configuration Example
S1# configure terminal S1(config)# interface fa0/1 S1(config-if)# switchport mode access S1(config-if)# switchport nonegotiate S1(config-if)# switchport access vlan 10 S1(config-if)# exit S1#
[NOTE] VLANs are configured on the switch port and not on the end device.