When changing locations in Network via System Preferences and the DHCP service does not provide directly a new IP address, one does not need to restart the computer. A network reset suffices. This can be given via the terminal:
% sudo /System/Library/StartupItems/NetworkExtensions/NetworkExtensions stop % sudo /System/Library/StartupItems/NetworkExtensions/NetworkExtensions startA tcsh "Network-restart" script can be easily put into ~/bin to make this easier. Make the script executable with chmod +x Network-restart. Here's the "Network-restart" script:
#!/bin/tcsh -f # # aim: restart network # usage: Network-restart sudo /System/Library/StartupItems/NetworkExtensions/NetworkExtensions stop sudo /System/Library/StartupItems/NetworkExtensions/NetworkExtensions start[robg adds: I haven't tested this one.]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20031021073821426