Skip to main content

How to create VLANs? VLAN Tutorial



Configuring VLANs and Assigning VLANs to interfaces

SW1# configure terminal
SW1# vlan2
SW2# name Sales department
SW2# exit
SW2# interface range fastethernet 0/11 – 16
SW2# switchport access vlan2
SW2# switchport mode access
SW2# end

In the above configuration, SW1 is the switch name. ‘#’ denotes privileged EXEC mode or enable mode.

1.       “Configure terminal” command: This command is used to enter into Global configuration mode.
2.       “vlan2” command: This command is used to create a vlan.
3.       “name Sales department#: This command is used to give a name to vlan2 as Sales department. If you don’t want to give a name, this command can be ignored.
4.       “exit” command: To exit to privileged EXEC mode.
5.       “interface range fastethernet 0/11 – 16: To enter into interface configuration mode to configure the switch interfaces from 11, 12, 13, 14, 15 & 16.
6.       “switchport access vlan2” command: To specify the VLAN number associated with the above interfaces.
7.       “switchport mode access” command: To make this interface range 11 to 16 to always operate in access mode (that is, to not trunk).
You can learn the different types of switchport mode here.
8.       “end”: This command is used to get back to privileged EXEC mode regardless of what configuration mode or configuration sub mode you are in.

How to verify VLANs?

Any of the below commands can be used to check the created VLANs and default VLANs:
1.       Show vlan brief
2.       Show running-config
3.       Show vlan id 2






Comments

Popular posts from this blog