After configuring DHCP scope, the next tasks that you probably need to do is setting up DHCP reservation. DHCP reservation ensures that a specific DHCP client to always get the same IP address. It’s very useful for some clients that needs fixed IP address without static IP configuration. In this post, we’re going to learn to Configure DHCP Reservation in Windows Server 2012 R2.
How to Configure DHCP Reservation in Windows Server 2012 R2
In order to Configure DHCP Reservation in Windows Server 2012 R2, you will need the MAC address information of the client machine. MAC address information can be obtained from the machine directly.
To set up reservation, open DHCP console from Server Manager.
Select the related scope and right click > New Reservation.
Enter the reservation name, the IP address you want to assign, and client’s MAC address. In this example we want to give IP address 192.168.0.240 for client machine with MAC address of 3c-97-0e-1c-8a-55. Notice that MAC address is written without any special character. Click Add button then close the new reservation window
To see list of reservation that we have created, go to Reservation folder under that same scope.
This way when this specific client performing DHCP request, the server will give the configured IP address.
Configure DHCP Reservation from an Existing Lease
You can also set up DHCP reservation from an existing lease. To do that, go to address leases folder > right click on the lease entry that you want > select Add to Reservation.
Click OK on the notification that appears.
This way you can create reservation without having to find out the client’s MAC address as it is already recorded in the server. However this can only be done after the client is connected and given an IP address by the server.
Modifying DHCP Reservation
Any DHCP Reservation that has been made can also be modified. For example if you need to assign a reserved IP address for another client machine. To do that, expand the Reservation folder under the related scope, then right click on the related reservation entry > Properties.
You can change the reservation name and MAC address but you can’t change the IP address.
If you somehow need to use the same MAC address but using a different IP address, you must delete the reservation and create a new reservation using the populated MAC address information.
DHCP Reservation in Windows Server 2012 R2 using PowerShell
In Windows Server 2012 R2, we can also use PowerShell to create the DHCP reservation. The PowerShell command to create the DHCP reservation is:
Add-DhcpServerv4Reservation -ScopeId [SCOPE] -IPAddress [IP_ADDRESS] -ClientId [MAC_ADDRESS] -Description [DESCRIPTIVE_TEXT]
Replace all the variables in brackets with the value according to your case. For this example, the command that we use to create the same reservation as previous example is:
Add-DhcpServerv4Reservation -ScopeId 192.168.0.0 -IPAddress 192.168.0.54 -ClientId 00-0C-29-AF-6E-B8 -Description “WKS003.mustbegeek.com”
Whether using Server Manager or PowerShell, when you set a DHCP reservation, the client machine may need to perform a manual release and renew DHCP lease. To do that, you can use command ipconfig /release and ipconfig /renew directly from command line on the client machine.
And that’s how you configure DHCP reservation in Windows Server 2012 R2.