Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This is the same problem asked here but there is no indication it was ever resolved for Eddie. Plus, I have already looked at the various answers and tried what was suggested without success.


I have a Linux box running a DHCP service (V3.0.7) and BIND9 (9.6.0-P1). I've configured it to have the DHCP service update the local DNS zone. The DNS updates are working perfectly for Windows and Mac clients but not for Linux (Debian Lenny and Ubuntu 8.10). Looking at the dhcp.leases file I see DDNS related information added for the leases handed out to Win and Mac clients but that information is not present for the leases handed out to he Linux clients. Lease file extract:

lease 192.168.10.199 {
  starts 4 2010/01/07 00:56:43;
  ends 5 2010/01/08 00:56:43;
  tstp 5 2010/01/08 00:56:43;
  binding state active;
  next binding state free;
  hardware ethernet 00:0c:e5:4d:9e:e9;
  uid "\001\000\014\345M\236\351";
  set ddns-rev-name = "199.10.168.192.in-addr.arpa.";
  set ddns-txt = "316ae6c100af725fdd91f9de7f200d6c7a";
  set ddns-fwd-name = "dell.mylocaldomain";
  client-hostname "dell";
}
lease 192.168.10.198 {
  starts 4 2010/01/07 05:14:39;
  ends 5 2010/01/08 05:14:39;
  binding state active;
  next binding state free;
  hardware ethernet 00:1c:42:e2:6f:4a;
  client-hostname "ubuntu";
}

Relevant part of dhcpd.conf:

authoritative;
ddns-updates on;
ddns-update-style interim;
ignore client-updates; # Have also tried allow client-updates, no change

update-static-leases on;
include "/etc/rndc.key";

zone mylocaldomain {
    primary 192.168.10.1;
    key rndckey;
}

zone 10.168.192.in-addr.arpa. {
    primary 192.168.10.1;
    key rndckey;
}

I've gone to the extend of stopping both the DHCP and DNS services and clearing out all information relating to the clients, such as leases and DNS records. The zone journal files were deleted and the services restarted. Upon forcing the clients to renew their leases I still have the same results.

What am I missing? Why are the Linux leases not updating DNS and why would it even matter what OS the clients have when it's the DHCP service that should be doing the updating?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

Is your Linux DHCP client asking for dynamic DNS update? I can't see any information in your question about that, and without it your Linux DHCP requests won't get DDNS registration on the server side. Look at the "DYNAMIC DNS" section in dhclient.conf(5) for details of the settings required.

share|improve this answer
    
I'll check that out but I was under the impressing the DHCP service should request the DNS update whether the client asks for it or not. That's certainly the behaviour I'm looking for and what the documentation and articles I've read so far suggest, without ever actually spelling it out. –  John Gardeniers Jan 7 '10 at 10:16
    
My experience is that unless the client asks for it, and provides the appropriate information, a DDNS update won't happen. The reason why it looks like the server will do the update regardless is that all clients except dhclient under linux ask for it by default. If you end up with a different experience, I'd be interested to hear about it, because it never worked as you describe for me. –  womble Jan 7 '10 at 21:36
    
It turns out that at least part of man dhclient.conf is correct, but much is misleading. I've been able to get this to work simply by editing dhclient.conf to send the hostname. None of the domain related bits are required. Nor are they desirable if you want this to work on different domains, as I do. The domain name is filled in by the DHCP service. –  John Gardeniers Jan 10 '10 at 21:50

My issue was with the A and PTR records for an Ubuntu 10.04 (Lucid) DHCP client not being updated on a Windows 2003 Server running both the DHCP and DNS services.

I found this thread with a web search for windows dhcp ddns linux client, so even if this doesn't solve the OP's problem, there's a good chance it will solve someone else's who came the way I did.

After examining the logs in C:\WINDOWS\System32\dhcp, I could see the DHCP→DNS updates happening for all the clients on our LAN except for the Ubuntu box, similar to John's description of his problem. Making me think that it was something the DHCP client had to request. (Even though I had explicitly ticked the option for "Always dynamically update DNS A and PTR records" in the DHCP server properties. Hmph.)

This post gave me the precise solution I needed:

send fqdn.fqdn "mymachine.mydomain";
send fqdn.encoded off;
#                 ^^^ not sure if this is essential, or even desired, but
#                     it worked, so I'm not complaining.
send fqdn.server-update on;
do-forward-updates on;
#                  ^^ which may be the default anyway

added to /etc/dhcp3/dhclient.conf did the trick. After renewing the lease, the DHCP-to-DNS update went right through for the Ubuntu client, just as it had for the Windows DHCP clients.

share|improve this answer

Were you guys able to dynamic updates working via linux dhclient?

I can get forward maps to update

# service network restart
Apr  7 15:25:24 i-d40976dd dhclient[26054]: Added new forward map from i-d40976dd.example.com. to 10.1.133.33

_

# dig i-d40976dd.example.com.

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.23.rc1.el6_5.1 <<>> i-d40976dd.example.com.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50517
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;i-d40976dd.example.com.    IN  A

;; ANSWER SECTION:
i-d40976dd.example.com. 300 IN  A   10.1.133.33

;; AUTHORITY SECTION:
example.com.    86400   IN  NS  ns2.example.com.
example.com.    86400   IN  NS  ns1.example.com.

;; ADDITIONAL SECTION:
ns1.example.com.    86400   IN  A   10.1.1.10
ns2.example.com.    86400   IN  A   10.1.1.11

;; Query time: 1 msec
;; SERVER: 10.10.142.120#53(10.10.142.120)
;; WHEN: Mon Apr  7 15:28:09 2014
;; MSG SIZE  rcvd: 131

I never see a reverse map get updated

# cat /etc/dhcp/dhclient.conf 
send fqdn.fqdn = "i-d40976dd.example.com.";
send fqdn.encoded on;
send fqdn.server-update off;
also request fqdn;

This client lives in AWS. I would like to use dhclient to update forward and reverse maps. I have auto-generated PTR records for hosts. That was good enough for awhile but we need PTR = A to allow KRB5 to work.

/Chris

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.