Solved

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

Posted on 2011-10-01
4
998 Views
Last Modified: 2012-05-12
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.

0
Comment
Question by:coder1313514512456
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 9

Accepted Solution

by:
Shaun McNicholas earned 250 total points
ID: 36896275
try opening a terminal window and type the commands:

sudo ifconfig en0 down
sudo ifconfig en0 up

if you aren't sure what the interface is called on your system just type
ifconfig

that should display the current network interfaces available on your system.
This should help - http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/ifconfig.8.html
0
 

Author Comment

by:coder1313514512456
ID: 36896629
I'll try having it go down before going up on the next iteration.  Thanks maestropsm.

0
 

Author Comment

by:coder1313514512456
ID: 36896706
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.

0
 

Author Closing Comment

by:coder1313514512456
ID: 36896709
Bring the interface down before you bring it up.  Right.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Deploystudio is a system which can be used to deploy OSX clients and servers within the small/medium or large business environments. The system is built ontop of the OSX Server NetBoot system and uses images & workflows as its core assets. Although …
In this article we will discuss some EI Capitan Mail app issues and provide some manual process to resolve them.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question