How to Migrate DHCP Service from Server 2016 to Server 2022

This post is to document the process to migrate DHCP service from Windows Server 2016 to Windows Server 2022, as well as the related DHCP Failover and DHCP Forwarding/IP-helper configuration. Microsoft’s DHCP services haven’t changed much in the past 20 years, it would be a similar procedure if you are using the old version such as Server 2008, Server 2012.

Environment

  1. Source: The DHCP service is hosted on the Windows Server 2016
  2. Destination: A couple of Server 2022 running DHCP failover with load balancing.
  3. Lease time (DHCP Option) on the Source server is configured to 2 hours prior to the schedule of the change window.

Migrate the DHCP Server from Windows Server 2016 to Windows Server 2022

1. On Source 1: Server 2016, open the DHCP console and clean up the inactive scopes, then export the DHCP Scope out, via run CMD as Administrator then

netsh dhcp server export C:\temp\dhcp.dat all

2. If your destination server is a brand new build and has nothing on it, you just need to install the DHCP server roles and “authorize” this server in the domain, in the below example my server has been authorized already.

3. If there are some scopes already configured on the destination DHCP server, we would suggest cleaning up the DHCP configuration. as of the source DHCP server, It would be great to remove the “inactive scopes” that sit there doing nothing.

4. Setup pre-defined DHCP options such as option 150 for Cisco IP phones or customized DHCP options for Cisco Access Points etc, otherwise you may encounter errors like below and bring down the DHCP service. You can find an example of DHCP Option 150 in our post here: https://ictfella.com/how-to-migrate-dhcp-service-from-cisco-core-switch-to-server-2022

5. Copy the exported “dhcp.dat” and import it on the new server, please run CMD as administrator to avoid any permission-related issues.

netsh dhcp server import c:\temp\dhcp.dat all

DHCP failover Configuration (Optional)

1.Right-click on the migrated Score and select “Configure Failover…”

2. By default the scope is ticked, click Next

3. Click “Add Server”, then choose your authorized secondary DHCP server, if your server is NOT in the list, please “authorize” your secondary server first.

4. Setup your failover relationship’s load balance configurations, you can “Enable Message Authentication”, then next

microsoft-configure-dhcp-failover-relationship-enable-message-authentication
microsoft-configure-dhcp-failover-relationship-enable-message-authentication

5. Review the config, then finish the failover configuration

microsoft-configure-dhcp-failover-summary
microsoft-configure-dhcp-failover-summary

DHCP Forward / IP Helper Configuration

Cisco switch IP helper-address, update/modify the IP helper configuration

conf t

interface Vlan2


! get rid of old config
 no ip helper-address 192.168.0.1  
 no ip helper-address 192.168.0.2

! put new servers into config
 ip helper-address 10.0.0.1
 ip helper-address 10.0.0.2

end

wr 

Juniper Switch DHCP forwarding

set forwarding-options dhcp-relay forward-snooped-clients all-interfaces
set forwarding-options dhcp-relay overrides allow-snooped-clients

del forwarding-options dhcp-relay server-group dhcp-srv 192.168.0.1
del forwarding-options dhcp-relay server-group dhcp-srv 192.168.0.2

set forwarding-options dhcp-relay server-group dhcp-srv 10.0.0.1
set forwarding-options dhcp-relay server-group dhcp-srv 10.0.0.2

set forwarding-options dhcp-relay active-server-group dhcp-srv
set forwarding-options dhcp-relay group all interface irb.2

Useful links

How to use the Netsh utility to export and import DHCP scopes

https://docs.microsoft.com/en-us/troubleshoot/windows-server/networking/netsh-utility-export-import-dhcp-scopes

Step-by-Step: Configure DHCP for Failover

https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh831385(v=ws.11)

Configuring the Cisco IOS DHCP Relay Agent

https://www.cisco.com/en/US/docs/ios/12_4t/ip_addr/configuration/guide/htdhcpre.html

3 thoughts on “How to Migrate DHCP Service from Server 2016 to Server 2022”

  1. see this here

    Your way of describing all in this post is truly pleasant, all
    be capable of without difficulty understand it, Thanks a lot.

  2. เรื่องราวความเชื่อ

    We stumbled over here by a different page and thought I may as well check
    things out. I like what I see so i am just following you.
    Look forward to going over your web page yet again.

  3. ซื้อหวยออนไลน์

    I am really thankful to the owner of this website who has shared this wonderful post at at this time.

Leave a Comment

Your email address will not be published. Required fields are marked *