Understanding BIND with "Network Settings"

Hello,

I have successfully installed BIND and done some cool things with it like setup internal and external views and so on. The reason I am using BIND is that I have set it up as an Authoritative DNS server for external queries and a caching DNS server for my internal queries along with a couple of other internal/external differences.

With it I setup the Name Server in YaST “Network Settings:Hostname/DNS” to be 127.0.0.1 so that all queries would go through BIND… here it gets fuzzy because I think that is right but not sure.

Additionally, in bind I have the two Name Servers defined in forwarders.conf supplied by my ISP (I have a fixed IP, no DHCP).

Now to me it seems redundant but I could in theory also put the two name servers from my ISP as name servers 2 & 3 YaST “Network Settings:Hostname/DNS” in leaving name server 1 as 127.0.0.1. I see no reason why this wouldn’t work but I also see no reason to do it as it is redundant (as far as I can see).

I don’t know “Network Settings” nearly well enough although BIND I know quite well.

So, could anyone tell me, given that BIND does what I want it to do, what would be the best setup for the DNS in “Network Settings”?

Also, I have only used the “Network Settings” through YaST, can someone tell me where the setting are stored (presumably /etc/something)?

Thanks heaps!!
Reg

Some aanswers (may not be exhaustive).

To have more DNS servers is indeed redundant. The second (and third) are only used if the first in not available (timed out). As the ISPs servers are not realy a mirror of your own one, I would leave them out.

Network configurations are in a lot of files:
. The DNS servers are in /etc/resolv.conf
. The order in which the diferent resources for hosrlookup are used is in /etc/nsswitch.conf and /etc/host.conf (it is normaly first files [/etc/hosts] and then DNS and I donot know why there are two of them).
. And yes, /etc/hosts and /etc/networks belong in the category.
. in /etc/sysconf/network/ you will find several, config, dhcp, the ifcfg-* files are for the individual NICs, and routes for … you guessed it.
. More …?

HTH

Thanks so much! I guess I have quite a bit of digging around to do after all that info., much to learn… it never ends with Linux but that’s half the fun.

I do have some insight on the host file for you from observation. You can take any computer and give it a short name, for example I gave my 2nd name server the alias ‘ns2’ now I can ssh to it just by doing ‘ssh root@ns2’ so the host file allows you to set alternative references that you can use elsewhere in the system. I don’t know if this is it’s prime purpose though or just a nice side-effect from a bigger picture - I suspect the later.

First thing to remember is that /etc/hosts is much older then DNS. It was the sole source for name vs address table.

Nowadays it is mostly used as a backfall for DNS containing the most used addresses. I remember the first DNS server of an application server going down. The result was that for every request to the database server the transaction had ro wait until the first DNS timed out and the second gave an answer. The solution was of course to have the database server also in /etc/hosts. Even when the DNS server was OK it was still faster!.

OTOH putting to much there would put a strain on maintaining /etc/hosts because every change that is normaly covered by DNS must now be edited by hand.

Normaly one puts there:

10.20.30.40   name.full.qualified.domain    name

Thus one can use both the long name (as in DNS) and a short name (as in DNS with a search or domain staments in /etc/resolv.conf). An extra nickname might be of use, but generaly I would not recommend it.