我正在尝试在 Ubuntu 14.04.2 服务器上运行 ISC DHCP 服务器。每当我尝试启动 DHCP 服务时,它都会立即停止,并记录以下内容,然后服务停止:
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“接口”部分。
有什么想法吗?DHCP 客户端位于远程网络上,DHCP 池与 eth0 位于不同的子网上有关系吗?
答案1
dhcpd
需要为其eth0
物理网卡声明子网。
您需要将其添加到您的中dhcpd.conf
,但如果您不想使用它,请将其留空:
subnet 10.126.88.0 netmask 255.255.255.0 {
}
我让你根据你的网络调整子网掩码