简体   繁体   中英

Check if server is accessible via IPv6?

是否可以通过c#检查服务器是否可通过IPv6访问?

遍历从Dns.GetHostEntry返回的地址列表,并检查是否有任何IsIPv6xxxx属性设置为true

It depends on what you mean - if you know (or can resolve) the server's hostname or DNS name to an IPv6 address, it should be possible for you to do a couple of things.

You could either send a test packet using IPv6 to the server and see if you get a response back. Alternatively, if you're going IPv6 all the way, you could change your own network layer to be IPv6 only. On newer releases of Windows server I believe you can switch IPv6 on and IPv4 off.

Hope that helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM