VLAN
Reference: [Book] Network Introduction for IT Engineers
1. What is VLAN?
A technology that logically divides and configures a LAN regardless of physical placement
A single
Switchcan be divided into multipleVLANsThey operate as separate switches
As departments in companies need network separation and numerous terminals like smartphones and PCs connect to networks, network segmentation is important
Why network segmentation is needed
Performance degradation of terminals due to excessive broadcast
For security enhancement and blocking purposes
Applying policies based on service characteristics
When
VLANsare separated, since a single device is logically divided into different networks, not onlyUnicastbut alsoBroadcastcannot communicate between VLANsIf communication between
VLANsis needed, it requires the help of Layer 3 devices since it is communication between different networks
Using
VLANs, networks can be separated regardless of physical configuration, and terminals on physically different floors can be grouped into the same network using a singleVLANCommunication between separated terminals occurs through
Layer 3 devices
2. Types of VLANs
There are port-based VLANs and MAC address-based VLANs for VLAN assignment methods
Port Based VLAN
When VLANs were first introduced, switches were expensive and played the role of bundling multiple hubs, so using the switch for multiple networks by dividing it was the purpose of applying VLAN functionality
Using the switch's ports in a logically divided manner is called
Port Based VLANMost VLANs we generally refer to are
Port Based VLANs
Regardless of which terminal connects, assigning a VLAN to a specific port on the switch causes it to belong to that assigned VLAN
In a switch configured with
Port Based VLAN, the VLAN assignment criterion is the Switch's portex)
If PC AA connects to port 1, it belongs to VLAN 10; if connected to port 4, it belongs to VLAN 20
MAC Based VLAN
As user mobility increased,
MAC Based VLANbased on MAC Addresses was developedUsing
MAC Based VLAN, wired users remain in the same VLAN even when they move
Rather than assigning VLANs to fixed ports on the Switch, it assigns VLANs based on the terminal's MAC Address connecting to the switch
When a terminal connects, the switch recognizes the terminal's MAC Address and changes the port to the designated VLAN
Since VLAN information can change based on the terminal, it is also called
Dynamic VLAN
The VLAN assignment criterion for
MAC Based VLANis the PC's MAC addressex)
PC AA is assigned the same VLAN regardless of which switch or which port it connects to
3. How VLAN Works (Trunk/Access)
In
Port Based VLAN, each Switch port is configured with a VLAN to use, and even if connected to a single switch, ports with different VLANs cannot communicateDifferent
VLANsmean being connected to separate, isolated switches, so inter-VLAN communication is impossibleCommunication between different VLANs requires Layer 3 devices like
routersIn networks segmented by
VLANs, the broadcast ARP Request cannot be delivered to other VLANs, so communication must occur through Layer 3 devices
Separating networks by configuring VLANs on switch ports allows more efficient use of equipment compared to physically separating switches
VLAN separation creates the effect of multiple logical switches
When switches need to be interconnected in a situation with multiple VLANs, communicating between each VLAN requires as many ports as VLANs
A switch with divided VLANs is treated as physically separate switches
ex)
If one switch has 3 VLANs configured, 3 ports are needed for each VLAN to communicate between switches
In medium/large networks using more VLANs, connecting by VLAN wastes many ports just for device interconnections
The
VLAN Tag featurewas created to solve this problem!
Tagged Port (Trunk Port)
The Tag feature allows multiple VLANs to be transmitted together through a single port
This port is called a
Tagged portorTrunk port
The
Tagged portthat must transmit multiple VLANs simultaneously inserts a VLAN Field in the middle of the Ethernet Frame during communicationWhen sending packets through the
Tagged Port, a VLAN ID is attached, and the receiving side removes the VLAN ID and sends the packet to the corresponding VLAN
Using
Tagged Portsallows bundling the multiple ports previously needed for each VLAN's communication into one, enabling flexible network design without port wasteWith the
Tagged Portfeature added to switches, the MAC Address Table used for packet transmission also changedA field specifying VLAN was added to the MAC Address Table to prevent communication between different VLANs!
When a network is separated using VLANs on a single switch, it operates as if MAC Address Tables exist per VLAN
Tagged Portsare used to deliver multiple VLANs, meaning multiple networks, through a single physical portTagged Portsare generally used for connections between switches that have multiple networks configured simultaneouslyWhen packets enter through a
Tagged Port, they are transmitted to the tagged VLAN side while stripping off the Tag
Untagged Port (Access Port)
Regular ports are called
Untagged PortorAccess PortUntagged Portsare used only when belonging to a single VLANSo typically, servers belonging to a single network are configured as
Untagged
When packets enter through an
Untagged Port, they are transmitted only to the same VLAN
Virtualized Servers
Even server-connected ports, not just switch-to-switch connections, may need to communicate with multiple VLANs when connected to virtualized servers
In this case, even server-connected ports are configured as
Taggedrather thanUntaggedSince it is in Tagged state, the interface on the virtualized server side must also be configured in tagged state
Since a virtual switch exists inside the virtualized server, it is easier to understand when viewed as a switch-to-switch connection
Inter-VLAN Communication
VLANs prevent
unicast,multicast, andbroadcastfrom crossing VLAN boundaries due to the switch communication segmentation functionGenerally, different VLANs mean being divided into separate networks, so different networks with different IP address assignments is typical
If communication between different networks is needed, the help of Layer 3 devices like
routersis required
Last updated