Windows DNS, DHCP server

Copper Contributor

Hi Guys, 

 

In our company, we use linux based DNS,DHCP server and the chap who use to manage the server has retired and have left the country.

 

I would like to migrate the server from Linux to Windows based, so please let me know the steps to  migrate the DNS & DHCP server to windows. 

 

Regards,

Ethan 

2 Replies

There are the steps to steps to migrate the DNS & DHCP server to windows:
Figure 1: Step 1 of migrating a Linux BIND name server to a Windows Server DNS server.

It grants permission to this DNS server to allow a zone transfer to another box. Any current secondary servers will need to be here, and we need to add our server's IP. Once we have added the IP address of our new Windows Server 2012 R2 server for each domain, we are ready to move on to the next step of preparing the Windows Server.

 Preparing the Windows Server

Install Windows, name the box, and give it an IP address. Your IP should match what you configured in Linux for the allowed transfer.

Next, add the DNS Server role to the server. Once it is added, open the DNS console.

Figure 2: 

Right-click on forwarding Lookup Zones and then add the first domain. In my first example, I am using carttan.ca:

Figure 3: 

Click Next:

Figure 4:

Click on Secondary Zone and click Next:

Figure 5: 

Enter in the DNS name for the Zone you are creating. Then click Next:

Figure 6: 

Please enter the IP Address of the Master DNS server, press enter, and then click Next when it goes green. If it doesn't go green, then there is an issue, and check the Linux server:

Figure 7: 

Click Finish to close the wizard and return to the DNS Manager console:

Figure 8: 

Check that the records are coming across properly.

Repeat these steps for every domain that needs to be migrated.

Promoting the Windows Server to Primary Master for the DNS Zone

Right-click on the Zone and go to properties to convert from Secondary to Primary Server:

Figure 9: 

Click on Change:

Figure 10: 

Click on Primary Zone and click OK.

Next, click on the Zone Transfers tab:

Figure 11: 

Click on Allow Zone Transfers and click on Only To The Following Servers. Click Edit and enter the information for the servers you want to be secondary servers. These will be the servers you direct internet traffic to. These could be secondary servers hosted anywhere. I have configured my firewall to allow DNS traffic to these servers only.

Next, we will configure the Start of Authority record. We need to change the primary server. Here we will use one of our external responding servers as our primary. Also, set the Responsible person and be sure to increment the serial number once you are complete with the changes:

Figure 12: 

Setting up the Secondary DNS Servers

Install Windows, name the box, and give it an IP address.

 

Next, add the DNS Server role to the server. Once it is added, open the DNS console. It should be familiar as these are the steps we've already completed with setting up the primary DNS server:

Figure 13: 

Right-click on forwarding Lookup Zones and then add the first domain. Again, in my example, I am using carttan.ca:

Figure 14: 

Click Next:

Figure 15: 

Click on Secondary Zone and click Next. The steps to follow are identical to what we first completed when we set up the first Windows Server before making it a primary server.

Check that the records are coming across properly. Repeat these steps for each domain that needs to be migrated.

Create a new record for your external DNS servers. These need to be externally routable addresses (which I have not used in my example here), next add them to your DNS servers in the Name Servers tab, removing the one server listed for internal. In my example, I only have one server showing up now:

Figure 16: 

As you can see in the above example, there is no mention of ns1.carttan.ca, which is the primary server for these domains. Next, let's turn off DNS resolution for any domain we do not host. Right-click on the name of the server and go to the advanced tab. Check Disable recursion:

Figure 17:

The final step is to change your internet registration files so that the DNS servers are pointed to the new external servers.

 

> steps for DHCP migration from Linux to Windows server:

The "netsh dhcp server export c:\dhcp.txt all" command creates a text file, but it's not exactly readable by a human eye...I get ASCII characters - what do you get?

 

So I am doing this:

- Get hold of the DHCPD.CONF file from Linux (this I can read in Notepad)

- Create a batch file with a ton of netsh commands to configure the new MS DHCP server.

 

Pity there isn't something like DHCPEXIM.EXE for Linux :)