Update networking.md

Cleaned up Mark's additions.
This commit is contained in:
Anne Henmi 2018-09-12 13:26:00 -06:00 committed by GitHub
parent 3a2873c940
commit 3bae1bb428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 14 deletions

View File

@ -194,30 +194,31 @@ $ docker network create \
##### Using custom default address pools
Default network address pools for customzied subnet allocation of networks can be [optionally configured](./sarm-mode.md) during `swarm init`. The usage of the default address pools is automatically invoked when users create networks. For example, the following command is used when initializing a Swarm:
To customize subnet allocation for your Swarm networks, you can [optionally configure them](./sarm-mode.md) during `swarm init`.
For example, the following command is used when initializing a Swarm:
```bash
$ docker swarm init --default-address-pool 10.20.0.0/16 --default-addr-pool-mask-length 26`
```
Whenever a user creates a network not using the `--subnet` command, the subnet for this network will be allocated sequentially from the next available subnet in the pool. Usage of the `--subnet` command is still allowed, though the network will not be created if the user has specified a subnet that has already been allocated.
Whenever a user creates a network, but does not use the `--subnet` command line option, the subnet for this network will be allocated sequentially from the next available subnet in the pool. if the network the user specifies is already allocated, that network will not be used for Swarm.
Additional notes:
- Default address pools can only be configured on `swarm init` and cannot be altered after cluster creation
- The default mask length can be configured and is the same for all networks. It is set to `/24` if not configured.
- Multiple pools can be configured if discontigous address space is required, however allocation from specific pools is not supported. Network subnets will be allocated sequentially from the IP pool space and subnets will be reused as they are deallocated from networks that are deleted.
Multiple pools can be configured if discontigous address space is required. However, allocation from specific pools is not supported. Network subnets will be allocated sequentially from the IP pool space and subnets will be reused as they are deallocated from networks that are deleted.
The default mask length can be configured and is the same for all networks. It is set to `/24` if not configured. To set the default subnet mask length, use the `--default-addr-pool-mask-length` command line option.
**NOTE:** Default address pools can only be configured on `swarm init` and cannot be altered after cluster creation
##### Overlay network size limitations
You should create overlay networks with `/24` blocks (the default), which limits
you to 256 IP addresses, when you create networks using the default VIP-based
endpoint-mode. This recommendation addresses
[limitations with swarm mode](https://github.com/moby/moby/issues/30820). If you
need more than 256 IP addresses, do not increase the IP block size. You can either
use `dnsrr` endpoint mode with an external load balancer, or use multiple smaller
overlay networks. See [Configure service discovery](#configure-service-discovery)
for more information about different endpoint modes.
Docker recommends creating overlay networks with `/24` blocks (the default), which limits the network to 256 IP
addresses, when you create networks using the default VIP-based endpoint-mode.
This recommendation addresses[limitations with swarm mode](https://github.com/moby/moby/issues/30820).
If you need more than 256 IP addresses, do not increase the IP block size. You can either use `dnsrr`
endpoint mode with an external load balancer, or use multiple smalleroverlay networks. See
[Configure service discovery](#configure-service-discovery) or more information about different endpoint modes.
#### Configure encryption of application data