Pcornel
Browse topics
Options
Recent
Favorites
Linux · Technical reference

Bridges

Direct answer

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.

When to use this

Use it to give VMs or containers direct access to the LAN, or when guests behind a bridge have no connectivity.

First 30 seconds

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.

Operational verification

ports enslaved → bridge learns MACs → frames forwarded between ports → host IP on the bridge reaches the LAN

Evidence · next step

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
Platform / version applicability
linux
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformlinux
Key commandbridge fdb show
Scope / prerequisiteUse it to give VMs or containers direct access to the LAN, or when guests behind a bridge have no connectivity.
Reference · 3
What next?3 suggested next steps
Catalog command links3
Evidence1
On this pageJump to a specific section
Linux command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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 references

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.

observation · 1
Key points

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.

Key checks
  • bridge link — bridge ports and state
  • ip -br addr — interfaces and addresses
  • ip route — routing table and default route
  • ip neigh — ARP/neighbour cache
  • ip route get <dest> — route, interface and source chosen for a destination
  • nmcli 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: learning and flood are on by default, and hairpin is off. guard disables the port if it receives a BPDU.
  • VLAN membership: pvid makes a VLAN the one that untagged ingress frames are assigned to, and untagged sends that VLAN without a tag on egress.

Port states (manual)

ValueStateBehaviour
0DisabledInactive
1ListeningOnly BPDUs; other frames dropped
2LearningLearns MACs, doesn't forward
3ForwardingFully active
4BlockingOnly BPDUs

States 1, 2 and 4 need STP enabled on the bridge.

Where bridges appear

UsePorts
Virtual machines (KVM/libvirt)The physical NIC (or a bond) plus one tap interface per VM
Containersveth pairs (for example docker0, cni0)
VLAN-aware hypervisor hostOne 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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor doclinux current

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%
Technical changelog & impact

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.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

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.

Aliases that resolve here
linux bridgebridge networking linuxbr0 linuxbridge fdb linux
Embedded reference data

Quick lookup tables

Bridges operational reference

Topic-specific lookup boundaries, proof limits and next-step Evidence for Bridges.

Lookup boundaryTopic-specific referenceOperational use
Scope / effective stateA 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 verificationPin 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 chainbridge netdevice → port membership → STP/VLAN port state → FDB learning/forwarding → host L3 attachment or external port → neighbor/routing → workloadTrace requested/configured state through effective state to the observed workload result.
Failure boundaryBridge 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 evidenceCorrelated 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 → workloadUse this observation only for the specific claim it actually supports.
Evidence limitIt 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 checkContinue 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 boundaryBridges
Topic pathLinux Networking → Bridges
Runtime stateA 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 chainbridge 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 boundaryBridge 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 ruleProve which configuration source owns the state, then prove that the running consumer loaded or generated the intended state.
Confirmation

Confirm action

Continue?