Docker Community Forums

Share and learn in the Docker community.

Windows Server 17.06 Loses connectivity when joining Swarm

docker

(Amcgill) #1

Greetings,

I’m running Windows Server 2016 Datacenter on OS Version 10.0.14393 N/A Build 14393

I’ve got Docker version 16.06.2-ee-6 installed on a trial license. Docker is installed and I can run the hello-world container just fine.The networking stack on my host looks like this:

Configuration for interface "vEthernet (HNS Internal NIC)"
    DHCP enabled:                         Yes
    IP Address:                           172.21.80.1
    Subnet Prefix:                        172.21.80.0/20 (mask 255.255.240.0)
    InterfaceMetric:                      15
    DNS servers configured through DHCP:  None
    Register with which suffix:           Primary only
    WINS servers configured through DHCP: None

Configuration for interface "Ethernet0"
    DHCP enabled:                         No
    IP Address:                           < static ip>
    Subnet Prefix:                        <removed ip prefix> (mask 255.255.252.0)
    Default Gateway:                      < default gateway >
    Gateway Metric:                       1
    InterfaceMetric:                      25
    Statically Configured DNS Servers:    <dns1>
                                          <dns2>
    Register with which suffix:           Primary only
    Statically Configured WINS Servers:   None

Configuration for interface "Loopback Pseudo-Interface 1"
    DHCP enabled:                         No
    IP Address:                           127.0.0.1
    Subnet Prefix:                        127.0.0.0/8 (mask 255.0.0.0)
    InterfaceMetric:                      75
    Statically Configured DNS Servers:    None
    Register with which suffix:           Primary only
    Statically Configured WINS Servers:   None

Overall a pretty standard networking config. As soon as I try to create a new swarm, I lose all connectivity to the host. It took about an hour of troubleshooting to figure out why this was happening, but here’s the behavior.

  1. With a static IP and a default Docker installation, I type docker swarm init
  2. Almost immediately I lose all connectivity to the system via the DNS name/Static IP
  3. From a console, I can see that I get a message saying the swarm was configured.

If I view my networking details, the previous Static IP config is now gone and has been replaced with a DHCP address on a new adapter named “vEthernet (HNSTransparent)”:

Configuration for interface "vEthernet (HNSTransparent)"
    DHCP enabled:                         Yes
    IP Address:                           < new DHCP address>
    Subnet Prefix:                        <removed ip prefix> (mask 255.255.252.0)
    Default Gateway:                      < default gateway >
    Gateway Metric:                       1
    InterfaceMetric:                      25
    DNS servers configured through DHCP:    <dns1>
                                            <dns2>
    Register with which suffix:           Primary only
    WINS servers confgiured through DHCP:   None

Configuration for interface "Loopback Pseudo-Interface 1"
    DHCP enabled:                         No
    IP Address:                           127.0.0.1
    Subnet Prefix:                        127.0.0.0/8 (mask 255.0.0.0)
    InterfaceMetric:                      75
    Statically Configured DNS Servers:    None
    Register with which suffix:           Primary only
    WINS servers confgiured through DHCP: None

If I manually use netsh to reconfigure the static IP on this new interface back to the original Static IP, I can get the node to join the swarm.

But what/why is this new interface being created and using a completely separate IP DHCP address?


(Cramsey) #2

I am experiencing the exact same thing, have you been able to find out any more information regarding this? Have you experienced any issues by manually configuring using netsh as far as the swarm goes?

Thanks, and very good observation on the DHCP.

I thought I would also mention the netsh commands run:

Get Interface ID
netsh interface ipv4 show interfaces
<Note the ID of the HNSTransparent network (I also had a HNS Internal NIC)>

Set IP Information
netsh interface ipv4 set address name="< ID >" source=static address=< StaticIP > mask=< SubnetMask > gateway=< DefaultGateway >

Add DNS Servers
netsh interface ipv4 add dnsserver name="< ID >" address=< DNSIP1 > index=1
netsh interface ipv4 add dnsserver name="< ID >" address=< DNSIP2 > index=2


(Amcgill) #3

We actually tracked this down to IPv6 being disabled on the host. Despite asking repeated times if IPv6 was a requirement for Docker on Windows, and being told No, turns out it is!