home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / named14.zip / named.doc < prev    next >
Text File  |  2000-08-14  |  6KB  |  149 lines

  1. A simple name server for OS/2
  2. =============================
  3.  
  4. Introduction
  5. ------------
  6. This package contains a very simple domain name server for OS/2.  It is
  7. intended primarily for small networks which access the Internet via a
  8. dialup connection (where another, real name server will also be used). 
  9.  
  10. The name database is, simply, the HOSTS file normally used by the OS/2
  11. name resolution library.  However, if the dialup connection is active,
  12. then another name server (typically that at the ISP) can be consulted as
  13. well. 
  14.  
  15. There are other, more sophisticated, name server programs available;
  16. this one is, however, small, fast and free!
  17.  
  18. How does name resolution work?
  19. ------------------------------
  20. Normally, OS/2 does name resolution by consulting a set of name servers
  21. (specified via the RESOLV2 file) and/or by looking at a static list of
  22. hosts in the HOSTS file.  By default, the name server is consulted
  23. first, but this means that a different RESOLV2 file is needed when the
  24. dialup connection is not active.  This search order can be overridden by
  25. putting:
  26.  
  27.           SET USE_HOSTS_FIRST=1
  28.  
  29. in CONFIG.SYS, but it is more convenient to use a small local server
  30. that can pass on queries to another name server if it is available. 
  31. This eliminates tiresome delays waiting for timeouts. 
  32.  
  33. Setting up the server
  34. =====================
  35. Installation and setting up of the server is very easy.
  36.  
  37. Step 1
  38. ------
  39. Copy the program files into place.  Copy NAMED.EXE to any suitable
  40. directory; it is convenient if this directory is on the PATH.  Also,
  41. copy NETLIB.DLL to a directory that is on the LIBPATH. 
  42.  
  43. Step 2
  44. ------
  45. Locate the ETC directory used by TCP/IP.  If you don't know the location
  46. of this directory, type the command:
  47.  
  48.           SET ETC
  49.  
  50. at an OS/2 command prompt.  You need to create one file in this
  51. directory.  We'll call this the ETC directory from now on. 
  52.  
  53. Step 3
  54. ------
  55. Create the NAMED configuration file.  This must be called NAMED.CNF, and
  56. must reside in the ETC directory. 
  57.  
  58. The format of the configuration file is very simple.  Items within lines
  59. are separated by any number of space or tab characters (as long as there
  60. is at least one).  Anything on a line after (and including) a '#'
  61. character is ignored.  Each line starts with a command, followed by
  62. parameters which depend on the command.  Commands are as below: items in <>
  63. indicate values to be inserted. Commands don't have to be in upper case.
  64.  
  65. PORT    <portnumber>
  66.     This indicates the port on which NAMED should listen. Normally, this
  67.     command can be omitted, and the default DNS port number derived from
  68.     the SERVICES file in the ETC directory will be used.
  69.  
  70. AUTH_NETWORK   <network-ip-address>
  71.     Specifies the IP address (as a dotted quad) of the local network,
  72.     for which the name server is to provide answers. This is used
  73.     for seeing if answers can be provided for reverse lookups.
  74.     It is used in conjunction with AUTH_NETMASK (see below).
  75.  
  76. AUTH_NETMASK   <network-mask>
  77.     This mask (expressed as a dotted quad) is used to mask IP addresses
  78.     which are the subject of reverse lookups, before seeing if they
  79.     match the network address given by AUTH_NETWORK. In most cases,
  80.     where a class C network is being used, the last number in
  81.     AUTH_NETWORK is zero, and AUTH_NETMASK is 255.255.255.0 so that
  82.     only the network part is compared.
  83.  
  84. AUTH_DOMAIN   <domain-name>
  85.     This gives the domain for which the DNS gives its own authoritative
  86.     answers; use the domain for your local network. This will be the same
  87.     as the one in your RESOLV2 file.
  88.  
  89. REFER_INTERFACE    <interface-name>
  90.     This gives the name of the dialup interface (e.g. sl0 for SLIP).
  91.     If this interface exists and is marked as UP, then names that
  92.     cannot be resolved locally will be passed on to the name server
  93.     provided by the 'other' end of this interface.
  94.  
  95. REFER_SERVERS     <network-ip> <network-mask> <name-server1> <name-server2>
  96.     This is a bit complicated. It handles the fact that the dialup
  97.     may not always be to the same ISP, and for each ISP there will be
  98.     different name server addresses.
  99.     The 'network-ip' is the network address of the ISP; essentially, as
  100.     much as possible of any IP address that will be handed out as a
  101.     dynamic IP address. The 'network-mask' is used to mask the actual
  102.     address of the 'refer interface'; if the masked value matches the
  103.     'network-ip', then the name servers given on the rest of the line
  104.     are consulted in turn. There may be as many as desired although only
  105.     two are shown above. If the values don't match, none of the specified
  106.     name servers are consulted.
  107.     This configuration statement can appear more than once, and each is
  108.     tried in turn until there is a match for 'network-ip'.
  109.  
  110. A sample NAMED.CNF is included with the package.  This MUST NOT be used
  111. in its current form; edit to suit your local environment.
  112.  
  113. Step 5
  114. ------
  115. Start the server. The easiest way is to issue the command:
  116.  
  117.     START "Name Server" /MIN /N NAMED
  118.  
  119. This starts the program minimised, in a VIO window, and it will appear in the
  120. Window List with a meaningful name.
  121.  
  122. To start the server automatically at every boot, add the above command
  123. to the \TCPIP\BIN\TCPEXIT.CMD file.  If that file doesn't exist, create
  124. it, containing just the above line. 
  125.  
  126. Logging
  127. -------
  128. The server maintains a logfile in the ETC directory, under the name
  129. NAMED.LOG.  This file will grow without bound unless regularly pruned;
  130. its use is really limited to debugging.  It could be deleted or renamed
  131. in TCPEXIT.CMD, just before starting the program. 
  132.  
  133. That's all there is to starting the server.
  134.  
  135. History
  136. =======
  137. 1.0    Initial version.
  138. 1.1    Added version number to startup message.
  139.     Grouped initialisation code together.
  140. 1.2    Fix exceptions on referral socket.
  141. 1.3    Fix problem with getting IP address on non
  142.     point to point interfaces.
  143. 1.4    Corrected handling of part line comments in config file.
  144.  
  145.  
  146. Bob Eager
  147. rde@tavi.co.uk
  148. August 2000
  149.