1
2dnsget(1)                   General Commands Manual                  dnsget(1)
3
4
5

NAME

7       dnsget - DNS lookup utility
8
9

SYNOPSYS

11       dnsget [-v|-q] [-c class] [-t type] [-o option:value] name...
12
13

DESCRIPTION

15       dnsget  is  a  simple  command-line  to perform DNS lookups, similar to
16       host(1) and dig(1).  It is useable for both interactive/debugging  sce‐
17       narious  and  in  scripts.   The  program  is implemented using udns(3)
18       library.
19
20
21       By default, dnsget produces a human-readable output, similar to
22              alias.example.com. CNAME www.example.com.
23              www.example.com. A 192.168.1.1
24              www.example.com. MX 10 mx.example.com.
25       which is just sufficient to see how a given name resolves.  Output for‐
26       mat is controllable with -v and -q options -- the former increases ver‐
27       bosity level up to printing the whole DNS contents of all packets  sent
28       and  received,  which is suitable for debugging DNS problems, while the
29       latter reduces the level, making output more quiet, up to  bare  result
30       with no error messages, which is good for scripts.
31
32

OPTIONS

34       The following options are recognized by dnsget:
35
36
37       -v     produce more detailed output.  More -v's means more details will
38              be produced.  With single -v,dnsget will print contents  of  all
39              received  DNS packets (in a readable format), while with -vv, it
40              will output all outgoing DNS packets too.
41
42
43       -q     the opposite for -v -- produce less detailed output.  With  sin‐
44              gle  -q,dnsget  will  only  show  (decoded)  data from final DNS
45              resource records (RR), while -qq also suppresses error messages.
46
47
48       -t type
49              request record(s) of the given type type.   By  default,  dnsget
50              will  ask  for IPv4 address (A) record, or for PTR record if the
51              argument in question is an IPv4  or  IPv6  address.   Recognized
52              types  include  A,  AAAA,  MX, TXT, CNAME, PTR, NS, SOA, ANY and
53              others.
54
55
56       -c class
57              request DNS record(s) of the given class class.  By default dns‐
58              get uses IN class.  Valid classes include IN, CH, HS, ANY.
59
60
61       -a     (compatibility option).  Equivalent to setting query type to ANY
62              and increasing verbosity level (-v).
63
64
65       -C     (planned)
66
67
68       -x     (planned)
69
70
71       -o option:value
72              Set resolver option option to the value value (may be  specified
73              several  times).   The  same as setting $RES_OPTIONS environment
74              variable.  The following options are recognized:
75
76              timeout:sec
77                     Set initial query timeout to sec.
78
79              attempts:num
80                     (re)try every query num times before failing.
81
82              udpbuf:bytes
83                     set DNS UDP buffer size to bytes bytes.  Valid values are
84                     from  512 to 65535.  If bytes is greather than 512, EDNS0
85                     (RFC 2671) extensions will be used.
86
87              port:num
88                     Use given UDP port number num instead of the default port
89                     53 (domain).
90
91
92       -n nameserver
93              Use  the  given  nameserver(s) (may be specified more than once)
94              instead of the default.  Using this option  has  the  same  same
95              effect as $NSCACHEIP or $NAMESERVERS environment variables, with
96              the only difference that only IPv4 addresses are recognized  for
97              now, and it is possible to specify names (which will be resolved
98              using default settings) instead of IP addresses.
99
100
101       -h     print short help and exit.
102
103

RETURN VALUE

105       When all names where resovled successefully,  dnsget  exits  with  zero
106       exit status.  If at least one name was not found, dnsget will exit with
107       return code 100.  If some other error occured during  name  resolution,
108       it  will  exit with code 99.  In case of usage or initialization error,
109       dnsget will return 1.
110
111

SEE ALSO

113       host(1) dig(1) resolv.conf(5) udns(3).
114
115
116
117User Utilities                     Apr 2005                          dnsget(1)
Impressum