Docker Can Only Create 31 Default Networks

Jarek Lipski
Sep 4, 2016 · 1 min read

I have just learned that Docker has a limit of 31 networks for a default bridge network driver on a single machine:

~$ docker network create test1
~$ docker network create test2
...~$ docker network create test31
~$ docker network create test32
Error response from daemon: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network

This is due to the fact that it uses a hardcoded list of broad network ranges for a bridge network driver: 172.17-31.x.x/16 and 192.168.x.x/20 (Update: it’s now possible to customize the ranges in Docker daemon configuration). For an overlay network driver, 64K networks can be created. If you want to know the implementation details, please look into Docker libnetwork’s ipamutils and allocator.

The only solution to circumvent this limitation seems to be manually specifying subnet ranges for each created network (please see Docker network create subnet option and Docker Compose network configuration reference):

docker network create --subnet= test1

In Puffin, which needs to create a separate network for each application, I implemented a simple address allocator.


Originally published at on September 4, 2016.

Jarek Lipski

Written by

Full-Stack Developer / Agilist / Free and Open Source Software Fan.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade