I l@ve RuBoard Previous Section Next Section

3.16 Configuring a Name Server to Forward Some Queries to Other Name Servers

3.16.1 Problem

You want a name server to forward queries for certain domain names to another name server.

3.16.2 Solution

Use a zone statement of type forward to tell a BIND 8.2 or later or 9.1.0 or later name server to forward queries for domain names that end in the specified suffix to particular name servers. For example:

zone "bar.example" {
    type forward;
    forwarders { 10.0.0.9; };
};

This tells the name server to forward queries for domain names that end in bar.example to the name server at 10.0.0.9.

3.16.3 Discussion

As with the corresponding options substatement, you can list multiple forwarders in the forwarders substatement.

An alternative to using a forward zone is to use a stub zone. Stub zones are a little like slave zones, in that the name server periodically checks with its master server to see if the zone's serial number has changed. But instead of transferring the whole zone, it retrieves just the zone's SOA and NS records, plus any necessary glue A records, using discrete queries. That's enough information to tell the name server where to begin iterative name resolution of domain names that end in the domain name of the stub zone. For example, here's a stub zone definition very similar to the forward zone defined earlier:

zone "bar.example" {
    type stub;
    masters { 10.0.0.9; };
    file "stub.bar.example";
};

Rather than sending a recursive query to the name server at 10.0.0.9 for information about any domain name that ends with bar.example, this name server would learn the bar.example NS records, and send one of those name servers a nonrecursive query for the domain name it needed. It would then follow any successive referrals to find the answer. This is less work for the name server at 10.0.0.9, but it also requires connectivity to any name server the local name server might be referred to.

3.16.4 See Also

Contrast this with Section 3.15, which tells you how to configure a name server to forward all queries it can't answer locally, and Section 3.17, which explains how to configure a name server not to forward certain queries. See "Forward Zones" in Chapter 10 of DNS and BIND for more information.

    I l@ve RuBoard Previous Section Next Section