Try this: Go to System Preferences>Network . At the top of this window, it probably will say Location:Automatic. Click that drop-down box and choose “Edit Locations”. Click on the +, and create a new location.
If you’re on Airport, it may ask you for your network key again- enter this.
Restart and see if this has fixed it.
via Apple – Support – Discussions – Networking Connection Error ….