4 interfaces, 4 different responses, 2 forwardings and 1 cache. How ?

Barry Margolin barmar at bbnplanet.com
Fri Oct 22 15:01:27 UTC 1999


In article <Pine.LNX.4.10.9910211932120.14295-100000 at ann.ied.com>,
Jan Vicherek  <honza at ied.com> wrote:
>  I have 4 interfaces(lo, eth0, eth1, ppp0), two of them going to the
>Net(ppp0, eth1). I have about 10+1 domains to take care of; 1 my domain,
>for which I also do reverse resolution (+1) on LAN, and then the remaining
>9 just for virtual hostings.
>
> While resolving the names->addresses, I want to generate four different
>responses, each for the interface on which the request came. so I figured
>I need to run 4 'named' daemons. Right ?

Right.  You use the "listen-on" option in the configuration file to specify
the address of the interface that this instance will respond on.

> Now the two on ppp0 and eth1 should only resolve those 10 domains, no
>other requests should be resolvable. Do I accomplish that by supplying
>null "forwarders" list ? How do I make sure that no cache is being
>maintained and no external DNS servers are contacted to resolve the
>incoming requests ? I guess that's a newbie question and I guess the
>answer is "Don't specify any forwarders, dummy^H^H^H^H^H^H newbie!"

You do this by configuring:

options {
  ...
  allow-query { none; };
}

zone "domain1.com" {
  ...
  allow-query { all; };
}

zone "domain2.com" {
  ...
  allow-query { all; };
}

and so on.

> Would the following configuration do it ? :

Except for the above options, yes.

Note that the eth0 named will maintain its own cache.  It will simply be a
subset of what's in the lo named's cache, since it will learn everything
(except its authoritative zones) by forwarding to the lo named.

>
>/etc/named.conf.lo :
>options { forwarders { ext_dns1; ext_dns2; }; listen-on { 127.0.0.1; }; };
>zone "." { type hint; file "named.ca"; };
>zone "0.0.127.in-addr.arpa"      { type master; file "named.local"; };
>/* now 10x */ zone "a_domain."   { type master; file "...lo"; };
>zone    "4.168.192.in-addr.arpa" { type master; file "...lo"; };
>
>/etc/named.conf.eth0
>options { forwarders { 127.0.0.1; }; listen-on { 192.168.4.1; }; };
>// now 10x zone "a_domain."      { type master; file "...eth0"; };
>// zone "4.168.192.in-addr.arpa" { type master; file "...eth0"; };
>
>/etc/named.conf.ppp0
>options { listen-on { 1.2.3.4; }; };
>// now 10x zone "a_domain." { type master; file "...ppp0"; };
>
>/etc/named.conf.eth1
>options { listen-on { 2.3.4.5; }; };
>// now 10x zone "a_domain." { type master; file "...eth1"; };



-- 
Barry Margolin, barmar at bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.


More information about the bind-users mailing list