Traffic Flow Example
Explore how Docker creates overlay networks to enable container communication across different hosts. Understand the underlying components like VTEPs, VXLAN tunnels, and virtual Ethernet adapters, and see how traffic flows between containers using these technologies. This lesson clarifies the network mechanisms behind Docker overlay networks, helping you better manage and discuss Docker networking in complex environments.
We'll cover the following...
The hands-on examples from earlier had two hosts connected via an IP network. You deployed an overlay network across both hosts, connected two containers to it, and did a ping test. Let’s explain some of the things that happened behind the scenes.
Docker created a new sandbox (network namespace) on each host with a new switch called Br0. It also created a VTEP with one end connected to the Br0 virtual switch and the other end connected to the host’s network stack. The end in the host’s network stack got an IP address on the underlay network that the host is connected to and was bound to the UDP port 4789. Finally, the two VTEPs on each host created a VXLAN tunnel as the backbone for the overlay network.
The figure below shows the configuration. Remember, the VXLAN tunnel goes through the networks at the bottom of the diagram; we’ve just drawn it higher up for readability.
At this point, you’ve created the VXLAN ...