// Poradnik techniczny // Sieć · VLAN

Sieci VLAN w Proxmox:
izolacja i segmentacja ruchu

VLAN (802.1Q) pozwala podzielić jedną fizyczną sieć na wiele logicznie odseparowanych segmentów — produkcję, zarządzanie, storage czy strefę DMZ — bez dokładania kabli i kart sieciowych. W Proxmox VE to fundament bezpiecznej, czytelnej architektury sieci po migracji z VMware vSphere, gdzie analogiczną rolę pełniły portgrupy na vSwitchu.

// 01 · Jak to działa

Jeden kabel, wiele odseparowanych sieci

VLAN dokłada do ramki ethernetowej 4-bajtowy znacznik 802.1Q z numerem (VLAN ID, 1–4094). Switche i hosty traktują ruch z różnymi tagami tak, jakby płynął przez fizycznie oddzielne sieci — urządzenia w VLAN 10 nie widzą bezpośrednio urządzeń w VLAN 20, nawet jeśli dzielą ten sam przełącznik i ten sam kabel uplink.

Port, który przenosi wiele otagowanych VLAN-ów naraz (np. uplink z hosta Proxmox do switcha), nazywamy trunkiem. Port przypisany na stałe do jednego VLAN-u, oddający ruch nieotagowany do urządzenia końcowego, to port access. Ruch bez znacznika trafia do tzw. native VLAN (PVID) danego portu.

ℹ️

VLAN to separacja w warstwie 2. Aby segmenty mogły się ze sobą komunikować, ruch musi przejść przez router lub firewall (warstwa 3) — to naturalne miejsce na reguły i kontrolę dostępu między strefami.

// 02 · Model VLAN-aware bridge

Tagowanie na mostku, nie na podinterfejsach

Proxmox oferuje dwa podejścia do VLAN-ów. Zalecane i najprostsze w utrzymaniu to VLAN-aware bridge: jeden mostek vmbr0 z włączoną obsługą VLAN obejmuje wszystkie segmenty, a numer VLAN-u przypisujesz per maszyna w konfiguracji karty sieciowej.

  • VLAN-aware bridge: jeden mostek dla wszystkich VLAN-ów, tag ustawiany w polu „VLAN Tag” karty VM/kontenera. Czyste, skalowalne, łatwe do audytu.
  • Tradycyjne podinterfejsy: osobne interfejsy eno1.10, eno1.20 i osobne mostki na każdy VLAN. Działa, ale szybko mnoży konfigurację.
  • Czego unikać: tagowanie wewnątrz gościa przy jednoczesnym tagowaniu na hoście — podwójne znaczniki (QinQ) wprowadzane przez pomyłkę to klasyczne źródło „sieci, która nie działa”.

Po stronie switcha port do hosta musi być trunkiem przepuszczającym wszystkie używane VLAN ID. To najczęstszy punkt, w którym konfiguracja się rozjeżdża: host taguje poprawnie, ale switch odrzuca nieznane VLAN-y.

// 03 · Konfiguracja w praktyce

Mostek VLAN-aware krok po kroku

VLAN-aware bridge włączysz w panelu (Node → System → Network → wybierz vmbr0 → „VLAN aware”) lub bezpośrednio w pliku /etc/network/interfaces:

ElementKonfiguracja
Mostek VLAN-awarebridge-vlan-aware yes + bridge-vids 2-4094
VLAN dla VMHardware → Network Device → VLAN Tag = np. 10
VLAN dla kontenera LXCNetwork → VLAN Tag w konfiguracji interfejsu
Adres zarządzania w VLANpodinterfejs vmbr0.99 z adresem IP hosta
Sprawdzenie tagówbridge vlan show

Dla redundancji łącza uplink łączymy w bond (LACP 802.3ad), a VLAN-aware bridge stawiamy na bondzie zamiast na pojedynczej karcie — uzyskujesz jednocześnie odporność na awarię łącza i pełną segmentację VLAN.

💡

Trzymaj sieć zarządzania Proxmox w osobnym VLAN-ie niż ruch maszyn produkcyjnych. To prosta zmiana, która znacząco ogranicza powierzchnię ataku na interfejs hosta i klaster.

// 04 · Dobre praktyki i pułapki

O czym pamiętać

  • Trunk na switchu: brak danego VLAN ID na trunku to najczęstsza przyczyna „milczącej” sieci. Najpierw sprawdzaj konfigurację portu na przełączniku.
  • Native VLAN / PVID: ustal świadomie, co dzieje się z ruchem nieotagowanym. Niedopasowanie native VLAN między hostem a switchem prowadzi do trudnych do wykrycia wycieków ruchu.
  • MTU: znacznik VLAN dokłada bajty do ramki. Przy jumbo frames (storage, Ceph) upewnij się, że MTU jest spójne na hoście, bondzie, mostku i switchu.
  • Firewall Proxmox: VLAN izoluje warstwę 2, ale reguły między strefami i tak warto egzekwować na firewallu — Proxmox ma wbudowany, działający per VM/kontener.
⚠️

VLAN to izolacja logiczna, nie szyfrowanie. Dla naprawdę wrażliwych segmentów łącz VLAN-y z firewallem i — tam, gdzie to konieczne — z separacją fizyczną lub szyfrowaniem ruchu.

Zaprojektujemy Twoją sieć w Proxmox

Trunki, VLAN-aware bridge, bondy LACP, segmentacja zarządzania i firewall — przeniesiemy logikę sieciową z VMware do Proxmox VE czysto i bezpiecznie.

⚡ Bezpłatna konsultacja → Kontenery LXC w Proxmox
// Technical guide // Network · VLAN

VLANs in Proxmox:
isolating and segmenting traffic

VLANs (802.1Q) let you split a single physical network into many logically separated segments — production, management, storage or a DMZ — without adding cables or NICs. In Proxmox VE this is the foundation of a secure, readable network architecture after migrating off VMware vSphere, where port groups on a vSwitch played the same role.

// 01 · How it works

One cable, many separated networks

A VLAN adds a 4-byte 802.1Q tag (VLAN ID, 1–4094) to the Ethernet frame. Switches and hosts treat traffic with different tags as if it flowed through physically separate networks — devices in VLAN 10 don't directly see devices in VLAN 20, even though they share the same switch and the same uplink cable.

A port carrying several tagged VLANs at once (e.g. the uplink from a Proxmox host to a switch) is called a trunk. A port permanently assigned to a single VLAN, delivering untagged traffic to an end device, is an access port. Untagged traffic lands in the port's native VLAN (PVID).

ℹ️

A VLAN is layer-2 separation. For segments to communicate, traffic must pass through a router or firewall (layer 3) — the natural place for rules and access control between zones.

// 02 · The VLAN-aware bridge model

Tag on the bridge, not on sub-interfaces

Proxmox offers two approaches to VLANs. The recommended and most maintainable is the VLAN-aware bridge: a single vmbr0 bridge with VLAN support enabled covers all segments, and you assign the VLAN number per machine in the NIC configuration.

  • VLAN-aware bridge: one bridge for all VLANs, tag set in the "VLAN Tag" field of the VM/container NIC. Clean, scalable and easy to audit.
  • Traditional sub-interfaces: separate interfaces eno1.10, eno1.20 and a separate bridge per VLAN. It works, but the configuration multiplies quickly.
  • What to avoid: tagging inside the guest while also tagging on the host — accidental double tags (QinQ) are a classic source of "the network just won't work".

On the switch side, the port to the host must be a trunk passing all the VLAN IDs in use. This is the most common point of failure: the host tags correctly, but the switch drops unknown VLANs.

// 03 · Configuration in practice

A VLAN-aware bridge step by step

Enable the VLAN-aware bridge in the UI (Node → System → Network → select vmbr0 → "VLAN aware") or directly in /etc/network/interfaces:

ElementConfiguration
VLAN-aware bridgebridge-vlan-aware yes + bridge-vids 2-4094
VLAN for a VMHardware → Network Device → VLAN Tag = e.g. 10
VLAN for an LXC containerNetwork → VLAN Tag in the interface config
Management address in a VLANsub-interface vmbr0.99 with the host IP
Check the tagsbridge vlan show

For uplink redundancy, bond the links into a bond (LACP 802.3ad) and put the VLAN-aware bridge on the bond instead of a single NIC — you get both link-failure resilience and full VLAN segmentation at once.

💡

Keep the Proxmox management network in a different VLAN from production VM traffic. It's a simple change that significantly reduces the attack surface on the host interface and the cluster.

// 04 · Best practices and pitfalls

What to keep in mind

  • Switch trunk: a missing VLAN ID on the trunk is the most common cause of a "silent" network. Check the switch port configuration first.
  • Native VLAN / PVID: decide deliberately what happens to untagged traffic. A native-VLAN mismatch between host and switch leads to hard-to-spot traffic leaks.
  • MTU: the VLAN tag adds bytes to the frame. With jumbo frames (storage, Ceph) make sure the MTU is consistent across host, bond, bridge and switch.
  • Proxmox firewall: a VLAN isolates layer 2, but rules between zones are still worth enforcing on the firewall — Proxmox has a built-in one that works per VM/container.
⚠️

A VLAN is logical isolation, not encryption. For truly sensitive segments combine VLANs with a firewall and — where necessary — with physical separation or traffic encryption.

We'll design your Proxmox network

Trunks, VLAN-aware bridges, LACP bonds, management segmentation and the firewall — we'll move your network logic from VMware to Proxmox VE cleanly and safely.

⚡ Free consultation → LXC containers in Proxmox