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

时间:2018-01-29 12:00:05

标签: configuration-files 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 file 中的

   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;
    }

错误我得到:

error

3 个答案:

答案 0 :(得分:0)

您好我很抱歉我是新来的,所以我不知道如何正确格式化。

好像您的界面enp2s0未启动。您可以使用ifconfig

进行检查

您可以在auto enp2s0

中的auto lo下添加:/etc/network/interfaces来解决此问题

答案 1 :(得分:0)

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

答案 2 :(得分:0)

但是有点晚了:

isc-dhcp-server作为名为/etc/default的{​​{1}}文件夹中的配置文件,是您必须在最后一行设置isc-dhcp-server监听的接口的文件:

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