I would like to disconnect from my WiFi network on OS X Lion without having the computer to forget the network. So basically I'm looking for a way to just disconnect and connect to a specific WiFi network at will.
How do I do this?
You can disconnect from the current wireless network without turning wireless off by running the following command on the command line:
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -z
Would setting up different locations under Network preferences, each having different way out settings be an option? You'd 'sort of' be disconnecting.
I know that it's old question but maybe someone is looking for better solution.
I've just found that you can detach from a WiFi network by Opt/Alt-clicking on the Wifi icon and then selecting the appropriate option in the dropdown.
Your router may also offer a user interface which offers a way to disconnect from the wifi network. I just tested it out with mine and it worked fine. I also tested the command line prompt described above, and that worked, too.