Skip to content

Commit e9cb32e

Browse files
committed
Updates to default bridge address config
Signed-off-by: Rob Murray <[email protected]>
1 parent ce035f4 commit e9cb32e

File tree

1 file changed

+24
-4
lines changed
  • content/manuals/engine/network/drivers

1 file changed

+24
-4
lines changed

content/manuals/engine/network/drivers/bridge.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ When you create your network, you can specify the `--ipv6` flag to enable IPv6.
229229
$ docker network create --ipv6 --subnet 2001:db8:1234::/64 my-net
230230
```
231231

232+
If you do not provide a `--subnet` option, a Unique Local Address (ULA) prefix
233+
will be chosen automatically.
234+
232235
## Use the default bridge network
233236

234237
The default `bridge` network is considered a legacy detail of Docker and is not
@@ -259,7 +262,12 @@ the settings you need to customize.
259262
}
260263
```
261264

262-
Restart Docker for the changes to take effect.
265+
In this example:
266+
267+
- The bridge's address is "192.168.1.1/24" (from `bip`).
268+
- The bridge network's subnet is "192.168.1.0/24" (from `bip`).
269+
- Container addresses will be allocated from "192.168.1.0/25" (from `fixed-cidr`).
270+
263271

264272
### Use IPv6 with the default bridge network
265273

@@ -270,22 +278,34 @@ These three options only affect the default bridge, they are not used by
270278
user-defined networks. The addresses in below are examples from the
271279
IPv6 documentation range.
272280

273-
- Option `ipv6` is required
274-
- Option `fixed-cidr-v6` is required, it specifies the network prefix to be used.
281+
- Option `ipv6` is required.
282+
- Option `bip6` is optional, it specifies the address of the default bridge, which
283+
will be used as the default gateway by containers. It also specifies the subnet
284+
for the bridge network.
285+
- Option `fixed-cidr-v6` is optional, it specifies the address range Docker may
286+
automatically allocate to containers.
275287
- The prefix should normally be `/64` or shorter.
276288
- For experimentation on a local network, it is better to use a Unique Local
277-
prefix (matching `fd00::/8`) than a Link Local prefix (matching `fe80::/10`).
289+
Address (ULA) prefix (matching `fd00::/8`) than a Link Local prefix (matching
290+
`fe80::/10`).
278291
- Option `default-gateway-v6` is optional. If unspecified, the default is the first
279292
address in the `fixed-cidr-v6` subnet.
280293

281294
```json
282295
{
283296
"ipv6": true,
297+
"bip6": "2001:db8::1111/64",
284298
"fixed-cidr-v6": "2001:db8::/64",
285299
"default-gateway-v6": "2001:db8:abcd::89"
286300
}
287301
```
288302

303+
If no `bip6` is specified, `fixed-cidr-v6` defines the subnet for the bridge
304+
network. If no `bip6` or `fixed-cidr-v6` is specified, a ULA prefix will be
305+
chosen.
306+
307+
Restart Docker for changes to take effect.
308+
289309
## Connection limit for bridge networks
290310

291311
Due to limitations set by the Linux kernel, bridge networks become unstable and

0 commit comments

Comments
 (0)