Isc-dhcp 服务器未启动错误:未配置为侦听任何接口



我已经安装了Isc-dhcp-server并相应地配置了文件,但它仍然显示错误,即它未配置为侦听任何接口。我有 Ubuntu 17.04 64 位

接口文件:

auto lo
iface lo inet loopback
iface enp2s0 inet static
address 10.90.90.5
netmask 255.255.255.0
gateway 10.90.90.1
broadcast 10.90.90.255
dns-nameservers 8.8.8.8
up service isc-dhcp-server restart

在/etc/default/isc-dhcp-server 文件中

   INTERFACES="enp2s0"
/

etc/dhcp/dhcpd.conf 文件:

 subnet 10.90.90.0 netmask 255.255.255.0 {
      range 10.90.90.10 10.90.90.20;
      default-lease-time 600;
      max-lease-time 7200;
      option routers 10.90.90.1;
    }

我收到的错误:

错误

有点晚了,但是:

isc-dhcp-server作为名为isc-dhcp-server的文件夹中/etc/default配置文件,此文件位于最后一行,您必须设置接口isc-dhcp-server该接口将侦听:

# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
#       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACESv4="eth0 eth1"
INTERFACESv6=""

尝试使用INTERFACESv4密钥。

然后重新启动服务器。

server isc-dhcp-server restart

问题是我的 isc-dhcp-server 配置文件被重置为带有空白接口的原始文件。我重新安装了 ubuntu,它运行良好。

好吧,

您的界面似乎enp2s0没有启动。您可以使用 ifconfig 进行检查。

您可以通过放置:auto enp2s0auto lo/etc/network/interfaces来修复它

最新更新