I'm having a little trouble understanding the System.Net.IPAddress
class, because I don't know where to look for a definition of what some of the properties are referring to. Specifically, what are:
IPAddress.IsIPv6LinkLocal
IPAddress.IsIPv6Multicast
IPAddress.IsIPv6SiteLocal
IPAddress.IsIPv6Teredo
I will also happily accept an answer that points to a resource that explains these concepts. The MSDN site has proved insufficient.
IPAddress.IsIPv6LinkLocal
IPAddress.IsIPv6Multicast
IPAddress.IsIPv6SiteLocal
IPAddress.IsIPv6Teredo
For link local and site local:
http://www.tcpipguide.com/free/t_IPv6SpecialAddressesReservedPrivateLinkLocalSiteLo-3.htm
For link local, site local and multicast (and others as well):
http://technet.microsoft.com/en-us/library/cc757359(WS.10).aspx
For teredo:
http://technet.microsoft.com/en-us/library/bb457011.aspx
HTH
The answer of CodeNaked is almost correct, but please watch out with IPAddress.IsIPv6SiteLocal. The original IPv6 Site Local addresses (fec0::/10) are deprecated.
These days Unique Local Addresses (ULA) are used in place of Site Local. ULA has two variants: fc00::/8 is not defined yet, but might be used in the future for internal-use addresses that are registered in a central place (ULA Central). fd00::/8 is in use and does not have to registered anywhere. Prefixes from this range are generated randomly.
Unfortunately IsIPv6SiteLocal only checks for the original deprecated version:
It does not recognize ULA Central:
Or locally assigned ULA:
Please see http://tools.ietf.org/search/rfc4193 for further details.