If your Mac cannot connect to the Internet, and the Internet connection has been verified good, the issue may be the preferences.plist file has become damaged. This preference file can cause a number of networking problems, including network
loss after sleep, an inability to log in, and even an inability to start-up.
Try the following on your Mac in order, until (hopefully) resolved. Put your iMac to sleep, and after awaking it, see if it has network connectivity.
Create a New User Account
- System Preferences > Accounts
- Click "+" to add a new account.
- Log off, and then, log back on with the new user account. If this resolves the problem, there may be something amiss with your current profile and will require further troubleshooting. If this does not resolve the problem, go ahead and log back into your normal account and go on to the next step.
Delete AirPort Keychain Entries
- Launch the "Keychain Access" application, located in Applications/Utilities.
- In the left-side window, select "login" under Keychains and "Passwords" under Category.
- Click on the "Kind" filter at the top and look for any "AirPort network password" entries...and delete them.
- Close Keychain Access.
- Again, put your Mac into sleep mode, and then, wake it up.
Delete & Add Back Preferred Network(s)
- System Preferences > Network > Wi-Fi > Advanced > Wi-Fi tab
- Delete all entries under "Preferred Networks."
- Click on OK.
- System Preferences > Network > Wi-Fi > Advanced > Wi-Fi tab
- Add the preferred network(s) using the "+" button.
- Click on OK.
- Restart or log out, and then, back in.
- Put your Mac into sleep mode, and then, awaken it. If it works, then you are done. If not, go on to the next step.
Move System Configuration Files
- Quit any applications that are currently using Wi-Fi.
- Turn off Wi-Fi from the Wi-Fi icon on the macOS menu bar.
- Open Finder > Go > Go To Folder
- In the "Go to the folder" window, enter:/Library/Preferences/SystemConfiguration/
- Click on Go
- Locate and select the following files: (Note: Files are macOS version specific, not all the following files are used in each version.) com.apple.airport.preferences.plist, com.apple.network.eapolclient.configuration.plist, com.apple.wifi.message-tracer.plist, NetworkInterfaces.plist, & preferences.plist
- Move any matching files to the macOS Desktop. You can place them all in a folder as a backup. The "missing" files will be rebuilt after restarting the Mac.
- Reboot the Mac.
- Re-enable Wi-Fi from the Wi-Fi icon on the macOS menu bar.
- Put your Mac to sleep, and then, awaken it.