A systems administrator is deploying a distributed application across a multi-node Docker Swarm cluster. The microservices, running in separate containers on different hosts, must be able to communicate with each other over a single, private network. Which container network type should the administrator create to enable this inter-host communication seamlessly?
The correct answer is the overlay network. Overlay networks in Docker are designed specifically for multi-host communication, creating a virtual network that spans across all nodes in a Docker Swarm cluster. This allows containers on different hosts to communicate as if they were on the same machine.
The bridge network is the default for standalone containers on a single host and does not facilitate communication across different hosts by itself.
The host network removes network isolation, making the container share the host's networking namespace. This is not designed for creating a private, multi-host network for containers.
The macvlan network allows a container to appear as a physical device on the host's network by assigning it a unique MAC address. While it can enable multi-host communication, it's more complex and typically used for legacy applications or those that need to be on the physical LAN directly, not for creating a virtual network for swarm services.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
How does an overlay network enable multi-host communication in a Docker Swarm cluster?
Open an interactive chat with Bash
What are some common use cases for macvlan networks compared to overlay networks?
Open an interactive chat with Bash
Why is the bridge network unsuitable for multi-host communication in Docker?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Services and User Management
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access