Dns
is an Internet Domain Name Service (DNS) resolver.
By default it serves a file
/net/dns,
that clients such as
cs(8)
write and read to retrieve network data associated with domain names and Internet addresses.
The
-f
option specifies the network database that contains the local DNS data (default:
/lib/ndb/local).
The
-x
option specifies an alternative mount point for the network (default:
/net).
When Inferno is running hosted,
dns
normally uses the host's own DNS resolver first (via
srv(2)),
before searching the DNS itself; that way domain names can be
used in Inferno with minimal configuration.
The
-h
option stops
dns
from using the host data.
In the absence of local data, by default
dns
consults the external DNS directly using some bootstrap data, but if
-r
is specified and local resolvers are given in the configuration file,
dns(6),
dns
will query them first for all addresses, before resorting to external DNS servers.
Dnsquery
queries the given
server
(default:
/net/cs)
for a translation of each
address
and prints the results, one per line.
If no
address
is given,
dnsquery
prompts for something to find in the DNS, one per line on the standard input,
of the form:
-
name [attribute]
where
name
is the label of something in the DNS, and
attribute
is one of its attributes from the list below:
- all
- all data currently known locally for
name
- cname
- name for which
name
is an alias
- hinfo
- host and operating system type
- ip
- for an IP address when
name
is a domain name
- mx
- mail exchanger
- ns
- for a list of name servers
- ptr
- for the domain name when
name
is an Internet address
- soa
- statement-of-authority
Dnsquery
queries the
server
for that name/attribute combination and prints the results, one per line.
If an
attribute
is not given,
dnsquery
uses
ip
if
name
looks like a domain name,
and
ptr
if it looks like an Internet address.