IPv6 address by hostname
86,388
Solution 1
With nslookup
, just query for the AAAA
record type used for IPv6 addresses:
nslookup -query=AAAA $hostname
Solution 2
host -t AAAA www.google.com
dig www.google.com AAAA
Comments
-
user44273 about 4 years
Is there any command in Linux to get the IPv6 address of a hostname?
I tried
NSLookup
, but it doesn't seem to have an option to get the IPv6 address for the specified hostname or perhaps I missed it.I have a C program that deals with IPv6 and I want to check if I am getting correct results by using a different method to obtain the IPv6 address of a host.
-
user44273 about 11 yearsoops, my bad, thanks anyway
-
Smit Johnth over 7 yearsWorks at least on Windows XP too.