onsdag 8 oktober 2008

dynamic DNS clients is not registering when using non Microsoft DHCP-server

scenario:
the clients are getting their DHCP-leases from a non-microsoft server and is using the DNS-server in server 2003 as DNS.

problem:
no clients are updating their A RR:s in DNS.


accordning to Microsoft, with the default settings, all versions of windows from 2000 and up should register their own A records and ask the DHCP-server to update the corresponding PTR-records.




but in my case, this didn't happen. i verified that it wasnt a permissions error by setting a static IP and saw that the records got registered.


today after tearing my hairs out for months i finally figured out that the "ask the DHCP-server to register"-part is the culprit.



from this draft http://tools.ietf.org/html/draft-ietf-dhc-dhcp-dns-12:
"If a client that owns/maintains its own FQDN wants to be responsible for updating the FQDN to IP address mapping for the FQDN and address(es) used by the client, then the client MUST include the Client FQDN option in the DHCPREQUEST message originated by the client. A DHCP client MAY choose to include the Client FQDN option in its DISCOVER messages as well as its REQUEST messages. The rightmost ("S") bit in the Flags field in the option MUST be set to 0.

the client sets the 0x00 flags and wants to register its own A-records:


okey, i knew that. but why is it not updating?


then i found this:
"Even, if the Client FQDN option carried in the DHCPREQUEST message has its Flags field set to 0 (indicating that the client wants to update the A RR), the server MAY (under configuration control) update the A RR. The update MUST be originated following the procedures described in Section 5.4. The server MAY originate the update before the server sends the DHCPACK message to the client. In this case the RCODE from the update [RFC2136] MUST be carried to the client in the RCODE2 field of the Client FQDN option in the DHCPACK message, and the Flags field in the Client FQND option MUST be set to 3."

the server replies back with the flags 0x03 which tells the client NOT to update its records, because the server will do this for him.



so XP and Vista is following the RFC-draft but the DHCP-server (who has the ability to register the RR's) tells the client not to do it!



aah, the satisfaction of solving a hard problem. can't beat it :)

3 kommentarer:

Christine sa...

Hi Robin,

Great post, I've been investigating the exact same thing. So the next questions is -- did you figure out a work-around?

robin engström sa...

Christine:

Yeah, it's an option on the DHCP server. Disable it and the clients will correctly register themselfs in the Windows DNS.

ch.haller sa...

@Robin
Could please tell me which option this is, and where to find it?!
We've been looking at the same problem for months!
Much appreciated, thanks.