Tag Archives: DHCP Scope

STEP-BY-STEP GUIDE TO MIGRATE DHCP FROM WINDOWS SERVER 2003 TO WINDOWS SERVER 2012 R2 USING WINDOWS SERVER MIGRATION TOOLS

Microsoft has already announced that windows server 2003 / windows server 2003 R2 versions support is coming to end in 14th July 2015 (http://support2.microsoft.com/lifecycle/search/default.aspx?sort=PN&alpha=Microsoft+Windows+Server+2003&Filter=FilterNO ).

It’s no wonder that still organizations using windows server 2003 / windows server 2003 R2 in their infrastructure with different server roles.

With windows server 2008 R2 Microsoft has introduce new great feature called “Windows Server Migration Tools” which will  allow administrators to migrate server roles, features, configuration settings seamlessly from one system to another(ex- windows server 2003). Windows server 2012 also includes this feature and in this article I will demonstrate how we can use it to migrate DHCP role to windows server 2012 r2.

Please note, To use this method we need to install this feature in both source and destination servers.

For the demonstration I am using following setup

Server Name

Operating System

Server Roles

Networks

dhcp-2k3.canitpro.local

Windows Server 2003 R2 Enterprise x86

DHCP

Network A – 10.10.10.0

Network B – 172.16.25.0

Network C – 192.168.148.0

CANITPRO-DC2K12.canitpro.local

Windows Server 2012 R2 x64

Before start the migration process it’s important to consider on following.

1)    To migrate the roles you need to log in to source and destination servers as “Domain Administrators”.
2)    Before start the migration process make sure source and destination servers’ runs with latest updates and service packs.
3)    If the source server runs with multiple network, multiple NIC make sure the destination server also have same number of NIC so it can be server with same network setup.

dhcp-2k3.canitpro.local server currently setup with 3 additional NIC to represent network A,B and C. those have configured with static ip addresses to match with relevant network it belongs to. The DHCP server host different DHCP scopes for each network.
Before we start the process we need to install the following software in windows server 2003(dhcp-2k3.canitpro.local) if it’s not there already.

1)    .Net Framework 3.5 (http://www.microsoft.com/en-us/download/details.aspx?id=21)
2)    Windows PowerShell 2.0 (http://support2.microsoft.com/kb/968929/en-us)

Install Windows Server Migration Tools in windows server 2012

1)    Log in to the Windows server 2012 as Domain Administrator
2)    Go to Server Manager > Add Roles and Features

dmig1

3)    It will open the Add roles and features Wizard and click next to start the process
4)    In next window, for the installation type select “Role-based or feature-based installation”  then click next to continue

dmig2

5)    In next window keep the default server selection and click next to continue

dmig3

6)    Then it will give option to select server roles but we need to install only a feature. So keep the default selection and click next to continue.

dmig4

7)    Then in features selection, select “Windows Server Migration Tools”  and click next to continue

dmig5

8)    In next window it will give the confirmation window and click on install to begin the installation process

dmig6

9)    Once installation is completed click on close to exit from the wizard

Prepare windows server migration tools for windows server 2003

1)    Log in to the Windows server 2012 as Domain Administrator
2)    Go to Server Manager > Tools > Windows Server Migration Tools > Windows Server Migration Tools

dmig7

3)    It will open up the command prompt and then type cd ServerMigrationTools

dmig8

4)    Now we need to create migration deployment package for windows server 2003. To save the files I have create folder “C:\WIN2K3MIG”. Now type the command .\SmigDeploy.exe /package /architecture x86 /os ws03 /path C:\WIN2K3MIG and press enter

dmig9

5)    This creates the package as following

dmig10

6)    Now we need to copy the folder C:\WIN2K3MIG\SMT_ws03_x86 to windows server 2003 which host the DHCP role

Prepare windows server 2003 (DHCP Source) for the migration

1)    Log in to the Windows server 2003 as Domain Administrator
2)    Go to Start > All Programs > Accessories > Windows PowerShell > Windows PowerShell

dmig11

3)    Then type “Net stop “DHCP Server”” and enter

dmig12

4)    This will stop the running DHCP server. Then open the folder copied from windows server 2012 R2 and then open the file called “SmigDeploy.exe

dmig13

5)    Then it will open up the command window. Then type Get-SmigServerFeature and press enter

dmig14

6)    This will examine the roles running on this server and provide list of roles which we can migrate over to windows server 2012 R2
7)    Now it’s time export the DHCP data using the tool. Before do it we need to prepare a share folder in network which will have access from both DHCP Source Server and DHCP Destination Server. I have create folder called “DHCPShare” in windows server 2012 and share it with read and write NTFS permissions.

dmig15

8)    Type the command Export-SmigServerSetting -featureID DHCP -User All -Group -path \\Canitpro-dc2k12\DHCPShare -Verbose and press enter to export the DHCP data. In here featureID define the server role. Once enter the command it will ask a password to protect the data.

dmig16

9)    Now in the share we can see it created the backup file.

dmig17

With this step it will successfully exports the DHCP data.

Remove DHCP roles from windows server 2003 R2

Since we no longer need DHCP role running on this server we can go ahead and uninstall the DHCP service.

1)    Log in to the windows server 2003 as member of administrator group
2)    Start > Control Panel > Add or Remove Programs

dmig18

3)    Then click on “Add/Remove Windows Components

dmig19

4)    In next window select “Networking Services” and click on details

dmig20

5)    From next window de-select the DHCP option and click ok

dmig21

6)    Then click next to uninstall the DHCP service


It will uninstall the DHCP role from the windows 2003 server.

Install DHCP Role in windows 2012 R2 server

1)    Log in to the windows server 2012 as member of administrator group
2)    Open Server Manager > Add Roles and Features

dmig22

3)    It will open the wizard and click next to continue
4)    For the installation type select “Role-based or feature-based installation” and click  next

dmig23

5)    Let the default selection run on server selection and click next to continue

dmig24

6)    For the server roles select DHCP and it will prompt to add relevant features. Click on “Add features” to add them and next to continue

dmig25

7)    For the features let it run with default. Click next to continue
8)    Then it will give brief description about DHCP server role and click next to continue

dmig26

9)    Next window it will give the confirmation and click on install to continue

dmig27

This will install the DHCP server role in the new server.

Import DHCP server data in to windows server 2012 R2

1)    Log in to the Windows server 2012 as Domain Administrator
2)    Open Windows Powershell using Server manager > Tools > Windows Powershell
3)    Type “Net stop “DHCP Server”” and press enter

dmig28

4)    Then type Add-PSSnapin microsoft.windows.servermanager.migration and press enter to use the migration tools command set.

dmig29

5)    Now to import DHCP data type Import-SmigServerSetting -featureID DHCP -Force -path C:\DHCPShare -Verbose (Note: Here I didn’t import the users or groups as its domain controller I am importing to but if necessary you can do it using –Users and Group command) and press enter. Here C:\DHCPShare is the folder path where we save the DHCP data from windows server 2003. It will ask the password to enter which we have define during the export DHCP server data process.

dmig30

6)    Then type Start-Service DHCPServer and press enter to start the DHCP server

dmig31

7)    Then authorize the DHCP server with command Netsh DHCP add server CANITPRO-DC2K12.canitpro.local 38.117.80.124

dmig32

Note : If the source DHCP server had multiple NIC with Multiple networks make sure the new server also match the same config. Assign the static ip address to those interfaces to match the configuration. This also can automated during the import process. You can get more info about command option in http://technet.microsoft.com/en-us/library/dn495425.aspx

Now we completed with the restore process and I already can see its issues IP addresses.

dmig33

STEP-BY-STEP GUIDE TO MIGRATE DHCP FROM WINDOWS SERVER 2003 TO WINDOWS SERVER 2012 R2

Microsoft has already announced that windows server 2003 / windows server 2003 R2 versions support is coming to end in 14th July 2015 (http://support2.microsoft.com/lifecycle/search/default.aspx?sort=PN&alpha=Microsoft+Windows+Server+2003&Filter=FilterNO ).

It’s no wonder that still organizations using windows server 2003 / windows server 2003 R2 in their infrastructure with different server roles. In last few post I have covered up how we can migrate different server roles from windows server 2003 to latest windows server 2012. This article also a part of the same series and it will explain how we can migrate DHCP server role.

For the demonstration I am using following setup

Server Name

Operating System

Server Roles

Networks

dhcp-2k3.canitpro.local

Windows Server 2003 R2 Enterprise x86

DHCP

Network A – 10.10.10.0

Network B – 172.16.25.0

Network C – 192.168.148.0

CANITPRO-DC2K12.canitpro.local

Windows Server 2012 R2 x64

dhcp-2k3.canitpro.local server currently setup with 3 additional NIC to represent network A,B and C. they have configured with static ip addresses to match with relevant network it belongs to. The DHCP server host different DHCP scopes for each network.

Backup DHCP configuration in windows server 2003 R2

1)    Log in to the windows server 2003 as member of administrator group
2)    Load the DHCP server console Start > Administrative Tools >  DHCP

dhcp1

3)    In here we can see the configured DHCP scopes

dhcp2

4)    Now it’s time to back up the config. To do that open the command prompt using start > run > type cmd and then enter
5)    Then type netsh dhcp server export C:\DHCPbk\dhcpbk.txt all and press enter. In here C:\DHCPbk\dhcpbk.txt is the file path which backup will save in to. It can change according to your requirement.

dhcp3

6)    Now please move file C:\DHCPbk\dhcpbk.txt in to CANITPRO-DC2K12.canitpro.local server which will be configured as new DHCP server ( windows server 2012 R2)

Remove DHCP roles from windows server 2003 R2

Since we no longer need DHCP role running on this server we can go ahead and uninstall the DHCP service.

1)    Log in to the windows server 2003 as member of administrator group
2)    Start > Control Panel > Add or Remove Programs

dhcp4

3)    Then click on “Add/Remove Windows Components”

dhcp5

4)    In next window select “Networking Services” and click on details

dhcp6

5)    From next window de-select the DHCP option and click ok

dhcp7

6)    Then click next to uninstall the DHCP service

It will uninstall the DHCP role from the windows 2003 server.

Install DHCP Role in windows 2012 R2 server

1)    Log in to the windows server 2012 as member of administrator group
2)    Open Server Manager > Add Roles and Features

dhcp8

3)    It will open the wizard and click next to continue
4)    For the installation type select “Role-based or feature-based installation” and click  next
5)    Let the default selection run on server selection and click next to continue
6)    For the server roles select DHCP and it will prompt to add relevant features. Click on “Add features” to add them and next to continue

dhcp9

7)    For the features let it run with default. Click next to continue
8)    Then it will give brief description about DHCP server role and click next to continue

dhcp10

9)    Next window it will give the confirmation and click on install to continue

dhcp11

This will install the DHCP server role in the new server.

Restore DHCP configuration

1)    Log in to the windows server 2012 as member of administrator group
2)    Open Command prompt with Run > cmd
3)    Type netsh dhcp server import C:\DHCPbk\dhcpbk.txt all and press enter. In here C:\DHCPbk\dhcpbk.txt is the backup file we copied from windows 2003 server.

dhcp12

4)    Go to Server manager > tools > DHCP

dhcp13

5)    Right click on the server name > All Task > Restart

dhcp14

6)    Once Restart done we can see all the scopes are visible which was in 2003 server.

dhcp15

7)    We still need to authorize the dhcp server, to do it again right click on server name and select authorize

dhcp16

Now we completed with the restore process and I already can see its issues IP addresses.

dhcp17

if any questions about the post feel free to contact me on rebeladm@live.com
 

Step by Step Guide to install DHCP role and configure

Let’s see how we can configure DHCP server in a Windows Server Environment. For the demo I will be using Windows 2008 R2 Server.

To start first need to log in to the server with administrator privileges. Then start the “server Manager” by clicking on “Server Manager” icon on task bar. Then go to “Roles”

dhcp1

Then click on “Add Roles” option to open Add roles Wizard.

dhcp2

Then it will load the Roles Wizard and select the “DHCP Server” From the list and click next to continue.

dhcp3

Then it will give description about the role. Click next to continue.

dhcp4

Next window is asking to use which interface to serve DHCP clients. If server has multiple NIC with multiple IP you can add them also to serve DHCP clients.

dhcp5

In next window it will give opportunity to add DNS settings that should apply for DHCP clients.

dhcp6

Next window is to define the WINS server details.

dhcp7

In next window we can add the scope, the Starting IP, End IP of the DHCP range, subnet mask, default gateway, leased time etc.

dhcp8

In next Window it can configure to support IPv6 as well.

dhcp9

Then it will give the confirmation window before begin the install. Click on “Install”

dhcp10

Once installation finishes DHCP server interface can open from Start > Administrative Tools > DHCP

dhcp11

Using the DHCP it is possible to even configure multiple Scopes configurations to the network. In a network there can be different network segments. It is waste to setup different DHCP servers for each segment. Instead of that it is possible to create different Scopes to issue DHCP for them.