LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-25-2006, 04:25 PM   #1
nsvora
LQ Newbie
 
Registered: Oct 2006
Posts: 16

Rep: Reputation: 0
Question DDNS client: Multiple zone entries


Hi All,

While testing the DDNS server configuration with proprietory client implementation for DHCP and DDNS, I noticed a strange thing. Any help here is appreciated.

Pre-condition:
----------------
DHCP and DDNS server are running on a single LINUX machine having following version:
Linux ns1.testdns.com 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:54:53 EST 2006 i686 i686 i386 GNU/Linux

The DHCP server was able to generate the dynamic IP Address as specified in the dhcpd.conf.
DDNS server was able to add the entries in the forward and reverse zone files eg : testdns.com and 1.168.192.in-addr.arpa
This ensures that DHCP and DDNS server settings are correct.

Test Condition:
---------------
I modified the client host name and restarted the named service so that changes are reflected in the zone files. The forward zone file was expected to be updated with the modified host name.

Results:
----------
Forward zone had two entries viz; one with old host name and other with new host name.

Analysis:
------------
I have found that this is happening because in DDNS client code,
before updating the server database with modified host name, we are checking whether a record with “new” host name exists. And server replies in negative for this ( which is correct ) and client adds a new record for the new host name.

But previous entry with the old host name is never deleted from the server.
So, observation was multiple host names pointing to same IP.

This check is done via “Prerequisite” record sent by the DDNS client. Since the prerequisite check fails, client doesn’t send request for deletion of the “old” host name entry.

Forward zone file :/var/named/chroot/var/named/dyn/testdns.com

Could you kindly let me know if this behavior is correct to have multiple entries in the forward zone on change of host name. What should prerequisite record check for while updating the record?

( Similar would be observed for reverse zone on change of IP Address i.e multiple IP point to same name. )


With Regards,
Nirav

Last edited by nsvora; 10-25-2006 at 10:01 PM.
 
Old 10-26-2006, 07:21 AM   #2
ARC1450
Member
 
Registered: Jun 2005
Location: Odenton, MD
Distribution: Gentoo
Posts: 290

Rep: Reputation: 30
Quote:
Originally Posted by nsvora
Hi All,

While testing the DDNS server configuration with proprietory client implementation for DHCP and DDNS, I noticed a strange thing. Any help here is appreciated.

Pre-condition:
----------------
DHCP and DDNS server are running on a single LINUX machine having following version:
Linux ns1.testdns.com 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:54:53 EST 2006 i686 i686 i386 GNU/Linux

The DHCP server was able to generate the dynamic IP Address as specified in the dhcpd.conf.
DDNS server was able to add the entries in the forward and reverse zone files eg : testdns.com and 1.168.192.in-addr.arpa
This ensures that DHCP and DDNS server settings are correct.

Test Condition:
---------------
I modified the client host name and restarted the named service so that changes are reflected in the zone files. The forward zone file was expected to be updated with the modified host name.

Results:
----------
Forward zone had two entries viz; one with old host name and other with new host name.

Analysis:
------------
I have found that this is happening because in DDNS client code,
before updating the server database with modified host name, we are checking whether a record with “new” host name exists. And server replies in negative for this ( which is correct ) and client adds a new record for the new host name.

But previous entry with the old host name is never deleted from the server.
So, observation was multiple host names pointing to same IP.

This check is done via “Prerequisite” record sent by the DDNS client. Since the prerequisite check fails, client doesn’t send request for deletion of the “old” host name entry.

Forward zone file :/var/named/chroot/var/named/dyn/testdns.com

Could you kindly let me know if this behavior is correct to have multiple entries in the forward zone on change of host name. What should prerequisite record check for while updating the record?

( Similar would be observed for reverse zone on change of IP Address i.e multiple IP point to same name. )


With Regards,
Nirav
No need to restart named. DDNS works by DHCP telling the DNS server "Hey, I have this host. . .here's the info. Oh, hey. . .this host hasn't replied back on it's lease, so delete it."

You changed a host name, never renewed the IP (so that DHCP knows what's going on), and restarted the DNS server. Throw enough wrenches into any situation and you'll get gawd-awful unexpected results.

Bottom line: next time, change the host name and renew the IP. That's all you need to do. DHCP and DNS will update accordingly, and change the serial number on your zone files so they propogate properly. Servers shouldn't be restarted, as the client changes will be almost immediate (again, as long as you renew the DHCP address), and if they're not, no big deal as it's just a name pointing to an IP. . .you'll get to the proper computer either way.

[edit]I forgot to add. . .it's best if you only either let clients update their own records or the DHCP server, but not both. IMHO, only let the DHCP server update records, as clients aren't exactly the greatest on cleaning up after themselves, and letting clients play with DNS isn't exactly the most secure thing in the first place.

Last edited by ARC1450; 10-26-2006 at 07:24 AM.
 
  


Reply

Tags
client, ddns


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
Linux DDNS (MDK8.1) by WinXP Client... ionreflex Linux - Networking 1 01-06-2006 07:21 AM
double entries at reverse zone by BIND 9 ccc Linux - Networking 0 01-08-2004 12:49 PM
linux client - DDNS w2000 server swatzy Linux - Networking 1 09-27-2003 01:11 AM
DDNS Client toW2K DNS akire1020 Linux - Networking 0 09-01-2003 06:44 AM
DDNS and 2 reverse zones - not at top of zone mule Linux - Networking 2 08-22-2003 01:06 AM


All times are GMT -5. The time now is 09:32 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration