Bird
0
0

If a service is deployed on a Docker Swarm overlay network, what IP address will containers use to communicate across nodes?

medium📝 Command Output Q5 of 15
Docker - Swarm
If a service is deployed on a Docker Swarm overlay network, what IP address will containers use to communicate across nodes?
ANo IP address is assigned; communication uses hostnames only.
BThe host machine's IP address.
CThe container's IP address assigned by the overlay network.
DThe public IP address of the Swarm manager.
Step-by-Step Solution
Solution:
  1. Step 1: Understand container communication in overlay networks

    Containers get virtual IPs from the overlay network to communicate across hosts.
  2. Step 2: Evaluate options

    The container's IP address assigned by the overlay network. correctly states containers use overlay-assigned IPs. Options A, B, and C are incorrect because communication is via container IPs, not host or manager IPs, and IPs are assigned.
  3. Final Answer:

    The container's IP address assigned by the overlay network. -> Option C
  4. Quick Check:

    Overlay network assigns container IPs for cross-node communication [OK]
Quick Trick: Containers use overlay network IPs, not host IPs [OK]
Common Mistakes:
  • Confusing host IP with container IP
  • Assuming no IP is assigned
  • Thinking manager IP is used for container communication

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes