-1

This is the Zone of my Hostname :

host.mydomain.com IN SOA ns1.mydomain.com
host.mydomain.com IN NS ns1.mydomain.com
host.mydomain.com IN NS ns2.mydomain.com
host.mydomain.com IN A 111.111.111.111
localhost IN A 127.0.01

This is the Zone of NS1 nameserver :

ns1.mydomain.com IN SOA ns1.mydomain.com
ns1.mydomain.com IN NS ns1.mydomain.com
ns1.mydomain.com IN NS ns2.mydomain.com
ns1.mydomain.com IN A 222.222.222.222
localhost IN A 127.0.01

This is the Zone of NS2 nameserver :

ns2.mydomain.com IN SOA ns1.mydomain.com
ns2.mydomain.com IN NS ns1.mydomain.com
ns2.mydomain.com IN NS ns2.mydomain.com
ns2.mydomain.com IN A 333.333.333.333
localhost IN A 127.0.01

There are 3 things I'm not sure to understand.

  1. Why each zones have an SOA record to ns1.mydomain.com ?
  2. Why NS1 Zone has a NS record to ns2.mydomain.com and NS2 Zone has a NS record to ns1.mydomain.com ?
  3. Why the localhost in all zones ?

closed as off-topic by Hyppy, mdpc, masegaloeh, HBruijn, fuero May 4 '15 at 15:12

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • Anybody have these anwers ? – Marc-Antoine May 5 '13 at 0:16
1

1st Answer:

Per my answer to another one of your recent questions on DNS, as you know, you need two DNS servers for redundancy purposes. But 1 must always act as your "master," and (when configured correctly), the second name server should replicate data from the master.

That said, you have the same SOA (Start of Authority) value in both your servers because one of the fields in the SOA record is the computer name, or "The FQDN of the name server that was the original or primary source of data for this zone" (http://help.dnsmadeeasy.com/records/soa-record/).

You should only need to change DNS records on the master server (your primary source of data) which gets replicated out to the additional redundant Name Server(s).

Second Answer:

Short answer: For redundancy purposes. Long Answer: For redundancy purposes. If NS1 goes down temporarily, you don't want caching servers to suddenly "forget" about NS1 because NS2 didn't have a record for it, or vice-versa. Both servers serve DNS data "indiscriminately" - their zone files need to have the exact same data, and this only makes sense because your slave server(s) are simply pulling data from the master server - i.e. as I said before, you should NEVER have to update data (the zone file) on NS2 because it should replicate from NS1.

Third Answer

Think about it. Why not? Seriously. Your servers need to be able to talk to themselves.

Configured properly, this shouldn't be a problem. Requests to localhost should always work. But this is simply insurance (although it wouldn't be a huge problem if you removed it). The purpose is to prevent any requests your server uses to talk to itself from "leaking" onto the internet. My recommendation: Keep it.

Also, cross-reference this answer on a similar question: https://serverfault.com/a/120785/57332

But seriously: Based on your earlier questions and this one, I still don't recommend you maintain your own DNS servers. Use the ones provided by your registrar and/or your hosting provider.

  • Thank you... but I can't use my registrar DNS. I explained why in my earlier DNS question : With cPanel if I host my DNS with a thirdparty.. I loose many critical cPanel functions. I found a way to bypass this with the cPanel Clustering function... but I still want to understand what's behind. Thanks again. – Marc-Antoine May 5 '13 at 1:09
  • Why would you hamstring yourself by using cPanel? Anything which needs doing on a linux server box can be done perfectly fine from the shell. – Falcon Momot Jun 30 '13 at 8:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.