DevHeads.net

Hint for nslookup wanted ...

Hello,

has anybody a hint for me, how I can use nslookup to get
either IPv6 AAAA only or both A and AAAA entries when doing this:

e.g.

# nslookup <a href="http://www.example.com" title="www.example.com">www.example.com</a>

Thanks,
Walter

Comments

Re: Hint for nslookup wanted ...

By Richard Mann at 10/11/2016 - 08:23

Did your google break?

For just IPv6
nslookup -type=AAAA <a href="http://www.example.com" title="www.example.com">www.example.com</a>

For all records
nslookup -type=any <a href="http://www.example.com" title="www.example.com">www.example.com</a>

Re: Hint for nslookup wanted ...

By Peter at 10/11/2016 - 14:36

Don't use nslookup:
<a href="http://web.archive.org/web/20160304065708/http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/nslookup-flaws.html" title="http://web.archive.org/web/20160304065708/http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/nslookup-flaws.html">http://web.archive.org/web/20160304065708/http://homepage.ntlworld.com/j...</a>
<a href="http://groups.google.com/group/comp.protocols.dns.bind/msg/6de73c9eaa37137f" title="http://groups.google.com/group/comp.protocols.dns.bind/msg/6de73c9eaa37137f">http://groups.google.com/group/comp.protocols.dns.bind/msg/6de73c9eaa37137f</a>
<a href="http://groups.google.com/group/comp.protocols.dns.bind/msg/39ffce8e8510b9cc" title="http://groups.google.com/group/comp.protocols.dns.bind/msg/39ffce8e8510b9cc">http://groups.google.com/group/comp.protocols.dns.bind/msg/39ffce8e8510b9cc</a>

...use dig instead.

Peter

Re: Hint for nslookup wanted ...

By Walter H. at 10/11/2016 - 08:41

On Tue, October 11, 2016 15:23, Richard Mann wrote:
not really;

nslookup -type=any <a href="http://www.google.com" title="www.google.com">www.google.com</a>

shows only IPv6, when having done
nalookup -type=AAAA <a href="http://www.google.com" title="www.google.com">www.google.com</a>
before???

other sample:

[root@host ~]# nslookup -query=any <a href="http://www.bipa.at" title="www.bipa.at">www.bipa.at</a>
Server: 192.168.23.2
Address: 192.168.23.2#53

Non-authoritative answer:
<a href="http://www.bipa.at" title="www.bipa.at">www.bipa.at</a> canonical name = <a href="http://www.bipa.at.cdn.cloudflare.net" title="www.bipa.at.cdn.cloudflare.net">www.bipa.at.cdn.cloudflare.net</a>.

Authoritative answers can be found from:

[root@host ~]#

why is no IP - neither IPv4 nor IPv6 shown?
doesn't matter if -query=any or -type=any

Greetings,
Walter

Re: Hint for nslookup wanted ...

By John R Pierce at 10/11/2016 - 12:12

On 10/11/2016 6:41 AM, Walter H. wrote:
probably because its a CNAME, and points to a different domain, and
nslookup isn't following that.

$ nslookup -query=any <a href="http://www.bipa.at" title="www.bipa.at">www.bipa.at</a>
Server: xxx.xxx.xxx.xxx
Address: xxx.xxx.xxx.xxx#53

Non-authoritative answer:
<a href="http://www.bipa.at" title="www.bipa.at">www.bipa.at</a> canonical name = <a href="http://www.bipa.at.cdn.cloudflare.net" title="www.bipa.at.cdn.cloudflare.net">www.bipa.at.cdn.cloudflare.net</a>.

Authoritative answers can be found from:
bipa.at nameserver = dns2.telekom.at.
bipa.at nameserver = dns3.telekom.at.
bipa.at nameserver = dns1.telekom.at.
dns1.telekom.at internet address = 80.120.17.26
dns2.telekom.at internet address = 213.33.99.79
dns3.telekom.at internet address = 80.240.225.50

that said, I've gotten to using 'host' rather than 'nslookup'. host is
part of the bind-utils package for obtuse reasons.

$ host <a href="http://www.bipa.at" title="www.bipa.at">www.bipa.at</a>
<a href="http://www.bipa.at" title="www.bipa.at">www.bipa.at</a> is an alias for <a href="http://www.bipa.at.cdn.cloudflare.net" title="www.bipa.at.cdn.cloudflare.net">www.bipa.at.cdn.cloudflare.net</a>.
<a href="http://www.bipa.at.cdn.cloudflare.net" title="www.bipa.at.cdn.cloudflare.net">www.bipa.at.cdn.cloudflare.net</a> has address 104.16.168.136
<a href="http://www.bipa.at.cdn.cloudflare.net" title="www.bipa.at.cdn.cloudflare.net">www.bipa.at.cdn.cloudflare.net</a> has address 104.16.169.136

Re: Hint for nslookup wanted ...

By Anand Buddhdev at 10/11/2016 - 08:27

This is bad advice, because in DNS, ANY != ALL

If you query with qtype=any, and you ask a caching resolver, then it
will return to you all the records that are in its cache at that time,
which may or may not include the records you want.

In order to definitively get the A as well as the AAAA records, one
needs to ask for them specifically:

nslookup -type=AAAA <a href="http://www.example.com" title="www.example.com">www.example.com</a>
nslookup -type=A <a href="http://www.example.com" title="www.example.com">www.example.com</a>

This makes a cache explicitly look up those types of records if it
doesn't already have them.

Regards,
Anand

Re: Hint for nslookup wanted ...

By Richard Mann at 10/11/2016 - 08:53

As I said: For all records. Reading comprehension can be important.

Re: Hint for nslookup wanted ...

By Walter H. at 10/11/2016 - 08:44

Greetings,
Walter