Follow these steps - it will fix the issue (After restarting or waking from sleep, my computer might not connect to the Internet) on the latest iMac with Lion 10.7.3:
What we will do here is - first install the latest iMac Wi-Fi Update. Then remove our preferred network in network settings plus remove the stored network passwords from KeyChain Access Utility. Restart and rebuild our preferred network with password. Done. Please follow the instructions carefully.
1) Download iMac Wi-Fi Update v1.0 here: Download
This update resolves an issue that may cause an iMac to not automatically connect to a known Wi-Fi network after waking from sleep. February 24, 2012 - 25.81 MB
http://support.apple.com/kb/DL1500
2) (http://support.apple.com/kb/HT4628?viewlocale=en_US) - (slightly modified below)
Symptom: After restarting or waking from sleep, my computer might not connect to the Internet
1. Select the Wi-Fi tab and view your Preferred Networks list.
- Select each network and click the minus ➖ sign to remove those networks from your Preferred Networks list.
=> REMOVE ALL NETWORK - including your PREFERRED NETWORK (which is the very one you are having issues with)
- Click OK and close the Network preferences.
2. Remove your stored network passwords using the Keychain Access Utility.
- Open Keychain Access from /Applications/Utilities. Your window will look like this:
- Remove your AirPort network passwords from the login keychain: Select the "login" keychain from the Keychain sidebar. Click the "Kind" column to order the list of keychain items by their type. Remove all entries of the kind: "AirPort network password".
- Remove your AirPort network passwords from the System keychain: Select the "System" keychain from the Keychain sidebar. Click the "Kind" column to order the list of keychain items by their type. Remove all entries of the kind: "AirPort network password".
Note: The above steps will remove your Wi-Fi network passwords. If you do not know them, or if your network does not use passwords to restrict access, you should contact your network administrator.
3. Restart your computer.
4. Go to network settings / preferred networks and click the ➕ button to add your preferred network. Join your Wi-Fi network. You will need to enter your password for your network again if it requires one.
Done.
Click Sleep and wake it and it all will be fine!