SYNOPSYSdnsget [-v|-q] [-c class] [-t type] [-o opt,opt,...] name...
DESCRIPTIONdnsget is a simple command-line to perform DNS lookups, similar to host(1) and dig(1). It is useable for both interactive/debugging scenarious and in scripts. The program is implemented using udns(3) library.
By default, dnsget produces a human-readable output, similar to
alias.example.com. CNAME www.example.com. www.example.com. A 192.168.1.1 www.example.com. MX 10 mx.example.com.
The following options are recognized by dnsget:
produce more detailed output. More
means more details will be produced. With single
will print contents of all received DNS packets (in a readable format),
it will output all outgoing DNS packets too.
the opposite for -v -- produce less detailed output.
will only show (decoded) data from final DNS resource records (RR),
also suppresses error messages.
- -t type
request record(s) of the given type type. By default,
will ask for IPv4 address (A) record, or for PTR record if the
argument in question is an IPv4 or IPv6 address. Recognized
types include A, AAAA, MX, TXT, CNAME, PTR, NS, SOA, ANY and
- -c class
request DNS record(s) of the given class class. By
uses IN class. Valid classes include IN, CH, HS, ANY.
(compatibility option). Equivalent to setting query type to
and increasing verbosity level
- -o opt,opt,...
(may be specified several times).
Set resolver options (in a form option:value) as if they
were set in
environment variable, or set query flags:
- Set initial query timeout to sec.
- (re)try every query num times before failing.
- set DNS UDP buffer size to bytes bytes. Valid values are from 512 to 65535. If bytes is greather than 512, EDNS0 (RFC 2671) extensions will be used.
- Use given UDP port number num instead of the default port 53 (domain).
- set AA (auth only) query bit.
- do not set RD (recursion desired) query bit (set by default).
- dnssec or do
- set DNSSEC OK (DO) query flag (dnsget does not verify DNSSEC signatures, only displays them; this is set in EDNS RR).
- set CD (checking disabled) query bit.
- -n nameserver
Use the given nameserver(s) (may be specified more than once)
instead of the default. Using this option has the same same effect as
environment variables, with the only difference that only IPv4 addresses
are recognized for now, and it is possible to specify names (which will
be resolved using default settings) instead of IP addresses.
print short help and exit.
RETURN VALUEWhen all names where resovled successefully, dnsget exits with zero exit status. If at least one name was not found, dnsget will exit with return code 100. If some other error occured during name resolution, it will exit with code 99. In case of usage or initialization error, dnsget will return 1.