$linuxjunkies
>

overlay network

also: virtual network, software-defined network layer, container network

A virtual network layer built on top of an existing physical network infrastructure that allows containers or virtual machines to communicate across hosts as if they were on the same local network.

An overlay network is a software-defined networking abstraction that encapsulates traffic between containers or VMs and tunnels it through the underlying physical network. This allows workloads on different physical hosts to communicate directly without needing changes to the host network infrastructure.

Common overlay network implementations in Linux include VXLAN (Virtual eXtensible LAN) and Flannel, which are widely used by container orchestration platforms like Docker Swarm and Kubernetes. For example, two containers running on separate physical servers can ping each other through their overlay network IP addresses, while the actual packets are encapsulated and routed through the physical network infrastructure.

Overlay networks provide flexibility for service deployment, enable multi-tenant isolation, and allow dynamic scaling without requiring manual network reconfiguration. However, they add a layer of encapsulation that slightly increases latency and CPU overhead compared to direct physical network communication.

Related terms