DockerOrchestration

Swarm Init & Listen Addr — DCA Practice Question

A representative Docker Certified Associate (DCA) exam question on Swarm Init & Listen Addr. Work through it below, then read why each option is right or wrong.

This question is part of the free Docker Certified Associate practice test.

Short answer

The correct answer is C. 0.0.0.0:2377, the documented default listen address, so it accepts connections on all interfaces on port 2377.

C is correct: the swarm init reference lists 0.0.0.0:2377 as the default for --listen-addr. A is wrong because port 7946 is used for node discovery, not for manager API traffic, and the listen address is not derived from the advertised one. B is wrong because the default is 0.0.0.0, not the loopback address, so remote nodes can connect. D is wrong because port 4789 carries overlay network traffic, not swarm management traffic.

The Question

An administrator runs docker swarm init --advertise-addr 10.0.0.5 and passes no --listen-addr flag. On which address and port does the new manager listen for swarm management traffic?

A10.0.0.5:7946, the advertised address combined with the port the swarm uses for node discovery gossip
B127.0.0.1:2377, the loopback address, because a listen address that is not set is restricted to local clients
C0.0.0.0:2377, the documented default listen address, so it accepts connections on all interfaces on port 2377Correct
D10.0.0.5:4789, the advertised address combined with the port the swarm uses for VXLAN overlay traffic

Why C is correct

C is correct: the swarm init reference lists 0.0.0.0:2377 as the default for --listen-addr. A is wrong because port 7946 is used for node discovery, not for manager API traffic, and the listen address is not derived from the advertised one. B is wrong because the default is 0.0.0.0, not the loopback address, so remote nodes can connect. D is wrong because port 4789 carries overlay network traffic, not swarm management traffic.

Why the other options are wrong

Option A: 10.0.0.5:7946, the advertised address combined with the port the swarm uses for node discovery gossip

Option A does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.

Option B: 127.0.0.1:2377, the loopback address, because a listen address that is not set is restricted to local clients

Option B does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.

Option D: 10.0.0.5:4789, the advertised address combined with the port the swarm uses for VXLAN overlay traffic

Option D does not satisfy the requirement in the scenario. Review the explanation above: the correct choice (C) is the only one that fully meets every constraint stated in the question.

Key idea: Swarm Init & Listen Addr

C is correct: the swarm init reference lists 0.0.0.0:2377 as the default for --listen-addr. A is wrong because port 7946 is used for node discovery, not for manager API traffic, and the listen address is not derived from the advertised one. B is wrong because the default is 0.0.0.0, not the loopback address, so remote nodes can connect. D is wrong because port 4789 carries overlay network traffic, not swarm management traffic. On the DCA exam, questions in the "Orchestration" domain test whether you can map a scenario's constraints to the right choice. Read the requirement carefully, eliminate options that violate any single constraint, and pick the one that satisfies all of them with the least operational overhead.

Ready to see how you'd score?

Take the free practice quiz and find out which Docker Certified Associate domains you need to focus on. No signup required.

Practice 5 similar questions

Same cert, same or adjacent domain. Use these after reviewing the explanation.

Related Docker Certified Associate Practice Questions

Official sources used

Verify program and exam details at the source before scheduling.