InetAddress.getLocalHost() returns APIPA/link-local address in a Windows 2008 SP2 or later version Windows OS with multiple-NICs. (original) (raw)

Charles Lee littlee at linux.vnet.ibm.com
Wed Nov 30 17:13:46 PST 2011


Hi Alan,

Sorry for the late reply. Please see below:

On 11/29/2011 05:47 PM, Alan Bateman wrote:

On 29/11/2011 02:11, Charles Lee wrote:

You are right. The ipv4 will appear in front of ipv6, but the order of ipv4 or ipv6 (separately) will not be sorted. Right, but it means that if the host has at least one IPv4 address then it will be chosen and the IPv6 addresses will be ignored. I should say that I don't have an issue with doing something about this but I'm trying to understand how this issue arises. I'm guessing that either the host is IPv6 only or that somehow the host name is resolving to a list that includes a 169.254.0.0/16 address.

Yes. In the customer scenario, the return value is 169.254../16 address.

-Alan.

-- Yours Charles

-------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/net-dev/attachments/20111201/d6ef5f99/attachment.html



More information about the net-dev mailing list