IPv6 local link address

Hi!

I'm trying to get the computer's IPv6 addresses using this code but it returns only the IPv6 loopback address (::1). What could be the problem

IPHostEntry HosyEntry = Dns.GetHostEntry(Dns.GetHostName());

if (HosyEntry.AddressList.Length > 0)

{

foreach (IPAddress ip in HosyEntry.AddressList)

{

if (ip.AddressFamily != AddressFamily.InterNetwork)

{

IPString = ip.ToString();

}

}

}

Thanks,

Feper



Answer this question

IPv6 local link address

  • Johannes Jauch

    When you do IPCONFIG.exe /all
    on a command prompt do you see any v6 addresses
    If you don;t you won't get any addresses in the GetHostEntry

    You can also try ipconfig /registerdns
    to make sure that the v6 address is registered in the DNS



  • IPv6 local link address