ZeroTierOne icon indicating copy to clipboard operation
ZeroTierOne copied to clipboard

MacOS losing connectivity to LAN after waking from sleep

Open teddziuba-eu opened this issue 6 years ago • 10 comments

Describe the bug If a Mac OS X client goes to sleep while connected to a ZeroTier network, upon waking up after 20-30 minutes, the client maintains connectivity to hosts on the ZeroTier network, but loses connectivity to hosts on its LAN.

More specifically, upon waking, the client is unable to ping its LAN gateway (192.168.1.1 in my case), citing no route to host. Additionally, there is no entry for the LAN gateway in the client's ARP table. The client machine is sending unicast ARP requests to the LAN gateway, and receiving correct replies, but is not updating its ARP table accordingly.

To Reproduce Steps to reproduce the behavior:

  1. Create a ZT Network that sets the default route 0.0.0.0/0 to a host within the ZT network
  2. Connect a MacOS X (Catalina) host to it using ZT version 1.4.6
  3. Put the Mac to sleep, wait 20-30 minutes
  4. Wake the Mac up
  5. The machine remains connected to the ZT network, and can ping hosts in the ZT network
  6. The machine is unable to ping machines in its LAN

Expected behavior The machine, after waking from sleep, should maintain connectivity to both the ZeroTier network and its LAN.

Desktop:

  • OS: Mac OS X Catalina
  • ZeroTier Version 1.4.6
  • Hardware: Macbook Pro

Additional context

  • Upon waking up, the client machine is unable or unwilling to update its ARP table with any hosts on the LAN, despite sending both broadcast and unicast who-has requests, and receiving correct is-at responses from the gateway. The client also respond to who-has ARP requests for its own LAN IP address. (I verified this with tcpdump on the LAN interface)
  • Curiously, while the client says its unable to route traffic to the LAN gateway, the connection to the ZeroTier network, though said LAN gateway, remains intact.

teddziuba-eu avatar Nov 20 '19 19:11 teddziuba-eu

Having the same issue here, with same Hardware/OS/Software Version.

After 20-30 minutes of sleep, the malfunction of ZeroTier on Mac paralyzes the local network, making other computers in the local network cannot connect to each other and cannot connect to the Internet.

But the local network goes back to normal and functions as expected once the Mac is waked up.

KevenLi8888 avatar Dec 26 '19 10:12 KevenLi8888

Having the same issue here.

Has anyone found a workaround for this?

ajmazzaferrotakl avatar Mar 11 '20 14:03 ajmazzaferrotakl

I think I'm having a similar issue. Though I've changed the settings and it's not supposed to be sleeping, so I'm unsure if it's ZeroTier that fails to keep the VPN connection alive or if there's really no WAN connectivity whatsoever.

gustiando avatar Dec 29 '20 14:12 gustiando

Can confirm this issue is still happening in version 1.8.1, only running sudo route -n flush a few times followed by a Wi-Fi reconnect fixes this issue.

lflare avatar Nov 07 '21 07:11 lflare

Similar issue here, but only affects Mac (10.12.5) with Zerotier installed. Updated to lastest version 1.6.6 with no joy.

Symptoms are very strange, with various local services continuing run as normal (Chrome, Terminal) whilst others fail outright (Mail, Safari). It appears non cached DNS requests fail causing eventual system wide melt down and paralysis. Only solution is to hard restart mac, and un-install Zerotier and reboot again. Only after this do things return to normal. This first occurred when the Mac was put to sleep and wouldn't wake up. Then after this initial upset, Zerotier continued to complain about being unable to connect. Installed, rebooted, reinstalled. Removing Zerotier has cleared up all problems. Problem is, after years of operating on a stable unchanged Mac OS, zerotier appears to have just lost the plot.

dirtymouse avatar Jan 04 '22 17:01 dirtymouse

1.8.4 is the current version. Maybe you mean 1.8.4.

I never experience this, but I don't use sleep often. I can try to sleep more often. Any other tips to reproduce?

laduke avatar Jan 04 '22 18:01 laduke

v1.6.6 is the latest version for Mac OS 10.12.5

I don't use force sleep either, just screen saver screen lock, but my wife put the computer to sleep and that's when everything went south. Needless to say she won't do that again :)

choose sleep from Apple Menu to replicate had two ZT connections live Mac is a 2012 Mac Mini 16gb 4 core i7

dirtymouse avatar Jan 04 '22 22:01 dirtymouse

Same issue on Windows 11. Some info:

  • ZT version 1.8.4
  • In GUI the VPN looks normal but no traffic can be sent or received.
  • In Central the connection is reported to be offline.
  • When you disconnect the VPN and the reconnect the connection hangs forever on "REQUESTING_CONFIGURATION".
  • Running Windows 11 Pro, Version 10.0.22000. Haven't found an easy workaround to get the VPN. Bouncing the Zerotier service or rebooting the machine are the only cures I have found.

gmos avatar Jan 28 '22 10:01 gmos

This bug still exists on the latest version of ZeroTier, v1.8.9. A small workaround is to toggle the allowDefault via a simple bash script.

lflare avatar May 14 '22 22:05 lflare

~~hey @lflare, or anyone that likes to compile software, does this work better for you?:~~ ~~https://github.com/laduke/ZeroTierOne/tree/default-route-mac~~

laduke avatar May 21 '22 00:05 laduke