mirror of https://github.com/docker/docs.git
added default address pools installation/usage comments across UCP install, swarm install, and networking pages
This commit is contained in:
parent
48ab28e3d3
commit
ea9e729e21
|
@ -42,7 +42,9 @@ this.
|
|||
|
||||
## Avoid IP range conflicts
|
||||
|
||||
The default Kubernetes cluster IP pool for the pods is `192.168.0.0/16`. If it conflicts with your current networks, please use a custom IP pool by specifying `--pod-cidr` during UCP installation.
|
||||
Swarm uses a default address pool for its overlay networks that is `10.0.0.0/16`. If this conflicts with your current networks, please use a custom IP address pool by specifying `--default-address-pool` during [Swarm initialization](../../../../engine/swarm/swarm-mode.md). Currently, the UCP installation process does not support this flag. To deploy with a custom IP pool Swarm must first be installed using this flag and UCP must be installed on top of it.
|
||||
|
||||
Kubernetes uses a default cluster IP pool for pods that is `192.168.0.0/16`. If it conflicts with your current networks, please use a custom IP pool by specifying `--pod-cidr` during UCP installation.
|
||||
|
||||
## Time synchronization
|
||||
|
||||
|
|
|
@ -192,6 +192,22 @@ $ docker network create \
|
|||
my-network
|
||||
```
|
||||
|
||||
##### 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:
|
||||
|
||||
```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.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
##### Overlay network size limitations
|
||||
|
||||
You should create overlay networks with `/24` blocks (the default), which limits
|
||||
|
|
|
@ -63,9 +63,11 @@ To add a worker to this swarm, run the following command:
|
|||
|
||||
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
|
||||
```
|
||||
### Configure the default IP address pools and subnet mask
|
||||
### Configuring default address pools
|
||||
|
||||
To create the initial address pool for Swarm, you must define at least one default address pool, and an optional default address pool subnet mask. The default address pool uses CIDR notation.
|
||||
By default Docker Swarm uses a default address pool `10.0.0.0/8` for 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 desireable to use a different default IP address pool for networks. For example, if the default `10.0.0.0/8` range conflicts with already allocated address space in your network then it is desireable to ensure that networks use a different range without requiring Swarm users to specify each subnet with the `--subnet` command.
|
||||
|
||||
To configure custom default address pools, you must define pools at Swarm initialization using the `--default-addr-pool` flag. To create the custom address pool for Swarm, you must define at least one default address pool, and an optional default address pool subnet mask. The default address pool uses CIDR notation.
|
||||
|
||||
Docker allocates subnet addresses from the address ranges specified by the --default-addr-pool options. For example, a command line option `--default-addr-pool 10.10.0.0/16` indicates that Docker will allocate subnets from that `/16` address range. If `--default-addr-pool-mask-len` were unspecified or set explicitly to 24, this would result in 256 `/24` networks of the form `10.10.X.0/24`.
|
||||
|
||||
|
@ -81,16 +83,18 @@ To create a default IP address pool with a /16 (class B) for the 10.20.0.0 netwo
|
|||
$ docker swarm init --default-addr-pool 10.20.0.0/16
|
||||
```
|
||||
|
||||
To create a default IP address pool with a /16 (class B) for the 10.20.0.0 and 10.30.0.0 networks, and to create a subnet mask of /24 (class C) for each network looks like this:
|
||||
To create a default IP address pool with a /16 (class B) for the 10.20.0.0 and 10.30.0.0 networks, and to create a subnet mask of /26 for each network looks like this:
|
||||
|
||||
```
|
||||
$ docker swarm init --default-addr-pool 10.20.0.0/16 --default-addr-pool 10.30.0.0/16 --default-addr-pool-mask-length 24
|
||||
$ docker swarm init --default-addr-pool 10.20.0.0/16 --default-addr-pool 10.30.0.0/16 --default-addr-pool-mask-length 26
|
||||
```
|
||||
|
||||
In this example, `docker network create -d overlay net1` will result in `10.20.1.0/24` as the allocated subnet for `net1`, and `docker network create -d overlay net2` will result in `10.20.2.0/24` as the allocated subnet for `net2`. This continues until all the subnets are exhausted.
|
||||
In this example, `docker network create -d overlay net1` will result in `10.20.0.0/26` as the allocated subnet for `net1`, and `docker network create -d overlay net2` will result in `10.20.0.64/26` as the allocated subnet for `net2`. This continues until all the subnets are exhausted.
|
||||
|
||||
Refer to the `docker swarm init` [CLI reference](../reference/commandline/swarm_init.md)
|
||||
for more detail on the advertise address.
|
||||
Refer to the following pages for more information:
|
||||
- [Swarm networking](./networking.md) for more information about the default address pool usage
|
||||
- [UCP Installation Planning](../../ee/ucp/admin/install/plan-installation.md) for more information about planning the network design before installation
|
||||
- `docker swarm init` [CLI reference](../reference/commandline/swarm_init.md) for more detail on the `--default-address-pool` flag.
|
||||
|
||||
### Configure the advertise address
|
||||
|
||||
|
|
Loading…
Reference in New Issue