LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-01-2011, 02:55 AM   #1
anishkumarv
Member
 
Registered: Feb 2010
Location: chennai - India
Distribution: centos
Posts: 289

Rep: Reputation: 10
Any other option is available??? in BIND


Hi all,

Thanks in Advance,

In bind zone transfer process from master to slave zone ,in master every time i need to change the serial in zone file it reflects in slave server,any other option available instead of changing the serial it automatically reflect to slave server, Please guide me to solve this issue.

With Regards
Anish Kumar.V
 
Old 08-01-2011, 04:26 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,641

Rep: Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539
Hi,

By increasing the serial in the master's zone file after changing some record(s), you actually inform the master that there are some zone changes it has to be aware of.
The master in turn sends a NOTIFY to the slave and the slave starts a zone transfer. It's all done automatically.
If for some reason the master does not send the NOTIFY, the slave will refresh the zone when the refresh time for that zone expires.
So there is no other way for the slave to automatically do a zone transfer.

Regards
 
Old 08-01-2011, 02:57 PM   #3
anishkumarv
Member
 
Registered: Feb 2010
Location: chennai - India
Distribution: centos
Posts: 289

Original Poster
Rep: Reputation: 10
Hi bathory,

Thanks for the quick reply,

Actually why i raised this question means my requirement is like this, for example

this is my client zone file


Quote:
$TTL 60
gld.co.in. IN SOA ns1.anish.co.in. ns1.anish.co.in.(
2011071826
30
30
604800
3600)

NS ns1.anish.co.in.
NS ns2.anish.co.in.
anis.co.in. A 192.168.1.1
www.anish.co.in. A 192.168.1.1

this is my client zone file
As per our application we calculate the serial in this base yyyymmddhh okay so
Using web application one of my client tried to update his zone file he succeeded once he did the first time (2011071824) okay and it reflect to secondary also, but within next 10 mins he update another zone , and it not reflects in secondary server because the (2011071824) serial number is same...:-( now we can able to update the zone 1 hour once only, then only it will reflect in secondary

so my question is any other way is available to reflect simultaneously in secondary server??
 
Old 08-01-2011, 05:15 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,641

Rep: Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539
Quote:
Using web application one of my client tried to update his zone file he succeeded once he did the first time (2011071824) okay and it reflect to secondary also, but within next 10 mins he update another zone , and it not reflects in secondary server because the (2011071824) serial number is same...
I don't know how your client updates the 1st zone and then the 2nd one and what is the relation between the 2 zones (why the have the same serial).
Anyway, as I've already told you there is no other way to automatically update the slave without the NOTIFY from master.
The only other thing you can do, is to setup a cron job in slave to do zone transfers every once in a while overwriting the previous slave zone file
 
Old 08-01-2011, 05:41 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,294

Rep: Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358
Actually, its just a serial number; extend it to include minutes (mi) digits and you'll be fine.
 
Old 08-01-2011, 10:20 PM   #6
anishkumarv
Member
 
Registered: Feb 2010
Location: chennai - India
Distribution: centos
Posts: 289

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by chrism01 View Post
Actually, its just a serial number; extend it to include minutes (mi) digits and you'll be fine.

Hi chrism01 i read in one article maximum we can use 10 digits only in serial, and if we are increased means we will get

Quote:
out of range
error and i tried too...we get the same error

Last edited by anishkumarv; 08-01-2011 at 10:22 PM.
 
Old 08-01-2011, 10:37 PM   #7
anishkumarv
Member
 
Registered: Feb 2010
Location: chennai - India
Distribution: centos
Posts: 289

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by bathory View Post
I don't know how your client updates the 1st zone and then the 2nd one and what is the relation between the 2 zones (why the have the same serial).
Hi bathory,

I think you are not understand my problem, the problem is 2011071824 - this serial is based on this format right (yyyy-mm-dd-hh) okay totally 10 digits we will get, just one example suppose a client will upload the zone file at today 1am means he will get this serial (2011080201) and this will reflect in secondary too, and the same client will update the same zone in 1.10 am means (2011080201) again he will get the same serial, right..????
 
Old 08-01-2011, 10:43 PM   #8
anishkumarv
Member
 
Registered: Feb 2010
Location: chennai - India
Distribution: centos
Posts: 289

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by bathory View Post
Anyway, as I've already told you there is no other way to automatically update the slave without the NOTIFY from master.
The only other thing you can do, is to setup a cron job in slave to do zone transfers every once in a while overwriting the previous slave zone file
Thanks man, me too thinking the same http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/ first we generate key right then only we can do this transfer process right ??
 
Old 08-01-2011, 10:53 PM   #9
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,294

Rep: Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358Reputation: 2358
As Bathory says, you can bypass the serial by enabling an auto process in cron to 'update' by just overwriting the file, regardless of serial.

Must admit I didn't remember there's a 10 digit limit on serial. OTOH, it doesn't have to(!) represent anything in the real world eg yyyymmddhh. So long as it increases for each new version of the master's file, that will work.
yyyymmddhh is just a handy format IF you can restrict amendments to no more than once per hour...
 
Old 08-02-2011, 01:50 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,641

Rep: Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539Reputation: 1539
Quote:
I think you are not understand my problem, the problem is 2011071824 - this serial is based on this format right (yyyy-mm-dd-hh) okay totally 10 digits we will get, just one example suppose a client will upload the zone file at today 1am means he will get this serial (2011080201) and this will reflect in secondary too, and the same client will update the same zone in 1.10 am means (2011080201) again he will get the same serial, right..????
You're wrong. The last 2 digits do not represent the hour. They can be whatever numbers from 00-99. Better have a look at this:
Quote:
SOA
sn = serial number
Unsigned 32 bit value in range 1 to 4294967295 with a maximum increment of 2147483647. In BIND implementations this is defined to be a 10 digit field. This value MUST increment when any resource record in the zone file is updated. A slave (Secondary) DNS server will read the master DNS SOA record periodically, either on expiry of refresh (defined below) or when it receives a NOTIFY and compares arithmetically its current value of sn with that received from the master DNS. If the sn value from the master is arithmetically HIGHER than that currently stored by the slave then a zone transfer (AXFR/IXFR) is initiated. If the value of sn from the master DNS SOA is the same or LOWER then no zone transfer is initiated. The convention is to use a date based sn value to simplify the task of incrementing the sn - the most popular convention being yyyymmddss where yyyy = year, mm = month and dd = day ss = a sequence number in case you update it more than once in the day! Using this date format convention the value 2005021002 indicates the last update was on the 10th February 2005 and it was the third update that day. The date format is just a convention, not a requirement, so BIND (or any other DNS software) will not validate the contents of this field. It is easy to make mistakes and get serial numbers out of sequence.
 
1 members found this post helpful.
Old 08-02-2011, 03:09 AM   #11
anishkumarv
Member
 
Registered: Feb 2010
Location: chennai - India
Distribution: centos
Posts: 289

Original Poster
Rep: Reputation: 10
Hi bathory,

Thanks for your help, Its just awesome... but the problem is in our development side if they implement this concept in our application means , the existing client will maybe affect, and they need to change the entire zone module in the project, it takes more time.

And i am thinking is it possible to write a script to do this incremental process once a client update a zone , every time a client update zone the serial only automatically increase using the script.Thinking how to write?? :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ACL is mandatory option in BIND? Please read this post with patience :-) anishkumarv Linux - Security 1 08-01-2011 08:53 PM
[SOLVED] Bind DNS 9 topology option kshitiz Linux - Server 2 08-24-2010 07:33 AM
Fstab not mounting a subdir with the bind option JosipBroz Linux - Software 2 03-11-2009 04:44 PM
Bind problem: config files are missing after re-install bind 9.5 on Fedora Core 8 elvisious Linux - Software 1 07-15-2008 07:49 PM


All times are GMT -5. The time now is 01:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration