Job for isc-dhcp-server.service failed interface错误

为树莓派配置dhcp服务器(isc-dhcp-server),启动服务时出现:

Job for isc-dhcp-server.service failed. See 'systemctl status isc-dhcp-server.service' and 'journalctl -xn' for details.


运行

# systemctl status isc-dhcp-server.service

得到

● isc-dhcp-server.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/isc-dhcp-server)
   Active: failed (Result: exit-code) since Sun 2017-09-03 16:47:49 CST; 2min 18s ago
  Process: 1145 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILU)

Sep 03 16:47:47 NanoPi3 dhcpd[1152]: to which interface usb0 is attached. **
Sep 03 16:47:47 NanoPi3 dhcpd[1152]:
Sep 03 16:47:47 NanoPi3 dhcpd[1152]:
Sep 03 16:47:47 NanoPi3 dhcpd[1152]: Not configured to listen on any interfaces!
Sep 03 16:47:47 NanoPi3 dhcpd[1152]:
Sep 03 16:47:49 NanoPi3 isc-dhcp-server[1145]: Starting ISC DHCP server: dhc...!
Sep 03 16:47:49 NanoPi3 isc-dhcp-server[1145]: failed!
Sep 03 16:47:49 NanoPi3 systemd[1]: isc-dhcp-server.service: control proces...=1
Sep 03 16:47:49 NanoPi3 systemd[1]: Failed to start LSB: DHCP server.
Sep 03 16:47:49 NanoPi3 systemd[1]: Unit isc-dhcp-server.service entered fa...e.
Hint: Some lines were ellipsized, use -l to show in full.

很明显,interface设备错了,被设置为了usb0


解决:

# vi /etc/default/isc-dhcp-server

修改默认的设备(eth0, wlan0 ....)

你可能感兴趣的:(Linux知识)