The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setting up nameservers.

Discussion in 'Bind / DNS / Nameserver Issues' started by HH-Steven, Nov 22, 2006.

  1. HH-Steven

    HH-Steven Well-Known Member

    Joined:
    Aug 29, 2004
    Messages:
    284
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi, not sure if this is the right section for this but it seemed to be the most fitting,

    Im currently expanding the amount of servers i have and was wondering whats the best way to go about maintaining and setting up the dns servers.

    Currently i have:

    NS3.domain.com
    ***.**.***.186

    NS4.domain.com
    ***.**.***.187

    NS5.domain.com
    **.**.***.202

    NS6.domain.com
    **.**.***.203

    Now the most logical thing to me seems to be to continue as i have using NS7,8,9 and so on........ using the new ip's

    Is there an easier way to do this? because as it stands ill be sending out specific nameserver details to each customer that signs up instead of letting the billing system (modernbill) handle this.

    Is it possible for just one set of DNS whether it be 2,4 or 6 nameservers to be sent to all clients regardless of which server they are on?

    Thanks for any advice you can give with this.

    Cheers.
     
  2. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    Using the DNS cluster functions in WHM, you can easily set up two or three name servers in a DNS cluster to handle all your hosted domains. Those name servers can reside on web servers that host websites, or on servers dedicated to DNS only (using DNS-only version of cPanel). All your other web servers will then not run Bind for DNS; instead they will hook into and synchronise with the DNS cluster.

    The procedure goes something like this (this is not a thorough how-to):

    On each of the 3 servers that will be used for DNS:
    * Enable Bind using Name Server Setup.
    * Enter the info of the 3 name servers in Basic cPanel/WHM Setup.
    * Using Configure Cluster, enter the 2 peer name servers and set their DNS Role to Synchronize Changes.

    Add 4th server (web server without DNS):
    * Do not enable Bind during initial setup. Remember the 3 servers in the DNS cluster will be doing all the DNS.
    * Enter the info for 3 name servers in Basic cPanel/WHM Setup.
    * using Configure Cluster, enter the 3 name servers and set their DNS Role to Synchronize Changes.
    * On each of the above 3 servers that do your DNS, do Configure Cluster and add this 4th server and set its DNS Role to Standalone.

    To add the 5th and further servers, follow the same procedure as for the 4th.

    In the final setup you should have the 3 DNS servers that Synchronize with each other, and referencing all other web servers as Standalone roles. Each web server should in turn reference the 3 name servers only as Synchronize roles.

    I hope this helps ;)
     
  3. HH-Steven

    HH-Steven Well-Known Member

    Joined:
    Aug 29, 2004
    Messages:
    284
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Seems pretty straight forward but just a few questions.

    If say i was running on 3 servers would that be enough? would i set all 3 as synchronised with each other and they would work fine?

    What would i set the nameservers as at the registar? just the 3 main dns servers and there ips?

    So basically at the registar i would have:

    ns1.domain.com
    ***.**.***.186

    ns2.domain.com
    **.**.***.202

    ns3.domain.com
    ***.**.***.144

    And i would give those 3 nameservers to every client regardless of which server they were on and there account and site would work fine?

    What happens if one of the dns servers has an outage? how does this affect the other servers in the cluster?

    And last but not least......... can this be setup and implemented whilst still keeping the existing nameservers active and working? basically so that clients could change there nameservers without experiencing any downtime? (im guessing not as your changing the nameservers in basic cpanel/whm setup)

    Thanks again Stefaans
     
  4. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    Two name servers are the minimum, three would be better for redundancy.

    Yes, that's it.


    Correct.


    If one of your three name servers goes down, other servers on the Internet will automatically query one of your two remaining name servers.

    If one of your name serves goes down for a long time, its DNS information will become out of sync with the others. It will synchronise again automatically with the cluster when you get it back online and Bind starts up. All in all, you will have good DNS redundancy in your cluster.


    This is where we have to tread carefully :eek:

    I assume your existing name servers all contain the same DNS zones. If not, the steps below will need to be expanded to synchronize all the DNS zones to your new DNS cluster.

    So, assuming all existing name servers contain the same DNS zones, this is what I would do:
    * Set up the cluster of three name servers (ns1 through ns3) and update them with your registrar. Your long-term system will now be ready for action.
    * Set the A record of any other existing name servers (ns4, ns5, ns6, etc) to point to the IPs of ns1, ns2 or ns3. In other words, ns4 will become an alias for ns1, ns5 an alias for ns2 etc. That will ensure that existing domain records remain valid while you update each of the domains with the registrars. (You may need to enable Allow Sharing Nameserver Ips in Tweak Settings, I don't know for sure.)
    * Weeks or months later when all your domains use ns1, ns2 and ns3, you can get rid of the A records for ns4, ns5 etc.
     
  5. HH-Steven

    HH-Steven Well-Known Member

    Joined:
    Aug 29, 2004
    Messages:
    284
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Right so i now have another server online (still waiting for the others).

    I have a new domain purchased solely for use as the nameservers, for this purpose we'll call this domain1.com

    I have the nameservers registered as:

    ns1.domain1.com - ***.**.***.186

    ns2.domain1.com - **.**.***.202

    ns3.domain1.com - **.***.**.122

    and the nameservers for that domain as:

    ns1.domain1.com
    ns2.domain1.com
    ns3.domain1.com

    (is that correct?)

    If so what should be the next step?, obviously sooner or later id like all clients regardless of what server they are on to use the same nameservers as above.

    But for the meanwhile i need to get the cluster up and running as above but with as little downtime as possible for my clients, so ideally they need to carry on using there existing nameservers and there sites need to carry on as they are. (i plan on giving clients a deadline for when the existing nameservers will cease to work)

    I kind of understood what you was saying Stefaans but every time ive enabled the cluster on the live/production servers all sites have gone down.

    Basically what im asking is, what now?
     
  6. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    I don't think so. Until such time that all your boxes that host ns1, ns2 and ns3.domain1.com are physically in place, you should not use those name servers. If one or more of those name servers do not respond (because you are still waiting to set up the boxes, I cannot see how your client domains will resolve. (You did say you are still waiting for some boxes, didn't you?)

    :eek: Not what you needed...

    Without divulging any info you want to keep private, it may help if you posted a description of your current setup, e.g. how many servers, are they already working in a cluster? I think the most important part to know is whether all your DNS zones are contained in the same system (cluster), or whether each existing server has a set of DNS records independent from the other servers..
     
  7. HH-Steven

    HH-Steven Well-Known Member

    Joined:
    Aug 29, 2004
    Messages:
    284
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    At the moment the servers i have setup and running (with live sites on them) are as follows:

    Server 1: (shared)

    ns3.domain.com - ***.**.***.186
    ns4.domain.com - ***.**.***.187

    Server 2: (resellers)

    ns5.domain.com - **.**.***.202
    ns6.domain.com - **.**.***.203

    So basically each server has its own set of nameservers.
     
  8. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    It will be necessary to combine all the zones of all servers into a single name servers. I suggest:
    * Copy /var/named/*db files from Server 2 to Server 1, e.g. "scp root@server2.domain.com:/var/named/*db /var/named".
    * Edit /etc/named.conf on Server 1, and paste all the zone info in /etc/named.conf from Server 2 at the end. (I would copy the two named.conf files to a local PC for easy editing)
    * Restart Bind on Server 1, and verify that you can query old zones (that used to be on Server 2) as well as new zones (from Server 2), e.g. "dig @ns3.domain.com clientdomain.com".
    * If Bind on Sever 1 is responding well to all queries, you can do the same process on Server 2 to obtain the combined DNS zones.

    Important, of course, is to make a backups of /etc/named and also the contents of /var/named directory on both servers before you attempt any of this. Even though all should work out just fine, it would be wise to do this during quiet time on your servers (to minimise any potential disruption of customer services).

    Good luck Jortex!
     
  9. HH-Steven

    HH-Steven Well-Known Member

    Joined:
    Aug 29, 2004
    Messages:
    284
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Im about to set this up now on all servers (scheduled possible downtime) but just though of something else.........

    What if say i have domain50.com and the nameservers are set to:

    ns1.domain1.com
    ns2.domain1.com
    ns3.domain1.com

    then regardless of which server domain50.com is on the above nameservers will work right?

    What if that domain is present on 2 or more servers? which one would it use?

    Or on further thinking im assuming with the servers communicating with each other itd say "domain in use" or similar?

    Also, any other helpful tips or hints before i start are more than appreciated.
     
  10. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
     
  11. HH-Steven

    HH-Steven Well-Known Member

    Joined:
    Aug 29, 2004
    Messages:
    284
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Ok, so far i have done the following and in this order:

    And after i used:

    DNS Functions -> Synchronize DNS Records -> Synchronize all zones to all servers

    Its showing identical files/zones in both:

    /var/named/
    /etc/named.conf

    on all 3 servers.

    All domains are currently still working using there existing nameservers ns3 & ns4 / ns5 & ns6 respectivly.

    Added a new domain (devilhost.net for those who are nice enough to check the DNS for me :) )

    and it seems to be working fine using ns1, ns2 and ns3

    Am i missing anything here? because it seems to have gone TOO well from my past experience lol.

    Any helpful advice is greatly appreciated.
     
  12. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    Well, maybe it really did go down without error. Congratulations! :D
     
  13. HH-Steven

    HH-Steven Well-Known Member

    Joined:
    Aug 29, 2004
    Messages:
    284
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Well if you cant see anything wrong or predict problems occuring then im happy lol.

    Seriously though, thanks a lot, youve been a great help and i couldnt have done it without the help you gave me.

    hopefully this thread will help others now who are trying to achieve the same thing.
     
  14. HH-Steven

    HH-Steven Well-Known Member

    Joined:
    Aug 29, 2004
    Messages:
    284
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    All seems to be working ok but one question.....

    What about those on private nameservers?
    How does it affect those and what should (if anything) be done?

    Cheers.
     
  15. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    697
    Likes Received:
    1
    Trophy Points:
    18
    Doesn't affect them. You have two choices:

    1) Continue to give them their own IPs from the box where their account is located. They don't use your nameserver cluster.

    2) Give them the same IPs for your clustered nameservers and they register them as "aliases".
     
  16. HH-Steven

    HH-Steven Well-Known Member

    Joined:
    Aug 29, 2004
    Messages:
    284
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Theyre actually using the shared ips so theyre not using dedicated ips (if that makes sense, its still early)

    So very unsure about what the clients needs to do there side (at the registar etc..) and what if anything i need to do my side.

    Ideally id like them to keep there private nameservers but also take advantage of the DNS cluster if possible.

    Any advice is greatly appreciated.
     
    #16 HH-Steven, Dec 5, 2006
    Last edited: Dec 5, 2006
  17. electric

    electric Well-Known Member

    Joined:
    Nov 5, 2001
    Messages:
    697
    Likes Received:
    1
    Trophy Points:
    18
    I think (not 100% sure), that you would do this:

    - add A entry to DNS record for their reseller domain for each nameserver:
    ns1 IN A x.x.x.x
    ns2 IN A y.y.y.y
    ns3 in A z.z.z.z

    (Where x, y, z are your three clustered nameserver IP addresses.)

    - Reseller has to create their "private" nameservers, using the three clustered IP addresses.

    So... eventually, you'll end up with all your resellers using the same three clustered IP addresses.

    Someone else might want to confirm this is correct..
     
  18. agilagi

    agilagi Registered

    Joined:
    Feb 6, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    DNS, pero en Español

    Alguien sabe cómo administrar los dns en whm? He leído algo pero no manejo del todo bien el ingles. Gracias un saludo.
     
  19. Shiboning

    Shiboning Member

    Joined:
    Sep 18, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for this thread. I have a couple of questions.

    You have talked about having 2 or 3 servers for DNS only. I have only two servers at this time because that's all I need so far for my organization. Can I set up the DNS cluster in these two servers and at the same time use them for hosting? What's the down side of this? Would the outside secondary DNS service a better choice in this case?

    Another question is. If I were to set up using a couple of servers for DNS only, can I use just the cheap servers like a Celeron box, or even cheaper, since I don't need to run the websites on these machines, right? How have you guys been doing this hardware wise?

    Thanks!

    Sam
     
Loading...

Share This Page