Why This Error Happens
Error 321 typically occurs when Windows 11 loses its ability to communicate with a networked device due to a disrupted network discovery service or blocked communication port. This is commonly caused by the Windows Firewall blocking the required ports (often TCP 443 or UDP 3702 for WS-Discovery), a disabled “Function Discovery Resource Publication” service, or a stale ARP/DNS cache entry pointing to an outdated IP address for the device. In some cases, corrupted network adapter drivers or incorrect network profile settings (Public vs. Private) can also trigger this unreachable status.
Step-by-Step Resolution Guide
-
Check Network Discovery Services
PressWin + R, typeservices.msc, and press Enter. Locate Function Discovery Provider Host and Function Discovery Resource Publication. Ensure both are set to Automatic and are currently Running. Right-click each and select Start if they are stopped. -
Verify Firewall Rules
Go to Control Panel > System and Security > Windows Defender Firewall > Allow an app or feature through Windows Defender Firewall. Ensure Network Discovery and File and Printer Sharing are checked for both Private and Public networks (or at least Private, if the device is on a trusted network). -
Flush DNS and Reset ARP Cache
Open Command Prompt as Administrator and run the following commands sequentially:
ipconfig /flushdns
netsh interface ip delete arpcache
This clears outdated address mappings that may be causing Windows to reach an incorrect or dead endpoint for the device.
-
Confirm Network Profile Type
Navigate to Settings > Network & Internet > Wi-Fi (or Ethernet) > [Your Network]. Ensure the network profile is set to Private network, as Public profiles restrict discovery and device communication. -
Update Network Adapter Drivers
Open Device Manager, expand Network adapters, right-click your active adapter, and select Update driver > Search automatically for drivers. Restart your PC after updating.
Alternative or Verification Steps
- After completing the steps, try pinging the device via Command Prompt (
ping [device IP]) to confirm connectivity is restored, or check if it appears again under Settings > Bluetooth & devices. - If the issue persists, try connecting the device via a different network adapter (e.g., switch from Wi-Fi to Ethernet) to rule out adapter-specific driver conflicts.