Operating System - HP-UX
1829571 Members
1431 Online
109992 Solutions
New Discussion

How to update the db files on the secondary DNS server

 
Yi Gong_1
Occasional Contributor

How to update the db files on the secondary DNS server

We have two DNS servers in the environment, primary and secondary. We found that when the primary DNS is updated, the secondary DNS is NOT synchronized automatically. Should the db.domain be updated automatically?
6 REPLIES 6
Kofi ARTHIABAH
Honored Contributor

Re: How to update the db files on the secondary DNS server

Yes the secondary should get its zone information from the primary, if zone transfers are working properly...

put named in debug mode and see the logs for errors with zone XFERs.

kill -USR1 `cat /var/run/named.pid`

and look at the file /var/tmp/named.run

also make sure that the value of your serial number in your SOA records are changed each time you make changes on the primary.

ensure that the value of the new SOA is larger than it previously was.
nothing wrong with me that a few lines of code cannot fix!
Rob Mallard
Valued Contributor

Re: How to update the db files on the secondary DNS server

Make sure you are incrementing the serial number in the SOA record of the db files you are editing. The SOA starts on the first line of the db file. The serial number is the first entry (usually on the second line) and is often followed by the comment ;Serial

00345 ; Serial

The secondary server checks for a change in the serial number, if it is different than the serial number of the last update that file will be upated.

I had the problem of forgeting this step so I changed my serial number from just a meaningless string of digits to a string that represented the current date plus a revision number (mmddyyvv), i.e.; If updated my DNS today my serial number would be 12130001. if I had to make another change today I would change it to 12130002. Example:

12130001 ;Serial

I hope this helps.
Kenneth Platz
Esteemed Contributor

Re: How to update the db files on the secondary DNS server

Rob, that's a great suggestion, except I'd recommend using the format yymmddvv, ie, 00121301 or 00121302 for version 01 and version 02 of a file modified today.
I think, therefore I am... I think!
Albert E. Whale, CISSP
Honored Contributor

Re: How to update the db files on the secondary DNS server

Yi,

The Secondary Servers will update automatically, but not right away. The Values established in the DNS Primary tell the Secondary server when to check for updates, how often to check for connection problems, and how long to trust the table if the Primary is no longer available.

In short, if you make a change on the Primary, and you know they change has been recognized (i.e. you've already performed the nslookup on the new addresses), you can get the Secondary server to immediately check for an update by issuing a

kill -HUP

This tells the Secondary named server to communicate to the Primary and get the latest updates from it, NOW!

Hope that helps.

Have a Great Day!
Sr. Systems Consultant @ ABS Computer Technology, Inc. http://www.abs-comptech.com/aewhale.html & http://www.ancegroup.com
Yi Gong_1
Occasional Contributor

Re: How to update the db files on the secondary DNS server

Thanks for everybody's help. We have some progress here now. When we run "sig_named restart" on secondary, the db files can be updated. But they can't be synchronized automatically.

Attached is /var/tmp/named.run. Can anybody figure out the problem?

The current setting for DNS is
108:Refresh
3600:Retry every hour
604800:Expire after a week
86400:Minimum ttl of 1 day


Yi Gong_1
Occasional Contributor

Re: How to update the db files on the secondary DNS server

Thanks everybody again. The problem is solved.
It seems that setting for refresh has some minimum limitation. We set it for 108 seconds, actually it synced after 10 minutes.