3
How can I get the IPv6 address of any website ( eg www.google.com) using ping command in cmd on windows 8.1? And is it possible to do so if my OS only supports link-local IPv6?
I tried this: ping -6 www.google.com
but it didn't work.
3
How can I get the IPv6 address of any website ( eg www.google.com) using ping command in cmd on windows 8.1? And is it possible to do so if my OS only supports link-local IPv6?
I tried this: ping -6 www.google.com
but it didn't work.
3
You can just use nslookup
like you normally would. If the site has an IPv6 address it will be returned in the list:
nslookup google.com
Name: google.com
Addresses:
2607:f8b0:400a:804::1005
173.194.33.166
173.194.33.174
173.194.33.165
173.194.33.162
173.194.33.164
173.194.33.169
173.194.33.163
173.194.33.160
173.194.33.161
173.194.33.168
173.194.33.167
If you want to only return the IPv6 address (if present), you can use nslookup -query=AAAA
:
nslookup -query=AAAA google.com
Name: google.com
Address: 2607:f8b0:400a:804::1005
Keep in mind that ping
is not designed to be used as a lookup tool. In order to ping something the computer must do a lookup, and does end up showing you an IP address, but if your purpose is to find an IP address it makes more sense to just use nslookup
directly. That's what it's there for.
Thanks! Your method works perfectly. But here I got confused somehow. You said that
nslookup
is used byping
yet I still can't ping Google's IPv6 address, so what's going on? – kamal – 2015-05-16T21:56:48.450@mhmdhsenkamal
ping
doesn't usenslookup
directly, but it does basically the same thing internally. In order toping
something you need to know its IP address. And in order to find an IP address, you must do a nameserver lookup. However, a nameserver lookup can return an IP address which you might not be able to ping. – nhinkle – 2015-05-16T22:16:05.180An NSlookup is like looking somebody up in an address book. You get their address, but just because you know the address doesn't mean that if you go to their house their door will be open. – nhinkle – 2015-05-16T22:17:03.793