Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a clean way to get my default IP address.



On 12/6/05, Frederick Cheung wrote:

>>> To each interface there can be assigned multiple IP addresses.
>>
>> Multiple ones?   WOW!!!  yet MORE confusion...  Gackkkk!

In practice this is rare and typically used as follows:

(1) To host multiple websites (or services) on a single box where each
site responds to a different IP address.  Newer versions of HTTP can
distinguish websites by the domain name in the URL so don't need this.

(2) For "Static NAT" where one or more public IP addresses are mapped to
private IP addresses behind a NAT firewall similar to a DMZ.  In this
case it's not actually necessary to create public IP interfaces as long
as ARP is configured to publish the corresponding IP addresses.

(3) To support single Ethernet or one arm gateways that forward packets
in and out the same port.

Some BSD networking tools refer to these additional IP addresses as
"aliases".  In any case, it's probably safe to assume the user has
arranged to place the "Primary Interface" first in the currently
selected location (service order) within the System Configuration
Framework (SCF).

Using the SCF looks harder than it really is.  It's just a collection of
Dictionaries and Arrays specifying various interface attributes.  Once
you grasp the schema (organization of keys and attributes), it's fairly
straight forward to extract any information you need.

Kind Regards,

- Peter


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden

References: 
 >Is there a clean way to get my default IP address. (From: John Draper <email@hidden>)
 >Re: Is there a clean way to get my default IP address. (From: "Justin C. Walker" <email@hidden>)
 >Re: Is there a clean way to get my default IP address. (From: John Draper <email@hidden>)
 >Re: Is there a clean way to get my default IP address. (From: Frederick Cheung <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.