My Cloud Network Connectivity Woes

#1

I have a 6TB My Cloud running on a static IP outside of the DHCP range via Cat5e to a Ubiquity Unifi network (Gigabit USG, 16-port POE switch with an AP-PRO). I have a Mac running High Sierra 10.13.6 (wifi) and a Raspberry pi 3B+ running Pi Hole on a DNS of 192.168.1.100. My Unifi controller software is also on the PI. The NAS is on a static IP 192.168.1.99 and all firmware is up to date.

For the life of me, my NAS will not stay connected over the network through my Mac. I only have one Mac, and every 10-30 mins, the NAS will disconnect and disappear from the network. This will require me to shutdown the mac and restart or wait a significant number of minutes before reestablishing a connection. After restart, the NAS will reappear on the network and I can begin my file transfers (mostly torrents). I’m still able to access the MyCloud portal and all of the contents through my phone just fine over wifi.

I’ve tried switching the NAS to SMB3 (although I don’t own a Windows device) from AFP but that doesn’t seem to work. I’ve tried mounting the drive to the network via smb//192.168.1.99 and that doesn’t retain connection. A full health check on the WD NAS comes back clean and I can’t determine the problem. Media Streaming is off and Itunes sharing is disabled. My next step is to disconnect the USG and go back to my Netgear Nighthawk to see if the USG is interfering with the network links. I don’t want to do that because of the time it would take me to reconfigure the network, so here I am…

I also experience complete disconnect from the internet on my Mac that sometimes happens simultaneously with this NAS problem. I run torrents in the background, hence the NAS. I first noticed the problem because my torrents would disconnect and the client spits back a connection error to me. I’ve used both qTorrent and uTorrent and I get the same connection problems with both.
I don’t have Plex or any other stream service connected.

UPnP is enabled and I also have the Unifi Auto-Optimize set to ‘off’.

Prior to the Unifi network, the Mac and NAS would communicate just fine without disconnecting. I’ve had this NAS since 2017 without any trouble until now.

Any suggestions?

#2

Many suggestions :smile:

It sounds like a network problem that shows up because the NAS sleeps. Have you checked your network config? How comfortable are you with Terminal? SSH?

Mac:
In Terminal you should be able to:

ping 192.168.1.99
ping NAS.lan
ping NAS.local
arp -a

This is a local network - the responses should be a couple of ms.

I am assuming you assigned a name to your NAS (Settings > General > Device Name ) AND gave your network a local domain name (I use “lan”; DO NOT use “local”!! The ".local is the Bonjour (Apple)/Avahi (Linux) zero config network (224.0.0.251)). I suggest you get the (free) app Discovery - DNS-SD Browser which will show you every device your network on that zero config network - FireTV, Chromecast, NAS and anything else that offers a service.

Other things to check:

Router/Pi-Hole (am not familiar with it, I assume applies)
External DNS (1.1.1.1, 8.8.8.8, etc) should be on the WAN side only - each of your devices (including the NAS) should show 192.168.1.100 as the ONLY DNS server and your network domain name (“lan”) as the search domain. (Network Prefs > Advanced > DNS on the Mac and “hostname -A” on the NAS)
Jumbo Frames - disable
IGMP Snooping - disable (or at least see if it improves)
static IP inside the DHCP range - I know it is not recommended, but worth a shot

Other things you can do to improve your Mac-NAS experience:
Mac:
disable NETBIOS -
sudo launchctl disable system/netbiosd
turn off SMB packet signing - https://support.apple.com/en-us/HT205926

NAS (if you are comfortable to SSH):
add this to the [Global] section of /etc/smb-global.conf

# PREREQUISITES TO FUNCTION WITH OSX
#
  min protocol = SMB2
  ea support = yes
#
# NOT NEEDED WITH OSX/LINUX
#
  disable netbios = yes
  dns proxy = no
  smb ports = 445
  name resolve order = host bcast
#
# GENERAL COMPATABILITY WITH OSX SMB
# adds alternate data streams (ADS) support
#
  vfs objects = catia fruit streams_xattr
#
# STORAGE OF OSX METATDATA & RESOURCE FORK 
# in Netatalk compat xattr & ._ AppleDouble File
#
  fruit:metadata = netatalk
  fruit:resource = file
#
# FILE LOCKING
# no cross protocol locking
#
  fruit:locking = none
#
# MAP NTFS ILLEGAL CHARS TO UNICODE
#
  fruit:encoding = private
#
# SMB2+ AAPL EXTENSIONS
# file metadata - Unix mode, FinderInfo, resource fork size, permissions
#
  fruit:aapl = yes
  readdir_attr:aapl_rsize = yes
  readdir_attr:aapl_finder_info = yes
  readdir_attr:aapl_max_access = yes
  fruit:nfs_aces = yes
#
# OSX COPYFILE
#
  fruit:copyfile= yes
#
# PERFORMANCE TWEAKS
# note - error with smb2 leases
#
  smb2 leases = yes 
  kernel oplocks = no
  use sendfile = yes
#
# FILE CLEANUP
#
  delete veto files = true
  unix extensions = yes
  fruit:posix_rename = yes
#
# PARAMETERS IN SAMBA VERSION > 4.3.11?
# testparm does not check fruit parameters
#
  fruit:model = MacSamba
  fruit:veto_appledouble = yes
  fruit:zero_file_id = yes
  fruit:wipe_intentionally_left_blank_rfork = yes
#
## END OF ADDED CONFIGS

Apple has deprecated AFP, but Time Machine still uses AFP over SMB for the NAS. Otherwise you should use SMB for Mac < > NAS.
Note that the protocol used between the Mac & the NAS is SMB2 dialect 0x0302 which is the same as SMB 3.0.2 in MS-speak.
I assume you have UPnP enabled for a reason?