我正在尝试在我的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的新手,所以我不知道我的系统有什么问题,或者从这里去哪里。
我感谢任何帮助。
答案 0 :(得分:3)
你想要一台DHCP服务器,嗯?也许是this will help。这个链接的PDF提到你在第一次启动之前可能会遇到错误,然后再运行配置......
如果链接在将来的某个时间失效,相关信息就会出现在这里。
作为root用户,问题:
apt-get install isc-dhcp-server
安装服务器。
然后可以使用位于/etc/dhcp/dhcpd.conf
的配置文件配置服务器。