Web Hosting Talk







View Full Version : Two nameservers on one machine. How?


Ahmad
07-05-2002, 07:38 PM
Hi,

I'm still working on my home network.

I'm want to use my linux box as a local DNS server. I need to give this machine 2 more IP's and let my DNS daemon listen to use both these addresses.

How can that be done?

P.S. I'm still undetermined between djbdns and BIND. Any of them will do.

TIA.

--Ahmad

roly
07-05-2002, 09:04 PM
Just have both IPs point to server and register the DNS servers:)

allera
07-05-2002, 09:11 PM
If you're using djbdns, set up dnscache for the box's local DNS. Set up dnscachex for your network's local DNS. Set up tinydns for your network's external DNS.

http://cr.yp.to/djbdns.html

To bind more than one IP to tinydns, you'll need to patch it and recompile it:

http://www.ohse.de/uwe/patches/djbdns-1.05-multiip.diff

clocker1996
07-05-2002, 09:17 PM
DJBDNS!!

can setup djbdns ns1 in /etc/ns1
and ns2 in /etc/ns2

:D

Ahmad
07-05-2002, 10:14 PM
Hi,

Thank you all for the responces.

Before I begin, I'm now thinking that I might not need two nameservers. Do I really need two nameservers in my local LAN?
This is not going to serve any Internet domains.

TIA
--Ahmad

allera
07-05-2002, 10:47 PM
Nope, only one. Two nameservers for domains only serve as backups for each other so the domain stays resolveable (?). But having 2 seperate DNS machines, even in a local environment, is always healthy.

For example, say you have ns1 and ns2 as two seperate machines on your LAN servicing at least one other machine we'll call your workstation. If ns1 goes down for any reason (hd failure, ram failure, whatever), your workstation will still resolve hostnames because of ns2.

Now if you have both on one machine, that's a little silly. :) Even having both on one machine for domains is a little silly, but for simple domains where everything is on that machine anyway, it's fine. If you have a domain where www.domain.tld is pointing to 1.2.3.4 and www2.domain.tld is pointing to 4.3.2.1 and the one box that houses both of the domain's nameservers goes down, www AND www2 go down because no one can resolve them to IPs.

I think I typed too much, but basically all you need is one in a LAN environment. Anything additional is candy. That's all I used to use on my LAN at my old home. When the DNS went down (named, bleh), I couldn't do anything until I fired it up again. Then I found djbdns. :D

Ahmad
07-06-2002, 11:47 AM
Originally posted by allera
Nope, only one. Two nameservers for domains only serve as backups for each other so the domain stays resolveable (?). But having 2 seperate DNS machines, even in a local environment, is always healthy.

For example, say you have ns1 and ns2 as two seperate machines on your LAN servicing at least one other machine we'll call your workstation. If ns1 goes down for any reason (hd failure, ram failure, whatever), your workstation will still resolve hostnames because of ns2.


Well, the network currently consists of only three machines ;)

What I was really thinking is that it might be required for something. When doing the Windows XP TCP/IP settings, for example, it gives you two DNS fields. But it is now working perfectly with only one field filled.


Now if you have both on one machine, that's a little silly. :) Even having both on one machine for domains is a little silly, but for simple domains where everything is on that machine anyway, it's fine. If you have a domain where www.domain.tld is pointing to 1.2.3.4 and www2.domain.tld is pointing to 4.3.2.1 and the one box that houses both of the domain's nameservers goes down, www AND www2 go down because no one can resolve them to IPs.


Yeah, I fully agree.
That is why I think that such requirements by Internic and others must be eliminated, as it is irrelevant to enforcing anything any more.


I think I typed too much, but basically all you need is one in a LAN environment. Anything additional is candy. That's all I used to use on my LAN at my old home. When the DNS went down (named, bleh), I couldn't do anything until I fired it up again. Then I found djbdns. :D

I enjoyed reading it all :)
djbdns is really nice, espicially that I don't have to read my "DNS & BIND" book anymore :D

jakis
07-07-2002, 12:27 PM
If your domain is registered on OpenSRS, here's a trick to point different nameservers to single IP , Please don't abuse it , just use it on your own IP.

Goto opensrs manage domain - > create a new nameserver pointed it to a dummy IP -> change IP back to the IP already pointed by another nameserver -> wait 1-2 days then check result at http://www.internic.net/whois.html select Nameservers.

Ahmad
07-07-2002, 01:19 PM
Originally posted by jakis
If your domain is registered on OpenSRS, here's a trick to point different nameservers to single IP , Please don't abuse it , just use it on your own IP.

Goto opensrs manage domain - > create a new nameserver pointed it to a dummy IP -> change IP back to the IP already pointed by another nameserver -> wait 1-2 days then check result at http://www.internic.net/whois.html select Nameservers.

Thanks for the tip jakis :)