From d2bc218755672a9c50bca0f307c83e69edbfb06d Mon Sep 17 00:00:00 2001 From: Rob Murray Date: Wed, 11 Dec 2024 09:43:40 +0000 Subject: [PATCH] Describe IPv6-only network config Signed-off-by: Rob Murray --- content/manuals/engine/network/_index.md | 8 ++++++++ content/manuals/engine/network/drivers/bridge.md | 11 +++++++++++ 2 files changed, 19 insertions(+) diff --git a/content/manuals/engine/network/_index.md b/content/manuals/engine/network/_index.md index 0ffc841b59f..5cdc4fccd5a 100644 --- a/content/manuals/engine/network/_index.md +++ b/content/manuals/engine/network/_index.md @@ -144,6 +144,14 @@ direct routing to containers, see ## IP address and hostname +When creating a network, IPv4 address allocation is enabled by default, it +can be disabled using `--ipv4=false`. IPv6 address allocation can be enabled +using `--ipv6`. + +```console +$ docker network create --ipv6 --ipv4=false v6net +``` + By default, the container gets an IP address for every Docker network it attaches to. A container receives an IP address out of the IP subnet of the network. The Docker daemon performs dynamic subnetting and IP address allocation for containers. diff --git a/content/manuals/engine/network/drivers/bridge.md b/content/manuals/engine/network/drivers/bridge.md index bdf1c812c6b..2a0c2275dd6 100644 --- a/content/manuals/engine/network/drivers/bridge.md +++ b/content/manuals/engine/network/drivers/bridge.md @@ -232,6 +232,17 @@ $ docker network create --ipv6 --subnet 2001:db8:1234::/64 my-net If you do not provide a `--subnet` option, a Unique Local Address (ULA) prefix will be chosen automatically. +## IPv6-only bridge networks + +To skip IPv4 address configuration on the bridge and in its containers, create +the network with option `--ipv4=false`, and enable IPv6 using `--ipv6`. + +```console +$ docker network create --ipv6 --ipv4=false v6net +``` + +IPv4 address configuration cannot be disabled in the default bridge network. + ## Use the default bridge network The default `bridge` network is considered a legacy detail of Docker and is not