Configuring a Name Server as the Primary Master for a Zone

1.16.1 Problem

You want to configure a name server to be the primary master for a zone.

1.16.2 Solution

Add the appropriate zone statement to the name server's named.conf file.

The zone statement specifies the domain name of the zone and the name of the zone data file, and that this name server is the zone's primary master (with type master):

zone "foo.example" {
 type master;
 file "";

1.16.3 Discussion

Make sure you get the punctuation right: BIND name servers are notoriously unforgiving of incorrect syntax. Double-quote the domain name of the zone and the name of the zone data file. Enclose the type and file substatements in curly braces, and terminate both substatements and the zone statement with semicolons.

You must, of course, also create the zone's data file, which contains all of the resource records in the zone, including the zone's SOA record and NS records. That's covered in Section 2.2.

Note that this example shows the most basic zone configuration: I didn't use any zone-specific options, such as an access list for transfers of this zone.

1.16.4 See Also

Section 2.2, for instruction on creating a zone data file; and"Running a Primary Master Name Server" in Chapter 4 of DNS and BIND.

Getting Started

Zone Data

BIND Name Server Configuration

Electronic Mail

BIND Name Server Operations

Delegation and Registration


Interoperability and Upgrading

Resolvers and Programming

Logging and Troubleshooting


DNS & BIND Cookbook
DNS & BIND Cookbook
ISBN: 0596004109
EAN: 2147483647
Year: 2005
Pages: 220
Authors: Cricket Liu © 2008-2020.
If you may any questions please contact us: