SSD Nodes Learn Hosting plans →
Guides Matt ConnorBy Matt Connor

Docker: no non-overlapping IPv4 address pool

Docker cannot create a network because its default address pools are used up or clash with a VPN or LAN route. Find which one and fix it in the right order.

What the Docker non-overlapping IPv4 address pool error means

The Docker error "could not find an available, non-overlapping IPv4 address pool" means Docker tried to give a new network a subnet and found no free range it was willing to use. There are two causes. Either the default address pools are used up, or the free ranges clash with a route that is already on the host. The fix depends on which one you have, so find the cause first.

You will see one of these two messages, usually from docker compose up or docker network create:

could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network
all predefined address pools have been fully subnetted

The first one is the text reported in docker/for-linux issue 599. The second is the message of ErrNoMoreSubnets in the current moby source (the moby repository holds Docker Engine's code). Both come from the same step: automatic subnet allocation. A report in moby issue 51863 shows the second message during daemon start as well. So it can stop Docker itself from starting, not only one project.

Where Docker gets subnets: the default address pools

When you create a network without --subnet, Docker picks a subnet from its "default address pools". Docker's network docs list the built-in default as seven pools. Each pool has a base (the range to allocate from) and a size (the prefix length of each network cut from it). The chart below shows how many networks each pool can produce. The counts are arithmetic on the documented table, not a measurement.

ChartNetworks each built-in default pool can produce (derived from Docker's docs)
The data behind this chart
[
  {
    "label": "172.17.0.0/16, size 16",
    "networks": 1
  },
  {
    "label": "172.18.0.0/16, size 16",
    "networks": 1
  },
  {
    "label": "172.19.0.0/16, size 16",
    "networks": 1
  },
  {
    "label": "172.20.0.0/14, size 16",
    "networks": 4
  },
  {
    "label": "172.24.0.0/14, size 16",
    "networks": 4
  },
  {
    "label": "172.28.0.0/14, size 16",
    "networks": 4
  },
  {
    "label": "192.168.0.0/16, size 20",
    "networks": 16
  }
]

A /14 holds four /16 networks, so each of the three /14 pools gives 4. A /16 holds sixteen /20 networks, so the 192.168.0.0/16 pool gives 16. Add them up across all 7 pools: 3 + 3x4 + 16 = 31 networks. That is the most automatic allocation can give you on a stock host. The figure comes from the docs, not from a test. The real number on your host can be lower. The default bridge docker0 also needs a subnet, and any range that Docker skips (see the second cause) is gone too. Run ip -4 addr show docker0 to see which range docker0 holds on your machine.

Thirty-one sounds like a lot until you count Compose projects. The docs say the same thing in plain words: the default pools use large subnets, which limits how many networks you can create.

Cause 1: the default pools are used up

By default, Compose creates one network per project, named <project-name>_default, and attaches every service to it. The project name comes from the directory name. Every extra network you declare under networks: takes another subnet. So a host with twenty project directories and a few multi-network stacks reaches 31 quickly.

Networks also pile up. docker compose down removes the project's containers and the networks it created. docker compose stop only stops containers and removes nothing. If you deleted a project directory without running down first, its containers and its network are still there, and nothing will clean them up for you. The difference between the two commands is covered in docker compose down vs stop and what each one removes.

Cause 2: the free ranges clash with a host route

Docker's docs say it "attempts to avoid address prefixes already in use on the host". If your host already uses a range, Docker skips the pools inside it. When every remaining pool is skipped, you get the same error even with very few Docker networks.

The usual sources are VPN clients and LANs. In for-linux issue 599, many commenters tied the error to VPN clients such as ExpressVPN, OpenVPN, NordVPN and AWS Client VPN. Those clients added routes that covered Docker's pools. A route for 172.16.0.0/12 on a local interface had the same effect, because that one route covers every 172 pool in the table. A Docker maintainer summed it up in the thread: "the pre-defined bridge ranges are all in use already so Docker can't use them." A LAN or tunnel route inside 192.168.0.0/16 removes part or all of the largest pool in the same way.

The current moby source is more precise about what counts as "in use". It builds a list of reserved ranges from two inputs: the nameservers in /etc/resolv.conf, and on-link IPv4 routes. An on-link route is one with a destination, scope link, and no via gateway. The default route is not counted. The ip route man page explains why a VPN often produces this kind of route: when a route points straight at a device with no gateway, its scope defaults to link. A tunnel route such as 10.8.0.0/24 dev wg0, the kind you may see on a box running a self-hosted WireGuard VPN, has that shape.

This logic is in moby's master branch, and your installed version may behave differently. Issue 51863 was reported on Docker 28.2.2 and was still open and untriaged when checked on 11 November 2026. It reports that VPNs pushing two /1 routes (a pair that together covers all of IPv4) trigger the failure. That report does not match the source reading above, so treat it as reported, not settled. The maintainers in that thread point to explicit subnet configuration as the way out, which is the fix below.

How to tell which cause you have

Start with the networks Docker already has. The second command counts the user-defined ones.

docker network ls
docker network ls --filter type=custom -q | wc -l

Then print every network's name with its subnet. This reads the IPAM.Config field of each network, which the current moby source defines. If the template prints nothing on your version, run docker network inspect <name> and read the IPAM section of the JSON yourself.

docker network inspect --format '{{.Name}} {{range .IPAM.Config}}{{.Subnet}} {{end}}' $(docker network ls -q)

Now look at the host side: the on-link routes and the nameservers.

ip -4 route show
ip -4 route show scope link
grep nameserver /etc/resolv.conf

Read the results like this:

  • Close to 31 user-defined networks, most of them /16 or /20 inside 172.17.0.0 to 172.31.255.255 or 192.168.0.0/16: the pools are used up. Go to the prune step.
  • Only a handful of networks, plus a scope link route that covers 172.16.0.0/12, 192.168.0.0/16 or a large part of them: a route is blocking the pools. Pruning will not help. Go to the subnet fixes.
  • Both at once is common on a laptop or a VPS that also runs a VPN. Prune first, then pin subnets.

Fix 1: remove networks nothing uses

This is the smallest change. docker network prune removes networks that no container references. The built-in bridge, host and none networks are never pruned.

docker network prune

It asks before it deletes anything: WARNING! This will remove all custom networks not used by at least one container. Are you sure you want to continue? [y/N]. To keep anything created in the last day, add a filter: docker network prune --filter until=24h. Add -f only in scripts, where nobody can answer the prompt.

Run docker network ls again afterwards. Any network still listed is referenced by a container. For an old project, the cleaner move is docker compose down in its directory, which removes its containers and its network together. Network pruning sits next to image and volume pruning, and cleaning up Docker disk space on a VPS with prune shows which prune commands are safe to run on a live server.

Freed subnets come back into use straight away. Since Docker Engine 27.0.1 the default allocator is linear: it takes the first free subnet and no longer remembers the last one it handed out. Docker never shipped a 27.0.0 release, so 27.0.1 is the first version with this behaviour.

Fix 2: give the project an explicit subnet

When a route blocks the pools, stop asking Docker to choose. The Compose file reference lets you customise the implicit default network, and ipam.config.subnet sets a fixed range in CIDR form. Pick a range that does not appear in ip -4 route show and is not used by your LAN or VPN. The 10.201.0.0/24 below is only an example.

networks:
  default:
    ipam:
      config:
        - subnet: 10.201.0.0/24

Compose creates the network on up. So take the project down first to remove the old network, then start it again and check the result:

docker compose down
docker compose up -d
docker network inspect --format '{{range .IPAM.Config}}{{.Subnet}}{{end}}' "$(basename "$PWD")_default"

The last command assumes the project name is the directory name, which is the default. If it reports that no such network exists, copy the exact name from docker network ls. If two networks ask for overlapping fixed subnets, Docker refuses the second one. The moby source names that error Pool overlaps with other one on this address space. Give each project its own range.

The other option is one shared network for many projects. Create it once, with your own subnet, then mark it external in each compose.yaml. Compose then looks for that network instead of creating <project-name>_default, and fails with Network not found if it is missing.

docker network create --subnet 10.201.1.0/24 shared
networks:
  default:
    name: shared
    external: true

One shared network uses one subnet, however many projects join it. The cost is isolation: containers from every project on it can reach each other. How Compose connects services over its networks is covered in how Docker Compose networks work, so it is not repeated here.

Fix 3: change the default address pools for the whole host

This changes every new network on the host, so it comes last. Edit /etc/docker/daemon.json (for rootless Docker the file is ~/.config/docker/daemon.json). If the file already has settings, add the key to the existing object instead of replacing the file.

{
  "default-address-pools": [
    { "base": "172.30.0.0/16", "size": 24 }
  ]
}

The base above comes from Docker's dockerd reference. It is an example, not a recommendation. Replace it with a range that does not appear in ip -4 route show and is not used by your LAN or VPN. Size 24 means each network gets a /24 (256 addresses), so a /16 base yields 256 networks instead of one. Docker's own network page gives that same count of 256 for 172.17.0.0/16 split at size 24.

Check the file, then restart Docker. A restart affects every container on the host, so choose a quiet moment.

sudo dockerd --validate --config-file /etc/docker/daemon.json
sudo systemctl restart docker

--validate returns a non-zero exit code for an invalid file. default-address-pools is not in the dockerd reference's list of options that reload on SIGHUP, which is why this guide restarts the daemon instead. Prove the change with a throwaway network:

docker network create pooltest
docker network inspect --format '{{range .IPAM.Config}}{{.Subnet}}{{end}}' pooltest
docker network rm pooltest

The subnet printed should sit inside your new base. Docker's docs do not say whether existing networks move to the new pools. Check each network's subnet with the inspect command from the diagnosis step. To move a project, run docker compose down and then docker compose up -d so its network is created again.

Two settings look related but are not. bip and fixed-cidr configure the default bridge docker0 only, not user-defined networks. Change them only when docker0's own subnet collides with a route. A daemon option called trust-default-address-pools exists only as an open pull request (moby PR 52805) as of 11 November 2026, so do not put it in your config.

FAQ

Why does Docker say "could not find an available, non-overlapping IPv4 address pool"?

Docker had to pick a subnet for a new network and found none it could use. Either its default pools are used up (they allow at most 31 networks, by arithmetic on the documented table), or the free pools clash with an on-link route on the host, such as a VPN tunnel or a LAN in 172.16.0.0/12 or 192.168.0.0/16. Compare docker network ls with ip -4 route show scope link to see which.

Does docker network prune delete networks my containers use?

No. docker network prune removes only networks that no container references, and it never removes the built-in bridge, host and none networks. It asks for confirmation unless you pass -f. Any network left in docker network ls afterwards is still referenced by a container.

I connected a VPN and now docker compose up fails. Why?

Many VPN clients add routes that cover Docker's default pools, and Docker skips ranges that are already in use on the host. When every pool is skipped, network creation fails. Set a fixed subnet for the project under networks: default: ipam: config: in compose.yaml, or set default-address-pools in /etc/docker/daemon.json to a range your VPN does not use.

How many networks can Docker create with default-address-pools size 24?

Each /16 base split at size 24 gives 256 networks of 256 addresses each. Docker's docs use this example with 172.17.0.0/16. Choose a base that does not overlap your LAN or VPN, restart Docker, and confirm with a test network and docker network inspect.

Was this article useful?