Skip to content

Commit 59ad176

Browse files
David Karlssonpolarathene
David Karlsson
andcommitted
networking: improve ipv6 subnet allocation examples
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com> Signed-off-by: David Karlsson <david.karlsson@docker.com>
1 parent b4285ff commit 59ad176

File tree

1 file changed

+32
-16
lines changed

1 file changed

+32
-16
lines changed

config/daemon/ipv6.md

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,15 @@ default bridge network, and to user-defined networks configured with an IPv6 sub
4646

4747
## Dynamic IPv6 subnet allocation
4848

49-
If you want dynamic IPv6 subnet allocation, you must explicitly configure the
50-
`default-address-pools` parameter to include:
49+
If you don't explicitly configure subnets for user-defined networks,
50+
those networks use the default address pools of the daemon as a fallback.
51+
The default address pools are all IPv4 pools.
5152

52-
- The default address pool values
53-
- One or more custom IPv6 supernets
53+
To enable dynamic subnet allocation for user-defined IPv6 networks,
54+
you must manually configure address pools of the daemon to include:
5455

55-
> **Note**
56-
>
57-
> Be aware that the following known limitations exist:
58-
>
59-
> - Supernets can't have a size larger than 80. This is due to an integer
60-
> overflow in the Docker daemon. See
61-
> [moby/moby#42801](https://github.com/moby/moby/issues/42801)
62-
> - The difference between the supernet length and the pool size can't be
63-
> larger than 24. Otherwise, the daemon consumes all available memory. See
64-
> [moby/moby#40275](https://github.com/moby/moby/issues/40275)
56+
- The default IPv4 address pools
57+
- One or more IPv6 pools of your own
6558

6659
The default address pool configuration is:
6760

@@ -80,7 +73,20 @@ The default address pool configuration is:
8073
```
8174

8275
The following example shows a valid configuration with the default values and
83-
an IPv6 supernet, with a prefix length of 64 and a size of 80.
76+
an IPv6 pool. The IPv6 pool in the example provides up to 256 IPv6 subnets of
77+
size `/112`, from an IPv6 supernet of prefix length `/104`. Each `/112`-sized
78+
subnet supports 65 536 IPv6 addresses.
79+
80+
> **Note**
81+
>
82+
> Be aware that the following known limitations exist for IPv6 pools:
83+
>
84+
> - The `base` value for IPv6 needs a minimum prefix length of `/64`.
85+
> This is due to an integer overflow in the Docker daemon.
86+
> See [moby/moby#42801](https://github.com/moby/moby/issues/42801).
87+
> - The `base` supernet is split into subnets of `size`. Defining an excessive
88+
> number of subnets causes the daemon consume all available memory.
89+
> See [moby/moby#40275](https://github.com/moby/moby/issues/40275).
8490
8591
```json
8692
{
@@ -92,11 +98,21 @@ an IPv6 supernet, with a prefix length of 64 and a size of 80.
9298
{ "base": "172.24.0.0/14", "size": 16 },
9399
{ "base": "172.28.0.0/14", "size": 16 },
94100
{ "base": "192.168.0.0/16", "size": 20 },
95-
{ "base": "2001:db8::/64", "size": 80 }
101+
{ "base": "2001:db8::/104", "size": 112 }
96102
]
97103
}
98104
```
99105

106+
> **Note**
107+
>
108+
> The address `2001:db8` in this example is
109+
> [reserved for use in documentation][wikipedia-ipv6-reserved].
110+
> Replace it with a valid IPv6 network.
111+
> The default IPv4 pools are from the private address range,
112+
> the IPv6 equivalent would be [ULA networks][wikipedia-ipv6-ula].
113+
114+
[wikipedia-ipv6-reserved]: https://en.wikipedia.org/wiki/Reserved_IP_addresses#IPv6
115+
[wikipedia-ipv6-ula]: https://en.wikipedia.org/wiki/Unique_local_address
100116

101117
## Next steps
102118

0 commit comments

Comments
 (0)