How does an overlay network work?

AdvancedConceptNetworking
Answer

Overlay spans multiple Docker hosts, encapsulating container traffic in VXLAN (UDP 4789) between nodes. It requires Swarm mode (control plane via gossip on 7946 and cluster management on 2377) or a key-value store. --opt encrypted adds IPsec ESP encryption. In Kubernetes, CNI plugins fill this role instead.

All Docker questions Roadmap: Docker & containers

More on Networking