B Y T E B A R

Study Hub / Docker Certified Associate (DCA) / Domain 4.0

Docker Certified Associate (DCA) Domain 4.0: Networking — Explained

Domain 4.0 is how containers talk: the network drivers Docker provides, when each fits, and how traffic gets from the outside world to a container — and between containers across hosts.

Exam weight: 15% · Free study preview from ByteBar

Network drivers: the menu

Single host → bridge. Multi-host Swarm → overlay. Need max speed, accept exposure → host. Need to look like physical hardware → macvlan. Need nothing → none.

Publishing ports and DNS

Designing container networks

The must-memorize table: Docker network drivers

Which driver for which topology.

DriverScopeUse it when
bridgeSingle hostDefault; containers on one machine
hostSingle host (no isolation)Max performance; no network isolation needed
noneNo networkIsolated compute; custom networking
overlayMulti-host (Swarm)Containers across hosts, one virtual network
macvlanPhysical networkContainers need real MACs / look like hardware

Try it: 4 sample questions

Sample questions to check your understanding of this domain. Answers and full reasoning are tucked under each one.

1. Two containers on the same host need to communicate by name, isolated from other projects' containers. What should the admin create?

  1. A. A. Nothing — the default bridge provides DNS by name
  2. B. B. A user-defined bridge network for the project
  3. C. C. A host network for maximum speed
  4. D. D. An overlay network
Show answer & reasoning

B. User-defined bridges provide automatic DNS resolution by container name and isolation from other networks — the default bridge has neither (no embedded DNS, all containers lumped together). Host (C) destroys isolation; overlay (D) is for multi-host.

2. A web container must be reachable from outside the host on port 8080, mapping to its internal port 80. Which flag does this?

  1. A. A. --expose 8080
  2. B. B. -p 8080:80 — publish host port 8080 to container port 80
  3. C. C. --network host
  4. D. D. -e PORT=8080
Show answer & reasoning

B. -p host:container publishes: traffic to the host's 8080 reaches the container's 80. EXPOSE (A) only documents; host networking (C) shares the whole stack (overkill and exposed); -e (D) sets an env var the app may ignore. Format is always host:container, left to right.

3. A Swarm service must be reachable on port 80 from any swarm node, with traffic load-balanced to its containers wherever they run. What provides this?

  1. A. A. A bridge network on each node
  2. B. B. The Swarm routing mesh (ingress) — publishes the port on every node with internal load balancing
  3. C. C. host networking on every container
  4. D. D. macvlan on each node
Show answer & reasoning

B. The routing mesh is Swarm's ingress: every node listens on the published port and the mesh routes to healthy task containers cluster-wide. Per-node bridges (A) don't span hosts; host networking (C) can't load-balance across nodes. "Any node, balanced to containers" → routing mesh.

4. A legacy monitoring tool requires each monitored container to have its own MAC address visible on the physical LAN. Which driver fits?

  1. A. A. bridge
  2. B. B. overlay
  3. C. C. macvlan — containers appear as physical devices with real MACs
  4. D. D. none
Show answer & reasoning

C. macvlan assigns containers MAC addresses on the physical network — they look like real hardware to switches, DHCP, and monitoring tools. Bridge (A) and overlay (B) hide containers behind NAT/virtual networks; none (D) gives no network at all. "Look like hardware" → macvlan.

This was one domain. The simulator drills all 6.

This free preview covered Networking (Domain 4.0, 15%). Not covered here: Orchestration (Domain 1.0, 25%); Security (Domain 5.0, 15%). Swarm orchestration and Docker security — the most scenario-heavy DCA material — stay in the paid guide and practice bank. The ByteBar Practice Exam Simulator drills every domain with 1,000 exam-style questions — $9.99 one-time unlocks all 28 exams. Prefer to read? The full DCA Study Guide is in the ByteBar shop on Etsy.

Practice Exam Simulator — $9.99 one-time, all 28 exams Full Study Guides on Etsy
Keep learning: ByteBar blog · ByteBar store