Use it to give VMs or containers direct access to the LAN, or when guests behind a bridge have no connectivity.
Bridges
A Linux bridge (br0) is a software switch that connects interfaces — physical NICs, VM tap devices, container veths — in one Layer 2 segment. The host's IP goes on the bridge, not the enslaved NIC.
1. bridge link — which ports are in the bridge and their state?
2. ip -br addr show br0 — host address on the bridge?
3. bridge fdb show br br0 — guest MACs learned?
4. Filtering bridged traffic? sysctl net.bridge.bridge-nf-call-iptables.
5. VLAN-aware bridge → bridge vlan show.
ports enslaved → bridge learns MACs → frames forwarded between ports → host IP on the bridge reaches the LAN
For Linux Networking → Bridges, continue with the first unproven Topic check: List bridge, member ports, STP state, VLAN filtering and per-port VLAN/PVID settings. If that boundary is healthy, advance to the adjacent check: Confirm host IP addressing is attached to the intended L3 interface in the topology. 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.
bridge fdb showPrimary Commands
Configuration and operational commands for this Topic.
bridge fdb showReferenceLinux bridge forwarding database.
Linux · mixedbridge vlan showReferenceDisplay bridge-port VLAN membership/PVID.
Use when: Use after confirming the Virtual Networking target and before changing state.
Quick note: Hyper-V / Proxmox VE / KVM-QEMU. A running VM proves only execution state; it does not prove guest health, network reachability, storage durability or recoverability.
Linux · mixedbridge link showReferenceShows bridge-port state and attributes.
Linux · mixedVerification & 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
bridge netdevice → port membership → STP/VLAN port state → FDB learning/forwarding → host L3 attachment or external port → neighbor/routing → workload
Healthy evidence: intended ports are attached and forwarding with correct VLAN policy, FDB learning matches observed endpoints, host L3 placement is correct and target flows succeed.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - List bridge, member ports, STP state, VLAN filtering and per-port VLAN/PVID settings.
- Confirm host IP addressing is attached to the intended L3 interface in the topology.
- Inspect FDB learning and per-port counters while reproducing the failing flow.
- Validate VM/container/host and upstream paths separately to find the first failed bridge boundary.
Verification chain. bridge netdevice → port membership → STP/VLAN port state → FDB learning/forwarding → host L3 attachment or external port → neighbor/routing → workload
Step 3 Commands Verify boundary
bridge link
ip -d link show br0
bridge fdb show br br0 | head
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: IP remains on a slave, a port is blocked/down, VLAN filtering excludes traffic, stale topology assumptions hide veth/tap placement or FDB churn accompanies packet loss.
Step 5 Common mistakes Narrow the fault
- STP disabled on bridges in looped topologies.
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.
Move the host address from the NIC to the bridge or the host loses connectivity. STP on the bridge delays forwarding (forward delay); disable it on simple host bridges. br_netfilter can make iptables/nftables filter bridged traffic unexpectedly.
bridge link— bridge ports and stateip -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
Map the exact bridge topology: physical/virtual ports, VLAN filtering, host-facing IP and any VM/container tap devices. Distinguish bridge interface state from member forwarding state and inspect FDB/port flags. Verify whether packets are switched locally, sent upstream or filtered.
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
Bridge membership/FDB shows local L2 forwarding information only; upstream VLAN topology, routed path and guest/application health remain separate.
In depth
Linux bridges, ports and VLAN filtering
A Linux bridge is a software switch. It learns MAC addresses on its ports, forwards frames between them and can run STP. The bridge command manages the details, and the bridge(8) manual page covers:
- Objects: ports (
link), the forwarding database (fdb), multicast groups (mdb) and per-port VLANs (vlan). - Port options:
learningandfloodare on by default, andhairpinis off.guarddisables the port if it receives a BPDU. - VLAN membership:
pvidmakes a VLAN the one that untagged ingress frames are assigned to, anduntaggedsends that VLAN without a tag on egress.
Port states (manual)
| Value | State | Behaviour |
|---|---|---|
| 0 | Disabled | Inactive |
| 1 | Listening | Only BPDUs; other frames dropped |
| 2 | Learning | Learns MACs, doesn't forward |
| 3 | Forwarding | Fully active |
| 4 | Blocking | Only BPDUs |
States 1, 2 and 4 need STP enabled on the bridge.
Where bridges appear
| Use | Ports |
|---|---|
| Virtual machines (KVM/libvirt) | The physical NIC (or a bond) plus one tap interface per VM |
| Containers | veth pairs (for example docker0, cni0) |
| VLAN-aware hypervisor host | One bridge with vlan_filtering 1, each VM port in its own VLAN |
A VLAN-aware bridge
host$ sudo ip link add br0 type bridge vlan_filtering 1 stp_state 0
host$ sudo ip link set bond0 master br0
host$ sudo ip link set vnet3 master br0
host$ sudo bridge vlan add dev bond0 vid 110
host$ sudo bridge vlan add dev bond0 vid 120
host$ sudo bridge vlan add dev vnet3 vid 110 pvid untagged
host$ sudo bridge vlan del dev vnet3 vid 1
host$ bridge vlan show
port vlan-id
bond0 1 PVID Egress Untagged
110
120
vnet3 110 PVID Egress Untagged
host$ bridge fdb show br br0 | grep -v permanent | head
host$ bridge link show
Reading the example
The uplink (bond0) carries VLANs 110 and 120 tagged, which matches a switch trunk. The VM port vnet3 is an access port in VLAN 110. Removing VLAN 1 from vnet3 keeps the VM out of the bridge's default VLAN. If the VM gets no connectivity, bridge fdb show shows whether its MAC address was learned, and in which VLAN.
Documented example, not captured output.
How it works at runtime
Bridges is part of Linux Networking → Bridges. A Linux bridge is an in-kernel Layer 2 forwarding domain connecting ports and optionally the host itself; port membership, bridge VLAN filtering, FDB learning, STP state and IP placement determine behavior.
Topic-specific state model. A Linux bridge is an in-kernel Layer 2 forwarding domain connecting ports and optionally the host itself; port membership, bridge VLAN filtering, FDB learning, STP state and IP placement determine behavior.
Interpretation rule. - Bridge UP ≠ member ports are forwarding or connected.
- Port enslaved ≠ correct VLAN/PVID/untagged policy when VLAN filtering is enabled.
- FDB entry learned ≠ end-to-end IP service works.
- Host IP on a member interface ≠ equivalent to placing it on the bridge device.
Quick reference
Linux bridges connect interfaces at Layer 2 — used for VMs, containers and transparent setups.
ip link add br0 type bridge
ip link set eno1 master br0; ip link set br0 up
nmcli con add type bridge con-name br0 ifname br0 ipv4.method manual ipv4.addresses 10.0.10.21/24 ipv4.gateway 10.0.10.1
nmcli con add type bridge-slave ifname eno1 master br0
bridge link show; bridge fdb show br br0 | head
bridge vlan show
The host IP moves from the physical NIC to the bridge. Enable vlan_filtering for VLAN-aware bridges. If VM traffic is filtered unexpectedly, check net.bridge.bridge-nf-call-iptables.
Limits and how it fails
Primary failure point. Bridge membership/FDB shows local L2 forwarding information only; upstream VLAN topology, routed path and guest/application health remain separate.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Bridges owns Linux software L2 forwarding. VLAN owns 802.1Q subinterfaces; Network Namespaces/containers may connect via veth/tap but own isolation semantics.
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 → Bridges. 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
Bridges operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Bridges.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | A Linux bridge is an in-kernel Layer 2 forwarding domain connecting ports and optionally the host itself; port membership, bridge VLAN filtering, FDB learning, STP state and IP placement determine behavior. | 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 | bridge netdevice → port membership → STP/VLAN port state → FDB learning/forwarding → host L3 attachment or external port → neighbor/routing → workload | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Bridge membership/FDB proves local L2 forwarding information only; upstream VLAN topology, routed path and guest/application health remain separate. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux networking evidence can establish this proof path: bridge netdevice → port membership → STP/VLAN port state → FDB learning/forwarding → host L3 attachment or external port → 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. Bridge membership/FDB proves local L2 forwarding information only; upstream VLAN topology, routed path and guest/application health remain separate. | 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. |
Bridges · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Bridges |
|---|---|
| Topic path | Linux Networking → Bridges |
| Runtime state | A Linux bridge is an in-kernel Layer 2 forwarding domain connecting ports and optionally the host itself; port membership, bridge VLAN filtering, FDB learning, STP state and IP placement determine behavior. |
| Fast checks | - List bridge, member ports, STP state, VLAN filtering and per-port VLAN/PVID settings. - Confirm host IP addressing is attached to the intended L3 interface in the topology. - Inspect FDB learning and per-port counters while reproducing the failing flow. - Validate VM/container/host and upstream paths separately to find the first failed bridge boundary. |
| Verification chain | bridge netdevice → port membership → STP/VLAN port state → FDB learning/forwarding → host L3 attachment or external port → 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 | Bridge membership/FDB proves local L2 forwarding information only; upstream VLAN topology, routed path and guest/application health remain separate. 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. |