Single-Host Bridge Networks
Let's learn about single-host bridge networks.
What is a single-host bridge?
The simplest type of Docker network is the single-host bridge network.
The name tells us two things:
Single-host tells us the network only spans a single Docker host
Bridge tells us that it’s an implementation of an 802.1d bridge (layer 2 switch)
Docker creates single-host bridge networks with built-in bridge
driver. If you run Windows containers, you’ll need to use the nat
driver, but for all intents and purposes, they work the same.
Example
The figure below shows two Docker hosts with identical local bridge networks, both called mynet
. Even though the networks are identical, they are independent and isolated, meaning the containers in the picture cannot communicate, even if the nodes are part of the same swarm.
Get hands-on with 1300+ tech skills courses.