Managing DHCP reservations
While we’re on the topic of DHCP and split-scopes, it would be good to mention reservations. Reservations are used to assign a DHCP client a specific IP address, controlled via MAC address. The value of this is that you get the benefit of dynamically assigning dedicated IP addresses while maintaining manageability of global options such as designated DNS servers. It’s much easier to change the IP address of a DNS server in a single DHCP scope than it is to change on dozens or hundreds of hosts. That said, I still firmly believe in static IP assignments for critical server functions. I wouldn’t want my production SQL cluster or domain controllers running with DHCP reservations, but for ILO/IPMI, less critical hosts, etc, why not? I have had great success using reservations on management devices.
The complication occurs when you throw split-scopes into the mix. Even though a given DHCP scope is carved among several servers and the reservations will fall within one of those splits, you still need to provide redundancy for the reserved hosts. This can be accomplished by entering the reservations on each DHCP server. This works because DHCP servers can still serve reservations that fall outside of their active address pool.
You could manually enter each reservation on each DHCP server, backup/restore the DHCP database, or write your own script. Luckily the Microsoft DHCP team has already written a script for us: the DHCP Reservation Tool. It’s a simple VB script that given the right arguments can copy, sync, dump, or enter from input file all defined DHCP reservations between the servers you designate. Download the script below and rename to .vbs. I annotated it to include the command syntax. The process is called by invoking the script with the Rmanager command followed by specifying the operation and arguments. See the remarks in the script or the DHCP team post for more specifics. This worked fine in my Server 2008 R2 environment. Example:
cscript dhcp_res_mgr.vbs Rmanager –sync <source IP> <Destination IP> <all>
References:
No comments: