Docker Community Forums

Share and learn in the Docker community.

Local bridge network custom range not working

Hello everyone,

First of all, thank you in advance for your help!

After running into some network issues with one of our machines running docker, we noticed that the bridge networks that are created (in an automated way or by using docker compose) may be assigned with a subnet that interferes with the one in our local network, and thus making some machine that has to be accessed from one of the container unreachable.

Therefore, I have seen that it should be possible to define custom subnet pools for bridge networks that do not specify subnet in their configuration. This would avoid conflict as explained above.

From my understanding, setting the config like below in the daemon.json should be enough to use specific subnets.

The config for example:

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

The problem comes at this point, where the docker daemon keeps on using the default pools ranges 172.17.0.0/16 through 172.31.0.0/16 and 192.168.0.0/20 through 192.168.240.0/20 (when doing a docker network create for instance)

The configuration for the default bridge network (bip) is working though.

OS: CentOS 7
Docker version: 19.03.12

Did anyone else have issues with this configuration, am I setting this up correctly or did I miss something here?

Many thanks, best regards,

Antony