How would one go about setting up a redundant DNS server?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,101
126
Yeah. Everything in one domain (zone). I have never seen each host occupies one zone. That's extremely bizarre.

Like www is a host (computer), dev is a host (another computer), pc1, pc2 etc.

so you have www.mydomain.loc & dev.mydomain.loc, pc1.mydomain.loc, pc2.mydomain.loc. etc all in one domain (zone)
 
Last edited:

Red Squirrel

No Lifer
May 24, 2003
67,347
12,100
126
www.anyf.ca
Interesting, that seems kinda odd though, I would have figured each device gets it's own domain, kinda like in Windows each device gets it's own netbios name. Except I just add .loc at the end since it's a FQDN. Where would mydomain.loc point to? Most of my domains don't have www or anything as the are not being treated as web servers (well some are, but still didn't do www).

What about a web DNS server where you have multiple domains hosted on the same server?
 

XavierMace

Diamond Member
Apr 20, 2013
4,307
450
126
You really need to do some studying on how DNS works. :) It functions largely the same regardless if you're talking external DNS or internal. So let's look at an external website. This is one domain (xaviermace.com), therefore one zone record.

xaviermace.com A 23.229.190.232 600s (00:10:00)
xaviermace.com NS ns51.domaincontrol.com 3600s (01:00:00)
xaviermace.com NS ns52.domaincontrol.com 3600s (01:00:00)
xaviermace.com CNAME www @ (01:00:00)

www is not required to be a website. The www is a CNAME. You'll generally have multiple CNAME's on a domain. Your www CNAME normally points towards your primary A (Host) records which is denoted by the @ symbol. CNAME's don't point towards IP addresses, they point to host names (IE to point webmail towards your 3rd party email provider). A records point towards IP addresses as they are specifying hosts on this domain. On an internal domain, the structure is the same. The one item we haven't touched is the TLD. Adding a TLD doesn't make it a FQDN. The TLD is telling DNS where to start hunting for it's destination. The TLD tells it which root name servers to start looking at (AKA the authoritative name servers). The authoritative name servers actually maintain the records for the domain or delegate to some other name servers. This is probably why the practice started of giving internal domains a non existent TLD. Adding .loc is effectively accomplishing nothing other than making it clear to a person that it's an internal only domain. In your case, you have a HOST (say server1) and you're specifying a TLD (.loc). You have no domain specified, therefore it's not a FQDN. Let's pretend you were hosting AT. Since you have separate domains for everything, it would look like this:

DNS: anandtech.com
Website: anandtechwebserver.com
Email: anandtechemail.com
Forums: anandtechforums.com

That would be rather confusing to anybody using it. Hosting multiple website from a single host is a configuration matter on the web server, not a DNS issue. Nor is it a "web DNS server", it's just a DNS server. On shared hosting providers, you'll have dozens or even hundreds of websites resolving to the same IP address. My above example is a GoDaddy IP address. A reverse lookup shows that IP is hosting 84 websites.
 
Last edited:

Red Squirrel

No Lifer
May 24, 2003
67,347
12,100
126
www.anyf.ca
I know all that, but I'm just surprised at the new revelation that all devices on a network should be under one zone/domain and that you would just have one domain for everything, just seems odd to me. Right now each of my servers are basically 1 domain, or "1 website" if you want to put it that way. So if I want to connect to my file server it's fileserver.loc. I can add subdomains if I wanted to (I actually have a few like for management to connect to IMPI interface) but each device is essentially one zone/domain because each device has it's own name.

As for my websites each one has it's own zone, really not sure how else I would do it unless I made a zone for .com and one for .ca etc. mywebsite1.com is one zone, mywebsite2.com is another zone etc. Is that not how it should be? Each of those domains will then have their own set of subdomains that are specific to that one site. www is one I typically add but there are sometimes others.
 

Red Squirrel

No Lifer
May 24, 2003
67,347
12,100
126
www.anyf.ca
That's basically how mine are setup, one zone per domain, one domain per device (domain is basically the server name).

Code:
[root@rohan zones]# cat falcon.loc
$TTL 600
@ IN SOA falcon.loc. root.borg.loc. (
                                        1000000000       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H     ; minimum
					)



@	IN	NS 	ns1.rohan.loc.
;	IN	MX 	10 mail.borg.loc.

@ IN A 10.1.2.10



[root@rohan zones]# 
[root@rohan zones]# cat rohan.loc
$TTL 600
@ IN SOA rohan.loc. root.borg.loc. (
                                        1000000000       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H     ; minimum
					)



@	IN	NS 	ns1.rohan.loc.
	IN	MX 	10 mail.rohan.loc.

@ IN A 10.1.1.5



www IN A 10.1.1.5
mail IN A 10.1.1.5

ns1 IN A 10.1.1.5

webapps CNAME www
imap CNAME www
smtp CNAME www
webmail CNAME www

[root@rohan zones]#
 

thecoolnessrune

Diamond Member
Jun 8, 2005
9,672
578
126
Right, and people are telling you that that design essentially defeats the purpose of DNS administration. You *can* do it that way, but there's no real reason to, and you're just giving yourself headaches.

mydomain.internal
host1.mydomain.internal
host2.mydomain.internal
host3.mydomain.internal

is the way it's intended to be done. You can even find reason to segment in the home if you want to. As long as the domains are only being used internally, they can be almost anything under the rainbow (like myhomprod.internal and myhomedev.internal), with appropriate hosts in their respective zones. If you're going to use DNS, why not put your servers under a single logical container (zone) as opposed to everything independent?
 

Red Squirrel

No Lifer
May 24, 2003
67,347
12,100
126
www.anyf.ca
What does "mydomain" represent though? Do I just pick a random server, or what?

How are websites done? I always assumed 1 zone per website. Example.com would be 1 zone, example2.com would be another and so on, is that not how it's done?
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,101
126
A website is just a computer (could be desktop or server) happens to run http server software on it, nothing particular. It's just a convention that people use "www" as the website name. However, you can have several websites in a zone or domain, like www, ww1, ww2, dev, etc.

mydomain is just a name space you choose for internal or external use. For internal use, you can use any suffix you like (.loc, .local, .), for external use, you have to use .com, .net, .org, etc,. but actually you can use these suffix internally on your LAN too since your internal domain does not communicate with outside world at all.

And yes, Example.com would be 1 zone, example2.com would be another

All DNS needs to know is mapping name to IP address correctly.
 

Red Squirrel

No Lifer
May 24, 2003
67,347
12,100
126
www.anyf.ca
Yeah I get that, www is just a sub domain. But each server is it's own domain right now, but if I make each server a sub domain just wondering what the convention would be, ex: what do you pick to be the domain, the DNS server itself, or just pick a random name that won't actually resolve anywhere on it's own? As right now I just have server1.loc server2.loc etc. But if I have everything under one zone, then I would need to have server1.something.loc, server2.something.loc etc. What does something.loc represent? I guess you can do what you want but just wondering what is the main convention. First time I hear of putting all the servers under one zone, so just trying to grasp the proper convention so if I'm going to change it may as well do it right.

Though not sure if I'm ready to totally change that as it means fixing every place that refers to a server as it would need to refer to the new name. I think my quickest fix at this point might be to hard code the IP for the LUNs as well as NFS host permissions in the /etc/exports file that way I don't lose my storage if DNS goes down. Kinda dirty, but not like I have any plans of changing my IP especially for the main/important servers like file and VM server. In fact I have extra IP reservations in case I plan to add more storage or more VM servers so I can have a proper sequence. I'll then revert back to having just 1 DNS server and make it a hardware DNS server, as my fail over is not working anyway.

I might do the Raspberry Pi A/B setup later. Heck, the more I think about it the more it's not that crazy an idea. Basically how lot of telecom gear works. You have an active side and sync side, if anything happens to the active, or you do a manual swact, it just switches to the other. In my case it would just be turning the interface on or off. Can probably use i2c to communicate between the two or even have a MCU act as a main controller. The whole thing would fit in a small 1U box. That way if my VM environment is down I still have DNS. Eventually I do want to look at a more redundant VM setup though.
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,101
126
Don't understand why you keep asking the same thing over and over. Put PCs (servers & desktops) & devices in one domain/zone is just like the environment of the telco company you work for, it's just a name space for a group of PCs/devices.

Your company probably have domain name like goodtelco.local internally with several DNS servers. In your company network, you will have ns1.goodtelco.local, ns2.goodtelco.local, www.goodtelco.local, fileserver.goodtelco.local, dev.goodtelco.local, mail.goodtelco.local, pc1.goodtelco.local, pc2.goodtelco.local, mac1.goodtelco.local, linux1.goodtelco.local, etc.

you can use any tld suffix you like on your LAN, no one cares. But probably a lot of people/companies/organizations use .local, .loc, .lan, .org.

Absolutely no one put each server or PC on it's own zone/domain, like I said before, it's just extremely bizarre.
 
Last edited:

Red Squirrel

No Lifer
May 24, 2003
67,347
12,100
126
www.anyf.ca
Hmm I never really thought of treating it like a "AD" style domain. I could do that. I've never even considered it as working the same way, but I guess it sort of does. So the myname.local would be equivalant to the domain name in an Windows/AD environment. Probably just use something short like int.loc or something, then put everything in one zone. I just never even thought of doing it that way but I can see how it could work and be easier.
 
  • Like
Reactions: mxnerd