Recipe 14.9. Enabling Dynamic DNS Updates from the DHCP ServerProblemYou want to configure the DHCP Server to perform dynamic DNS updates on behalf of clients. SolutionUsing a graphical user interfaceTo set the global dynamic DNS update configuration, do the following:
To set the dynamic DNS update configuration for a specific scope, do the following:
Using a command-line interfaceYou can configure all of the dynamic DNS update settings with netsh. This is the format for the command: > netsh dhcp server set dnsconfig <Enable> <Update> <DeleteOld> <Legacy> There are four bits (0 for off or 1 for on) corresponding to each flag. The first setting is for enabling dynamic updates. If the second flag is 0, A and PTR records are always updated, and if it is 1, they are updated only if requested. The third flag, when set to 1, deletes A and PTR records when leases expire. The fourth flag, when set to 1, will cause the DHCP Server to send updates even if the client doesn't support it. The following command enables dynamic updates (1), always performs dynamic updates (1), deletes records for expired leases (1), and does not perform updates for legacy clients (0): > netsh dhcp server set dnsconfig 1 1 1 0
Using VBScriptSee the Introduction for more information on how to run the netsh command from within a script. DiscussionDynamically assigning IP addresses to clients makes IP address management easier, but your clients may not always want to refer to other computers by IP address. If you are running the Windows Internet Naming Service (WINS) in your environment, client computers automatically register their names with that service, which allows users to use the NetBIOS protocol to resolve computer names. If you prefer to rely on the Domain Name System (DNS), clients will need to dynamically register their hostname via dynamic DNS updates. You could allow each client to register their own A and PTR records, but then each client would send its own set of DNS updates to your DNS servers. If you have hundreds of clients, that would be hundreds of computers that send dynamic updates. There are also some security issues with allowing clients to do this. Another option is to use the DHCP Server to send dynamic updates on behalf of clients.
See AlsoRecipe 14.19 |