MAN page from Other bind-utils-8.2.3-1.i386.rpm
DNSQUERY
Section: User Commands (1)
IndexBSD mandoc
BSD 4
NAME
dnsquery - query domain name servers using resolver
SYNOPSIS
dnsquery[-
n nameserver][-
t type][-
c class][-
r retry][-
p period][-
d][-
s][-
v]
host DESCRIPTION
The
dnsqueryprogram is a general interface to nameservers viaBIND resolver library calls. The program supportsqueries to the nameserver with an opcode of QUERY.This program is intended to be a replacement orsupplement to programs like nstest, nsquery andnslookup. All arguments except for
hostand
nameserverare treated without case-sensitivity.
OPTIONS
- -n nameserver
- The nameserver to be used in the query. 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 . )
- -t type
- The type of resource record of interest. Types include:
- A
- address
- NS
- nameserver
- CNAME
- canonical name
- PTR
- domain name pointer
- SOA
- start of authority
- WKS
- well-known service
- HINFO
- host information
- MINFO
- mailbox information
- MX
- mail exchange
- RP
- responsible person
- MG
- mail group member
- AFSDB
- DCE or AFS server
- ANY
- wildcard
Note that any case may be used. (Default: ANY .
- -c class
- The class of resource records of interest.Classes include:
- IN
- Internet
- HS
- Hesiod
- CHAOS
- Chaos
- ANY
- wildcard
Note that any case may be used. (Default: IN .
- -r retry
- The number of times to retry if the nameserver isnot responding. (Default: 4.)
- -p period
- Period to wait before timing out. (Default: RES_TIMEOUT .
- -d
- Turn on debugging. This sets the RES_DEBUG bit of the resolver'sFt optionsfield. (Default: no debugging.)
- -s
- Use astreamrather than a packet. This uses a TCP stream connection withthe nameserver rather than a UDP datagram. This sets theRES_USEVC bit of the resolver'sFt optionsfield. (Default: UDP datagram.)
- -v
- Synonym for the ``-s ''flag.
- host
- The name of the host (or domain) of interest.
FILES
- /etc/resolv.conf
- to get the default ns and search lists
- <arpa/nameser.h>
- list of usable RR types and classes
- <resolv.h>
- list of resolver flags
DIAGNOSTICS
If the resolver fails to answer the query and debugging has not beenturned on,
dnsquerywill simply print a message like:
Query failed (rc = 1) : Unknown host
The value of the return code is supplied by Ft h_errno .
SEE ALSO
nslookup(8),
nstest(1),
nsquery(1),
named(8),
resolver(5).
AUTHOR
Bryan Beecher
BUGS
Queries of a class other than
IN can have interesting resultssince ordinarily a nameserver only has a list of root nameserversfor class
IN resource records.
Dnsquery uses a call to Fn inet_addr to determine if the argumentfor the ``-n''option is a valid Internet address. Unfortunately,Fn inet_addr seems to cause a segmentation fault with some (bad)IP addresses (e.g., 1.2.3.4.5).
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- OPTIONS
- FILES
- DIAGNOSTICS
- SEE ALSO
- AUTHOR
- BUGS
This document was created byman2html,using the manual pages.