Assigning default IPv6 addresses

Hi, I’m trying to make sense of the IPv6 setup of docker.

TL;DR: I am trying to specify a range of IPv6 addresses as defaults for newly created networks but get the following error:
Error response from daemon: could not find an available, non-overlapping IPv6 address pool among the defaults to assign to the network

I have tried a few things and ran into the following issues:

1) Changing the IPv6 subnet configuration in the daemon.json

It is mentioned in the docs, that in the deamon.json, fixed-cidr-v6 should be set to my desired v6 subnet.
I’ve thus tried two different things:

  • Setting it to my host’s address with a higher prefix (e.g. /80)
  • Using fc00:10:10:: with various prefixes

It is also stated that any changes made should come into effect after reloading the config file. However, I have found that the changes are not applied unless I restart docker, neither to existing networks (which does make sense) nor to newly created ones.

2) The bridge network hogs all prefixes

No matter what prefix I choose, the bridge network will always have the full size specified in fixed-cidr-v6. I’m not sure if that is intentional behavior. If so, the documentation should make that clear. However, them I’m unsure how to specify a pool of IPv6 addresses for the engine to choose from.

3) Restarting docker after changing the IPv6 prefix does not work

I’ve tested various prefixes and at some point started running into the following issue: After updating the daemon.json and reloading the config, docker would not restart. Instead, I got the following error:

failed to start daemon: Error initializing network controller: Error creating default "bridge" network: failed to add IPv6 address fc00:10:10::1/60 to bridge: file exists

This specific case was after I tried changing the prefix from /70 to /60. I’ve tried deleting the /var/lib/docker/network directory as advised in this post without success.


Any input on the above-mentioned points and especially my leading problem is greatly appreciated.