Name

dnsq — query a content DNS server using the DNS protocol

Synopsis

dnsq {t} {fqdn} {s}

Description

dnsq looks up resource records of type t for fqdn by making a Domain Name System request to a server at s. It prints the results in a human-readable format, more compact than the dig(1) output format.

s is expected to indicate one or more content DNS servers, and the request is marked as non-recursive. t may be a name or a number. Currently recognized names are: any, a, ns, mx, ptr, txt, cname, soa, loc, hinfo, rp, sig, key, aaaa, axfr, srv, and opt.

dnsq feeds s through name qualification and then looks it up, to find those content DNS servers, using the locally configured DNS proxy server. See djbdns-client(5) for how this server is found, for how name qualification operates, and for certain s values and standard domain names that short-circuit DNS lookups to the proxy DNS server(s) and possibly name qualification as well.

dnsq makes all DNS lookups using the specified content DNS server(s), and performs no name qualification on what is taken to already be a "fully-qualified" domain name (trailing dot or no) fqdn. It does not treat any values of fqdn specially.

Caution

dnsq is a diagnostic tool, and thus permits using improper values of t and any value of fqdn. It also does not have a special multiple response "zone transfer" mode.

Note

dnsq axfr , dnsq any , and dnsq opt simulate things that valid DNS clients will not actually do. See RFC 8482 for the particular case of any passing into desuetude, and RFC 6891 for why opt is never a valid client query type.

Note

If you want to perform (or diagnose) a "zone transfer" you should use axfr-get(1), not dnsq axfr .

Note

Some standard or widely abused values of fqdn are handled internally by DNS client libraries and proxy DNS servers, and in normal operations will never reach a content DNS server.

See also

dnsqr(1)

a similar tool that makes requests to proxy DNS servers

tinydns-get(1)

a tool that makes direct queries against a content DNS server's database

History

dnsq was originally part of Daniel J. Bernstein's djbdns toolset in 1999.

Author

Original code and documentation by Daniel J. Bernstein. Documentation modernizations by Jonathan de Boyne Pollard.