Portal Home > Knowledgebase > Articles Database > Primary and Secondary Nameservers Question?


Primary and Secondary Nameservers Question?




Posted by olddocks, 05-26-2008, 06:28 AM
ok, i have just bought a dedicated server with 2 ips. i already put type master in named.conf along with a zone file having 2 nameservers pointing to A records ns1 IN A 1.3.5.7 ns2 IN A 2.4.6.8 how do i setup ns2 (secondary nameserver)? how do i know it is running?

Posted by activelobby4u, 05-26-2008, 07:10 AM
you have to register the name servers at your registrar and if you have a control panel, you can add the same to the dns template (plesk) or the name server configuration (whm/cpanel).

Posted by olddocks, 05-26-2008, 07:13 AM
update: i tried setting up the slave and master (same server) and i am getting this error: Here is my named.conf zone. is it possible to run both master and slave on same server? if not what is the use of ns2?. Note: i dont use any control panels. i manually write zone files in the nano editor.

Posted by helpyoulinux, 05-26-2008, 07:34 AM
You can't have master and slave as same server. Your master and slave servers should be two different servers. One should have type master and other should have type slave in named.conf. Also you should allow transfer etc etc.

Posted by olddocks, 05-26-2008, 09:21 AM
If i am not allowed to setup master and slave on same server, is it possible to run 2 master nameservers on the same server. I am just trying to understand the dns basics. If godaddy recommends 2 nameservers IPs, and if run bind on my server, only ns1 will be working and ns2 will be a dummy nameserver (if it doesnt work as slave). what is the use of second name server like ns2? Sorry for my vague questions, just trying to understand the dns basics.

Posted by RBBOT, 05-26-2008, 10:05 AM
Your not *supposed* to run primary and secondary DNS on the same machine for reasons of redundancy when there is more than one machine in your domain. However, if you are in a situation where your entire domain is that one machine, and none of the dns records point to an address elsewhere, then it becomes a moot point whether your DNS servers are fault tolerant or not. In this scenario, you can configure your server to act as a master server with no slave, then register your master server as both primary and secondary with your registrar. i.e. You only run bind once on your machine but you point the registrar to it twice. DNS Stuff and other diagnostic tools will tell you this is an incorrect configuration, but they are setup to test for scenarios where there is more than one machine in the domain.

Posted by gnusys, 05-26-2008, 10:15 AM
Even though it is not advised many hosts only run a single nameserver and the domain registry only checks that if the two name server is given 2 diffrent IPs( If you are registering a child nameserver or technically a glue record) If you have a very few domains and you dont mind taking the pain and adding up some entries for all domains on a website.I would recommend you use some free secondary DNS service providers like http://xname.org But for getting you up and running just running a single instance of named and declaring a master zone in a machine having atleast 2 IP address would do.Means you dont have to run 2 named's as master and slave (Not recommended!)

Posted by helpyoulinux, 05-26-2008, 12:19 PM
Hello gnusys, I thin, you have misunderstood with the concepts. The two nameserver IPs should point to the master server. A DNS will have one master dns server ( with 2 IPs, the two IPs can be in a single server, or in two different servers, still it is master) A secondary nameserver concept is entirely diff from this.

Posted by gnusys, 05-26-2008, 01:06 PM
Helpybuddy!, You didnt get me! (read my post ovr and ovr)and i didnt get you either. Well i hope olddocks just understood he doesnt have to put 2 entries for the same zone(one as master and other as slave) on the same named.conf

Posted by olddocks, 05-26-2008, 03:01 PM
It can be! I just did setup one master server on one IP and other slave on another IP as secondary. It worked perfectly for me. From what i have learnt, a domain would work fine with one IP running as nameserver. it is because registrars force for 2 IPs, it is very common to run a website on a bind dns server running with 2IPs. Thanks! i understood that



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
reseller location (Views: 518)
Reseller Packages (Views: 517)