VLAN
also: Virtual Local Area Network, 802.1Q, VLAN tagging
A Virtual Local Area Network (VLAN) is a logical network segment that groups devices on a physical network, allowing them to communicate as if they were on the same network even if physically separated or connected through different switches.
A VLAN uses tagging (typically IEEE 802.1Q) to partition a physical network into multiple isolated broadcast domains. Instead of requiring separate physical cables and switches for different networks, VLANs allow a single physical infrastructure to carry multiple logical networks by assigning each frame a VLAN ID.
For example, on a single switch with multiple ports, you might configure ports 1-4 as VLAN 10 (Finance) and ports 5-8 as VLAN 20 (Engineering). Devices in VLAN 10 cannot directly communicate with devices in VLAN 20 without a router, even though they share the same physical switch.
In Linux, VLANs are created and managed using tools like ip link or the older vconfig command. A typical configuration might look like: ip link add link eth0 name eth0.100 type vlan id 100, which creates a VLAN interface on physical interface eth0 with VLAN ID 100.