Re: How do you display the IP Address?
Re: How do you display the IP Address?
- Subject: Re: How do you display the IP Address?
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 28 Aug 2009 08:37:16 -0400
Sounds like the system info value is somewhat random and unreliable, then...
On 8/28/09, Emmanuel LEVY <email@hidden> wrote:
>
> On Aug 27, 2009, at 5:52 PM, Deivy Petrescu wrote:
>
>>
>> On Aug 26, 2009, at 4:27 PM, Emmanuel LEVY wrote:
>>
>>>
>>> On Aug 26, 2009, at 5:37 PM, Mark J. Reed wrote:
>>>
>>>> Then probably your primary IP address isn't the one on the en0
>>>> interface. OMM en0 is wired Ethernet and en1 is wireless and I'm
>>>> using
>>>> wireless, so (IPv4 address of (system info)) returns the same result
>>>> as `ipconfig getifaddr en1`.
>>>>
>>>> I could be using both; a system can have more than one IP address.
>>>> Not sure what system info returns in that case.
>>>
>>> I checked on a machine with 3 Ethernet addresses: 2 public
>>> addresses and one local address.
>>>
>>> - IPv4 address of (system info) prudently returns... missing value,
>>> - ipconfig getifaddr en0 returns one of the public addresses,
>>> - ipconfig getifaddr en1 returns the local address.
>>>
>>> Not that I would need to, but I don't know how to grab the second
>>> public address.
>>>
>>> Emmanuel
>>
>>
>> It is strange that you have a missing value.
>> I assume you have a MacPro, the first ethernet is the WAN link, so
>> it displays the wan IP.
>
> Not a MacPro, a XServe. And I confirm it has two WAN IP: 91.199.0.247
> and 91.199.0.251.
>
>> It is probably the server so it shares the the WAN IP via en1 the
>> second ethernet port (the LAN IP).
>> May be your "missing value" is returned when the Mac is the server
>> for the LAN.
>> Still, it should have returned something else...
>
> Not that it makes things clearer, but I tested on another machine in
> the same LAN, which has only one WAN IP and one LAN IP, and IPv4
> address of (system info) wittily returns... 127.0.0.1.
>
> Emmanuel
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
--
Sent from my mobile device
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden