Docker networking is a vital concept for enabling communication between containers, hosts, and external systems. It allows containers to connect with one another and the outside world while maintaining security and isolation.
These top MCQs on Docker networking cover the fundamental concepts, types of networks, and practical configurations, helping you prepare for interviews by understanding real-world networking scenarios in containerized environments.
1.) What is the default network type created when Docker is installed?
2.) Which command lists all available Docker networks?
3.) What is the purpose of the docker network create command?
4.) Which network driver is used for communication between containers on the same host by default?
5.) What is the role of the –network flag in the docker run command?
6.) Which network driver allows a container to share the host’s network namespace?
7.) What is an “overlay network” in Docker?
8.) What is the purpose of the docker network inspect command?
9.) Which network driver disables all networking for a container?
10.) How do you connect a running container to an existing network?