0

I have a domain: example.com and have a server with IP 21.1.1.1

I set vanity/private/child nameservers for example.com as below:

ns1.example.com with IP 21.1.1.1
and
ns2.example.com with IP 21.1.1.1

And in server's WHM I set NS as below:
ns1.example.com
ns2.example.com
then I hosted example.com in WHM of my server.

Now, I got my second server with IP 95.1.1.1. I don't know how to set vanity/private/child nameservers for example.com for this second server! And I want to use my second server for hosting customers.

  1. Should I set NS3 and NS4 for this new server with settings:
    ns3.example.com with IP 95.1.1.1
    and
    ns4.example.com with IP 95.1.1.1
    ?

  2. I can use multiple IP for domain NS, Should I set:
    ns1.example.com with IPs 21.1.1.1 & 95.1.1.1
    ns2.example.com with IPs 21.1.1.1 & 95.1.1.1
    So I get rid of NS3, NS4...?

I am confused with NS of domain and server, Any help please?

0

DNS records are organised in zones. One zone contains the records for one domain. If there are few records and subdomains, it might also contain the subdomains, but usually those get separate zones.

A zone can have various NS records and they can be domain specific, but every zone has one SOA record (Start of Authority), which, among other information lists the primary name server for the zone.

Assuming your domain is mydomain.com and your customer has customerdomain.com:

There's no point in having two NS records that ultimately point to the same IP-Address. Multiple name serverse are for redundancy, which you won't get that way. Also, it's good practice to have the primary NS server outside the domain it serves. So you'll set ns1.mydomain.com as either the first or second name server, depending on whether you prefer best practice over appearances or not.

For customerdomain.com, you set ns2.mydomain.com to your second DNS server, and set it as the authoritative DNS server for customerdomain.com.

That is, if you want those domains served by separate servers. For redundancy, it's probably best to have both zones on the same server, have ns1.mydomain.com point to the first, ns2.mydomain.com to the seconde and set a NS record to both of them for each zone.

  • Thank you, My first server's panel is WHM/cPanel and it needs two NS. Should I use ns1.mydomain.com & again ns1.mydomain.com for WHM/cPanel (duplicate ns)? – user3252522 Jun 19 '17 at 17:56
  • Just a hint: cPanel and WHM are out of the scope of serverfault and questions about their configuration will get your question closed. To answer the general part of your question: if both your nameservers (i.e. 21.1.1.1 & 95.1.1.1) are capable of hosting both domains/zones, set ns1.mydomain.com to point to one of them and ns2.mydomain.com to point to the other and add both to both mydomain.com and customerdomain.com as NS record. – PaterSiul Jun 19 '17 at 18:35
0

Name servers are not for hosting anything; they just resolves human readable domain names to IP addresses. You should have always had at least two name servers on separate networks. Therefore, neither of your suggestions meets the minimum technical requirements for authoritative name servers. You should read the whole article, but the related parts are these:

Minimum number of name servers

There must be at least two NS records listed in a delegation, and the hosts must not resolve to the same IP address.

Network diversity

The name servers must be in at least two topologically separate networks. A network is defined as an origin autonomous system in the BGP routing table. The requirement is assessed through inspection of views of the BGP routing table.

The only acceptable solution would be to have all the domains on both name servers, the other being primary and allowing zone transfers from the secondary. If example.com is your domain and example.net customers domain, that would be e.g.

example.net.     IN NS  ns1.example.com.
example.net.     IN NS  ns2.example.com.

example.com.     IN NS  ns1.example.com.
example.com.     IN NS  ns2.example.com.
ns1.example.com. IN A   21.1.1.1
ns2.example.com. IN A   95.1.1.1

After this you should fix all the other requirements starting from all the consistensies. You really should learn all this and have it all together with your own domain before trying to sell these services to anyone else. Seriously.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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