Skip to content

Overlay networks: VXLAN between two hosts

Select an icon to see what it is.

Step 1 of 6

Two hosts form a swarm

Overlay networks need the hosts to know each other, so host A (10.0.0.20) runs docker swarm init and host B (10.0.0.21) joins. They open 2377/tcp for management, 7946 for node gossip and 4789/udp for VXLAN data. Then you create an attachable overlay network.

$ docker network create -d overlay --attachable --subnet 10.10.0.0/24 shop-overlay
PrevNext

Ports between the hosts

2377/tcp cluster management
7946/tcp and udp node discovery
4789/udp VXLAN data traffic