Basic install, DHCP non-functional

Hi there,

First post. Have searched the forum (and googled) for things like vmware dhcp vyos, vyos dhcp not working, but not found anything other than others having success.

Simple config:

VMware ESXi, 2 vSwitches. One vSwitch on the 192.168.0.x network is shared with real physical devices, wifi router etc. Other vSwitch is for the 10.x.x.x network. 2 VMs running, the vyos VM and a Windows 7 guest. NAT enabled. DNS relay enabled.
No special VMware settings set - e.g. the vSwitch security doesn’t have promisc enabled.

Problem: If I set the W7 guest to use DHCP then do an ipconfig /release and /renew, no IP address is given.

If I manually give the W7 guest an IP address on the 10.x.x.x network then it can ping the vyos VM and is also able to go through the NAT to the outside world.

Have brought up another Windows VM (2012) as a RRAS just to prove that DHCP can work on that subnet. Have rebooted everything multiple times.

Is there something blindly obvious wrong with my vyos config (below)?
Is there any easy way to see from vyos if it’s receiving a DHCP request but dropping it?

Thanks in advance.

vyos@vyos:~$ sh ver
Version: VyOS 1.1.5
Description: VyOS 1.1.5 (helium)
Copyright: 2015 VyOS maintainers and contributors
Built by: maintainers@vyos.net
Built on: Tue Mar 24 23:59:47 UTC 2015
Build ID: 1503242359-88bcbc8
System type: x86 64-bit
Boot via: image
Hypervisor: VMware
HW model: VMware Virtual Platform
HW S/N: VMware-42 2d 7b 7d b3 01 2f ba-eb 2d cb 57 f6 45 de dc
HW UUID: 422D7B7D-B301-2FBA-EB2D-CB57F645DEDC
Uptime: 10:55:01 up 1:13, 2 users, load average: 0.02, 0.07, 0.06

vyos@vyos:~$ sh configuration
interfaces {
ethernet eth0 {
address 192.168.0.223/24
description WAN
dhcpv6-options {
}
duplex auto
hw-id 00:50:56:ad:3f:57
smp_affinity auto
speed auto
}
ethernet eth1 {
address 10.0.0.1/8
description LAN
duplex auto
hw-id 00:50:56:ad:61:47
smp_affinity auto
speed auto
}
loopback lo {
}
}
nat {
source {
rule 100 {
outbound-interface eth0
source {
address 10.0.0.0/8
}
translation {
address masquerade
}
}
}
}
service {
dhcp-server {
disabled false
shared-network-name LAN {
subnet 10.0.0.0/8 {
default-router 10.0.0.1
dns-server 10.0.0.1
domain-name internal-network
lease 86400
start 10.1.0.0 {
stop 10.254.254.254
}
}
}
}
dns {
forwarding {
cache-size 0
listen-on eth1
name-server 192.168.0.95
}
}
ssh {
port 22
}
}
system {
config-management {
commit-revisions 20
}
console {
device ttyS0 {
speed 9600
}
}
gateway-address 192.168.0.1
host-name vyos
login {
user vyos {
authentication {
encrypted-password ****************
}
level admin
}
}
name-server 192.168.0.95
ntp {
server 0.pool.ntp.org {
}
server 1.pool.ntp.org {
}
server 2.pool.ntp.org {
}
}
package {
auto-sync 1
repository community {
components main
distribution helium
password ****************
url http://packages.vyos.net/vyos
username “”
}
}
syslog {
global {
facility all {
level notice
}
facility protocols {
level debug
}
}
}
time-zone UTC
}
vyos@vyos:~$

Your configuration looks ok to me. Here are a few things to look at:

does a “show dhcp server leases” show anything?

you could try a “tcpdump -n -e -i eth1 udp port 67 or udp port 68” and look for DCHP requests/responses

does this file look right? “/opt/vyatta/etc/dhcpd.conf”

does “ps aux | grep dhcp” show that the service is running?

are there any interesting tidbits in “/var/log/syslog”

show leases just shows the headers, no leases are being shown.
show statistics shows 16 million leases being available, 0 leased.

ps aux | grep dhcp (and ps -ef | grep dhcp) both show nothing (other than the grep line).

Tidbits in /var/log/syslog are dhcp complains about not binding to interfaces this morning, but that was probably caused by me removing and re-adding the scope. Deleted the messages file and rebooted, nothing unusual in there now and no mention of dhcp (but still not showing up to a ps aux)

dhcpd.conf file looks ok, seems to just contain the dhcp section shown when a show configuration is ran.

And the smoking gun.

dmesg (below error is manually typed)

[ 13.864414] dhcpd3[2950]: segfault at 7f7b0bf90000 ip 00007f7b0c1f4ea9 so 00007fff42837e28 error 7 in libc-2.11.3.so[7f7b0c17600+158000]

Hmmm.


Googling and found this: Bug #605558 “dhcp3-server segfaults on start with large dynamic ... : Bugs : dhcp3 package : Ubuntu

So reduced the dhcp scope size, (10.1.0.0 → 10.1.254.254) and rebooted.
dhcpd is now showing as a process.

So looks like either some validation needs to go into scope size, or it needs to handle large scopes differently?

That bug was from back in 2010 so probably isn’t the same code?