为什么我的Ubuntu DHCP isc-DHCP-server服务在重新启动时失败?

我正在尝试在Ubuntu 14.04计算机上使用isc-dhcp-server作为我的DHCP服务器,而不是路由器提供的DHCP服务。 我的设置如下。

我把所有设置都设置好了当我关闭路由器的DHCP时,我很高兴一切正常:连接到路由器的机器被分配了我的dhcpd.conf文件中定义的范围内的IP地址。 但是我觉得很奇怪,路由器显示的是Ubuntu机器的公共IP地址,而不是其/ etc / network / interfaces中定义的10.0.0.2地址。 事实上,分配的IP地址甚至不是私人地址! 它以169而不是10,192或172开头.IP地址有效; 我可以SSH没问题。 但是当我重新启动路由器和DHCP服务器时,整个过程失败了。

当我重新启动时,我再也看不到路由器界面中Ubuntu机器的IP地址。 毫不奇怪,DHCP也不起作用:连接到路由器的计算机无法获得IP地址。 当我在路由器上重新启用DHCP时,Ubuntu DHCP服务器会按预期获得10.0.0.2的IP地址。 当我SHH进入它时,我发现isc-dhcp-server没有运行。 我当然可以开始,然后整个循环重复。 (FWIW:我之前看到一条错误消息,当我尝试重新启动isc-dhcp-server,说我没有为Ubuntu DHCP服务器获得的那个奇怪的公共IP地址定义子网。我无法重现它但是对于这篇文章)

在我看来,在启动期间,eth0会发生一些事情。 有什么建议?

拓扑

我的Ubuntu机器连接到路由器,该路由器又连接到另一个作为Internet网关的路由器。

/etc/dhcpd/dhcpd.conf

ddns-update-style none; # option definitions common to all supported networks... 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 { option subnet-mask 255.255.255.0; option domain-name-servers 8.8.8.8, 8.8.4.4; option routers 10.0.0.1; pool { range 10.0.0.60 10.0.0.70; } } 

的/ etc /网络/接口

 # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet static address 10.0.0.2 netmask 255.255.255.0 network 10.0.0.0 broadcast 10.0.0.255 gateway 10.0.0.1 # The secondary network interface #auto eth1 #iface eth1 inet dhcp # WiFi use: -> connmanctl # Ethernet/RNDIS gadget (g_ether) # Used by: /opt/scripts/boot/autoconfigure_usb0.sh iface usb0 inet static address 192.168.7.2 netmask 255.255.255.252 network 192.168.7.0 gateway 192.168.7.1 

在/ etc /默认/ ISC-DHCP服务器

 DHCPD_PID=/run/dhcp-server/dhcpd.pid INTERFACES="eth0"