1

I'm trying to setup a DHCP server on a virtualized host only network and I'm having some issues. Currently I'm only running two VMs one being the server and the other being the client both VMs are running CentOS and are being virtualized on VMware Player.

The problem is that I can't get my client VM to get an IP from my server VM and when I run dhclient -v I get this message :

Listening on LPF/eth0/00:0c:29:44:81:55
Sending on LPF/eth0/00:0c:29:44:81:55
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4 (xid=0x2fb5f98b)
DHCPOFFER from 172.21.15.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0x2fb5f98b)
DHCPNAK from 192.168.117.254 (xid=0x2fb5f98b)
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3 (xid=0x180a9574)
DHCPOFFER from 192.168.117.254
DHCPREQUEST on eth0 to 255.255.255.255 port 67 (xid=0x180a9574)
DHCPACK from 192.168.117.254 (xid=0x180a9574)
bound to 192.168.117.254 -- renewal in 859 seconds.

I'm unsure why I'm getting a DHCPNAK or why I'm binding to a different server as there should only be the two NICs on the host only network unless it is a self assigned IP.

Here is my dhcpd.conf file :

domain name
option domain-name "abc_enterprise.local";

default lease time
default-lease-time 86400;

max lease time
max-lease-time 172800;

log method log-facility local7;

Configuration IP range
subnet 172.21.15.0 netmask 255.255.255.224
{
range 172.21.15.15 172.21.15.25;
option broadcast-address 172.21.15.31;
option routers 172.21.15.1;
}

Here are the ifcfg files for my SERVER VM NIC
eth0 is set for NAT and eth1 is set for host only :

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
USERCTL=no
PEERDNS=yes
IPV6INIT=no

DEVICE=eth1
BOOTPROTO=none
NETMASK=255.255.255.224
TYPE=Ethernet
IPADDR=172.21.15.1

And here's my ifcfg file for my CLIENT VM NIC :

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=dhcp

I can't seem to figure out why my client isn't leasing an IP from my server, if you have any insight at all it would be much appreciated. If I left out any relevant information let me know as I am very new at this.

EDIT:
At the suggestion of richardb I was able to determine that the DHCPNAK from 192.168.117.254 was from the VMware player and that it was interupting my clients DHCPREQUEST so after turning off VMware DHCP in Windows services then my client VM could acquire an IP from the server. The only problem is now I can't get an IP address for the servers NAT NIC in order to ping out.

Is there a way to stop the VMware DHCP service for just my client VM? Or possibly circumvent it using a setting in the client VM?

  • You have two DHCP servers. Disable one of them. – Michael Hampton Nov 3 '15 at 21:43
1

You are getting an offer from your DHCP server, but when you try to request the address the other DHCP server jumps in and NAKs it. It can do that because the client is broadcasting the request.

It's quite likely that it's VMware Player itself trying to manage DHCP for you. Anyway, you have the IP of the problem DHCP server (192.168.117.254) to help you track it down.

  • Thank you! This appears to be the case, if I disable VMware DHCP in Windows services then my client VM will acquire an IP from the server. The only problem is now I can't get an IP address for the NAT NIC but it's certainly a start. – Automaton Nov 3 '15 at 21:15

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.