Bash: Mac OS X 10.6.8/SL: How does Network Diagnostics fix?
Posted on 2011-10-01
I have a very easy bash Macintosh network question for you.
I'm currently in a situation where I have to unplug and replug in a Mac's ethernet cable. (Because of some network configuration which is unrelated to this question.)
When I plug the ethernet back into the Mac, I've found that the fastest way to get the OS to respond to the new network connection is to go to:
Preferences > Network > Ethernet (n) > Assist Me > Diagnostics > Ethernet > Continue.
In which case, a dialog responds that the internet connection appears to be operating. (And now it is.)
My question is, this is doing this very quickly and surely there must be some bash script I can write that can duplicate this simple procedure.
I can't simply do a
$ sudo ifconfig en0 up
(Macs use en0 instead of enth0 or something.)
What am I missing? This should be a very simple thing to do.