LinuxLXII · Cluster NetworkingVLANs
VLANs and failure domains in cluster networks
What you'll learn
- Configure VLANs on Linux
- Design with VLANs for cluster networks
- Recognise VLAN failure modes
- Test the VLAN design
Prerequisites
Verified against Ubuntu 24.04 LTS · Debian 12 (Bookworm) · RHEL 9.x · Rocky Linux 9.x · AlmaLinux 9.x · Linux kernel 6.1 LTS / 6.6 LTS · systemd 255+ · OpenSSH 8.7p1 (RHEL 9) / 9.6p1 (Ubuntu 24.04) · nftables 1.0.x · chrony 4.x · Pacemaker 2.1.x · Corosync 3.1.x · 2026-08-09
VLANs are the standard way to separate cluster networks on a single physical switch. This lesson covers how to configure them and how to design for failure domains.
What VLANs are
A VLAN (Virtual LAN) is a layer 2 broadcast domain. Multiple VLANs can share one physical switch but are isolated from each other. Tagged VLANs (802.1Q) carry multiple VLANs on one cable.
Configure VLANs on Linux
# Install
sudo apt install vlan
# Create a VLAN interface
sudo ip link add link eth0 name eth0.100 type vlan id 100
sudo ip addr add 10.0.0.10/24 dev eth0.100
sudo ip link set eth0.100 up
Or in /etc/network/interfaces:
auto eth0.100
iface eth0.100 inet static
address 10.0.0.10
netmask 255.255.255.0
vlan-raw-device eth0
Trunk vs access
- Trunk port: a switch port that carries multiple VLANs (802.1Q tagged). Used between switches and to hosts that need multiple VLANs.
- Access port: a switch port that carries one VLAN (untagged). Used for hosts that need one network.
For cluster hosts with multiple networks, the host NIC is usually a trunk (multiple VLANs) and the switch port is configured for 802.1Q tagging.
Failure domains with VLANs
VLANs provide logical separation but share physical infrastructure. For failure domain separation:
- Multiple switches (stacked or MLAG).
- Multiple uplinks per host (LACP bonding).
- VLANs across the redundant infrastructure.
The discipline: VLANs for logical separation, redundant hardware for failure domain separation.
VLANs in cluster networks
For a 2-host cluster with three networks:
- VLAN 10: management (BMC, console).
- VLAN 20: application (user traffic).
- VLAN 30: storage (DRBD, Ceph).
Each VLAN on a separate switch port or trunk port. The switch is configured with VLAN 10, 20, 30 on the trunk.
Knowledge check
Knowledge check · 3 questions
Q1. What is the difference between a trunk port and an access port?
Q2. VLANs provide failure domain separation.
Q3. Which of the following are valid for cluster network separation? Select all that apply.
Passing score: 75%. Answers are checked in this browser.