Use it when a server or hypervisor connects to a trunk port, or a VLAN interface has no connectivity.
VLAN
A Linux VLAN interface (e.g. eth0.20 or vlan20) tags traffic with an 802.1Q VLAN ID on a parent interface, so one physical port can carry several VLANs to a switch trunk.
1. ip -d link show <vlanif> — VLAN id and parent?
2. Parent up with carrier?
3. Capture on the parent: tcpdump -eni <parent> vlan <id> — tagged frames both ways?
4. Switch side: trunk allows the VLAN?
5. Address and gateway on the VLAN interface.
VLAN interface created on the parent → tags frames with the ID → switch trunk accepts the VLAN → replies tagged back → delivered to the VLAN interface
For Linux Networking → VLAN, continue with the first unproven Topic check: Confirm namespace, VLAN interface, parent interface, VLAN ID and master relationship. If that boundary is healthy, advance to the adjacent check: Verify parent carrier/MTU and place IP addressing on the intended logical interface. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
ip link add link eth0 name eth0.20 type vlan id 20Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
parent netdevice → VLAN subinterface + VLAN ID → admin/carrier state → tagging/untagging → upstream VLAN membership → neighbor/routing → workload
Healthy evidence: the VLAN device is attached to the correct parent/master with the expected VLAN ID, tagged traffic is exchanged with the intended upstream VLAN and the workload succeeds.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Confirm namespace, VLAN interface, parent interface, VLAN ID and master relationship.
- Verify parent carrier/MTU and place IP addressing on the intended logical interface.
- Capture on parent/logical interfaces to confirm expected 802.1Q tagging where offload permits interpretation.
- Validate upstream switch/VLAN membership and original workload after local evidence.
Verification chain. parent netdevice → VLAN subinterface + VLAN ID → admin/carrier state → tagging/untagging → upstream VLAN membership → neighbor/routing → workload
Step 3 Commands Verify boundary
ip link add link eth0 name eth0.20 type vlan id 20
ip -d link show eth0.20
nmcli con add type vlan ifname eth0.20 dev eth0 id 20
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: the VLAN is attached above/below the wrong bond/bridge layer, tag IDs mismatch, native/untagged assumptions differ, or offload/capture placement hides what actually crosses the wire.
Step 5 Common mistakes Narrow the fault
- Switch port not trunking the VLAN.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
The switch port must be a trunk that allows the VLAN; the parent interface must be up. Create persistently with nmcli (type vlan), netplan (vlans:) or a networkd .netdev. Untagged traffic stays on the parent.
ip -d link show <if>— link details incl. VLAN idip -br addr— interfaces and addressesip route— routing table and default routeip neigh— ARP/neighbour cacheip route get <dest>— route, interface and source chosen for a destinationnmcli device status / networkctl— which tool manages each interface
ReferenceWhat it is1 section · depth on demand
Core model
Identify VLAN interface ifindex, parent link, VLAN ID and whether tagging occurs on a standalone device, bond or bridge topology. Verify address placement and packet tags at the correct capture point. A locally created VLAN interface does not show the switch trunk/access configuration matches.
ReferenceWhy it matters1 section · depth on demand
How it works in operation
A Linux flow is scoped to a network namespace and crosses socket/source selection, routing policy and FIB lookup, neighbor resolution, netfilter/eBPF/qdisc where configured, device/bridge/bond/VLAN layers and the physical/virtual link.
ReferenceHow it works1 section · depth on demand
How it works
How it works: A Linux flow is scoped to a network namespace and crosses socket/source selection, routing policy and FIB lookup, neighbor resolution, netfilter/eBPF/qdisc where configured, device/bridge/bond/VLAN layers and the physical/virtual link.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
A Linux VLAN device shows only local tag configuration, but it does not show physical switch trunking, native VLAN consistency or routed/service reachability.
In depth
VLAN interfaces on Linux
A Linux VLAN interface is a virtual device on top of a parent interface. It sends and receives frames tagged with one VLAN ID. The ip-link(8) manual page describes ip link add ... type vlan:
idsets the VLAN ID.protocolselects 802.1Q (the default tagging) or 802.1ad (Q-in-Q).reorder_hdrcontrols whether Ethernet headers are reordered, and is on by default.gvrpregisters the VLAN with GVRP.
The VLAN interface gets its own addresses and routes, while the parent can stay without an address.
Switch-side expectations
| Linux side | Switch port must be |
|---|---|
Untagged traffic on eth0 only | An access port in the expected VLAN |
eth0.110, eth0.120 with addresses | A trunk allowing 110 and 120 |
Untagged traffic on eth0 plus eth0.110 | A trunk with a native VLAN for the untagged traffic |
802.1ad (protocol 802.1ad) | A Q-in-Q or provider port |
Runtime configuration
host$ sudo ip link add link eth0 name eth0.110 type vlan id 110
host$ sudo ip address add 10.110.0.64/24 dev eth0.110
host$ sudo ip link set eth0.110 up
host$ ip -d link show eth0.110
5: eth0.110@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
vlan protocol 802.1Q id 110 <REORDER_HDR>
host$ cat /proc/net/vlan/config
host$ sudo tcpdump -eni eth0 -c 5 vlan 110
Persistent configuration options
| Tool | Configuration |
|---|---|
| NetworkManager | nmcli connection add type vlan con-name vlan110 dev eth0 id 110 ipv4.method manual ipv4.addresses 10.110.0.64/24 |
| Netplan | vlans: {eth0.110: {id: 110, link: eth0, addresses: [10.110.0.64/24]}} |
| systemd-networkd | A .netdev with [VLAN] Id=110, and VLAN=eth0.110 in the parent's .network file |
Capturing tagged traffic
Capture on the parent interface with tcpdump -e to see the 802.1Q tag. On the VLAN interface itself, the frames appear already untagged. When the switch side doesn't match, the capture on the parent shows tagged frames leaving with no replies.
Documented example, not captured output.
How it works at runtime
VLAN is part of Linux Networking → VLAN. Linux VLAN interfaces implement IEEE 802.1Q tagging as virtual netdevices bound to a parent link and VLAN ID; parent state, VLAN identity, bridge/bond placement, tagging behavior and upstream switch configuration all affect connectivity.
Runtime state ownership and mechanics. Linux networking spans netdevice/link state, addresses, neighbor cache, routing policy/tables, namespaces/VRFs, bridges/bonds/VLANs, socket state and user-space managers such as NetworkManager, netplan or systemd-networkd.
Topic-specific state model. Linux VLAN interfaces implement IEEE 802.1Q tagging as virtual netdevices bound to a parent link and VLAN ID; parent state, VLAN identity, bridge/bond placement, tagging behavior and upstream switch configuration all affect connectivity.
Technical metadata. Host, distribution/release, kernel, incident/change time, network namespace inode/name, process namespace, ifindex/interface name/type/MAC, parent/master/peer, admin/carrier/operstate, addresses/prefixes, neighbor IP/MAC/NUD state, policy rules, route table/prefix/type/metric/nexthop/source, configuration owner/profile/renderer, VLAN ID, bond mode/member/LACP state, bridge port/FDB/VLAN state, interface/path MTU, counters/drops/errors, packet capture point, socket/listener, forward/return path and original workload result.
Interpretation rule. - VLAN interface exists ≠ parent link or upstream VLAN is usable.
- Correct VLAN ID locally ≠ switchport trunk/native VLAN configuration matches.
- Interface UP ≠ tagged frames are transmitted/received successfully.
- Ping within one VLAN ≠ routing or inter-VLAN policy is healthy.
Quick reference
VLAN interfaces tag traffic on a parent interface (802.1Q).
ip link add link eno1 name eno1.20 type vlan id 20
ip addr add 10.0.20.21/24 dev eno1.20; ip link set eno1.20 up
nmcli con add type vlan con-name vlan20 dev eno1 id 20 ipv4.method manual ipv4.addresses 10.0.20.21/24
cat /proc/net/vlan/config
ip -d link show eno1.20
Netplan: vlans: {vlan20: {id: 20, link: eno1, addresses: [10.0.20.21/24]}}. The switch port must be a trunk allowing the VLAN; the parent interface MTU must accommodate tagged frames (handled by most NICs).
Limits and how it fails
Primary failure point. A Linux VLAN device shows only local tag configuration, but it does not show physical switch trunking, native VLAN consistency or routed/service reachability.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Linux Networking → VLAN. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/networking/index.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
VLAN operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for VLAN.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Linux VLAN interfaces implement IEEE 802.1Q tagging as virtual netdevices bound to a parent link and VLAN ID; parent state, VLAN identity, bridge/bond placement, tagging behavior and upstream switch configuration all affect connectivity. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin host + namespace + exact flow → identify configuration owner/renderer → identify ifindex/interface + topology → inspect link/carrier → inspect addresses → inspect neighbor resolution → reproduce route/rule lookup → verify VLAN/bond/bridge/MTU as relevant → inspect packets/socket → verify return path → repeat original workload. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | parent netdevice → VLAN subinterface + VLAN ID → admin/carrier state → tagging/untagging → upstream VLAN membership → neighbor/routing → workload | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | A Linux VLAN device proves only local tag configuration; it does not prove physical switch trunking, native VLAN consistency or routed/service reachability. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux networking evidence can establish this proof path: parent netdevice → VLAN subinterface + VLAN ID → admin/carrier state → tagging/untagging → upstream VLAN membership → neighbor/routing → workload | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured namespace, interface, local kernel, L2/path or workload scope. A Linux VLAN device proves only local tag configuration; it does not prove physical switch trunking, native VLAN consistency or routed/service reachability. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: confirm namespace and configuration owner, inspect ifindex/link/address/neighbor/route state for the exact flow, verify L2/MTU construction and packet movement, then test the listening service and return path before making additional changes. | Continue to the next unresolved boundary while preserving the original test condition. |
VLAN · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | VLAN |
|---|---|
| Topic path | Linux Networking → VLAN |
| Runtime state | Linux VLAN interfaces implement IEEE 802.1Q tagging as virtual netdevices bound to a parent link and VLAN ID; parent state, VLAN identity, bridge/bond placement, tagging behavior and upstream switch configuration all affect connectivity. |
| Fast checks | - Confirm namespace, VLAN interface, parent interface, VLAN ID and master relationship. - Verify parent carrier/MTU and place IP addressing on the intended logical interface. - Capture on parent/logical interfaces to confirm expected 802.1Q tagging where offload permits interpretation. - Validate upstream switch/VLAN membership and original workload after local proof. |
| Verification chain | parent netdevice → VLAN subinterface + VLAN ID → admin/carrier state → tagging/untagging → upstream VLAN membership → neighbor/routing → workload Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | A Linux VLAN device proves only local tag configuration; it does not prove physical switch trunking, native VLAN consistency or routed/service reachability. Boundary chain: process/socket namespace → source/rule/FIB → neighbor → netfilter/eBPF/qdisc → virtual/physical device → peer → return → application. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |