Discussion Locked

dhcp dynamic dns registration

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,
I'm looking for some technical documentation that explains the interaction between dhcp and dns in detail. I've just disovered a problem whereby a customers dhcp server was set to always update on behalf of clients. Some machines, built on one subnet and subsequently moved to another, were periodically having their dns record revert back to the old ip. dns logging showed me that dhcp was periodically (midnight and around 1500 hrs) updating the records with the wrong address - note that throughout the workstation kept it's new address IE as far as I can tell this has nothing to do with the client. /registerdns on the workstation would re - register the correct record, but sure as eggs is eggs it would be overwritten by the dhcp server later in the day. the update occurs at the same time as event messages 1037 1038 and 1039 from the dhcpsvc stating that it was 'cleaning up the database'. Im happy that i've found the cause - my question is why is this happening.after all, the client has TWO entries on the dhcp server in different scopes - both of which are set to auto update dns. Why should dhcp favour the older record? If someone has come across this before then great, if not where can I find some indepth technical info about the process - and I mean in detail, like what citeria the dhcp scope uses when updating existing records - real step by step stuff. I've already trawled through the dhcp docs and technet without finding what i need. Hope all this makes sense....

6 replies

by ronypp

by maxwell edison

DHCP and DNS Introduction

DHCP provides centralized configuration and maintenance of IP addresses. It enables the configuration of clients from a single location. DHCP permits IP address "leases" to be dynamically assigned to workstations, eliminating the need for static IP address allocation. Servers implementing DHCP server functionality maintain pools of available IP addresses.

When a DHCP client workstation boots, it broadcasts a DHCP request asking for any DHCP server on the network to provide it with an IP address and configuration parameters. A DHCP server on the network that is authorized to configure this client will offer an IP address by sending a reply to the client. Upon receiving this offer, the client may decide to accept it or it may wait for additional offers from other servers on the network. Ultimately, the client accepts an offer and sends a request to accept the offer made by the server. The server will then send an acknowledgment with the offeredIP address and any other configuration parameters that the client might have requested.
The IP address offered to the client has an associated lease time. The lease time dictates the length of time that the IP address is valid. During the lifetimeof the lease, the client will repeatedly ask the server to renew. If the client chooses not to renew or if the client machine is shut down, the lease will eventually expire. Once the lease expires, the IP address can be recycled and given to anothermachine.

DNS is a hierarchical tree structure with a single root node. A naming authority owns each node in the tree; the owner can create any number of child nodes, each of which must have a unique name. A domain is any node and all of its descendant nodes (called subdomains). A domain name uniquely identifies a single node within a domain.

(continued..)

by maxwell edison

Example: An Internet web server might have a network name of "http://www.constel.cygsoft.com." In this instance, the domain name is "cygsoft.com", designating the entire enterprise. The subdomain would be "constel" and might define a product line within the enterprise. Finally "www" identifies the particular node (in this case, a Web server) within the constel subdomain.

Domain name requests convert network names into corresponding network addresses. A Domain Name request is first to the local nameserver in the network hierarchy, with the IP address of this nameserver typically configured in each workstation's TCP/IP software. If this nameserver cannot answer the query, it forwards the request to a higher-level nameserver. This nameserver may then either resolve the name itself, or obtain information from a nameserver unknown to the original requester.

Example: the constel and manageip subdomains may have nameservers at the same level in the DNS hierarchy, but the only way that users in constel can obtain name information from the manageip nameserver would be to request it via the cygsoft.com higher-level nameserver.

http://www.cygsoft.com/solutions/desc.htm

(REMOVE SPACES from the pasted URL.)

-------More links of interest-------

How DHCP Works

http://www.ehsco.com/reading/19960515ncw3.html

DHCP (Many additional related links)

http://www.webopedia.com/TERM/D/DHCP.html

DHCP and DNS in Windows 2000

http://techupdate.zdnet.de/story/0,,t427-s2104399,00.html

DHCP to DNS

http://www.linuxgazette.com/issue74/tag/3.html

Integrating DHCP and DNS

http://safari.oreilly.com/main.asp?bookname=dhcpwin2000&cnode=76

Configuring a Microsoft Windows 2000 DHCP and DNS Server

http://solutions.brother.com/Library/pdf/configure_W2K_DHCP.pdf

(REMOVE SPACES from the pasted URL.)

Maxwell

by maxwell edison

I also found a rather interesting article on how a DHCP client sends the update to add to A record, while its DHCP server sends the update to add a different PTR (client pointer) record. It appears that it describes what is happening in your case. (I found it, of all places. on a linux site.)

An excerpt from that article:

Nowadays, both Windows 2000 clients and servers use DNS. A Windows 2000 client with a static IP address registers its name-to-address and address-to-name mappings by sending dynamic updates. One update adds the client's address (A) record and another adds the client's pointer (PTR) record. For example, a client called host.a.example with the address 10.0.0.1 would send updates to add the two records, as illustrated in Figure One.

(See article for example)

The first of these records maps host.a.example's domain name to the address 10.0.0.1. The second maps the address 10.0.0.1 to the domain name host.a.example. Both records are necessary to ensure correct forward- and reverse-mapping.

A Windows 2000 client with a dynamic IP address (running DHCP) also registers its name-to-address mapping, but by default its DHCP server registers the client's address-to-name mapping. In other words, the DHCP clientsends the update to add the A record, while its DHCP server sends the update to add the appropriate PTR record.

An administrator can also configure the DHCP server to handle sending all dynamic updates. This is meant for use with DHCP clients that lack the ability to update their own name-to-address mappings but works with Windows 2000 DHCP clients also. The server sets a special DHCP option that tells the client, "Just relax -- I'll do all the work." Then the DHCP server sends the updates to add the A and PTR records.

(continued..)

by maxwell edison

Windows 2000 clients set dynamic update prerequisites when adding A records. Prerequisites allow an updater to specify conditions that must hold before the update is applied. For instance, the updater could specify that the A record for host.a.example that was shown earlier should be added only if the domain name host.a.example doesn't already have an A record associated with it, or only if the domain name host.a.example doesn't already exist. In fact, this is very similar to the prerequisites actually specified by Windows 2000 clients, which are:

1. The domain name of the client must not already own an address record.

2. The domain name of the client must not be an alias.

What happens when a Windows 2000 client's update is denied because a prerequisite isn't satisfied? Well, if there's a conflicting A record, the client deletes the offending record and tries again. Why? Well, the A record could be an old record that the client added, and didn't later delete, when it had a different name-to-address mapping.

A link to the article:

http://www.linux-mag.com/2001-03/bind_02.html

(REMOVE SPACES from the pasted URL.)

Note: The link provided is to page two of a six page article.

Good luck,

Maxwell

This discussion is closed to new replies.