正在启动 dhcpd:

正在启动 dhcpd:

我有一个使用 KVM 的 Centos 6 虚拟机。

当我启动 DHCPd 服务“service dhcpd start”时,我得到以下信息:

Starting dhcpd:       [FAILED]

当我执行“dhcpd”时,我得到以下信息:

Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Wrote 0 leases to leases file.

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


No subnet declaration for eth0 (192.168.121.176).
** 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. **


Not configured to listen on any interfaces!

This version of ISC DHCP is based on the release available
on ftp.isc.org.  Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.

Please report for this software via the CentOS Bugs Database:
    http://bugs.centos.org/

exiting.

这是我的 dhcpd.conf:

dhcpd.conf 截图

我该如何修复此问题?我想在 eth1 上配置 DHCPd。

有人能帮助我并提供给我确切的详细信息和命令吗?

答案1

我建议你读一下dhcp.conf 手册页

dhcpd 无法启动的原因在您的问题中明确说明 - 您没有告诉它在任何接口上监听。

要像您所说的那样监听 eth1,您至少需要类似于 dhcpd.conf 中的以下子句:

subnet 10.0.0.5 netmask 255.255.255.0 {
   range 10.0.0.6 10.0.0.254;
}

但是您需要对其进行调整以适合您的 eth1 的配置方式 - 我对掩码和所需范围做出了假设。

预安装的 dhcpd.conf 文件可能有很多预设,只需取消注释即可运行。它可能也注释得很好。

相关内容