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.

DNS Synchronisation - How is newest zone determined?

Discussion in 'cPanel Developers' started by mikelegg, Sep 16, 2010.

  1. mikelegg

    mikelegg Well-Known Member

    Joined:
    Mar 29, 2005
    Messages:
    330
    Likes Received:
    0
    Trophy Points:
    16
    When WHM performs a DNS synchronisation, what information does it use to determine the newest zone?

    I notice there is a comment at the top of each zone file that looks like this - ; cPanel first:11.26.8-BETA_48361 latest:11.26.8-BETA_48361 Cpanel::ZoneFile::VERSION:1.3 mtime:1284690458

    Is the "mtime:1284690458" section used to determine and compare the date of each zone file?
     
  2. mikelegg

    mikelegg Well-Known Member

    Joined:
    Mar 29, 2005
    Messages:
    330
    Likes Received:
    0
    Trophy Points:
    16
    I think I've found the answer - the zone's "age" is determined by it's serial number.
     
  3. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi mikelegg,

    That's correct. The serialnum (serial number) will determine the modification date and revision (for that day) of an SOA and be used to determine authority between two zone files for the same zone (say, when syncing). It is also used in some cases by zone editors, i.e. if you request to add a record to a file, and you specify a serialnum that is not equal to the current serialnum, the editor will reject the addition, complaining that you're behind the curve and should read the zone file again, verify you addition is still valid and use the correct serialnum. (well, it won't literal say that :p , but that's usually the intent of the error message). I'm sure that cPanel has similar mechanisms in various places, if only regarding syncing and clustering, however I'm only familiar with it in the cPanel context concerning some API stuff I've been testing lately.

    Hope things continue to go your way mikelegg.

    Regards,
    -DavidN
     
  4. mikelegg

    mikelegg Well-Known Member

    Joined:
    Mar 29, 2005
    Messages:
    330
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for clarifying that David.

    I have some more questions, but I'll open a new thread because the topic is slightly expanded.
     
Loading...

Share This Page