2

I am trying to do some basic testing of a DHCP server (Windows Server 2012).

I'm trying to do all this testing from a laptop. The VM's are set Host-Only (or 'Private to my Mac' setting)

To get started; I've got win2012 a DHCP server with a private IP (172.16.158.128). This what it defaulted to after setting the host-only networking.

Sample scope set up with basically this:

Add-DhcpServerv4Scope -Name "Test Scope" -StartRange 172.16.158.50 -EndRange 172.16.158.60 -SubnetMask 255.255.255.0

I am trying to test setting a specific workstation host to always pick up a certain IP.

So I create a Ubuntu VM (again, just something small footprint as my laptop isn't a beast), host only networking. It can ping the .128 DHCP server.

When I go

dhclient -v -s 172.16.158.128

I see DHCPREQUEST's only (or DHCPDISCOVER's)

If I go

dhclient -v

I instantly get

DHCPREQUEST of 172.16.158.130 on eth0 to 255.255.255.255 port 67
DHCPACK of 172.16.158.130 from 172.16.158.254

Windows firewall is disabled on win2012

What am I missing? How do I get the Windows machine to serve the requests?


edit The vm's are in VMware Fusion 6.0.5

0
1

VMware Fusion provides its own DHCP-server in the Host-Only network ('private to my mac'). This DHCP-server collides with the Windows Server 2012 DHCP service.

You may whether create a new private network with DHCP and NAT disabled in VMware Fusion -> Preferences -> Network and move both VMs' interfaces to it or disable DHCP in the preconfigured Host-Only network. To disable DHCP in the preconfigured network edit the file /Library/Preferences/VMware Fusion/networking and disable DHCP.

Example:

Change

VERSION=1,0
answer VNET_1_DHCP yes
answer VNET_1_DHCP_CFG_HASH B77CFE705F74AAb56C1E3CB5E9517746F02E0EC1
answer VNET_1_HOSTONLY_NETMASK 255.255.255.128
answer VNET_1_HOSTONLY_SUBNET 172.16.158.0
answer VNET_1_VIRTUAL_ADAPTER yes
answer VNET_3_HOSTONLY_NETMASK 255.255.255.0
answer VNET_3_HOSTONLY_SUBNET....

to

VERSION=1,0
answer VNET_1_HOSTONLY_NETMASK 255.255.255.128
answer VNET_1_HOSTONLY_SUBNET 172.16.158.0
answer VNET_1_VIRTUAL_ADAPTER No
answer VNET_3_HOSTONLY_NETMASK 255.255.255.0
answer VNET_3_HOSTONLY_SUBNET....

Since method 2 is a default VMware configuration, method 1 (adding a new vmnet) is preferred.

Depending on your (VMware Fusion) network config the IP-address of your Windows Server 2012 and its DHCP range may be wrong additionally.

1
  • Thanks heaps. I saw your earlier comments and started configuring network in fusion but was watching a soccer game and got distracted :) this has resolved the issue. I could do it all through the GUI: create new vmnet, untick provide dhcp server, it gave me a new ip range which I configured on the dhcpserver and all is well! thanks
    – isayque
    Aug 23 '15 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.