1830168 Members
23497 Online
109999 Solutions
New Discussion

question about BIND 9

 
SOLVED
Go to solution
'chris'
Super Advisor

question about BIND 9

hi

is it possible to put as forwarders
3 DNS IP addresses from the ISP
at named.conf from BIND 9
by "forward only" server ?

regards
chris
5 REPLIES 5
Stuart Browne
Honored Contributor

Re: question about BIND 9

Using a section in named.conf like:

options {
forwarders {
ip.ad.on.e;
ip.ad.tw.o;
ip.ad.thr.ee;
};
};

should do it.
One long-haired git at your service...
'chris'
Super Advisor

Re: question about BIND 9

sorry a mistake, because my question was
not so clearly.
I know how to put to named.conf
my collegue says by "forward only" DNS server
I cannot put more than 2 IP addresses.
and only by "resolver" I can put more than 2.
is it true ?

Stuart Browne
Honored Contributor
Solution

Re: question about BIND 9

Neither the '/etc/resolv.conf', or '/etc/named.conf' using 'forwarders' whilst running Bind have that limitation that I'm aware of.
One long-haired git at your service...
'chris'
Super Advisor

Re: question about BIND 9

hi stuart

I did a test with a resolver:

# cat /etc/resolv.conf
nameserver 192.168.5.1
nameserver 192.168.5.2
nameserver 192.168.5.3
nameserver 192.168.5.4

# ping something

# tcpdump -nl port 53
tcpdump: listening on eth0
00:45:06.365654 192.168.1.1.32841 > 192.168.5.1.53: 51545+ A? something. (27) (DF)
00:45:11.375117 192.168.1.1.32842 > 192.168.5.2.53: 51545+ A? something. (27) (DF)
00:45:14.385090 192.168.1.1.32843 > 192.168.5.3.53: 51545+ A? something. (27) (DF)
00:45:20.395042 192.168.1.1.32841 > 192.168.5.1.53: 51545+ A? something. (27) (DF)
00:45:25.405048 192.168.1.1.32842 > 192.168.5.2.53: 51545+ A? something. (27) (DF)
00:45:28.415041 192.168.1.1.32843 > 192.168.5.3.53: 51545+ A? something. (27) (DF)


how you can see the nameserver 192.168.5.4
will NOT be asked.
so by resolver will be limited up to 3 nameserver.

greetings
chris


Stuart Browne
Honored Contributor

Re: question about BIND 9

Wow, I'd never seen that before..

"man resolv.conf" produces this:

... Up to MAXNS (see ) name servers may be listed, one per keyword.

"grep MAXNS /usr/include/resolv.h" returns:

#define MAXNS 3

So you are absolutely correct.

In the configuration you are listing however, this is querying (up to MAXNS)remote name servers, not using forwarders in a BIND configuration.
One long-haired git at your service...