1 answer
- 210
those are the choices made by docker engine running on those VMs. you could add command line options (--bip and --fixed-cidr) to the docker start command to change those choices.
- Josef Reisinger
Hi Lusheng, thanks for your response.
I am not a docker expert, but I so far assumed the 172.17.0.0/16 is choose by docker and applies to the docker0 bridge (which can be changed by --bip) . 172.18.0.0/16 seems to be created by the container and uses a different bridge 'br-99c842c00ca6'. Can you confirm that 172.18.0.0/16 is created by the docker daemon?
- Lusheng Ji
Josef,
Sorry for the late response. Been busy at the ONAP dev conf.
You are correct, the 172.17/16 network is indeed picked by the dockerd. The 172.18/16 network is created by docker-compose by default. So on VMs that docker-compose is used for spinning up multiple containers you will see this kind of two-bridge arrangement.
Now to change the 172.17/16 network address space, created by dockerd, you will need to add the option --bip. For changing 172.18/16 network address, it is a bit trickier. You would need to add a network def block with preferred address space definition inside of the docker-compose.yml file; then inside of each service def block add a network subblock referencing this network you just defined.
The docker-compose.yml file can usually be found under /opt.
Lusheng
Add your comment...
While installing ONAP on a vanilla Openstack (Ocata), we used 172.18.1.0/24 as the network for controller/Compute node and the provider network. Later we found that vm1-dcae-controller vm1-message-router, vm1-appc, vm1-sdnc and vm1-policy have routing entries like this:
Is there a way to reconfigure the network to something else or even change the netmask to 255.255.255.0 before VM and/or the container start to use the 17.18.1.0 network?