I need to make a DNS query to one of my clients using IPv6 to resolve the IPv4 address for the machine, how would I go about doing that. I know i can just use the hostname to resolve both IPv4 & IPv6 for the machine, but the assignment is to use the IPv6 address to resolve the IPv4 adress for one of the clients of the network.

The client is a Windows 7 machine and the DNS-server is Debian Using Bind9.

I tried adding the IPv4 address to the PTR record of the IPv6 address, but that resulted in only getting either the IPv4 address or the hostname of the client when doing nslookup (half of the time it would show the hostname, half of the time it would show the Ipv4 address).

What I am essentially looking to do is that when I write (nslookup 2001:db8:acad:1::10), the DNS-Server should respond with both the hostname & the Ipv4 address.

  • 1
    Use dig instead of nslookup for troubleshooting. When you do a recursive reverse query, from an IP address (v4 or v6) you get back a name, that is all. Then, that name can itself resolve to one or multiple IPv4 and/or IPv6 addresses. Hence I do not understand what you really want to achieve in fact. Mar 11, 2017 at 20:39

2 Answers 2


IPv4 addresses can be mapped into IPv6 addresses, but since the range of the latter is much larger than the former, there is no guarantee that there is a relationship.

For discussion of mapping, see IPv6/IPv4 Address Embedding.

For discussion of relationships, see Internet Nameserver IPv4 and IPv6 Address Relationships, by Berger and others.

  • my understanding is that OP want to query, using ipv6, a server to get ipv4 of a host. like (non working) nslookup server=2001:db8:1:10 -type=A serverfoo
    – Archemar
    Nov 29, 2015 at 15:13

That would be two lookups: first an IPv6 reverse lookup to get the hostname, and then an IPv4 forward lookup to get the corresponding IPv4 address(es), if they exist.

Using the "dig" command in unix-style shell, this might work:

dig +short $(dig +short -x <IPv6_address_here> ) A

Unfortunately, it is much harder to feed the output of nslookup back to itself.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .