How To Configure VLAN
In order to configure a VLAN, you will need to access the switch’s management interface and navigate to the VLAN configuration section. From there, you can create new VLANs, assign ports to specific VLANs, and configure VLAN settings such as VLAN IDs and names. Make sure to save your changes once you have finished configuring the VLANs to ensure that the settings are applied correctly.
On this page, we learn how to configure:
* Telnet line and Password
* Console line and Password
* VLAN and names
* Switch hostnames
* Delete a VLAN
* Assigning a switch port
The following is a basic configuration of VLAN on Cisco Switch Interfaces:
Before you begin you must have worked out your IP addresses
We are configuring VLAN ports for three departments:
VLAN 10, Name: orbit
VLAN 20, Name: cisco
VLAN 30, Name: Student
We use the topology below as an example:
Configuring Telnet line and password:
switch1#config t
Switch1(config)#enable secret cisco
Switch1(config)#line vty 0 15
Switch1(config-line)#password cisco
Switch1(config-line)#login
Switch1(config-line)#exit
Configuring console line and password:
Switch1(config)#line con 0
Switch1(config-line)#password cisco
Switch1(config-line)#login
Switch1(config-line)#exit
Create and Configure VLANs and Names on Switch:
Switch1#config t
switch1(config)#vlan 10
switch1(config-vlan)#name orbit
switch1(config-vlan)#exit
switch1(config)#vlan 20
switch1(config-vlan)#name cisco
Switch11(config-vlan)#exit
Switch1(config)#vlan 30
Switch1(config-vlan)#name student
Switch1(config-vlan)#exit
Switch1(config)#exit
To view your configurations, use the show vlan command: –
Switch1#show vlan
VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
Gig1/1, Gig1/2
10 orbit active
20 cisco active
30 student active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
005 trnet-default active
Switch#
How to assign a switchport to a VLAN.
After creating your VLAN, you can assign a switch port to the VLAN.
VLAN 20, is statically assigned to port F0/8 on switch S1:
Switch1#config t
Switch1(config)#interface fa0/2
Switch1(config-if)#switchport mode access
Switch1(config-if)#switchport access vlan 20
Switch1(config-if)#no shut
Switch1(config-if)#exit
Switch1(config)#exit
Switch1#
use the above commands to assign the rest of the VLANs a switchport access.
How to delete VLANs
To delete a VLAN, use the global configuration command no vlan vlan-id to remove VLAN 20 from the switch.
e.g.
Switch1(config)#no vlan 10
Switch1(config)#end
Use the show vlan brief command to verify that VLAN 20 is no longer in the vlan.dat file.
Alternatively, the entire vlan.dat file can be deleted using the command delete flash:vlan.dat from privileged EXEC mode. After the switch is reloaded, the previously configured VLANs will no longer be present. This effectively places the switch into its “factory default” concerning VLAN configurations.
In Summary
Virtual Local Area Networks (VLANs) are a network configuration strategy used to segment a physical network into multiple logical networks. This segmentation enhances network efficiency and security by isolating traffic within specific groups, reducing broadcast domains, and managing traffic flow more effectively. VLANs are configured on network switches and routers that support VLAN tagging using IEEE 802.1Q standard.
To set up VLANs, network administrators assign switch ports to specific VLANs, each identified by a unique VLAN ID. This setup ensures that devices connected to a port are members of the designated VLAN. Communication between VLANs is not permitted by default and requires a Layer 3 device, like a router or a Layer 3 switch, to facilitate inter-VLAN routing. This helps in controlling traffic patterns and can be used to enforce security policies, by restricting access between VLANs according to organizational needs.
The configuration of VLANs typically involves defining the VLANs on the switch, assigning ports to the VLANs, and configuring trunk ports that can carry traffic for multiple VLANs across network devices. Trunk ports use tagging to keep track of VLAN information as traffic moves between switches. VLANs are a versatile tool in network design, allowing for improved performance, better management, and enhanced security.
How To Configure VTP VLAN ID ranges VLAN Switch Port Membership
VLAN Trunking Inter-VLAN Routing How To Configure Switch Security