

The one end of the bridge is connected to host ethernet. This bridge is called ‘Docker0’ and all the containers running on a standalone docker instance are connected to this bridge. Docker uses a virtual bridge to connect all the containers running on a single VM. There are 2 parts to establishing connectivity – connecting containers running on single VM and connecting containers spread across VMs (nodes).Ĭonnecting containers on a single VM is simple and I guess well understood. Docker containers are no different than those devices and to connect containers we need a similar setup. If you need a refresher check out this link on home networking. Interestingly most of us are already using these components in our home – to connect our devices at home with internet. Networking primarily relies on Bridge (or switch) and Router. Let’s start by talking about networking in general which is to make computers (VMs and devices) talk to each other. Hence, I thought to simplify this convoluted piece.

And that’s a common pain point I have heard from most of my customers. While the underpinnings are important, what most of them fail to do is to paint a simple picture for Devs who are looking to understand the overall traffic flow and how communication between containers work. If you search for any Docker Networking article, it invariably gets into the details of network namespaces, netns commands, ip links, iptables, IPVS, veths, mac addresses, and so on. While most will agree to that statement, it’s even more true from a developer standpoint. When I joined Docker Inc., my hiring manager had mentioned to me that everything they do is fairly simple except Networking.
