1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166
|
.\" $NetBSD: dnsquery.1,v 1.1.4.1 1996/06/14 13:18:13 mrg Exp $
.\"
.TH DNSQUERY 1 "10 March 1990"
.UC 6
.SH ̾
dnsquery \- resolver Ѥ domain name server ˼䤹
.SH
.B dnsquery
[-n
.I nameserver]
[-t
.I type]
[-c
.I class]
[-r
.I retry]
[-p
.I retry period]
[-d] [-s] [-v] host
.SH
The
.IR dnsquery
ץ is a general interface to nameservers via
BIND resolver library calls. The program supports
queries to the nameserver with an opcode of QUERY.
This program is intended to be a replacement or
supplement to programs like nstest, nsquery and
nslookup. All arguments except for
.IR host
and
.IR ns
are treated without case-sensitivity.
.SH ץ
.TP 1i
.B \-n
˻Ȥ͡ॵФǤNameservers can appear as either
Internet addresses of the form w.x.y.z or can appear as domain names.
(default: as specified in /etc/resolv.conf)
.TP 1i
.B \-t
The type of resource record of interest. Types include:
.RS 1.5i
.TP 1i
A
address
.PD 0
.TP 1i
NS
nameserver
.TP 1i
CNAME
canonical name
.TP 1i
PTR
domain name pointer
.TP 1i
SOA
start of authority
.TP 1i
WKS
well-known service
.TP 1i
HINFO
host information
.TP 1i
MINFO
mailbox information
.TP 1i
MX
mail exchange
.TP 1i
RP
responsible person
.TP 1i
MG
mail group member
.TP 1i
AFSDB
DCE or AFS server
.TP 1i
ANY
wildcard
.RE
.PD
.IP
Note that any case may be used. (default: ANY)
.TP 1i
.B \-c
The class of resource records of interest.
Classes include:
.RS 2i
.TP 1i
IN
Internet
.PD 0
.TP 1i
HS
Hesiod
.TP 1i
CHAOS
Chaos
.TP 1i
ANY
wildcard
.RE
.PD
.IP
Note that any case may be used. (default: IN)
.TP 1i
.B \-r
The number of times to retry if the nameserver is
not responding. (default: 4)
.TP 1i
.B \-p
Period to wait before timing out. (default: RES_TIMEOUT)
.IR options
field. (default: any answer)
.TP 1i
.B \-d
Turn on debugging. This sets the RES_DEBUG bit of the resolver's
.IR options
field. (default: no debugging)
.TP 1i
.B \-s
Use a
.IR stream
rather than a packet. This uses a TCP stream connection with
the nameserver rather than a UDP datagram. This sets the
RES_USEVC bit of the resolver's
.IR options
field. (default: UDP)
.TP 1i
.B \-v
Synonym for the 's' flag.
.TP 1i
.B host
The name of the host (or domain) of interest.
.SH Ϣե
/etc/resolv.conf to get the default ns and search lists
.br
<arpa/nameser.h> list of usable RR types and classes
.br
<resolv.h> list of resolver flags
.SH "Ϣ"
nslookup(8)
named(8), resolver(5)
.SH
If the resolver fails to answer the query and debugging has not been
turned on,
.IR dnsquery
will simply print a message like:
.TP 1i
Query failed (rc = 1) : Unknown host
.LP
The value of the return code is supplied by h_errno.
.SH Х
Queries of a class other than IN can have interesting results
since ordinarily a nameserver only has a list of root nameservers
for class IN resource records.
.PP
Query uses a call to inet_addr() to determine if the argument
for the '-n' option is a valid Internet address. Unfortunately,
inet_addr() seems to cause a segmentation fault with some (bad)
addresses (e.g. 1.2.3.4.5).
.SH
Bryan Beecher
|