Assigning Ports to VLANs

In this article we will discuss Assigning Ports to VLANs, will make brief discussion on Assigning Ports to VLANs, In last article we discuss about Creating a VLAN.

The switchport mode access command is optional, but strongly recommended as a security best practice. With this command, the interface changes to permanent access mode.

After creating a VLAN, the next step is to assign ports to the VLAN. An access port can belong to only one VLAN at a time; one exception to this rule is that of a port connected to an IP phone, in which case, there are two VLANs associated with the port: one for voice and one for data.

VLAN 20 is assigned to port F0/18 on switch S1; therefore, the student computer (PC2) is in VLAN 20. When VLAN 20 is configured on other switches, the network administrator knows to configure the other student computers to be in the same subnet as PC2 (

Use the show vlan brief command to display the contents of the vlan.dat file.

The switchport access vlan command forces the creation of a VLAN if it does not already exist on the switch. For example, VLAN 30 is not present in the show vlan brief output of the switch. If the switchport access vlan 30 command is entered on any interface with no previous configuration, then the switch displays the following:

% Access VLAN does not exist. Creating vlan 30

Add a Comment

Your email address will not be published. Required fields are marked *