Link to home
Start Free TrialLog in
Avatar of coder1313514512456
coder1313514512456Flag for United States of America

asked on

Bash: Mac OS X 10.6.8/SL: How does Network Diagnostics fix?

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.

ASKER CERTIFIED SOLUTION
Avatar of Shaun McNicholas
Shaun McNicholas
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of coder1313514512456

ASKER

I'll try having it go down before going up on the next iteration.  Thanks maestropsm.

Early indications are that it seems to work like a champ.

Thanks again, don't know why I didn't think of bringing it down first.

Bring the interface down before you bring it up.  Right.