docker-net-dhcp
docker-net-dhcp copied to clipboard
NetworkDriver.CreateNetwork: 172.20.0.1/16 has host bits set
Fresh git clone of project make install docker network create -d devplayer0/net-dhcp:latest --ipam-driver=null -o bridge=br0 test-net
returns: Error response from daemon: NetworkDriver.CreateNetwork: 172.20.0.1/16 has host bits set The address is that of my docker0 network. 644: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default link/ether 02:42:6c:62:49:62 brd ff:ff:ff:ff:ff:ff inet 172.20.0.1/16 brd 172.20.255.255 scope global docker0 valid_lft forever preferred_lft forever
docker --version: Docker version 19.03.8, build afacb8b7f0
I realise this is not enough to work on. Happy to provide additional information, I'm just not sure what would be useful here.
Hmmmm, it would seem the Subnet value for the IPAM section of the built-in Docker network has an IP set somehow (my Python code assumes it's only ever a CIDR subnet without the host bits set). The Go code I've written so far should :tm: account for this. https://github.com/devplayer0/docker-net-dhcp/blob/866bb1b5cd79ddbe8289dba3f150d008d7ad5114/net-dhcp/network.py#L50
I'll see if I can reproduce this behaviour with Docker on my end and test it. If you're still interested, would you mind describing your Docker environment (OS, have you made any config changes etc).