[Vm-dev] Finding ip address for eth0?
Andreas Raab
andreas.raab at gmx.de
Wed Aug 26 20:25:07 UTC 2009
Philippe Marschall wrote:
> 2009/8/26 Andreas Raab <andreas.raab at gmx.de>:
>> Quick Unix question: How do I find out what the IP address for eth0/eth1 is?
>> I thought NetNameResolver>>localHostAddress was supposed to return this but
>> it returns consistently 127.0.0.1 which is fine from a purity point of view
>> but utterly useless from any practical perspective ;-)
>
> I reported exactly this a while ago and was told that the problem is
> with me and not the code.
What was the argument? I'm not trying to find out how a client is
ultimately connecting to the host - I'm trying to make a "best guess"
for a zero configuration environment (concretely: a VMware image with a
single network interface running in a bridged environment). The only
thing that I know for sure is that 127.0.0.1 won't work because clients
won't connect from localhost.
Cheers,
- Andreas
> Then I suggested that the code would be
> changed to directly return 127.0.0.1. That would achieve the same
> result more efficiently. Somehow that never got implemented though.
>
> Cheers
> Philipe
>
More information about the Vm-dev
mailing list