By default, all ports on the switch are in VLAN 1. We can verify the port by typing the show vlan command in the IOS enable mode of the switch:
In the figure above, you can see that all 24 ports of the switch are in the same VLAN, that is, VLAN 1.
Two steps are required to create a VLAN and assign a switch port to the VLAN:
1. create a vlan using the vlan NUMBER global mode command
2. Connect the port to the VLAN. using two interface subcommands The first command is to switch port mode access commands. This command specifies that the interface is an access interface. The second command is the switchport access vlan NUMBER command. This command allocates the interface to VLAN.
Here is an example of assigning the VLAN 2 to the interface:
The first command (vlan 2) creates the VLAN2. Then enter Fa0 / 1 subinterface mode and configure the interface as an access interface belonging to VLAN 2. To verify this, we can use the show vlan command again:
Note: SPOTO will update the latest CCNA certification exam topics, and you can follow SPOTO where you can learn more related knowledge.
More Recommended Articles
1. CCIE and CCNA Evolving Technologies Study Guide
2. What Is the Difference Between CCNA R&S and CCNA Security?
3. How to Study for Cisco CCNA R&S?