-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
Problem description
The default pool for docker swarm init --default-addr-pool is covered in the swarm documentation:
By default Docker Swarm uses a default address pool
10.0.0.0/8for global scope (overlay) networks. Every network that does not have a subnet specified will have a subnet sequentially allocated from this pool. In some circumstances it may be desirable to use a different default IP address pool for networks.
Ref: https://docs.docker.com/engine/swarm/swarm-mode/#configuring-default-address-pools
The analogous default for local networks (dockerd --default-address-pool) is not currently represented in the documentation. The defaults are as follows (including swarm global networks as well for reference):
| Type | Default Size | Default Pool |
|---|---|---|
| global | /24 | 10.0.0.0/8 |
| local | /16 | 172.17.0.0/12 |
| local* | /20 | 192.168.0.0/16 |
- Local networks are allocated from 172.17.0.0/12, and then 192.168.0.0/16 once 172.17.0.0/12 is exhausted.
Problem location
Filing this in docker.github.io, but it might be best to address by adding a section to https://github.com/docker/cli/blob/master/docs/reference/commandline/dockerd.md.
Project version(s) affected
dockerd --default-address-pool was released with server 18.06 (moby/moby#36396).
Suggestions for a fix
Note the "default" default address pool via a new section on https://github.com/docker/cli/blob/master/docs/reference/commandline/dockerd.md. Adding a section might also present the opportunity to document the CLI syntax:
As [cli] flag (singular)
dockerd --default-address-pool base=10.10.0.0/16,size=24In
daemon.json(plural):{"default-address-pools":[{"base":"172.80.0.0/16","size":24},{"base":"172.90.0.0/16","size":24}]}