VLANS

VLANS #

What is a VLAN? #

A VLAN is a logical grouping of network devices that behave as if they are on their own independent network. VLANs allow network administrators to partition their network into different logical segments based on criteria such as location, department, or function. Devices within a VLAN can communicate with each other as if they were on the same physical network, even if they are connected to different physical switches.

Benefits of VLANs #

  1. Segregates network traffic and improves network performance
  2. Improves network security by isolating sensitive data
  3. Simplifies network management by allowing easier organization of network devices
  4. Enables flexibility in network design and scalability
  5. Reduces broadcast traffic, which can help reduce network congestion and improve performance.

VLAN Configuration #

Here is an example of configuring VLANs on a Cisco device:

Step 1: Access the switch

To access the switch, connect a console cable to the console port of the switch and use a program such as PuTTY.

Step 2: Enter privileged EXEC mode

Type enable and press Enter to enter privileged EXEC mode.

Step 3: Enter terminal configuration mode

conf t

Step 4: Create VLANs

To create a VLAN, use the following command:

vlan vlan-id 

For example, to create VLAN 10, use the following command:

Switch(config)# vlan 10

This will put you into VLAN configuration mode and here you can also name the VLAN with the following command:

name name

For example, to create VLAN 10 and name it use the following commands:

Switch(config)#vlan 10
Switch(config-vlan)#name Sales

Step 5: Assign Ports to VLANs To assign a port to a VLAN, use the following command:

interface interface-id
switchport mode access
switchport access vlan vlan-id

VLANS can be added to an access port without creating them first. The device will create the VLAN automatically.
For example, to assign port Fa0/1 to VLAN 10, use the following commands:

Switch(config)# interface FastEthernet0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10

Step 6: Verify VLAN Configuration

To verify VLAN configuration, use the following command:

show vlan brief

This command displays the VLANs that have been created, their IDs, names, and the ports that are assigned to each VLAN.