Windows Server DHCP role not working correctly in VMware Player

active-directorydhcpdnsvmware-playerwindows server 2008

I've got a Windows Server 2008 running in VMWare player with the following roles:

  • Active Directory Domain Services
  • DHCP
  • DNS

The server is using the following credentials:

  • The IP of the (DNS) server is 192.168.1.10
  • The name of the domain is cva.local

I've also got a pc running in VMWare Player with Windows 7 on it.

For configuration on this machine:

  • I set the IPv4 address (manually) to 192.168.1.100
  • I set the DNS Server to (manually) 192.168.1.10
  • I joined the cva.local domain.

After this I was able to login with the users i've created in the active directory within the server.

This was also working.


When configurating the DHCP server I used the following settings:

  • Scope name: cva-scope
  • Start IP address: 192.168.1.100
  • End IP address: 192.168.1.200
  • Subnet mask: 255.255.255.0
  • 006 DNS Servers: 127.0.0.1
  • 015 DNS Domain Name: cva.local

I wasn't receiving any errors while setting this up.


Problem

When I went back to the Windows 7 client PC and navigated to the screen where I could change my IPv4 settings and I activated the following checkboxes:

  • Obtain an IP address automatically
  • Obtain DNS server address automatically

I received an IPv4 address and default gateway from my router's DHCP service (which is outside of VMWare).

Expectation

I want to receive an IPv4 address from the Windows server, within the range I set in the DHCP settings. I don't want to receive an default gateway, because i'm not expecting any internet access at this point.

Question

Which settings do I have to change in VMWare (or anywhere else?) to achieve the result above.

Best Answer

You need to run the DHCP server on a separate network segment.

When starting, the Windows Server's DHCP Server Service checks if there are any other DHCP servers in the same network segment. If it detects one, it won't assign any IP addresses.

As far as I know you can't create any virtual network with VMware Player, so you'll need to use other virtualisation solution that supports virtual networks, temporarily disable the DHCP server on your router or use another router to divide the network into two segments - one with the router you have and the other with your virtual machines.

By the way, "006 DNS Servers" option should be configured with server's IP address (192.168.1.10) and not 127.0.0.1. With the current configuration, the client computer will send DNS queries to itself and not to the server.

Related Question