What is the default network driver used by Docker when no network is specified?
Docker uses the bridge network driver by default. It creates a private internal network on the host for containers to communicate.
Click to reveal answer
beginner
How does Docker's default bridge network handle container IP addressing?
Docker assigns each container a unique IP address within the bridge network's subnet, allowing containers to communicate using these IPs.
Click to reveal answer
intermediate
Can containers on the default bridge network communicate with each other by container name?
No, containers on the default bridge network cannot resolve each other by name. They must use IP addresses or user-defined networks for name resolution.
Click to reveal answer
intermediate
What is the role of NAT in Docker's default bridge network?
Docker uses Network Address Translation (NAT) to allow containers on the bridge network to access external networks like the internet through the host.
Click to reveal answer
beginner
How can you inspect the default bridge network configuration in Docker?
Use the command docker network inspect bridge to see details like subnet, gateway, and connected containers.
Click to reveal answer
What is the default subnet used by Docker's bridge network?
A172.17.0.0/16
B192.168.0.0/24
C10.0.0.0/8
D127.0.0.1/32
✗ Incorrect
Docker's default bridge network typically uses the subnet 172.17.0.0/16 for container IP addressing.
Can containers on the default bridge network communicate with each other using container names?
AYes, by default
BOnly on Windows hosts
CNo, they must use IP addresses
DOnly if linked explicitly
✗ Incorrect
Containers on the default bridge network cannot resolve each other by name; they must use IP addresses or user-defined networks.
What command shows detailed info about the default bridge network?
Adocker network ls
Bdocker inspect container
Cdocker ps -a
Ddocker network inspect bridge
✗ Incorrect
The command 'docker network inspect bridge' displays detailed configuration of the default bridge network.
How does Docker allow containers on the bridge network to access the internet?
AUsing NAT through the host
BDirect public IP assignment
CVPN tunneling
DContainers cannot access the internet
✗ Incorrect
Docker uses Network Address Translation (NAT) on the host to enable containers to access external networks.
Which of these is true about the default Docker bridge network?
AIt assigns public IP addresses to containers
BIt isolates containers from the host network
CIt allows automatic DNS resolution by container name
DIt requires manual IP assignment
✗ Incorrect
The default bridge network isolates containers from the host network using a private subnet and NAT.
Explain how Docker's default bridge network manages container communication and external access.
Think about how containers talk to each other and the outside world.
You got /4 concepts.
Describe how to inspect and understand the configuration of Docker's default bridge network.
Use Docker commands to explore network details.
You got /4 concepts.
Practice
(1/5)
1. What is the default behavior of Docker's bridge network regarding container communication?
easy
A. Containers can communicate by container name without extra setup.
B. Containers cannot communicate with each other at all.
C. Containers can communicate with each other by IP address only.
D. Containers share the host network directly.
Solution
Step 1: Understand bridge network basics
The default bridge network connects containers on the same Docker host and allows communication by IP address.
Step 2: Analyze name resolution behavior
By default, containers on the bridge network cannot resolve each other's names without a custom network.
Final Answer:
Containers can communicate with each other by IP address only. -> Option C
Quick Check:
Bridge network communication = IP only [OK]
Hint: Default bridge allows IP communication, not name resolution [OK]
Common Mistakes:
Assuming container names resolve by default
Thinking containers share host network directly
Believing containers cannot communicate at all
2. Which Docker command shows the default bridge network details?
easy
A. docker info bridge
B. docker network ls
C. docker container ls
D. docker network inspect bridge
Solution
Step 1: Identify command to inspect networks
To see details of a specific network, use docker network inspect <network-name>.
Step 2: Apply to default bridge network
The default bridge network is named "bridge", so the command is docker network inspect bridge.