180 lines
6.8 KiB
HTML
180 lines
6.8 KiB
HTML
<HTML>
|
|
<HEAD>
|
|
<TITLE>nonamed(8)</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<H1>nonamed(8)</H1>
|
|
<HR>
|
|
<PRE>
|
|
|
|
</PRE>
|
|
<H2>NAME</H2><PRE>
|
|
nonamed - not a name daemon, but acts like one
|
|
|
|
|
|
</PRE>
|
|
<H2>SYNOPSIS</H2><PRE>
|
|
<STRONG>nonamed</STRONG> [<STRONG>-d</STRONG>[<EM>level</EM>]] [<STRONG>-p</STRONG> <EM>port</EM>] [<STRONG>-n</STRONG> <EM>address</EM>[/<EM>port</EM>]]
|
|
|
|
|
|
</PRE>
|
|
<H2>DESCRIPTION</H2><PRE>
|
|
<STRONG>Nonamed</STRONG> is not an Internet name daemon. When started it immediately
|
|
tries to find a real name daemon on the local network. If it finds one
|
|
then it will relay any DNS queries to that name daemon. If it can't find
|
|
one then it will do its best to answer simple queries using the
|
|
<STRONG>/etc/hosts</STRONG> table for name to address translation.
|
|
|
|
On startup <STRONG>nonamed</STRONG> broadcasts up to five simple UDP queries on the local
|
|
network. This is a somewhat nasty thing to do, because it makes all name
|
|
servers on the net spring into action to answer the request. The first
|
|
name server to answer is used by <STRONG>nonamed</STRONG> to answer the queries of its
|
|
clients. The broadcast search is repeated after an hour to give another
|
|
name server a chance to be abused. (It is quite normal for a host to use
|
|
a remote name server. The broadcasts are a bit unfriendly, but they only
|
|
happen once an hour.)
|
|
|
|
If a real name server is found then <STRONG>nonamed</STRONG> enters "relay mode", passing
|
|
all queries on. In relay mode the daemon cannot be distinguished from a
|
|
real DNS name daemon.
|
|
|
|
<STRONG>Nonamed</STRONG> accepts both UDP and TCP queries under Minix-vmd. Under standard
|
|
Minix only UDP queries are accepted. 256 relayed UDP queries can be
|
|
outstanding before it forgets where the first one came from.
|
|
|
|
In answer mode <STRONG>nonamed</STRONG> can answer simple DNS queries to translate a host
|
|
name to an IP address, or an IP address to a host name. Suppose
|
|
<STRONG>/etc/hosts</STRONG> looks like this:
|
|
|
|
127.0.0.1 localhost
|
|
192.9.200.1 darask.home.cs.vu.nl
|
|
192.9.200.2 burask.home.cs.vu.nl
|
|
|
|
Then queries for the host names listed can be answered with the IP
|
|
addresses to the left of them. If the name can't be found then it is
|
|
retried with the domain name stripped of, this is because "localhost" is
|
|
looked up as "localhost.home.cs.vu.nl" in the above example. Reverse
|
|
lookups are answered with the first hostname on the line with the IP
|
|
address.
|
|
|
|
UDP queries are immediately answered on startup if the answer can be
|
|
found in the hosts file. Failure answers, and answers to TCP queries are
|
|
delayed until it decides that there are no real name servers out there.
|
|
|
|
|
|
<STRONG>Nonamed</STRONG> employs several timeouts for efficient operation:
|
|
|
|
If five broadcasts, two seconds apart fail to produce a name server on
|
|
startup then it decides that there are no real name servers around.
|
|
|
|
After 1 hour it will again look for a name server. (We don't want to hog
|
|
the same one indefinitely.)
|
|
|
|
If no UDP reply is seen in four seconds than a simple probe is sent the
|
|
name server. If that doesn't provoke an answer in two seconds then it
|
|
will look for a new name server. A failing TCP connection will also
|
|
invoke a search, the TCP connection is then made to the new name server.
|
|
A client using UDP will retry eventually, a client using TCP will notice
|
|
nothing but a short delay. The daemon drops back into answer mode if the
|
|
search fails and it has a hosts file with a "localhost" entry.
|
|
|
|
It waits five minutes for any action on a TCP stream before the
|
|
connection is aborted.
|
|
|
|
In answer mode it will generate data with a TTL (time to live) of 1 hour.
|
|
|
|
|
|
</PRE>
|
|
<H2>OPTIONS</H2><PRE>
|
|
The options are only useful when debugging <STRONG>nonamed</STRONG>, although it can be
|
|
very instructive to watch DNS queries being done.
|
|
|
|
<STRONG>-d</STRONG>[<EM>level</EM>]
|
|
Set debugging level to <EM>level</EM> (a single digit, by default <STRONG>1</STRONG>.) Debug
|
|
mode 1 makes <STRONG>nonamed</STRONG> decode and display the DNS queries and replies
|
|
that it receives, sends and relays. The decoding only handles the
|
|
common cases. In debug mode 2 it prints tracing information about
|
|
the internal jobs it executes. In debug mode 3 it core dumps when
|
|
an error causes it to exit. The debugging level may also be
|
|
increased by 1 at runtime by sending signal <STRONG>SIGUSR1</STRONG> or turned off
|
|
(set to 0) with <STRONG>SIGUSR2</STRONG>.
|
|
|
|
[<STRONG>-p</STRONG> <EM>port</EM>]
|
|
Port to use instead of the normal <STRONG>domain</STRONG> port.
|
|
|
|
[<STRONG>-n</STRONG> <EM>address</EM>[/<EM>port</EM>]]
|
|
Use this IP address and port to find a real name server. It can be
|
|
used to make <STRONG>nonamed</STRONG> relay to another <STRONG>nonamed</STRONG>. (They do not listen
|
|
to broadcasts, of course.) You can run two daemons on one machine
|
|
if you choose a new port number for one of them. You can force
|
|
<STRONG>nonamed</STRONG> out of relay mode by sending it a hangup signal.
|
|
|
|
|
|
</PRE>
|
|
<H2>FILES</H2><PRE>
|
|
|
|
|
|
|
|
|
|
/etc/hosts Hosts to address translation table when in answer mode.
|
|
|
|
|
|
</PRE>
|
|
<H2>SEE ALSO</H2><PRE>
|
|
<STRONG><A HREF="../man3/gethostbyname.3.html">gethostbyname(3)</A></STRONG>, <STRONG><A HREF="../man3/resolver.3.html">resolver(3)</A></STRONG>, <STRONG><A HREF="../man5/hosts.5.html">hosts(5)</A></STRONG>, <STRONG><A HREF="../man8/set_net_default.8.html">set_net_default(8)</A></STRONG>, <STRONG><A HREF="../man8/boot.8.html">boot(8)</A></STRONG>,
|
|
<STRONG><A HREF="../man8/inetd.8.html">inetd(8)</A></STRONG>, <STRONG><A HREF="../man8/irdpd.8.html">irdpd(8)</A></STRONG>, <STRONG><A HREF="../man8/rarpd.8.html">rarpd(8)</A></STRONG>.
|
|
|
|
|
|
</PRE>
|
|
<H2>NOTES</H2><PRE>
|
|
You can specify a remote name server in <STRONG>/etc/resolv.conf</STRONG> to circumvent
|
|
<STRONG>nonamed</STRONG>. But then you lose its talent for automatically finding new name
|
|
servers when the remote name server becomes unreachable.
|
|
|
|
Don't add a "localhost" entry to the hosts file if there are remote name
|
|
servers. It makes <STRONG>nonamed</STRONG> drop back in answer mode on a flaky network.
|
|
|
|
|
|
</PRE>
|
|
<H2>BUGS</H2><PRE>
|
|
If you can get a remote <STRONG>nonamed</STRONG> to listen to your name server then you
|
|
can make it believe anything you want to. You need access to a machine
|
|
on the same subnet of course.
|
|
|
|
|
|
</PRE>
|
|
<H2>AUTHOR</H2><PRE>
|
|
Kees J. Bot (kjb@cs.vu.nl)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</PRE>
|
|
</BODY>
|
|
</HTML>
|