LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-08-2007, 02:50 PM   #1
ElMoRsA
LQ Newbie
 
Registered: Sep 2007
Posts: 3

Rep: Reputation: 0
Exclamation Dynamic DNS + DHCP.


I'm currently running bind 9.3.4 and isc-dhcp 3.0.4 under Debian. I have managed to get DDNS working, and the first time they connect they get added to the reverse and forward zone OK:

DHCPREQUEST for 10.1.130.253 from 00:18:fe:9b:5a:05 via eth2
DHCPACK on 10.1.130.253 to 00:18:fe:9b:5a:05 (impre03B04) via eth2
Added new forward map from ws7186.example.com to 10.1.130.254
added reverse map from 254.130.1.10.in-addr.arpa. to ws7186.example.com



The thing is that this dhcp + ddns will be working within a huge network with different vlans (one vlan per floor). So imagine a printer, which is configured to obtain IP via DHCP, moves from one floor to another. The thing is that this entry WONT be updated, it will just say:

DHCPDISCOVER from 00:18:8b:19:75:63 via 10.1.112.1
DHCPOFFER on 10.1.112.254 to 00:18:8b:19:75:63 (ws7186) via 10.1.112.1
Forward map from ws7186.example.com to 10.1.112.254 FAILED: Has an A record but no DHCID, not mine.


(Notice the IP changed between them).

The thing is the forward zone is never updated, it keeps getting that "Has an A record but no DHCID, not mine" error.
Is there a way dhcpd could delete the previous entry and add the new updated one ?.

I will now paste my relevant parts of dhcpd.conf:

ddns-update-style interim;
deny-client-updates;
ddns-updates on;
update-static-leases on;
ddns-ttl 1;
one-lease-per-client on;
# allow unknown-clients;
ddns-domainname "bsas.example.com";
ddns-rev-domainname "in-addr.arpa.";
# authoritative;
do-forward-updates on;
# ddns-update-style interim;
# ddns-ttl 30;
# update-static-leases on;



And this is my named.conf:

(The dynamic zone being updated):

zone "bsas.example.com" {
type master;
file "dynamic/bsas.example.com";
# allow-update { key "rndc-key"; };
allow-transfer { key "rndc-key";
internal-servers;
mrecar-servers;
};

update-policy {
grant * self * A TXT;
};


I don't thing anything else from named.conf as i have already test it with nsupdate and have no issue at all deleting/adding new entries to the reverse and forward zones.

Any help would be VERY appreciated.

Regards, Francisco.

Last edited by ElMoRsA; 09-08-2007 at 02:52 PM.
 
Old 09-09-2007, 01:47 PM   #2
andrewdodsworth
Member
 
Registered: Oct 2003
Location: United Kingdom
Distribution: SuSE 10.0 - 11.4
Posts: 347

Rep: Reputation: 30
Have you tried making the lease times shorter?
 
Old 09-10-2007, 11:14 AM   #3
ElMoRsA
LQ Newbie
 
Registered: Sep 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by andrewdodsworth View Post
Have you tried making the lease times shorter?
I have set the default values VERY low:

default-lease-time 600;
max-lease-time 6400;


Still not udpdating the hosts ip's.

You think that if the lease finishe's then it should delete the entry on the forward record and add it again ?

Regards,
Francisco
 
Old 09-10-2007, 12:41 PM   #4
andrewdodsworth
Member
 
Registered: Oct 2003
Location: United Kingdom
Distribution: SuSE 10.0 - 11.4
Posts: 347

Rep: Reputation: 30
I thought that would happen. Had a look at my own confs and read the man pages. I think possibly, unless your syntax is totally different that
Quote:
deny-client-updates;
should be
Quote:
ignore client-updates;
. In any case in my setup I have 'allow client-updates;' Apart from trying that I'm out of suggestions - my setup is very simple - single DHCP/DNS server.
 
Old 09-10-2007, 02:17 PM   #5
ElMoRsA
LQ Newbie
 
Registered: Sep 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by andrewdodsworth View Post
I thought that would happen. Had a look at my own confs and read the man pages. I think possibly, unless your syntax is totally different that
should be . In any case in my setup I have 'allow client-updates;' Apart from trying that I'm out of suggestions - my setup is very simple - single DHCP/DNS server.
I've found that both syntax's are similar, and they both cause the same effect. Indeed this didn't make the dynamic dns to work neither, but at least i got a better dhcpd.conf =)

Now i've found that the function of dynamic dns is given by dhcpd.conf scripting.

I reached this website: where they say that this code would do the trick. I have already added it to the dhcpd.conf but with no luck at all. Maybe im missing something for the forward zone as the reverse is working great with this patch:

Code:
option oe-key     code 159 = string;
option oe-gateway code 160 = ip-address;

on commit {     
  if (not static and
      ((config-option server.ddns-updates = null) or
       (config-option server.ddns-updates != 0))) {

      if exists oe-key {                                            
        set ddns-rev-name =                                                 
           concat (binary-to-ascii (10, 8, ".",                            
                                     reverse (1, leased-address)), ".",     
                    pick (config-option server.ddns-rev-domainname,         
                          "in-addr.arpa."));

        set full-oe-key = option oe-key;

        switch (ns-update (delete (IN, 25, ddns-rev-name, null),
                            add (IN, 25, ddns-rev-name, full-oe-key,
                                lease-time / 2)))           
        {                                                           
        default:                                                    
          unset ddns-rev-name;                              
          break;                                                    
        case NOERROR:                                       
          on release or expiry {                                    
            switch (ns-update (delete (IN, 25, ddns-rev-name, null))) {
            case NOERROR:                               
              unset ddns-rev-name;                                  
              break;                                        
            }                                               
          }
        }                                                           
      }
  }                                                         
}
And now I get:

dhcpd: if ws7186.example.com IN TXT "31689186b29fce25f991728d8ec3e3b2af" rrset exists and ws7186.mrec.ar IN A 10.1.125.254 rrset exists delete ws7186.example.com IN A 10.1.125.254: success.
dhcpd: if ws7186.example.com IN A rrset doesn't exist delete ws7186.example.com IN TXT "31689186b29fce25f991728d8ec3e3b2af": success.
dhcpd: removed reverse map on 254.125.1.10.in-addr.arpa.

I insist that i've already probed that i can update any entry on the zone's, adding or deleting via nsupdate.

Thanks again,

Francisco
 
Old 12-02-2010, 06:37 PM   #6
Chrinux
LQ Newbie
 
Registered: Dec 2010
Posts: 1

Rep: Reputation: 1
Try this DHCP option
update-conflict-detection false;
 
1 members found this post helpful.
  


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
Dynamic DHCP/DNS on Mandrake 10 ahelm Linux - Networking 3 06-28-2004 01:09 AM
dynamic DNS DHCP droguin Linux - Networking 0 05-27-2004 10:47 AM
DHCP with Dynamic DNS mmontanaro Linux - Newbie 1 01-23-2004 03:04 PM
DHCP with Dynamic DNS mmontanaro Linux - Networking 2 12-23-2003 07:44 AM
Dynamic DNS for DHCP neovox Linux - Networking 0 03-23-2001 03:56 PM


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

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