DHCP 服务器未启动

DHCP 服务器未启动

我在 ubuntu 服务器 11.04 中安装了 dhcp3-server

apt-get install dhcp3-server

但是安装过程中出现错误信息:

Traitement des actions différées (« triggers ») pour « man-db »...
Traitement des actions différées (« triggers ») pour « ureadahead »...
Paramétrage de isc-dhcp-server (4.1.1-P1-15ubuntu9.1) ...
Generating /etc/default/isc-dhcp-server...
* Starting ISC DHCP server dhcpd                                           
* check syslog for diagnostics                                   [fail]
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
Paramétrage de dhcp3-server (4.1.1-P1-15ubuntu9.1) ...

tail -f /var/log/syslog说:

Sep  2 03:29:20 srv dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Sep  2 03:29:20 srv dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Sep  2 03:29:20 srv dhcpd: All rights reserved.
Sep  2 03:29:20 srv dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Sep  2 03:29:20 srv dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Sep  2 03:29:20 srv dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Sep  2 03:29:20 srv dhcpd: All rights reserved.
Sep  2 03:29:20 srv dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Sep  2 03:29:20 srv dhcpd: Wrote 0 leases to leases file.
Sep  2 03:29:20 srv dhcpd: 
Sep  2 03:29:20 srv dhcpd: No subnet declaration for eth0 (192.168.1.1).
Sep  2 03:29:20 srv dhcpd: ** Ignoring requests on eth0.  If this is not what
Sep  2 03:29:20 srv dhcpd:    you want, please write a subnet declaration
Sep  2 03:29:20 srv dhcpd:    in your dhcpd.conf file for the network segment
Sep  2 03:29:20 srv dhcpd:    to which interface eth0 is attached. **
Sep  2 03:29:20 srv dhcpd: 
Sep  2 03:29:20 srv dhcpd: 
Sep  2 03:29:20 srv dhcpd: Not configured to listen on any interfaces!
Sep  2 03:29:23 srv kernel: [ 1625.286737] type=1400 audit(1314930563.298:18)            apparmor="STATUS" operation="profile_replace" name="/usr/sbin/dhcpd" pid=2045     comm="apparmor_parser"

当我想要访问该文件时,/etc/dhcp3/dhcpd.conf我找不到它,但该包dhcp-server已安装。

  root@srv:/etc/dhcp3#ls -l
  total 4 drwxr-xr-x 2 root root 4096 2011-09-01 06:42 dhclient-enter-hooks.d

答案1

尝试编辑/etc/dhcp/dhcpd.conf。它应该与 isc-dhcp-server 包以及依赖于它的 dhcp3-server 包一起安装。

$ dpkg -S dhcpd.conf
isc-dhcp-server: /usr/share/doc/isc-dhcp-server/examples/dhcpd.conf
isc-dhcp-server: /etc/dhcp/dhcpd.conf
isc-dhcp-server: /usr/share/man/man5/dhcpd.conf.5.gz

答案2

要运行 DHCP 服务器,您需要先编辑文件/etc/default/dhcp并设置活动网络接口列表。DHCP 将在这些接口上处理请求。然后,您必须通过编辑/etc/dhcp/dhcpd.conf和添加适当的“子网”条目来配置服务器。

答案3

相关内容