Configuring a Name Server as Authoritative for Multiple Zones

1.18.1 Problem

You want to configure a name server to be authoritative (i.e., primary master or slave) for more than one zone.

1.18.2 Solution

Add multiple zone statements to the name server's named.conf file. For example, to make the name server the primary master name server for the foo.example zone and a slave for the bar.example zone, you might use these two zone statements:

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

zone "bar.example" {
 type slave;
 masters { 192.168.0.1; };
 file "bak.bar.example";
};

1.18.3 Discussion

A single name server can be authoritative for multiple zones at once. In fact, there are individual name servers on the Internet that are authoritative for over 100,000 zones. Imagine the size of the named.conf file on that name server!

The name server's relationship to the zone is defined on a zone-by-zone basis, in the type substatement. So a name server can be the primary master for some zones while it's a slave for others. It can't be both primary master and slave for the same zone, however.

The order of the zone statements isn't important. They don't depend on each other in any way, so you can list them in any order you like.

1.18.4 See Also

Recipes Section 1.16 and Section 1.17 for the syntax of individual zone statements, and Chapter 4 of DNS and BIND, as usual.

Getting Started

Zone Data

BIND Name Server Configuration

Electronic Mail

BIND Name Server Operations

Delegation and Registration

Security

Interoperability and Upgrading

Resolvers and Programming

Logging and Troubleshooting

IPv6



DNS & BIND Cookbook
DNS & BIND Cookbook
ISBN: 0596004109
EAN: 2147483647
Year: 2005
Pages: 220
Authors: Cricket Liu

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net