BIND 8.1.1 for OS/2

Installing BIND

Prerequisites

Installation

You have probably unzipped the archive to a temporary location like y:\xxx\bind. To install, move the following files from y:\xxx\bind\bin to a directory in your %PATH%
  named.exe
  named-xfer.exe
  emxkill.exe
  ndc.cmd
Optionally, you may also want to put these tools in the same directory:
  nslookup.exe
  dig.exe
  dnsquery.exe
  host.exe
  addr.exe
  nsupdate.exe
  nssig.cmd
Move this file from y:\xxx\bind\etc to your ETC directory
  nslookup.help

Quick setup guide for a caching-only server

  1. Put the conf file in your ETC directory
      cd %ETC%
      copy y:\xxx\bind\etc\samples\named.conf 
    
  2. Create a database directory in your ETC directory
      md namedb
    
  3. Switch to the database directory
      cd namedb
    
  4. Copy database files into it
      copy y:\xxx\bind\etc\samples\127.0.0.zone
      copy y:\xxx\bind\etc\samples\root.hint
      copy y:\xxx\bind\etc\samples\localhost.zone
    
  5. Edit named.conf and update the directory option
      epm named.conf
    
  6. Start the server
      ndc start
    
Thanks a lot to Ed Tomlinson for this step-by-step guide.

Upgrading from a previous version

I assume you have a working setup, and are somewhat familiar with DNS zone data files. You need to know what a zone is to make a configuration file, but there is no need to edit the zone files (unless BIND detects errors in them).

The named.boot file (or NAMED.BT in IBM's DDNS) has been replaced by the much more configurable named.conf in BIND 8.x. You should study the BIND Configuration File Guide carefully to learn about the new syntax. There is a perl script for automatic upgrading available in the tools directory. You will of course need access to a system with perl to run this script. I tested it with the OS/2 port of perl5, and it seemed to work just fine.

Using this script is strongly recommended if you run a server with more than a couple of zones.

Quick upgrade

If you have installed perl, run
  perl5 y:\xxx\bind\tools\named-bootconf.pl <%ETC%\namedb\named.boot>%ETC%\named.conf
to create a configuration file from your old named.boot file.

If you don't have perl, you will have to write a named.conf file by hand:

  1. Use the sample named.conf as a template
      cd %ETC%
      copy y:\xxx\bind\etc\samples\named.conf 
    
  2. Update the directory option
  3. Add zone definitions for all your master (previously primary) and slave (previously secondary) zones. A couple of examples:
    zone "bind.org" IN {
    	type master;
    	file "db.bind.org";
    };
    zone "168.192.in-addr.arpa" IN {
    	type master;
    	file "db.192.168";
    };
    zone "bog.com" IN {
    	type slave;
    	file "db.bog.com";
    	masters {
    		10.10.2.224;
    	};
    };
    
  4. Kill your old server
  5. Start BIND 8.1.1
      ndc start
    
NOTE: Keep your old named.boot and don't change the zone data file names. Then, if something goes wrong you can just fire up your old server again.

Detecting and resolving errors

You should run a syslog daemon together with BIND. All error messages and warnings will be written to this daemon (and hence lost if you don't have one). There should be a couple of alternatives available on hobbes.nmsu.edu and www.leo.org

BIND will write somthing like this to the syslog when it starts:

named[42]: starting.  named 8.1.1 Thu Aug 14 00:21:24 CDT 1997 	bjorn@canardo.mork.no:/bind/src/bin/named
named[42]: directory . is world-writable
named[42]: cannot set resource limits on this system
named[42]: directory d:\mptn\etc\namedb is world-writable
named[42]: cannot set resource limits on this system
named[42]: master zone "bind.org" (IN) loaded (serial 1997060201)
named[42]: master zone "168.192.in-addr.arpa" (IN) loaded (serial 1997061601)
named[42]: slave zone "bog.com" (IN) loaded (serial 1997073101)
named[42]: master zone "localhost" (IN) loaded (serial 1)
named[42]: master zone "127.in-addr.arpa" (IN) loaded (serial 1)
named[42]: cache zone "" (IN) loaded (serial 0)
named[42]: listening [127.0.0.1].53 (lo)
named[42]: listening [10.10.4.192].53 (lan0)
named[42]: Forwarding source address is [0.0.0.0].1028
named[57]: Ready to answer queries.
You should watch these messages carefully whenever you update your data files. Watch out for messages like zone rejected due to errors, since this will cause your server to answer non-authoratively for those zones.

The four warning messages cannot set.. and directory is... are normal on an OS/2 system. I did not remove these for two reasons:

You may also note a couple of other interesting items: You can turn on heavy debugging messages with the ndc trace and querylog commands.
Warning: The binaries in this distribution were compiled with QUERYLOG enabled. Turning on query logging will make your hard drive spin a lot. And fill up.

Debugging infrmation is written to named.run in the database directory (except for startup messages, which are saved in the startup directory).

Default file locations

If you do not specify a location, named.exe will look for named.conf in the its startup directory! This may not always be what you expected. To play it safe, always specify the location, especially in startup scripts like TCPEXIT.CMD.

If you want to keep named.conf in %ETC% (recommended), use either

  cd %ETC%
  named
or
  named -c %ETC%\named.conf
or
  ndc start
NOTE: Unless you edit it, ndc.cmd will always look for named.pid and named.conf in %ETC%, regardless of any named startup parameters or config options.

File nameDefault locationHow to move
named.exe%PATH%Must be in %PATH% if you want to use ndc
named-xfer.exe%PATH%named.conf options
ndc.cmd%PATH%
nslookup.exe
dig.exe
dnsquery.exe
host.exe
addr.exe
nsupdate.exe
emxkill.exe%PATH%Must be in %PATH% (required by ndc)

named.confstartup directory [1]named -c my.conf [2]
named.runrun direcory [3]
namedb/ directorynamed.conf options
named.pid%ETC%named.conf options [2]

nslookup.help%ETC% [4]
resolv2%ETC%
.nslookuprc%HOME%

named_dump.db%TEMP%named.conf options
named.stats%TEMP%named.conf options
xfer.trace%TEMP%
xfer.ddt.XXXXXXrun directory

Tips

SET PAGER=less will make nslookup use less for viewing text files (including the help file).

If you need to set a non-default root server or port number for nslookup, put SET HOME=x:\somewhere in CONFIG.SYS and create x:\somewhere\.nslookuprc with the options you want as defaults. See nslookup.help for a list of possible options.

If you only want to change the local domain, you can do this with the domain/search directives in %ETC%\resolv2, or by setting the environment variable LOCALDOMAIN. If none of these are found, nslookup will get the local doamin from your hostname.

Known problems

Bind 4.9.5 also had the first problem. A quick scan of the code shows that BIND is blocking with select() most of the time. Conclusion: The problem must be in select() in the EMX library. Or is that wrong? But it doesn't matter after all, since there's no impact on the machine load. It is a little annoying having bind on top of "Top" all the time, though.

I can fix the second problem by faking the protection, telling BIND that the files are protected even though they are not. But I have a feeling that this would be The Wrong Thing&tm; to do. The warnings are legitimate. Therefore I decided to keep them. But I am open for input on this one if you are of another opinion.

The third problem is worse. I cannot fix this without editing the code or placing named.run in a fixed place. But that would have to be C:\, and after all, not even that location is guaranteed to be available.

A temporary fix would be to always start named from the database directory when you are using the debug option (-d x).

The dig ping option uses a shell command (ping -s server_name 56 3 | tail -3) to do the job. This will fail in OS/2 since ping does not have a -s option, and since most OS/2 users do not have tail installed.

I have never felt the need for the ping option, and I won't fix it unless someone asks me to. I would prefer that it was either removed or fixed by the BIND maintainers.

Please report other bugs to bjorn@mork.no

Documentation

BIND Version 8 Online Documentation

comp.protocols.tcp-ip.domains Frequently Asked Questions

Manual pages

Since I don't expect the ordinary OS/2 user to have troff etc. installed, I converted [5] all the BIND manual pages to HTML.

More documentation

The documentation included with OS/2 BIND is only a small subset of the BIND documentation package. You may want to check out the rest of it (gzipped tar).

You will need tools to install and/or view postscript and manual pages.

Those familiar with C can learn a lot from the source code.

History

13 Aug 1997
Initial release: bind811a.zip
16 Aug 1997
Added documentation (this file + manual pages)
Fixed the sample configuration which I broke when testing the initial release
Minor fixes in ndc.cmd and fix_ioctl.c
17 Aug 1997
Changed %ETC%\resolv to %ETC%\resolv2
Fixed nslookup so it will find %HOME%\.nslookuprc
Fixed a serious bug that prevented slave zones from being updated
=> New release required: bind811b.zip

Future plans

Acknowledgements

The following have contributed, with or without their knowledge, to the development of BIND version 8 for OS/2:
Eberhard Mattes
with his excellent EMX library one cannot longer call it porting; it's just compiling...
Peter Meerwald
who ported BIND 4.9.5 to OS/2. I had a lot of help from his 4.9.5 source, and I also stole rename.c from him. I hope he can forgive me...
Garey Smiley
who wrote emxkill for the OS/2 port of Apache 1.1.3, from where I just lifted it. And he didn't even mention it...
Ed Tomlinson
who contributed the very consise setup guide, and who helped me find errors in the sample configuration...
Mike Nice who found the bug that made the second release necessary...
Internet Software Consortium
who have made BIND as portable as it is, and continue to deliver high quality free software. If you think BIND is too good to be free, check out their sponsor pages...
and all those I forgot. My memory is far from error correcting. Send me a mail if you should be on the list.


[1] This is the default compiled into named.exe. The ndc start default is %ETC%

[2] ndc.cmd will always use the default location, so you probably don't want to change this. Unless you edit ndc.cmd to reflect the changes, of course.

[3] This will be both the startup directory during initialisation and the DB directory afterwards. I.e. if you start named with the debug flag, you will get a named.run file in two different locations. Sorry about that, but this was one of the directories that had to be fixed. And I wouldn't want to assume that a fixed location was available. After all, there are systems where you cannot write to C:\

[4] This differs from the BIND 4.9.5 port, which expected this file to be in x:\tcpip\help. I made this change because there is no simple way to detect the location of x:\tcpip. It's much simpler to use %ETC% since it will always be defined.

[5] I used a utility called PolyglotMan to do this. PolyglotMan was a very pleasant surprise: it compiled directly on my OS/2 system, without any changes. If you are interested, the latest version is available via anonymous ftp from ftp.cs.berkeley.edu
If you need a precompiled OS/2 version, ask me to send you a copy.


HTML 3.2 Checked! Created by Bjørn Mork Sun Aug 17 1997