Planning IP Address Assignment for the Test Network

In the previous article, Creating Complex Environment for Testing, we configured Jenkins to create complex test environments. The only problem is that we don’t know where the computers are on the virtual network. From the host environment, we don’t see the IP address and we cannot set them to a specific value from outside of the computer.

In this article, we are going to plan for a solution, the implementation steps are going to be in later articles.

An overview of the planned network

The solution to know where are the provisioned guests for the test environment will involve the following things:

  • A Hyper-V network to which all test environment virtual computers are connected (Virtual Test Network),
  • Reading the MAC address of the provisioned guest virtual computers (Guest 1, …, Guest n), which forms the test environment
  • A special virtual computer with two network cards (DHCP Server):
    • One with a fixed IP address that is known to the control part of the test environment (Dedicated Network)
    • One attached to the Virtual Test Network,
    • Running a DHCP Server

How this is going to help us?

During the setup of the test infrastructure, we will:

  • Set up a Hyper-V virtual machine with a DHCP Server, DHCP Server
  • This virtual machine will have a script that we can call up through remoting with a MAC address and an IP address. The script will insert this information into the configuration of the DHCP server in a way that the DHCP server will always assign the given IP address only to the network card requesting IP address with the given MAC address.
  • Set up the Virtual Test Network on the Hyper-V Host, so that later the guests can be configured to use it.

When we provision the test environment we will follow the next steps:

  1. Provision the guests
  2. Attach the guests to the Virtual Test Network
  3. Acquire all MAC addresses from the guests
  4. Assign the IP addresses to the computers that we want and call the registration script with the MAC and IP addresses to write them into the configuration of the DHCP Server
  5. Power on the guest virtual computers.

In the next articles, we will explore all of the above points, so that our test environment setup will progress towards a working solution.

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.
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