Docker Community Forums

Share and learn in the Docker community.

IP assignment to docker bridge docker0 not same as requested


(Abhatnagar) #1

I started docker with following settings:
root 3064 1 0 Jun19 ? 00:00:34 /usr/bin/docker -d -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 –fixed-cidr=172.17.160.0/18 --bridge docker0 --mtu 1462

However when launched a docker container, IP allocation in the container is

12: eth0: <BROADCAST,UP,LOWER_UP> mtu 1462 qdisc noqueue state UP group default
link/ether 02:42:ac:11:80:03 brd ff:ff:ff:ff:ff:ff
inet 172.17.128.3/16 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::42:acff:fe11:8003/64 scope link
valid_lft forever preferred_lft forever

Bridge docker0 on the host gets different IP
5: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1462 qdisc noqueue state UP group default
link/ether 56:20:72:15:15:46 brd ff:ff:ff:ff:ff:ff
inet 172.17.42.5/16 brd 172.17.255.255 scope global docker0
valid_lft forever preferred_lft forever