The Wayback Machine - https://web.archive.org/web/20241126220100/https://www.geeksforgeeks.org/virtual-lan-vlan/
Open In App

Virtual LAN (VLAN)

Last Updated : 24 Mar, 2023
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Virtual LAN (VLAN) is a concept in which we can divide the devices logically on layer 2 (data link layer). Generally, layer 3 devices divide the broadcast domain but the broadcast domain can be divided by switches using the concept of VLAN. 

A broadcast domain is a network segment in which if a device broadcast a packet then all the devices in the same broadcast domain will receive it. The devices in the same broadcast domain will receive all the broadcast packets but it is limited to switches only as routers don’t forward out the broadcast packet. To forward out the packets to different VLAN (from one VLAN to another) or broadcast domains, inter Vlan routing is needed. Through VLAN, different small-size sub-networks are created which are comparatively easy to handle. 

VLAN ranges:

  • VLAN 0, 4095: These are reserved VLAN which cannot be seen or used.
  • VLAN 1: It is the default VLAN of switches. By default, all switch ports are in VLAN. This VLAN can’t be deleted or edit but can be used.
  • VLAN 2-1001: This is a normal VLAN range. We can create, edit and delete these VLAN.
  • VLAN 1002-1005: These are CISCO defaults for fddi and token rings. These VLAN can’t be deleted.
  • Vlan 1006-4094: This is the extended range of Vlan.

Configuration – 
We can simply create VLANs by simply assigning the vlan-id and Vlan name. 

#switch1(config)#vlan 2
#switch1(config-vlan)#vlan accounts

Here, 2 is the Vlan I’d and accounts is the Vlan name. Now, we assign Vlan to the switch ports.e.g- 

Switch(config)#int fa0/0
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access Vlan 2

Also, switchport range can be assigned to required vlans.  

Switch(config)#int range fa0/0-2
Switch(config-if)#switchport mode access
Switch(config-if) #switchport access Vlan 2

By this, switchport fa0/0, fa0/1, fa0-2 will be assigned Vlan 2. 

Example – 

52555

Assigning IP address 192.168.1.1/24, 192.168.1.2/24 and 192.168.2.1/24 to the PC’s. Now, we will create Vlan 2 and 3 on switch. 

Switch(config)#vlan 2
Switch(config)#vlan 3

We have made VLANs but the most important part is to assign switch ports to the VLANs.  

Switch(config)#int fa0/0
Switch(config-if)#switchport mode access
Switch(config-if) #switchport access Vlan 2

Switch(config)#int fa0/1
Switch(config-if)#switchport mode access
Switch(config-if) #switchport access Vlan 3

Switch(config)#int fa0/2
Switch(config-if)#switchport mode access
Switch(config-if) #switchport access Vlan 2 

As seen, we have assigned Vlan 2 to fa0/0, fa0/2, and Vlan 3 to fa0/1. 

VLANs offer several features and benefits, including:

  • Improved network security: VLANs can be used to separate network traffic and limit access to specific network resources. This improves security by preventing unauthorized access to sensitive data and network resources.
  • Better network performance: By segregating network traffic into smaller logical networks, VLANs can reduce the amount of broadcast traffic and improve network performance.
  • Simplified network management: VLANs allow network administrators to group devices together logically, rather than physically, which can simplify network management tasks such as configuration, troubleshooting, and maintenance.
  • Flexibility: VLANs can be configured dynamically, allowing network administrators to quickly and easily adjust network configurations as needed.
  • Cost savings: VLANs can help reduce hardware costs by allowing multiple virtual networks to share a single physical network infrastructure.
  • Scalability: VLANs can be used to segment a network into smaller, more manageable groups as the network grows in size and complexity.

Some of the key features of VLANs include:

  • VLAN tagging: VLAN tagging is a way to identify and distinguish VLAN traffic from other network traffic. This is typically done by adding a VLAN tag to the Ethernet frame header.
  • VLAN membership: VLAN membership determines which devices are assigned to which VLANs. Devices can be assigned to VLANs based on port, MAC address, or other criteria.
  • VLAN trunking: VLAN trunking allows multiple VLANs to be carried over a single physical link. This is typically done using a protocol such as IEEE 802.1Q.
  • VLAN management: VLAN management involves configuring and managing VLANs, including assigning devices to VLANs, configuring VLAN tags, and configuring VLAN trunking.

Types of connections in VLAN –

There are three ways to connect devices on a VLAN, the type of connections are based on the connected devices i.e. whether they are VLAN-aware(A device that understands VLAN formats and VLAN membership) or VLAN-unaware(A device that doesn’t understand VLAN format and VLAN membership).

  1. Trunk Link –
    All connected devices to a trunk link must be VLAN-aware. All frames on this should have a special header attached to it called tagged frames.
  2. Access link –
    It connects VLAN-unaware devices to a VLAN-aware bridge. All frames on the access link must be untagged.
  3. Hybrid link –
    It is a combination of the Trunk link and Access link. Here both VLAN-unaware and VLAN-aware devices are attached and it can have both tagged and untagged frames. 

Advantages – 

  • Performance –
    The network traffic is full of broadcast and multicast. VLAN reduces the need to send such traffic to unnecessary destinations. e.g.-If the traffic is intended for 2 users but as 10 devices are present in the same broadcast domain, therefore, all will receive the traffic i.e. wastage of bandwidth but if we make VLANs, then the broadcast or multicast packet will go to the intended users only.
  • Formation of virtual groups –
    As there are different departments in every organization namely sales, finance etc., VLANs can be very useful in order to group the devices logically according to their departments.
  • Security – 
    In the same network, sensitive data can be broadcast which can be accessed by the outsider but by creating VLAN, we can control broadcast domains, set up firewalls, restrict access. Also, VLANs can be used to inform the network manager of an intrusion. Hence, VLANs greatly enhance network security.
  • Flexibility –
    VLAN provide flexibility to add, remove the number of host we want.
  • Cost reduction –
    VLANs can be used to create broadcast domains which eliminate the need for expensive routers.
    By using Vlan, the number of small size broadcast domain can be increased which are easy to handle as compared to a bigger broadcast domain.

Disadvantages of VLAN 

  1. Complexity: VLANs can be complex to configure and manage, particularly in large or dynamic cloud computing environments.
  2. Limited scalability: VLANs are limited by the number of available VLAN IDs, which can be a constraint in larger cloud computing environments.
  3. Limited security: VLANs do not provide complete security and can be compromised by malicious actors who are able to gain access to the network.
  4. Limited interoperability: VLANs may not be fully compatible with all types of network devices and protocols, which can limit their usefulness in cloud computing environments.
  5. Limited mobility: VLANs may not support the movement of devices or users between different network segments, which can limit their usefulness in mobile or remote cloud computing environments. 
  6. Cost: Implementing and maintaining VLANs can be costly, especially if specialized hardware or software is required.
  7. Limited visibility: VLANs can make it more difficult to monitor and troubleshoot network issues, as traffic is isolated in different segments.

Real-Time Applications of VLAN 

Virtual LANs (VLANs) are widely used in cloud computing environments to improve network performance and security. Here are a few examples of real-time applications of VLANs:

  1. Voice over IP (VoIP) : VLANs can be used to isolate voice traffic from data traffic, which improves the quality of VoIP calls and reduces the risk of network congestion.
  2. Video Conferencing : VLANs can be used to prioritize video traffic and ensure that it receives the bandwidth and resources it needs for high-quality video conferencing.
  3. Remote Access : VLANs can be used to provide secure remote access to cloud-based applications and resources, by isolating remote users from the rest of the network.
  4. Cloud Backup and Recovery : VLANs can be used to isolate backup and recovery traffic, which reduces the risk of network congestion and improves the performance of backup and recovery operations.
  5. Gaming : VLANs can be used to prioritize gaming traffic, which ensures that gamers receive the bandwidth and resources they need for a smooth gaming experience.
  6. IoT : VLANs can be used to isolate Internet of Things (IoT) devices from the rest of the network, which improves security and reduces the risk of network congestion.


Previous Article
Next Article

Similar Reads

Types of Virtual LAN (VLAN)
Virtual LAN (VLAN) is created on the Layer 2 switch to reduce the size of the broadcast domain. It is one of the technologies used to improve network performance by the separating of large broadcast domains into smaller ones. There are 5 main types of VLANs depending on the type of network they carry: Default VLAN - When the switch initially starts
3 min read
Difference Between Default VLAN and Native VLAN
The Default VLAN and Native VLAN are critical standards in network management, particularly in VLAN configuration and operation. Understanding their differences helps in configuring and troubleshooting VLANs correctly in a network surrounding. What is Default VLAN?In Default VLAN all switch ports turn into a member of the default VLAN just after th
5 min read
Difference between LAN and VLAN
LANs and VLANs are both ways to connect computers in a network, but they work a bit differently. A LAN, or Local Area Network, is like a group of computers in one place, like an office or home. These computers are connected by cables or Wi-Fi and can share information and resources easily. It's like having all your friends in the same room, talking
5 min read
What is LAN (Local Area Network)? Understanding LAN's Working, Types and Features
A Local Area Network (LAN) connects devices within a limited area, like an office, building, or even a home. It’s designed to cover short distances, allowing all connected devices to share resources such as files, printers, and internet access. In most LANs, speeds range from 10 Mbps to 100 Mbps, though faster speeds are now common. The typical set
9 min read
Inter VLAN Routing by Layer 3 Switch
Prerequisite - Access and trunk ports Normally, Routers are used to divide the broadcast domain and switches (at layer 2) Operate in a single broadcast domain but Switches can also divide the broadcast domain by using the concept of VLAN (Virtual LAN). VLAN is the logical grouping of devices in the same or different broadcast domains. By default, a
5 min read
VLAN Trunking Protocol (VTP)
To carry traffic of a VLAN, it must be first configured on the switch. Suppose, if the user wants to send a frame from source to destination and the shortest path between them contains 1000 switches. To process a frame of any VLAN, VLANs should be configured first so, have to configure the same VLANs on all the 1000 switches manually. It will not b
5 min read
Private VLAN
Prerequisite - Virtual LAN (VLAN) Virtual LAN (VLAN) is used to break a broadcast domain into smaller domain at layer 2. Only (all) hosts belonging to same VLAN are able to communicate with each other while communicating with other VLAN hosts, Inter Vlan routing is done. But in same VLAN, if we want some hosts should not be able to communicate with
6 min read
How to Create and Delete VLAN on Cisco Catalyst Switch?
Virtual Local Area Networks (VLANs) are used in computer networks to divide a physical network into many logical networks, enhancing security, flexibility, and scalability. This article will walk you through the steps of adding and removing VLANs from a Cisco Catalyst Switch. Steps To Create and Delete VLAN on Cisco Catalyst Switch Step 1: Open the
4 min read
How does VLAN segmentation improve network management in wired networks?
The virtual local area network (VLAN) segmentation, in the context of network management becoming the critical factor of wired environment success can be mentioned. VLAN operates through configuring a physical network to virtually partition it with multiple independent networks each providing shielded and secured operation. Enhanced Security: VLANs
2 min read
Difference Between VLAN and VSAN
In the current world of networking ensuring that it efficiently aligns clients’ resources and traffic is imperative. Two technologies are very crucial in managing the networks and their resources and these are the VLAN (Virtual Local Area Network) and VSAN (Virtual Storage Area Network). Even though, both are essential in their sphere of operation,
6 min read
Difference Between VLAN and Subnet
In network management, VLAN (Virtual Local Area Network) and Subnet are important instruments that is used to manage networks and its traffic. Their main purpose is to divide large existing networks into smaller ones, which would be easier to work with. However, they get to this goal in a different manner, VLANs at the data link layer (Layer 2) whi
6 min read
VLAN Full Form
A Virtual Local Area Network (VLAN), is one of the network configuration technique. It allows for logical segmentation of the physical LAN into multiple distinct domains of broadcast. It enables a network manager to group the devices based on the function, department, or application regardless of the physical location. This leads to better organiza
5 min read
Difference between Ethernet and LAN
In practical, concept of LAN have possible because of Ethernet. The main difference between Ethernet and LAN is that Ethernet's working function is decentralized on the other hand LAN's working functions is centralized. And another difference is that, There is limitation take place in transmission of Ethernet while there is no limitation take place
1 min read
Soft Real-time Communication in LAN
Soft Real-time Communication is communication system that is used to support soft real-time applications is a LAN. Soft real-time communication networks do not provide absolute Quality of Service (QoS) guarantee to applications. These networks always ensure prioritized treatment for real-time messages. It also ensures that message deadline miss rat
3 min read
Hidden Station Problem (HSP) in Wireless LAN
Wireless LAN is used to transmit data from one device to another without using connected medium. There are normally several problems in wireless LAN. One of them is Hidden Station Problem (HSP). Hidden Station Problem (HSP) : When two stations hidden from each other i.e., not in range of each other send signals to third station at the same consider
2 min read
Advantages and Disadvantages of LAN, MAN and WAN
Pre-requisites: Difference between LAN, MAN, and WAN A computer network is a system that connects numerous independent computers in order to share information (data) and resources. In this article, we will see the advantages and disadvantages of LAN, MAN, and WAN. Advantages of LANSimple and reasonable cost: The primary benefit of the local area ne
5 min read
How to Set Up a LAN Network?
LAN (Local Area Network) is a data communication network that locally connects network devices such as workstations, servers, routers, etc. to share the resources within a small area such as a building or campus. Physical or wireless connections are set up between workstations to share the resources. Ethernet and Wi-fi are the most important techno
4 min read
What is Port Blocking within LAN ?
Port Blocking is the action performed by an Internet Service Provider (ISP) to identify and block the Internet traffic by using the Port Number and Transfer Protocol. Port Blocking within LAN refers to restricting the users from accessing a set of Services within the local area network. This may include blocking physical ports like USB, removable d
3 min read
LAN Switching
A computer network is a collection of two or more computer systems that are linked together. A network connection can be established using either cable or wireless media. Hardware and software are used to connect computers and tools in any network. A computer network consists of various kinds of nodes. Servers, networking hardware, personal compute
3 min read
LAN Switch Modes of Operation
Switching the LAN uses the hardware area as the basis for independent transmission and filtering. The LAN switch types determine how the frame is processed when the frame reaches the switch hole. In fact, the type of switch modes plays an important role when the application requirements of the application are ultimately the key that the customer fe
4 min read
Exposed Terminal Problem in Wireless LAN
Wireless LAN is used to transmit data from one device to another without using connected medium. There are normally several problems in wireless LAN. One of them is the Exposed terminal Problem. Exposed Terminal ProblemIn wireless LAN (local area network) communication, the exposed terminal problem is a frequent difficulty. It happens when a wirele
3 min read
How To Find Physical Address of LAN Card?
Answer: Use `ipconfig /all` on Windows or `ifconfig` on macOS/Linux; the MAC address is listed as `Physical Address` or `HWaddr`. Physical address which is also known as the MAC address of your LAN card, the process varies slightly depending on your operating system WindowsOpen Command Prompt by searching for cmd in the Start menu.Type `ipconfig` /
1 min read
How To Connect One Computer To Another Computer via LAN?
Answer: To connect one computer to another computer via LAN, use an Ethernet cable to directly connect their Ethernet ports.The most common methods include: Wired Ethernet Connection: Use an Ethernet cable to directly connect the two computers' network ports. For more than two computers, connect each computer to a network switch or router with Ethe
1 min read
LAN Full Form
A Local area network (LAN) is a network that is used to link devices in a single office, building, or campus of up to a short distance. LAN is restricted in size. In LAN networks internet speed is from 10 Mbps to 100 Mbps (But now much higher speeds can be achieved). The most common topologies used in LAN networks are bus, ring, and star. Imagine y
10 min read
Difference between LAN and CAN
In Computer Network, both Local Area Networks (LAN) and Controller Area Networks (CAN) are used to connect devices for communication, but they serve different purposes. LANs are typically used in homes, offices, and schools to connect computers and devices within a small area, allowing them to share resources like files and internet access. On the
6 min read
Difference between LAN and WAN
Networks can be classified broadly into two categories; Local Area Networks LAN and Wide Area Networks WAN. As compared to LAN, which could be as restricted as a home, office, or school, WAN covers very large areas and is used to connect more than one LAN in different towns, states, countries, or continents. It will therefore be important to unders
5 min read
Difference between LAN and MAN
A network is a way for computers and devices to share information with each other. There are different kinds of networks based on the size of the area they cover. LAN is used in small places like offices or schools. MAN is for bigger areas like cities and college campus. In this article we will see difference What is Local Area Network?LAN is a gro
4 min read
Difference Between LAN and WLAN
A network can be described as two or more computers connected using devices like data and communication tools for sharing. There are two kinds of networks that are widely used, although they are slightly different. LANs use the common wire within a specific geographical area; meanwhile, WLANs utilize wireless technologies like radio waves or infrar
5 min read
Types of area networks - LAN, MAN and WAN
The Network allows computers to connect and communicate with different computers via any medium. LAN, MAN, and WAN are the three major types of networks designed to operate over the area they cover. There are some similarities and dissimilarities between them. One of the major differences is the geographical area they cover, i.e. LAN covers the sma
7 min read
Difference between LAN, MAN and WAN
LAN, MAN, and WAN are different types of computer networks that connect devices over different areas. A LAN (Local Area Network) is a small network that covers a small area, like a home, office, or school. It lets devices like computers and printers share information quickly in that small space. A MAN (Metropolitan Area Network) is bigger than a LA
4 min read
Article Tags :
three90RightbarBannerImg