系统相关
首页 > 系统相关> > linux-Raspberry Pi isc-dhcp-server:eth0没有子网声明

linux-Raspberry Pi isc-dhcp-server:eth0没有子网声明

作者:互联网

我正在尝试在Raspberry Pi上设置DHCP服务器.我尝试使用以下命令进行安装:

sudo apt-get install isc-dhcp-server

并显示以下日志:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
   icelib
Use 'apt-get autoremove' to remove it.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 302 not upgraded.
Need to get 0 B/887 kB of archives.
After this operation, 0 B of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 61701 files and directories currently installed.)
Preparing to replace isc-dhcp-server 4.2.2.dfsg.1-5+deb70u6 (using .../isc-dhcp-server_4.2.2.dfsg.1-5+deb70u6_armhf.deb) ...
[FAIL] Stopping ISC DHCP server: dhcpd failed!
Unpacking replacement isc-dhcp-server ...
Processing triggers for man-db ...
Setting up isc-dhcp-server (4.2.2.dfsg.1-5+deb70u6) ...
[FAIL] Starting ISC DHCP server: dhcpd[....] check syslog for diagnostics. ... failed!
 failed!
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.

当我打开/ var / log / syslog文件时,它显示以下几行:

No subnet declaration for th0 (x.x.x.x)
** Ignoring requests on eth0. If this is not what
   you want, please write a subnet declaration 
   In your dhcpd.conf file for the network segment
   to which interface eth0 is attached. **

我是Linux的新手,所以我不知道我的系统出了什么问题或从这里去哪里.

感谢您的帮助.

解决方法:

您需要DHCP服务器吗?也许是this will help.这个链接到PDF的文件提到在运行配置之前首次启动时可能会出错.

如果链接在将来的某个时间失效,则此处提供了相关信息.

作为根,发出:

apt-get install isc-dhcp-server

安装服务器.

然后,可以使用/etc/dhcp/dhcpd.conf中的配置文件配置服务器.

标签:raspberry-pi,subnet,dhcp,linux
来源: https://codeday.me/bug/20191121/2053358.html