How to setup TCPIP in Mac OSX?

  • Follow


I'm familiar with the drill in Linux and also in Windows, but not too
clear on what the BSD-ish commands are.

It seems like it is dynamic, like in Windows - you don't really have to
do anything - it just works, if you have DHCP.  But the problems with
this are:
    1) What if it doesn't "just work"?  I.e., what if it doesn't
	configure itself right?  I've found that if you wait long enough, it
	usually fixes itself, but the question is, how long to wait?  And
	obviously, anything that includes phrases like "if you wait long
	enough..." isn't a good solution.
    2) And what if you want to set it up for fixed IP?

As I said, I'm quite familiar with how to do this stuff in Linux.
Having worked on a Solaris system, I have, a few times, brute forced it
there, but I don't remember what the commands are.

Please help.

0
Reply gazelle 12/20/2009 9:32:20 PM

gazelle@shell.xmission.com (Kenny McCormack) writes:
>I'm familiar with the drill in Linux and also in Windows, but not too
>clear on what the BSD-ish commands are.

>It seems like it is dynamic, like in Windows - you don't really have to
>do anything - it just works, if you have DHCP.  But the problems with
>this are:
>    1) What if it doesn't "just work"?  I.e., what if it doesn't


You do it through their graphic Network control panel. 

If you don't do it through the control panel, then it most likely won't work,
especially upon a reboot. Pretty much anything on OSX you take matters
into your own hands if you deviate from using Apple's graphic tools at all. 

OOTH, if you follow along using the their graphic control panels, then
things work all the time. 


0
Reply Doug 12/21/2009 12:37:18 AM


In article <4b2ec33e$0$47485$8046368a@newsreader.iphouse.net>,
Doug McIntyre  <merlyn@geeks.org> wrote:
....
>You do it through their graphic Network control panel. 
>
>If you don't do it through the control panel, then it most likely won't work,
>especially upon a reboot. Pretty much anything on OSX you take matters
>into your own hands if you deviate from using Apple's graphic tools at all. 

You are probably right, but (obviously) that wasn't the answer I was
looking for.  Had it been, I'd probably have posted to some Mac group,
rather than a Unix one.

0
Reply gazelle 12/21/2009 1:47:43 AM

Kenny McCormack <gazelle@shell.xmission.com> wrote:
> In article <4b2ec33e$0$47485$8046368a@newsreader.iphouse.net>,
> Doug McIntyre  <merlyn@geeks.org> wrote:
> ...
> >You do it through their graphic Network control panel. 
> >
> >If you don't do it through the control panel, then it most likely won't work,
> >especially upon a reboot. Pretty much anything on OSX you take matters
> >into your own hands if you deviate from using Apple's graphic tools at all. 

> You are probably right, but (obviously) that wasn't the answer I was
> looking for.  Had it been, I'd probably have posted to some Mac group,
> rather than a Unix one.

OS X isn't BSD'ish in this regard. Though it looks that way superficially
because it makes a modicum of effort to write-out certain configurations to
/etc/resolv.conf, /etc/passwd, etc, which they expect might be needed by
some of the FOSS software they ship, in general everything is either NeXt
derived at best, or of pure OS X breeding.

If want to interact with these systems from the commandline... I dunno where
to point you, nor off-hand do I know the details. Their man pages are decent
and surpisingly comprehensive (though that's relative). You should grep
through them. 

0
Reply William 12/21/2009 3:04:19 AM

gazelle@shell.xmission.com (Kenny McCormack) writes:
>In article <4b2ec33e$0$47485$8046368a@newsreader.iphouse.net>,
>Doug McIntyre  <merlyn@geeks.org> wrote:
>...
>>You do it through their graphic Network control panel. 
>>
>>If you don't do it through the control panel, then it most likely won't work,
>>especially upon a reboot. Pretty much anything on OSX you take matters
>>into your own hands if you deviate from using Apple's graphic tools at all. 

>You are probably right, but (obviously) that wasn't the answer I was
>looking for.  Had it been, I'd probably have posted to some Mac group,
>rather than a Unix one.


Since the TCP/IP system is based on FreeBSD, you can use ifconfig to
temporarily change interface items, where you can do things like
'ifconfig alias'.

But, the configuration storage across reboots is stored in a
not-user-servicable container in darwin, and it only supports what
the graphic control panel does, so there's not much point in messing 
around low-level for it. Even if you figured it out, it'd just change 
in the next rev (which does happen quite often). 


0
Reply Doug 12/21/2009 3:41:54 AM

Doug McIntyre <merlyn@geeks.org> schrieb:
> gazelle@shell.xmission.com (Kenny McCormack) writes:
>>I'm familiar with the drill in Linux and also in Windows, but not too
>>clear on what the BSD-ish commands are.

>>It seems like it is dynamic, like in Windows - you don't really have to
>>do anything - it just works, if you have DHCP.  But the problems with
>>this are:
>>    1) What if it doesn't "just work"?  I.e., what if it doesn't


> You do it through their graphic Network control panel. 

> If you don't do it through the control panel, then it most likely won't work,
> especially upon a reboot. Pretty much anything on OSX you take matters
> into your own hands if you deviate from using Apple's graphic tools at all. 

Depends on the tool you use. networksetup is your friend here.
man networksetup

hth
-Ralph


-- 
s/-nsp// for mail
0
Reply Ralph 12/21/2009 5:43:18 AM

In article <hgn1tm$nve$1@news.albasani.net>,
Ralph Böhme  <ralph-nsp@rsrc.de> wrote:
....
>> If you don't do it through the control panel, then it most likely won't work,
>> especially upon a reboot. Pretty much anything on OSX you take matters
>> into your own hands if you deviate from using Apple's graphic tools at all. 
>
>Depends on the tool you use. networksetup is your friend here.
>man networksetup

$ man networksetup
No manual entry for networksetup
$ 

0
Reply gazelle 12/21/2009 3:31:15 PM

In article <4b2eee82$0$33862$8046368a@newsreader.iphouse.net>,
Doug McIntyre  <merlyn@geeks.org> wrote:
....
>Since the TCP/IP system is based on FreeBSD, you can use ifconfig to
>temporarily change interface items, where you can do things like
>'ifconfig alias'.

That's what I am interested in.  I've always found the man pages (for
the networking commands) in Solaris/BSD systems to be cryptic and
unhelpful.

I assume it is this way by design.

>But, the configuration storage across reboots is stored in a
>not-user-servicable container in darwin, and it only supports what
>the graphic control panel does, so there's not much point in messing 
>around low-level for it. Even if you figured it out, it'd just change 
>in the next rev (which does happen quite often). 

I'm not too concerned with storage-across-reboots.  The main goal here
is to avoid rebooting.  In fact, the primary focus is this: I make a
change to the networking environment (imagine: change ISPs) and want the
machine to adapt to the new situation.  Since it is all "automatic",
there's nothing you can do to make it happen; you just have to wait and
hope.  Just like in Windows...

Obviously, rebooting would probably fix it, but that's what we are
trying to avoid.

0
Reply gazelle 12/21/2009 3:36:07 PM

Kenny McCormack wrote:
> In article <hgn1tm$nve$1@news.albasani.net>,
> Ralph Böhme  <ralph-nsp@rsrc.de> wrote:
> ...
>>> If you don't do it through the control panel, then it most likely won't work,
>>> especially upon a reboot. Pretty much anything on OSX you take matters
>>> into your own hands if you deviate from using Apple's graphic tools at all. 
>> Depends on the tool you use. networksetup is your friend here.
>> man networksetup
> 
> $ man networksetup
> No manual entry for networksetup
> $ 

What version are you running?

http://developer.apple.com/mac/library/DOCUMENTATION/Darwin/Reference/ManPages/man8/networksetup.8.html

0
Reply Golden 12/21/2009 6:19:47 PM

In article <hgo4l7$g9m$2@news.xmission.com>,
 gazelle@shell.xmission.com (Kenny McCormack) wrote:

> In article <4b2eee82$0$33862$8046368a@newsreader.iphouse.net>,
> Doug McIntyre  <merlyn@geeks.org> wrote:
> ...
> >Since the TCP/IP system is based on FreeBSD, you can use ifconfig to
> >temporarily change interface items, where you can do things like
> >'ifconfig alias'.
> 
> That's what I am interested in.  I've always found the man pages (for
> the networking commands) in Solaris/BSD systems to be cryptic and
> unhelpful.
> 
> I assume it is this way by design.
> 
> >But, the configuration storage across reboots is stored in a
> >not-user-servicable container in darwin, and it only supports what
> >the graphic control panel does, so there's not much point in messing 
> >around low-level for it. Even if you figured it out, it'd just change 
> >in the next rev (which does happen quite often). 
> 
> I'm not too concerned with storage-across-reboots.  The main goal here
> is to avoid rebooting.  In fact, the primary focus is this: I make a
> change to the networking environment (imagine: change ISPs) and want the
> machine to adapt to the new situation.  Since it is all "automatic",
> there's nothing you can do to make it happen; you just have to wait and
> hope.  Just like in Windows...
> 
> Obviously, rebooting would probably fix it, but that's what we are
> trying to avoid.

If you don't need it to persist, most of the BSD-style configurations 
should work.  ifconfig will change interface settings, and editing 
/etc/resolv.conf will update the DNS resolver.

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
0
Reply Barry 12/21/2009 10:47:41 PM

In article <hgoe6n$nu1$1@aioe.org>,
Golden California Girls  <gldncagrls@aol.com.mil> wrote:
....
>>> Depends on the tool you use. networksetup is your friend here.
>>> man networksetup
>> 
>> $ man networksetup
>> No manual entry for networksetup
>> $ 
>
>What version are you running?
>
>http://developer.apple.com/mac/library/DOCUMENTATION/Darwin/Reference/ManPages/man8/networksetup.8.html

Presumably, an older version that doesn't have that man page.

Anyway, thanks for the link; I'll check it out.

0
Reply gazelle 12/21/2009 11:06:08 PM

Kenny McCormack wrote:
> In article <hgoe6n$nu1$1@aioe.org>,
> Golden California Girls  <gldncagrls@aol.com.mil> wrote:
> ...
>>>> Depends on the tool you use. networksetup is your friend here.
>>>> man networksetup
>>> $ man networksetup
>>> No manual entry for networksetup
>>> $ 
>> What version are you running?
>>
>> http://developer.apple.com/mac/library/DOCUMENTATION/Darwin/Reference/ManPages/man8/networksetup.8.html
> 
> Presumably, an older version that doesn't have that man page.
> 
> Anyway, thanks for the link; I'll check it out.

Possibly, but I don't know, that the man page and the app are only installed if
you also install xcode.  A lot of good stuff only gets installed if you install
xcode.  I know I have it in 10.5, but I have xcode installed.

0
Reply Golden 12/22/2009 2:28:40 AM

Golden California Girls <gldncagrls@aol.com.mil> schrieb:
> Kenny McCormack wrote:
>> In article <hgoe6n$nu1$1@aioe.org>,
>> Golden California Girls  <gldncagrls@aol.com.mil> wrote:
>> ...
>>>>> Depends on the tool you use. networksetup is your friend here.
>>>>> man networksetup
>>>> $ man networksetup
>>>> No manual entry for networksetup
>>>> $ 
>>> What version are you running?
>>>
>>> http://developer.apple.com/mac/library/DOCUMENTATION/Darwin/Reference/ManPages/man8/networksetup.8.html
>> 
>> Presumably, an older version that doesn't have that man page.
>> 
>> Anyway, thanks for the link; I'll check it out.

> Possibly, but I don't know, that the man page and the app are only installed if
> you also install xcode.  A lot of good stuff only gets installed if you install
> xcode.  I know I have it in 10.5, but I have xcode installed.

Me too. But afair it has been on board by default since 10.5.

-Ralph

-- 
s/-nsp// for mail
0
Reply Ralph 12/22/2009 6:58:11 AM

In article <hgpqm3$44c$1@news.albasani.net>,
Ralph Böhme  <ralph-nsp@rsrc.de> wrote:
....
>>> Presumably, an older version that doesn't have that man page.
>>> 
>>> Anyway, thanks for the link; I'll check it out.
>
>> Possibly, but I don't know, that the man page and the app are only
>> installed if you also install xcode.  A lot of good stuff only gets
>> installed if you install xcode.  I know I have it in 10.5, but I have
>> xcode installed.
>
>Me too. But afair it has been on board by default since 10.5.

I have 10.4, and it doesn't not have that command (at least it isn't on
my PATH, the last time I checked).  So, the man page doesn't do me much
good.  At the URL, it says the command came in in 10.6...

0
Reply gazelle 12/22/2009 12:29:47 PM

Kenny McCormack <gazelle@shell.xmission.com> schrieb:
> In article <hgpqm3$44c$1@news.albasani.net>,
> Ralph Böhme  <ralph-nsp@rsrc.de> wrote:
> ...
>>>> Presumably, an older version that doesn't have that man page.
>>>> 
>>>> Anyway, thanks for the link; I'll check it out.
>>
>>> Possibly, but I don't know, that the man page and the app are only
>>> installed if you also install xcode.  A lot of good stuff only gets
>>> installed if you install xcode.  I know I have it in 10.5, but I have
>>> xcode installed.
>>
>>Me too. But afair it has been on board by default since 10.5.

> I have 10.4, and it doesn't not have that command (at least it isn't on
> my PATH, the last time I checked).  So, the man page doesn't do me much
> good.  At the URL, it says the command came in in 10.6...

In 10.4 afair it was not part of the base system, but part of ARDAgent.app
$ find /System -name '*networksetup*' -print
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/networksetup-jaguar
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/networksetup-panther

I can't remember though if you can use networksetup-panther on tiger.

hth
-Ralph

-- 
s/-nsp// for mail
0
Reply Ralph 12/22/2009 1:18:51 PM

In article <hgqgvr$7ko$1@news.albasani.net>,
Ralph Böhme  <ralph-nsp@rsrc.de> wrote:
....
>In 10.4 afair it was not part of the base system, but part of ARDAgent.app
>$ find /System -name '*networksetup*' -print
>/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/networksetup-jaguar
>/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/networksetup-panther
>
>I can't remember though if you can use networksetup-panther on tiger.

I did that 'find' command and it found networksetup-panther.

How do I run it?  Will it work?

0
Reply gazelle 12/22/2009 2:02:24 PM

Kenny McCormack <gazelle@shell.xmission.com> schrieb:
> In article <hgqgvr$7ko$1@news.albasani.net>,
> Ralph Böhme  <ralph-nsp@rsrc.de> wrote:
> ...
>>In 10.4 afair it was not part of the base system, but part of ARDAgent.app
>>$ find /System -name '*networksetup*' -print
>>/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/networksetup-jaguar
>>/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/networksetup-panther
>>
>>I can't remember though if you can use networksetup-panther on tiger.

> I did that 'find' command and it found networksetup-panther.
> How do I run it?  Will it work?

If you weren't able to find that by yourself, I'd recommend
staying with the GUI.

-Ralph

-- 
s/-nsp// for mail
0
Reply Ralph 12/22/2009 2:22:26 PM

In article <hgqkn2$efq$1@news.albasani.net>,
Ralph Böhme  <ralph-nsp@rsrc.de> wrote:
>Kenny McCormack <gazelle@shell.xmission.com> schrieb:
>> In article <hgqgvr$7ko$1@news.albasani.net>,
>> Ralph Böhme  <ralph-nsp@rsrc.de> wrote:
>> ...
>>>In 10.4 afair it was not part of the base system, but part of ARDAgent.app
>>>$ find /System -name '*networksetup*' -print
>>>/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/networksetup-jaguar
>>>/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/networksetup-panther
>>>
>>>I can't remember though if you can use networksetup-panther on tiger.
>
>> I did that 'find' command and it found networksetup-panther.
>> How do I run it?  Will it work?
>
>If you weren't able to find that by yourself, I'd recommend
>staying with the GUI.

Funny guy.  But don't quit your day job, OK?

0
Reply gazelle 12/22/2009 5:11:13 PM

On Dec 21, 4:36=A0pm, gaze...@shell.xmission.com (Kenny McCormack)
wrote:
> I'm not too concerned with storage-across-reboots. =A0The main goal here
> is to avoid rebooting. =A0In fact, the primary focus is this: I make a
> change to the networking environment (imagine: change ISPs) and want the
> machine to adapt to the new situation. =A0Since it is all "automatic",
> there's nothing you can do to make it happen; you just have to wait and
> hope. =A0Just like in Windows...
>
> Obviously, rebooting would probably fix it, but that's what we are
> trying to avoid.

What you want to do works great with OS X 10.4 Network Locations.
Automatic isn't your only choice, just define all the different
environments you may encounter in System Preferences (e.g. DNS
Servers, DHCP Settings etc.), then choose the location (from the top-
left Apple menu). Works all the time without rebooting.

If there are additional stuff you want to do (e.g. you can't define
static routes in the graphical utilites), you can select the location
from a shell script with the scselect utility.

http://support.apple.com/kb/HT2712

Cheers, Christian

--
rc at networkz dot ch
0
Reply rc 12/22/2009 11:48:36 PM

18 Replies
155 Views

(page loaded in 0.152 seconds)

Similiar Articles:


















7/29/2012 11:58:33 PM


Reply: