Overlay networking across hosts
An overlay adds a logical network across multiple Docker daemon hosts. The underlay is the actual network connecting those hosts. Docker uses encapsulation to carry overlay traffic over the underlay; Swarm membership is required for its built-in multi-host overlay. Standalone containers need an attachable overlay. Application-data encryption is optional and has performance and compatibility costs; it does not replace endpoint authentication. Extra encapsulation consumes packet space, so investigate effective MTU and verify the host-to-host path. A single bridge cannot span hosts simply because its name matches.
Worked networking scenario
Offline design exercise only. All addresses, topology and observations are fictional; do not contact endpoints, change host networking, create a Swarm or modify firewall rules. A real verification requires an approved disposable environment and documented scope. Keep the exercise offline. For any separately authorized Docker verification, identify the effective endpoint (including DOCKER_HOST and DOCKER_CONTEXT) before sending even read-only Engine requests. Record server version and platform; redact sensitive metadata.
Offline design:node A: web -> overlay endpoint | encapsulated packet private underlay |node B: overlay endpoint -> workerSwarm membership: required; standalone attachment: optional design requirementWeb and worker may share the logical network although on different hosts. Confirm that the underlay permits only approved node-to-node traffic, Swarm control connectivity is healthy and the overlay is created with the correct attachment policy. A failure only across hosts suggests investigating the underlay, encapsulation and MTU before modifying application configuration. No cluster is created here. Separate control-plane membership from application-data connectivity. The test plan needs a known-good same-node control and cross-node evidence; a failed nonmember request alone is not proof of segmentation.
Common mistake
Overlay is not inherently encrypted and an attachable overlay expands possible membership.
Manual practice
Design a two-node private test plan with one allowed cross-node request, one denied nonmember path, MTU evidence and cleanup by the authorized lab owner. Do not run cluster or firewall commands.
Use the offline worksheet lab-fixtures/docker-advanced-networking/07-overlay-networking/scenario.txt. No external connectivity or Docker installation is necessary for this task.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Overlay networking across hosts — Knowledge check
Interpret network design and diagnostic evidence without live infrastructure.
What is the underlay?
What allows standalone containers to join a Swarm overlay?
Is application-data encryption automatic for every overlay?