Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Network connection

Network connection
Thread Tools
callefoss
Junior Member
Join Date: Nov 2002
Location: Sweden
Status: Offline
Reply With Quote
Dec 22, 2004, 03:03 PM
 
Hi,

I was wondering if anybody could tell me how to bring up and down the ethernet connection from the terminal. I am receiving IP from my router, dhcp.


Thanx in advance
     
callefoss  (op)
Junior Member
Join Date: Nov 2002
Location: Sweden
Status: Offline
Reply With Quote
Dec 22, 2004, 05:53 PM
 
btw

$ sudo ifconfig en0 down - seems to work
$ sudo ifconfig en0 up - does not work

cheers
     
[APi]TheMan
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status: Offline
Reply With Quote
Dec 22, 2004, 08:33 PM
 
Originally posted by callefoss:
btw

$ sudo ifconfig en0 down - seems to work
$ sudo ifconfig en0 up - does not work

cheers
I was going to suggest using ifconfig en0 down as well but, like you, I can never get "up" to bring the interface back up. So what DO you do to bring the interface back up?
"In Nomine Patris, Et Fili, Et Spiritus Sancti"

     
callefoss  (op)
Junior Member
Join Date: Nov 2002
Location: Sweden
Status: Offline
Reply With Quote
Dec 23, 2004, 07:11 AM
 
Found some stuff that I have not tried yet my self, but it should work.

"sudo ipconfig set en0 DHCP" - to bring it up

Or

restarting the network interface with:

"sudo SystemStarter restart Network"

I cannot try this my self until tomorrow, so let me know if it works.
     
Detrius
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status: Offline
Reply With Quote
Dec 25, 2004, 05:45 PM
 
I don't believe this is limited to OS X Server... check out the "networksetup" command.

This should be:

sudo networksetup -setnetworkserviceenabled "Built-in Ethernet" on
sudo networksetup -setnetworkserviceenabled "Built-in Ethernet" off
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
callefoss  (op)
Junior Member
Join Date: Nov 2002
Location: Sweden
Status: Offline
Reply With Quote
Dec 25, 2004, 05:55 PM
 
Thanxs, but the networksetup command does not seem to work with client OS, at least not for me.
     
callefoss  (op)
Junior Member
Join Date: Nov 2002
Location: Sweden
Status: Offline
Reply With Quote
Dec 25, 2004, 05:59 PM
 
Anyway, I use the command "sudo ipconfig set en0 NONE" to bring it down and "sudo ipconfig set en0 DHCP" to bring it back up again.
     
Detrius
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status: Offline
Reply With Quote
Dec 26, 2004, 12:17 PM
 
Originally posted by callefoss:
Thanxs, but the networksetup command does not seem to work with client OS, at least not for me.
BTW, on my machine, it's in /usr/sbin which is in root's $PATH, but not in other users' $PATH. I also seem to recall reading somewhere else that some of these utilities are installed on OS X Client with ARD Client 2.0 (which is a free download, apparently).
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
Angus_D
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Dec 27, 2004, 07:34 AM
 
Originally posted by Detrius:
BTW, on my machine, it's in /usr/sbin which is in root's $PATH, but not in other users' $PATH. I also seem to recall reading somewhere else that some of these utilities are installed on OS X Client with ARD Client 2.0 (which is a free download, apparently).
Uh, /usr/sbin is in everyone's $PATH by default, I think. And it certainly isn't included with OS X Client by default, and the OS X Server version requires OS X Server. I get the following message when trying to run it:
Code:
gonzales:/Volumes/server/usr/sbin finlay$ ./networksetup This tool only runs on Mac OS X Server... exiting. gonzales:/Volumes/server/usr/sbin finlay$ sw_vers ProductName: Mac OS X ProductVersion: 10.3.7 BuildVersion: 7S215
     
Detrius
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status: Offline
Reply With Quote
Dec 29, 2004, 02:09 AM
 
Originally posted by Angus_D:
Uh, /usr/sbin is in everyone's $PATH by default, I think. And it certainly isn't included with OS X Client by default, and the OS X Server version requires OS X Server. I get the following message when trying to run it:
Code:
gonzales:/Volumes/server/usr/sbin finlay$ ./networksetup This tool only runs on Mac OS X Server... exiting. gonzales:/Volumes/server/usr/sbin finlay$ sw_vers ProductName: Mac OS X ProductVersion: 10.3.7 BuildVersion: 7S215
Crap... here I go spreading bad information again. [bad]BTW, Apple's going to ditch the G5 for the Pentium 4.[/bad]
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
Axel
Mac Enthusiast
Join Date: Sep 2000
Location: France
Status: Offline
Reply With Quote
Dec 29, 2004, 01:56 PM
 
According to macosxhints.com, this tool comes with the free Apple Remote Desktop Client.

edit : oops, that's already been said in this thread. at least now you have the link
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 03:44 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,