2

I need to make a DNS query to one of my clients using IPv6 to resolve the IPv4 adress 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 adress, but that resulted in only getting either the IPv4 adress 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

You can't realiably do that. If you do a reverse lookup for an IPv6 address and get the hostname, that name might not have any IPv4 attached to it, or it might be another machine's address entirely. PTR records must point to names, not IP addresses.

You could add TXT records that have the IPv4 records, but they'd have to be manually edited, so there isn't really a point in using DNS for this.

In any case you need to do two queries and you can't just send a simple query to determine this.

I assume this might be an XY problem, so if you explain why you need this it might help.

  • Well, I have a specific lab assignment regarding Ipv6 & DNS which requires me to do as follows: On your Windows client, make a DNS query to dnsserver01 using IPv6 for the IPv4 address of host “host01.ABC.xyz.gdf.se”. Unless I massively misunderstood the assignment that is exactly what I should do no? – NinjaAnte Dec 1 '15 at 17:01
  • 1
    @NinjaAnte I think they mean you need to use IPv6 for the DNS query and ask for the IPv4 address of that host. – Sami Kuhmonen Dec 1 '15 at 17:09
  • How would I go about doing that? I feel like im missing something really obvious here. – NinjaAnte Dec 1 '15 at 17:14
  • 1
    @NinjaAnte If you know the IPv6 address of the DNS server, you just say nslookup -querytype=A host01.ABC.xyz.gdf.se 2001::whatever:ipv6 – Sami Kuhmonen Dec 1 '15 at 17:45

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.