我试图让Ubuntu 14.04.2服务器上运行的ISC DHCP服务器。 每当我尝试启动DHCP服务时,它立即停止,并logging下来,服务停止:
2015-05-15T21:23:16.600736+00:00 ubuntu dhcpd: No subnet declaration for eth0 (10.126.88.2). 2015-05-15T21:23:16.600743+00:00 ubuntu dhcpd: ** Ignoring requests on eth0. If this is not what 2015-05-15T21:23:16.600749+00:00 ubuntu dhcpd: you want, please write a subnet declaration 2015-05-15T21:23:16.600755+00:00 ubuntu dhcpd: in your dhcpd.conf file for the network segment 2015-05-15T21:23:16.600762+00:00 ubuntu dhcpd: to which interface eth0 is attached. **
我的dhcpd.conf文件如下所示:
option ztp-file-server code 150 = { ip-address }; option space ZTP; option ZTP.image-file-name code 0 = text; option ZTP.config-file-name code 1 = text; option ZTP.image-file-type code 2 = text; option ZTP.transfer-mode code 3 = text; option ZTP-encap code 43 = encapsulate ZTP; subnet 10.194.74.0 netmask 255.255.255.128 { authoritative; option routers 10.194.74.1; option subnet-mask 255.255.255.128; default-lease-time 28800; max-lease-time 32200; range 10.194.74.10 10.194.74.11; option ztp-file-server 10.1.1.2; option ZTP.image-file-name "/jinstall-qfx-5-13.2X51-D35.3-domestic-signed.tgz"; option ZTP.transfer-mode "http"; option ZTP.config-file-name "/template.conf"; }
我试图做一些杜松零接触供应的东西,所以这就是所有的ZTP的东西所指的。
我把eth0放入了etc / default / isc-dhcp-server的“interfaces”部分。
任何想法这是怎么回事? DHCP客户端在远程networking上,DHCP池是否位于与eth0不同的子网上?
dhcpd需要eth0物理网卡的子网声明。
您需要将其添加到dhcpd.conf ,但是如果您不想使用它,请将其留空:
subnet 10.126.88.0 netmask 255.255.255.0 { }
我让你根据你的networking调整子网掩码