I l@ve RuBoard Previous Section Next Section

3.15 Configuring a Name Server to Forward Queries to Another Name Server

3.15.1 Problem

You want a name server to forward queries it can't answer locally to another name server.

3.15.2 Solution

Use the forwarders options substatement to configure a forwarder for the name server. For example:

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

The name server will forward any query it can't answer locally -- that is, from authoritative zone data or from cache -- to the forwarder.

3.15.3 Discussion

Since a name server configured to use forwarders relies on them for most name resolution, it's a good idea to list multiple forwarders. The name server will query them in the order you list them until it receives an answer. (BIND 8.2.3 and later name servers will first query the one in the list that's responding most quickly, which is even better.)

The default behavior of a name server configured to use one or more forwarders is to revert to iterative name resolution if the forwarders don't respond in about 60 seconds. To tell the name server to rely solely on the forwarders, and never try iterative name resolution, use the forward options substatement, set to only:

options {
    directory "/var/named";
    forwarders { 192.168.0.1; };
    forward only;
};

This "forward only" mode is actually preferable to the default behavior, because the forwarding timeout is so long that most resolvers have already given up on the name server before it even begins iterative name resolution.

3.15.4 See Also

Section 3.16 for how to forward only queries for certain domain names, Section 3.17 for how to configure a name server not to forward queries for certain domain names, and "Forwarding" in Chapter 10 of DNS and BIND.

    I l@ve RuBoard Previous Section Next Section