How do you check if a nameserver responds to recursive queries?
Use dig
and check the status of the RD
and RA
bits in the response.
By default dig
will send a recursive query (RD
set in the query header) unless you set the +norecurse
command line flag.
If the server supports recursive queries the response will have the "recursion available" RA
bit set in the response headers.
The RA
bit is the diagnostic test for recursive query support.
See if you can query it for a DNS entry for which it is not authoritative, e.g., try: host www.cnn.com ns.example.com
, where ns.example.com is the name server you're testing. If it doesn't respond to recursive queries, you will get a REFUSED.
$ host www.cnn.com. ns1.example.com
Using domain server:
Name: ns1.example.com
Address: 192.168.183.130#53
Aliases:
Host www.cnn.com not found: 5(REFUSED)
whereas a DNS server that does recursive queries:
$ host www.cnn.com. 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:
www.cnn.com has address 157.166.255.18
www.cnn.com has address 157.166.255.19
www.cnn.com has address 157.166.226.25
www.cnn.com has address 157.166.226.26
Another option, use an online checker such as:
http://www.intodns.com/