Struggling a bit with isc-dhcp-server on Ubuntu 16.04.
The Ubuntu box has one NIC that is connected via Ethernet cable to a router. I'm trying to get a Windows 10 machine to connect to the same router over WiFi and get a DHCP address from the Ubuntu machine. For completeness, I should point out that the router is connected to another router, which is the actual Internet gateway. I set it up this way so I could mess around without affecting Internet access for others.
To begin, the router has DHCP enabled and its web portal shows both the Ubuntu and Windows machines are connected. I have no problem on my Windows machine:
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 10.0.0.3
Subnet Mask . . . . .. . . .. . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.0.1
I ssh into the Ubuntu machine and configure it (comments removed for brevity):
/etc/network/interfaces
auto eth0
iface eth0 inet static
address 10.0.0.2
netmask 255.255.255.0
gateway 10.0.0.1
broadcast 10.0.0.255/etc/default/isc-dhcp-server
DHCPD_PID=/run/dhcp-server/dhcpd.pid
INTERFACES="eth0"/etc/dhcp/dhclient.conf
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, domain-search, host-name, dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers, netbios-name-servers, netbios-scope, interface-mtu, rfc3442-classless-static-routes, ntp-servers;
timeout 300;/etc/dhcp/dhcpd.conf
ddns-update-style none;
option domain-name "somename";
option domain-name-servers 8.8.8.8, 8.8.4.4;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.100 10.0.0.254;
option routers 10.0.0.1
}
Unfortunately, when I turn off the router's DHCP, the Windows machine cannot get an IP address:
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . :
Autoconfiguration IPv4 Address. . : 169.254.28.77
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
Once this happens, the only way I can recover is to modify the WiFi adapter settings on the Windows machine and specify the IP address, subnet mask, default gateway and DNS. After doing so, I can connect to the router's web interface and I notice that the Windows machine is the only connected device, so it seems to me that when the router has DHCP disabled, the Ubuntu machine cannot connect to it the same way the Windows machine does when it's configured to obtain its IP address manually.
See anything wrong with my configuration?