If your mapped or mounted network drive repeatedly disconnects during normal work, start by deciding whether the client (your PC or Mac), the local network (Wi‑Fi/router), or the NAS/server is closing the session. Do those checks first, then apply fixes one at a time and retest. The guidance below gives the exact checks to identify the source, specific client-side and server-side settings to change, router and Wi‑Fi fixes to try, and a verification process you can follow to confirm the problem is resolved.
What you must check first (prerequisites)
- OS and exact build: Windows (name and build), macOS (major version and build), or Linux distribution and kernel.
- How the drive is mounted: SMB (CIFS)/SMB2/SMB3, NFS, or another protocol and the exact mount method (Windows mapped drive, macOS Finder mount,
mountcommand,autofs, or a script). - Connection type: wired Ethernet or Wi‑Fi; if Wi‑Fi, the adapter model and driver version.
- Router make/model and firmware version, and whether you use a consumer router, ISP-supplied gateway, or separate APs.
- NAS/server model and firmware, and the server OS (Synology DSM, QNAP QTS/QuTS, TrueNAS, Windows Server, headless Linux, etc.).
- Symptom detail and timing: whether you see an authentication prompt, the drive letter disappears, mounts remain listed but I/O fails, or open files error. Note exact timestamps and what preceded the disconnect (idle, sleep/wake, VPN connect, heavy transfer).
- Account type: local user, domain/AD/Azure AD, or LDAP; whether credentials are cached.
Gather these items before changing settings. If you later contact vendor or IT support, these facts let them reproduce the issue and avoid unnecessary changes.
How to identify whether the client, the network, or the NAS/server is at fault
- Reproduce the disconnect and collect a timestamped symptom log entry: note the client, action (idle, transfer, sleep), and the exact time. The timestamp is essential for cross-checking logs.
- Quick wired test: plug the client into the same switch or router port with Ethernet and repeat normal activity for 10–30 minutes.
Expected result: if the disconnects stop, the problem is the Wi‑Fi or router. If disconnects continue, suspect the client or the NAS/server.
- Test from a second device: mount the same network share from another machine (wired if possible) and run the same workload.
Expected result: if the second device stays connected, the issue is likely the original client. If the second device also disconnects, the NAS/server or the network upstream of the NAS is more likely.
- Check logs at the time of failure:
- Client logs: Windows Event Viewer (System/Application for LanmanWorkstation/SMB), macOS Console for mount/SMB messages, Linux
dmesgandsyslog. - Router logs: look for wireless deauthentication, DHCP renewals, or interface resets at the same timestamp.
- NAS logs: SMB session disconnects, authentication failures, or SMB daemon restarts.
Expected result: matching events across client and NAS/router at the same time pinpoint where the session was closed. The exact message text varies by OS and vendor; copy raw log lines.
- If the symptom happens only after sleep/wake or idle, prioritize client power settings. If it happens only during periods of heavy traffic, prioritize router/NAS resource issues. If all clients drop at once, suspect the NAS or router.
- If VPN is in use, disable it temporarily and repeat tests because VPNs can change routing and tear SMB sessions.
Step-by-step fixes to apply in this order
- Test whether the problem is Wi‑Fi related by switching to wired Ethernet.
Expected result: if disconnects stop, focus on Wi‑Fi/router fixes rather than client or NAS settings.
- If wiring is possible, keep the Ethernet connection during troubleshooting and perform file operations for 10–30 minutes.
Expected result: stable access indicates a wireless problem; proceed to Wi‑Fi checks.
- Prevent client sleep and adapter power-down while troubleshooting.
- On Windows: disable network adapter power saving and allow the adapter to remain active.
- Open Device Manager > Network adapters > your adapter > Properties > Power Management and clear "Allow the computer to turn off this device to save power."
Expected result: the adapter stays active and does not sleep.
- On Windows run these PowerShell commands as Administrator to reduce system sleep during tests.
powercfg -change -standby-timeout-ac 0
powercfg -change -monitor-timeout-ac 0Expected result: system will not go to standby while plugged in for the test.
- On macOS: keep the Mac awake during tests and disable App Nap for Finder or the sync app if available. Use System Settings > Lock Screen or Energy Saver to prevent system sleep while testing.
Expected result: the system does not sleep and the network interface remains active.
- Ensure mapped mounts reconnect and credentials persist.
- Windows: map the drive with "Reconnect at sign-in" and save credentials in Credential Manager.
- macOS: add the server to Login Items or configure
autofsfor persistent mounts.
Expected result: drives reconnect after sign-in without repeated credential prompts.
- Adjust SMB client keepalive and autodisconnect settings.
- Windows: set
KeepConnso the workstation keeps connections. Example (run as Administrator):
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters" -Name "KeepConn" -PropertyType DWord -Value 1 -ForceExpected result: Windows keeps SMB sessions open longer rather than closing them due to idle.
- macOS / Linux: tune TCP keepalive and SMB client mount options. The exact keys and commands depend on your OS; check vendor docs before changing.
Expected result: client-side keepalives reduce idle disconnects.
- On the NAS/server, raise or disable SMB idle timeouts and enable server-side keepalives where available.
- Look for settings named "SMB session timeout", "Idle timeout", or "Disconnect inactive clients" in the NAS SMB settings and set them to a longer interval or disabled for testing.
Expected result: the server will not forcibly drop idle sessions during normal inactivity.
- Update firmware and drivers.
- Update router/AP firmware, NAS firmware, and client network drivers or OS patches to vendor-recommended versions.
Expected result: fixes for known bugs that cause disconnects may be applied.
- Stabilize IP addressing.
- Reserve a DHCP address for the NAS (DHCP reservation) or set a static IP on the NAS.
Expected result: IP changes during lease renewals won't break mounts that use IP or name resolution.
- Confirm DNS and DHCP settings.
- Ensure a single authoritative DHCP server is present and clients use a stable DNS resolver (router or a chosen public resolver).
Expected result: name resolution remains consistent and mounts by hostname do not fail.
- Improve Wi‑Fi reliability if you must use wireless.
- Move the AP closer, reduce interference, prefer 5 GHz where range allows, ensure AP firmware is current, and disable aggressive AP power-saving features like client isolation on the SSID used for NAS traffic.
- Use a Wi‑Fi analyzer app to check channel occupancy and try a different channel.
Expected result: fewer wireless retransmits and more stable connections.
- Consider router features that affect local traffic.
- Disable client isolation on the SSID used for NAS-client traffic.
- If supported, set QoS or priority for NAS traffic or place NAS and client on a trusted VLAN.
Expected result: NAS traffic gets prioritized and is less likely to be interrupted during heavy network load.
- Test VPN interactions.
- If you use a VPN, test without it. If the VPN breaks SMB, consider split tunneling for local LAN resources or add route exceptions so SMB traffic stays on the LAN.
Expected result: SMB sessions remain stable when local routing is unchanged.
- After each change, test immediately with a file copy or sync for 15–30 minutes before changing the next setting.
Expected result: you can confirm whether each change improved or worsened the problem. Revert any setting that causes instability.
Cautions and model-specific notes to avoid breaking things
- Don’t change DHCP ranges or disable DHCP unless you understand the network impact; that can make other devices unreachable.
- Avoid enabling SMB1 except as a last resort for legacy devices; SMB1 weakens security and should be isolated on a separate network segment.
- Power and sleep changes will reduce battery life on laptops; use them temporarily for troubleshooting and, if acceptable, only while plugged in for long-term use.
- Router features like client isolation and AP steering intentionally interrupt device-to-device communication; ensure those are disabled on the SSID used for NAS access.
- If your machine is managed by corporate group policy or AD, local changes to credential persistence or registry keys may be reverted; coordinate with IT.
Model-specific registry keys, sysctl names, or GUI locations vary by vendor and OS. Check vendor documentation before running low-level commands.
How to confirm the problem is fixed (completion)
- Start a sustained file operation: copy a large folder (several GB) or run a continuous sync tool (rsync, Synology Drive, Resilio) for 1–2 hours.
Expected result: no interruption, no I/O errors.
- While the transfer runs, simulate your normal workflow including idle periods, sleep/wake cycles, and reconnecting to VPN if you normally use one.
Expected result: the drive remains accessible after each event.
- Monitor logs during the test:
- Windows: Event Viewer > System and Applications for LanmanWorkstation/SMB errors.
- macOS: Console for kernel or SMB mount errors.
- NAS: system log and SMB service log for session disconnects or authentication failures.
Expected result: no disconnect or authentication error entries correlated with previous failure times.
- Reboot the client and NAS once and confirm the mapped drive reconnects automatically without repeated credential prompts.
Expected result: the drive is present after sign-in and accessible.
- Leave the client idle with the drive mounted for several hours (overnight if practical) and confirm the mount persists and file operations still work in the morning.
Expected result: no idle timeout disconnects.
If all checks pass, the fix is effective. If problems reappear, collect precise timestamps and the relevant logs (client, router, NAS) for the next troubleshooting step or vendor support.
Frequently Asked Questions
If my mapped drive disconnects only after my laptop sleeps, what should I change?
Prevent the network adapter from sleeping (Device Manager on Windows, Energy Saver on macOS) and test with system sleep disabled. If you need sleep, use a mount method that reconnects on wake (Credential Manager + Reconnect at sign-in on Windows, Login Items or `autofs` on macOS).
Are there common log lines I should look for when diagnosing SMB disconnects?
Look for SMB session or authentication errors, TCP reset messages, DHCP lease renewals, or Wi‑Fi deauthentication entries in client, router, and NAS logs. The exact message text varies by OS and vendor; copy the raw log lines for support.
I changed settings and things got worse. How do I roll back?
Reapply the configuration backup you made before changes. If you didn’t back up, reverse recent changes one at a time: power settings, SMB keepalive/timeout values, DHCP/static IP changes, and firmware updates (only if vendor allows downgrade). If unsure, contact vendor support with the settings you applied and the time the issue began.