Articles and news

Microsoft Windows Articles and News
Welcome to Articles and news Sign in | Join | Help
in Search

Using DHCPEXIM and netsh to migrate DHCP scopes to a Windows 2003 Server DHCP server


DHCP in Windows Server is one of those little thought about services that do not get much attention unless you are setting up a new DHCP server, configuring a DHCP scope, or migrating to another physical server.

 So just how do you go about migrating a Server or Scope from Windows NT Server, Windows 2000 Server or Windows 2003 server to a new Windows 2003 Server? The tools used and procedure depends on what version of Windows you are migrating from.

If you are Migrating from either Windows NT Server 4.0 or Windows 2000 Server DHCPEXIM is used for the export and netsh used for the import into Windows  Server 2003 where as if you are going from Windows Server 2003 to Windows Server 2003 netsh is used for both the export and import.

The entire procedure involves the following steps:

·         Compact the DHCP Database (Only required for Windows NT and Windows 2000)

·         Export DHCP Database & DHCP Configuration (Windows NT 4.0 and 2000 Server DHCPEXIM) ( Windows  Server 2003 netsh)

·         Import DHCP Configuration and Database into Windows Server 2003 (Use Netsh) 

 

Compact the DHCP Database

 

This first step is only required for Windows NT 4.0 and Windows 2000 Server and is outlined below:

 

1.       You first need to stop the DHCP Server Service this can be achieved by running the following command from the command prompt.  (Start Run CMD Press enter)

Net stop dhcpserver  <press enter>

 

2.       This second step involves running the jetpack command against your DHCP Database, open a command prompt (Start Run CMD Press enter) and run the following commands

Cd %systemroot%\system32\dhcp     <press enter>

Jetpack dhcp.mdb TempFileName.mdb <press enter>

 

 

Figure 1: Compacting the DHCP.mdb Database

 

Export the DHCP Database

 

This part is broken down into two sections Exporting the DHCP Database from Windows NT 4.0/ Windows 2000 Server and Exporting the DHCP Database from Windows Server 2003

 

Exporting the DHCP Database from NT 4.0 and Windows 2000 Server

 

In the entire process of migrating a DHCP server the export of the DHCP Database for both NT 4.0 and Windows 2000 Server requires use of the Server Resource Kit tool DHCPEXIM, DHCPEXIM is also available as a separate download from the following URL:

http://support.microsoft.com/kb/927229

First begin by downloading and installing DHCPEXIM.

 

Once installed run DHCPEXIM.exe from the following location C:\Program Files\Resource Kit  you would be presented the start window as seen below in figure 2

 

1.       As shown in figure 2 below select Export configuration of the local service to a file

 

Figure 2: DHCP Export Import Tool start Window

 

 

2.       On the export to file window (figure 3 below) select the path and name of the export file.

 

Figure 3: DHCP Export to file window

3.      Finally as seen in figure 4 select the scope/s that you want to migrate, if you are migrating the entire server then select all scopes. Also ensure that you check the checkbox Disable the selected scopes on local machine before export, then click Export.

 

Figure 4: DHCPEXIM Scope Selection Window

 

If you are exporting all of the scopes you may want to consider disabling the DHCP Server Service, so that the service will no longer start.

 

 

Exporting the DHCP Database from a Windows Server 2003 DHCP Server

 

To export the DHCP Database from a Windows Server 2003 DHCP server is performed via the use of the netsh command, as follows:

 

1.       Open a command prompt Start in the Run box type cmd press Enter

2.       In the command prompt type the following command

Netsh dhcp server export c:\temp\dhcpServerName.txt all <press enter>

               

You have now successfully exported the DHCP database and configuration from Windows Server 2003, copy this export text file to your import server and you can continue to the Import section below,

 

Importing the DHCP Database and configuration into a Windows Server 2003 DHCP Server

 

To start this task requires that you have the DHCP Server Service installed.

 

1.       First ensure that you have the DHCP Server Service installed, this service is started.

 

2.       Open a Command Prompt (Start Run Type cmd Press enter)

 

3.       Type and run the following command in the command prompt

 

Netsh dhcp server import c:\temp\dhcpServerName.txt all  <Press Enter>

 

4.       Finally open the DHCP Admin tool and check all scopes if all is ok, in the DHCP Admin tool where you see the server name right click and select Authorize as shown in figure5 below

Figure 5: Authorize DHCP Server

 

You have now completed migrating your DHCP Server, please post any comments or suggestions below. In addition if you have any article suggestions please send them to me via the contact link/form.

 

Related Articles

WindowsIS.com

   Requirements for 64 bit Guest Virtualization

ExchangeIS.com

  AD and Exchange InterOrg Migration A Real World Example Part 1

  Using ADModify – A Real World example

  Using CSVDE – A Real World Example

Published Tuesday, 12 June 2007 10:50 AM by ben hoffman

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Jaane Kyon said:

Excelent Doc, thanks heaps :)

April 9, 2008 4:09 PM
 

Steven Shue said:

I'd like to ask about Microsoft's suggestion and how it's different from yours.  Microsoft http://technet2.microsoft.com/windowsserver/en/library/4207a8c1-2788-4be8-b9f8-ce28501a24571033.mspx?mfr=true suggests doing a backup and restore.

Is there any real difference between export/import and backup/restore?

I'm looking to rebuild a domain controller and want to be sure I'm getting everything for DHCP so I don't need to manually configure settings when the config is complete.

--Steven M. Shue

sshue@spunkmeyer.com

May 6, 2008 7:55 AM
 

Abhishek said:

Can we migrate more than one windows 2000  DHCP server into one windows 2003  DHCP server..??

May 16, 2008 10:38 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server (Commercial Edition), by Telligent Systems