About bridge network
Bridge network in general networking terms refers to network type that connects multiple network segments or devices, allowing them to communicate with each other as if they were on the same physical network.
A bridge learns the MAC addresses of devices in each segment by examining the source address of incoming frames. It builds a MAC address table to forward frames to their destination segment.
In virtual networks (e.g., Docker network), a virtual bridge allows communication between virtual machines (VMs) or containers on different network segments, or between VMs/containers and the host network.
Bridge network vs router
-
Bridge: Operates at Layer 2 (Data Link Layer) and uses MAC addresses to forward traffic between network segments. It doesn’t change the IP addresses and doesn’t perform routing.
-
Router: Operates at Layer 3 (Network Layer) and uses IP addresses to route traffic between different networks or subnets. It performs network segmentation and is responsible for forwarding traffic between different IP networks.