Installing the DHCP Server for the Test Environment

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:

  1. Leave the installation path of the application set to C:\OpenDHCPServer and press Next.
  2. Read the License and press Install to start the installation.
  3. 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:

  1. Control Panel
  2. Network and Internet
  3. 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:

  1. Click on the name of the connection near the connection
  2. Click on Properties
  3. Select Internet Protocol Version 4 (TCP/IPv4)
  4. Click on Properties
  5. Fill in into the IP address field: 192.168.128.1
  6. Fill in into the Subnet mask field: 255.255.255.0
  7. Leave the default gateway empty.
  8. Click OK.
  9. Click Close.
  10. 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.

By subscribing to the email list, you will be notified about new posts.
Loading

No comments yet.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Powered by WordPress. Designed by WooThemes