During the previous article, Setting up Networking for the DHCP Server, we have set up the virtual machine for the DHCP Server. In this article, we are going to install the DHCP server application on it.
Things to know before we jump in
Before we jump in setting up everything, I will share the relevant information regarding to the environment, so that you can adjust your commands.
MAC address of the internal network card of the DHCP server |
00:60:2F:00:00:01 |
IP address assigned to the DHCP server on the test network |
192.168.128.1 |
MAC address of the virtual machine used to test the DHCP server |
00:60:2F:00:00:02 |
IP address to be assigned to the test virtual machine |
192.168.128.2 |
Downloading and installing the Open DHCP Server
In the test environment experiment, we are going to use the OpenDHCPServer, which has the homepage at https://sourceforge.net/projects/dhcpserver. At the time of writing this article, the newest version is 1.66 for which the Windows installer can be downloaded here.
After we downloaded the installer, run it and give the following answers:
-
Leave the installation path of the application set to C:\OpenDHCPServer and press Next.
-
Read the License and press Install to start the installation.
-
After the installation is finished, make sure that Run Program: Install Windows Service is checked and click Finish.
Configure the internal network card of the virtual machine
We need to set the IP address of the internal network card to the IP address that we want to assign on the DHCP server. To do this, go to:
-
Control Panel
-
Network and Internet
-
Network and Sharing Center
To make distinction, click on the name of the connection near the Connection, then click on Details… and you should see the internal MAC address between the properties of the network card.
To set the IP address on the network card do the following:
-
Click on the name of the connection near the connection
-
Click on Properties
-
Select Internet Protocol Version 4 (TCP/IPv4)
-
Click on Properties
-
Fill in into the IP address field: 192.168.128.1
-
Fill in into the Subnet mask field: 255.255.255.0
-
Leave the default gateway empty.
-
Click OK.
-
Click Close.
-
Click Close (yes, second time).
Configuring the system
To configure the DHCP server for the current scenario, use this configuration in C:\OpenDHCPServer\OpenDHCPServer.ini
Later, we are going to automate the edit of this file, so a Jenkins slave can do it.
By default, the port for the DHCP server is closed at the operating system level, to open it, start a PowerShell as an Administrator and run the following command:
And then, restart the DHCP service
You can connect with me on LinkedIn, Twitter or you can register on the blog. Share if you found this article useful or know somebody who would benefit from reading it.
No comments yet.