🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Linux Advanced

What is Linux Bridge?

A software-based network switch in the Linux kernel that connects multiple network interfaces at Layer 2, enabling VM and container networking.

A Linux bridge operates like a physical network switch in software, forwarding Ethernet frames between connected interfaces based on MAC addresses. Bridges are fundamental to virtualization (KVM/QEMU VMs connect through bridges to reach the physical network) and container networking (Docker creates docker0 bridge by default). Configuration uses ip link and bridge commands or the legacy brctl tool. Bridges support STP (Spanning Tree Protocol) to prevent loops, VLAN filtering for traffic isolation, and can be combined with iptables for firewalling bridged traffic. Network namespaces connect to bridges via veth pairs.