Docker Associate Container Networking Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 11982 | Total Attempts: 187,298
| Attempts: 17 | Questions: 20 | Updated: Aug 16, 2026
Please wait...
Question 1 / 21
🏆 Rank #-- ▾
0 %
0/100
Score 0/100

1. What is the primary security benefit of using overlay networks in Docker Swarm?

Explanation

Docker Swarm overlay networks can encrypt traffic traveling between nodes, helping protect service communications from interception while crossing the network. This is especially useful when containers run on different hosts. Encryption is enabled for an overlay network by configuring it with Docker’s encryption option; it may add some performance overhead.

Submit
Please wait...
About This Quiz
Docker Associate Container Networking Quiz - Quiz

This quiz evaluates your understanding of Docker container networking, a critical skill for the Docker Certified Associate exam. You'll be tested on network drivers, container communication, service discovery, and networking best practices. Master these concepts to confidently manage multi-container applications and secure container-to-container communication in production environments.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. What command creates a custom bridge network in Docker?

Explanation

The `docker network create` command creates a Docker network, and `--driver bridge` specifies that it should use the bridge driver. `mynet` is the custom name assigned to the network. Containers can then connect to this network for communication with one another.

Submit

3. What is the primary advantage of using an overlay network in Docker Swarm?

Explanation

Overlay networks allow containers running on different Docker Swarm nodes to communicate as if they were on the same network. They provide service-to-service connectivity across hosts while isolating that traffic from other networks.

Submit

4. What does the 'none' network driver in Docker do?

Explanation

The `none` network driver isolates a Docker container from external networks. It does not connect the container to the host, a bridge, or an overlay network; only the container’s loopback interface remains available.

Submit

5. In Docker, which port mapping syntax exposes port 8080 inside a container to port 80 on the host?

Explanation

Docker’s `-p` option uses the format `host_port:container_port`. Therefore, `-p 80:8080` maps port 80 on the host to port 8080 inside the container, allowing host traffic on port 80 to reach the container service.

Submit

6. What is the purpose of the 'docker network inspect' command?

Explanation

`docker network inspect` displays detailed information about a specified Docker network, including its configuration, connected containers, and network settings. This helps you understand how the network is set up and troubleshoot connectivity issues.

Submit

7. In Docker Swarm, what does the embedded DNS server do?

Explanation

Docker Swarm’s embedded DNS lets containers discover services by name. It resolves a service name to that service’s virtual IP, allowing containers to connect without needing to know individual container addresses.

Submit

8. Which of the following is true about container DNS in Docker?

Explanation

Docker includes an embedded DNS service that lets containers on the same user-defined network resolve one another by container name. This makes it easier for services to communicate without hard-coding IP addresses, which may change as containers are recreated.

Submit

9. In Docker Swarm, which network type is automatically created for service discovery?

Explanation

Docker Swarm automatically creates an overlay network named `ingress` when the swarm is initialized. It supports the routing mesh, allowing published service ports to receive traffic across swarm nodes and helping route requests to the appropriate service tasks. Other network types, such as `bridge` and `host`, are not created automatically for this purpose.

Submit

10. What happens when you connect a running container to a new network?

Explanation

Connecting a running container to another network attaches an additional network interface and assigns it the network’s configuration, such as an IP address. The container continues running, and its existing network connection remains unchanged.

Submit

11. Which command removes a Docker network from the system?

Explanation

`docker network remove mynet` removes the Docker network named `mynet` from the system. The network must have no containers connected to it; disconnect or remove any attached containers before running the command.

Submit

12. Which flag allows you to specify a custom IP address for a container when running it?

Explanation

The `--ip-address` flag lets you assign a specific IP address to a container when it starts, rather than relying on automatic address assignment. This can help when a container needs a predictable address for network communication or service configuration.

Submit

13. What is the macvlan network driver primarily used for?

Explanation

The macvlan driver gives each container its own MAC address and makes it appear as a separate device on the physical network. This allows legacy applications that expect direct Layer 2 connectivity or a presence on the physical network to work without requiring changes to their networking assumptions.

Submit

14. Which network driver allows containers to communicate with the host and external networks directly?

Explanation

The host network driver lets a container use the host’s network stack directly, rather than creating a separate virtual interface or network namespace. This enables direct communication with host services and access to external networks through the host’s interfaces. Because networking is shared, containers have less isolation and may encounter port conflicts with host services.

Submit

15. Which Docker networking mode would you use to expose a container directly to the host's network interface?

Explanation

Host mode places the container in the host’s network namespace, allowing it to use the host’s network interfaces and IP address directly. This avoids the separate virtual network interface used by bridge mode, and ports are exposed on the host without Docker port mapping. The trade-off is reduced network isolation.

Submit

16. How do containers on the same custom bridge network communicate with each other by default?

Explanation

Containers on a custom Docker bridge network can discover one another through Docker’s built-in DNS service. They can communicate using each other’s container names, so applications do not need to rely on changing IP addresses.

Submit

17. Which network driver is used for communication across multiple Docker hosts in Swarm mode?

Explanation

The overlay driver creates a virtual network that spans multiple Docker hosts, allowing containers on different hosts in a Swarm to communicate as though they share the same network.

Submit

18. In Docker, what is the default network driver for containers on a single host?

Explanation

The bridge network driver is Docker’s default for containers on a single host. It creates a virtual network bridge that lets containers communicate with one another and, when configured, with external networks.

Submit

19. What does port 2375 typically represent in Docker networking?

Explanation

Port 2375 is commonly used for Docker’s remote API over unencrypted HTTP. Because it does not use TLS, traffic and API commands are not protected in transit, so exposing this port can allow unauthorized access to the Docker daemon.

Submit

20. In Docker, what is a virtual IP (VIP) in the context of services?

Explanation

A virtual IP (VIP) provides a stable address for a Docker service, even as its containers change or scale. Docker uses this address to route incoming requests across the service’s available containers, supporting load balancing without requiring clients to track individual container IPs.

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What is the primary security benefit of using overlay networks in...
What command creates a custom bridge network in Docker?
What is the primary advantage of using an overlay network in Docker...
What does the 'none' network driver in Docker do?
In Docker, which port mapping syntax exposes port 8080 inside a...
What is the purpose of the 'docker network inspect' command?
In Docker Swarm, what does the embedded DNS server do?
Which of the following is true about container DNS in Docker?
In Docker Swarm, which network type is automatically created for...
What happens when you connect a running container to a new network?
Which command removes a Docker network from the system?
Which flag allows you to specify a custom IP address for a container...
What is the macvlan network driver primarily used for?
Which network driver allows containers to communicate with the host...
Which Docker networking mode would you use to expose a container...
How do containers on the same custom bridge network communicate with...
Which network driver is used for communication across multiple Docker...
In Docker, what is the default network driver for containers on a...
What does port 2375 typically represent in Docker networking?
In Docker, what is a virtual IP (VIP) in the context of services?
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!