Next Previous Contents

8. Converting from version 4 to version 8

This was originally a section on using BIND 8 written by David E. Smith (dave@bureau42.ml.org). I have edited it some to fit the new section name.

There's not much to it. Except for using named.conf instead of named.boot, everything is identical. And BIND 8 comes with a perl script that converts old-style files to new. Example named.boot (old style) for a cache-only name server:


directory /var/named
cache   .                                       root.hints
primary 0.0.127.IN-ADDR.ARPA                    127.0.0.zone
primary localhost                               localhost.zone          

On the command line, in the bind8/src/bin/named directory (this assumes you got a source distribution. If you got a binary package the script is probably around, I'm not sure where it would be though. -ed.), type:


./named-bootconf.pl < named.boot > named.conf

Which creates named.conf:


// generated by named-bootconf.pl

options {
        directory "/var/named";
};

zone "." {
        type hint;
        file "root.hints";
};

zone "0.0.127.IN-ADDR.ARPA" {
        type master;
        file "127.0.0.zone";
};

zone "localhost" {
        type master;
        file "localhost.zone";
};

It works for everything that can go into a named.boot file, although it doesn't add all of the new enhancements and configuration options that BIND 8 allows. Here's a more complete named.conf that does the same things, but a little more efficiently.


// This is a configuration file for named (from BIND 8.1 or later).
// It would normally be installed as /etc/named.conf.
// The only change made from the `stock' named.conf (aside from this
// comment :) is that the directory line was uncommented, since I
// already had the zone files in /var/named.

options {
        directory "/var/named";
        datasize 20M;
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "127.0.0.zone";
};

zone "." IN {
        type hint;
        file "root.hints";
};

In the BIND 8 distributions directory bind8/src/bin/named/test you find this, and copies of the zone files, that many people can just drop in and use instantly.

The formats for zone files and root.hints files are identical, as are the commands for updating them.


Next Previous Contents