Mac OS X Lion/Mountain Lion - Could not join network/timeout
I was migrating all the data from a friend's old MacBook (which was running Mac OS X Tiger) to her new MacBook Air (running Mac OS X Mountain Lion), and besides a WiFi hiccup, everything went smoothly (I had to clone the old MacBook's drive to a USB disk, then use Setup Assistant to migrate the data from that disk to the new MacBook Air).
During the Setup Assistant, I could easily connect to my WiFi network, but after the migration was complete, I couldn't connect anymore. I kept getting a pesky error: "Could not join [network]. A connection timeout has occurred." (see picture of error dialog here). Looking through Apple's forums and elsewhere was not much help, because this message seems to be a very generic 'something weird happened' error, happening in many different circumstances.
However, knowing that the keychain and old WiFi connection data from the old Mac had transferred over to the new Mac, and knowing that something might've gone screwy with the network information, I decided to do the following: