Skip to main content
Manage Docker networks beyond the basics. In this guide, you’ll learn how to list default networks, inspect their settings, connect or disconnect containers, and remove unused networks to keep your Docker environment clean.

Table of Contents


Listing Default Networks

Docker provides three built-in networks out of the box: bridge, host, and none. Use the following command to see them:
Example output:
You can also get a quick overview in tabular form:
The bridge network uses the 172.17.0.0/16 subnet by default, with gateway 172.17.0.1 assigned to the docker0 interface on the host.

Inspecting a Network

To dive deeper into a network’s configuration—such as its IPAM settings, subnets, gateways, and attached containers—run:
Sample output (abridged):
This output shows the network’s driver, IPAM configuration, and any containers currently connected.

Connecting and Disconnecting Containers

You can attach a running container to additional networks or remove it from one without restarting:
These commands make it easy to adjust a container’s network access on the fly.

Removing Networks

Clean up unused networks to avoid clutter:
This will remove all networks not used by at least one container.
Are you sure you want to continue? [y/N]

Watch Video