In recent articles, we talked about containers a lot like the below articles. In this article also we are going to continue the same trend and talk about how docker networking works.
Docker components and how they interact.
To understand very basic docker networking we need some knowledge beforehand. Lets read about namespaces in linux, veth pair and bridge.
Namespaces are a feature of the kernel which allows the partitioning of the system resources. One such resource is networking. Our network is there is default namespaces. We cannot see that because the whole OS uses the same namespaces.
It’s just like a link cable. Whatever you send on one end of the pair will be received at the other end.
Bridge generally sits in between two computers and based on the destination of the packet decides where to forward the packet to. You can consider bridges as switch.