| `4789/udp` | The default overlay traffic port, configurable with [`docker swarm init --data-path-addr`](/reference/cli/docker/swarm/init.md#data-path-port) |
| `7946/tcp`, `7946/udp` | Used for communication among nodes, not configurable |
To create an overlay network that containers on other Docker hosts can connect to,
run the following command:
```console
$ docker network create -d overlay --attachable my-attachable-overlay
```
The `--attachable` option enables both standalone containers
and Swarm services to connect to the overlay network.
Without `--attachable`, only Swarm services can connect to the network.
You can specify the IP address range, subnet, gateway, and other options. See
`docker network create --help` for details.
## Encrypt traffic on an overlay network
Use the `--opt encrypted` flag to encrypt the application data
transmitted over the overlay network:
```console
$ docker network create \
--opt encrypted \
--driver overlay \
--attachable \
my-attachable-multi-host-network
```
This enables IPsec encryption at the level of the Virtual Extensible LAN (VXLAN).
This encryption imposes a non-negligible performance penalty,
so you should test this option before using it in production.
> [!WARNING]
>
> Don't attach Windows containers to encrypted overlay networks.
>
> Overlay network encryption isn't supported on Windows.
> Swarm doesn't report an error when a Windows host
> attempts to connect to an encrypted overlay network,
> but networking for the Windows containers is affected as follows:
>
> - Windows containers can't communicate with Linux containers on the network
> - Data traffic between Windows containers on the network isn't encrypted
## Attach a container to an overlay network
Adding containers to an overlay network gives them the ability to communicate
with other containers without having to set up routing on the individual Docker
daemon hosts. A prerequisite for doing this is that the hosts have joined the same Swarm.
To join an overlay network named `multi-host-network` with a `busybox` container: