How to Diagnose connection issues
The first place you should look to check your Mac’s connection is System Preferences’ Network pane. Select Ethernet or Wi-Fi, depending on which one you use. If the circle next to it is red (no connection) or yellow (not configured), the pane should provide info on the problem, such as a missing Internet Protocol (IP) address — the set of four numbers beginning ‘192.168.’ that uniquely identify a device — or lack of an internet connection. If that’s not enough to identify the issue, however, then use the following steps to make further checks.
Check your Wi-Fi
Hold Alt, click the Wi-Fi menu bar icon and choose Open Wireless Diagnostics. Click Continue to run a series of tests, then click each result for a description of what it has found.
Run some tests
Use Spotlight (Cmd+Spacebar) to open Network Utility. In the app’s Ping tab, type your router’s IP address and click Ping. If the packets are all received, the issue isn’t with your Mac.
Verify IP settings
Go to System Preferences> Network. Select your connection type and see if an IP address has been assigned — if set manually, choose, TCP/IP. Try setting IPv4 to Using DHCP.
Renew the lease
Try renewing the lease of the IP address given by the router. If the issue persists, pick ‘Using DHCP with manual address’; enter an unused one, leave the mask as is, and verify the address.
Forget your Wi-Fi
If you use Wi-Fi, click Advanced > Wi-Fi, select the misbehaving network in the list and click – (minus) to remove it. Click OK, Apply, then the Wi-Fi menu bar icon and connect from scratch.