Docker networking basics explained
Introduction In this post, we are going to delve in the theory and components of Docker networking. Generally, when we create a container, from the networking aspect it either needs to communicate with another container or it comprises an application that needs to communicate with the internet. Docker networking essentially consists of the following three major components: 1 Container network model: This is a design specification that outlines the fundamental building blocks of docker. 2 libnetwork: This is the real-world implementation of CNM used by Docker to communicate between containers. libnetwork is also responsible for service discovery, ingress based container load balancing and the networking management control plane functionality. 3 Drivers: libnetwork implements CNM using drivers. The drivers are used to implement different network topologies. We’ll now discuss the drivers that are used by libnetwork. 1 Bridge This is the default driver used by libnetwork. A bridged network is a link layer device that forwards traffic between different network segments. The bridge driver uses a software bridge which allows containers connected to the same bridged network to communicate with each other. It also provides a layer of isolation to containers not connected on the same network. The bridge driver only works on Linux. 2 Host If you use the host network mode for a container, that container’s network stack is not isolated from the Docker host (the container...
Read More