fedora,dhcpd 无法启动

fedora,dhcpd 无法启动

历史:我有一个微型闪亮的插件服务器,我想将其插入我的 ADSL 路由器(或无论你想叫它什么)的一端(eth0),另一端(eth1)我想为我的 LAN 运行一个 dhcp 服务器。目前,我被困在让 LAN 工作上。操作系统是 fedora 12。我像这样配置我的 /etc/dhcp/dhcpd.conf:

#
# DHCP Server Configuration file.
#   see /usr/share/doc/dhcp*/dhcpd.conf.sample
#   see 'man 5 dhcpd.conf'
#

option domain-name "unknown.org";
option domain-name-servers 192.168.44.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.44.255;

default-lease-time 86400;
max-lease-time 172800;

subnet 192.168.44.0 netmask 255.255.255.0
{
host fedorabigbox
{
        hardware ethernet 00:19:66:8E:61:74;
        fixed-address 192.168.44.21;
}

#host mobile
#{
#       hardware ethernet ***;
#       fixed-address 192.168.44.22;
#}

        range 192.168.44.100 192.168.44.110;
        option routers 192.168.44.1;
}

# this is just dummy, as read many howtos, some suggesting to add a subnet blah netmask blah for each interface
subnet 192.168.33.0 netmask 255.255.255.0
{
        range 192.168.33.100 192.168.33.110;
        option routers 192.168.33.1;
}

但尝试通过以下方式启动服务器时,服务器无法启动/etc/init.d/dhcpd start

总的来说,如果有人能向我详细解释网络的工作原理就好了,我对这个东西还很陌生。

更具体的问题:如何将子网指向 eth1 并将另一个子网指向 eth0,如何实现?

有人发现任何错误或缺陷吗?语法应该是正确的,已经用 dhcpd 语法检查检查过了。

谢谢你的帮助

附录:

错误:

Internet Systems Consortium DHCP Server 4.1.0p1
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
WARNING: Host declarations are global.  They are not limited to the scope you declared them in.
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Wrote 0 deleted host decls to leases file.
Wrote 0 new dynamic host decls to leases file.
Wrote 0 leases to leases file.

No subnet declaration for eth0 (no IPv4 addresses).
** 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 Red Hat Bugzilla site:
    http://bugzilla.redhat.com

exiting.

答案1

我可以向您展示我的 Fedora“路由器”/防火墙的配置。我正在运行 Fedora 14(最近从 Fedora 13 升级)它有 2 个以太网卡(eth0 和 eth1)。eth0 是内部网络(10.0.0.x)eth1 是连接到我的有线电视运营商的外部网络。我的“路由器”有内部地址 10.0.0.3 我替换了名称并使一些信息通用。在需要的地方用您的特定信息替换。

option domain-name-servers 10.0.0.3, <external-dns1-ip>, <external-dns2-ip>;
# Sample /etc/dhcpd.conf
# (add your comments here) 

option domain-name "net.home";

group {
host pc1 {
    fixed-address 10.0.0.2;
    hardware ethernet xx:xx:xx:xx:xx:xx;
    }
host pc2 {
    fixed-address 10.0.0.4;
    hardware ethernet yy:yy:yy:yy:yy:yy;
    }
# Canon Pixma iP5200R
host printer1 {
    hardware ethernet zz:zz:zz:zz:zz:zz;
    fixed-address 10.0.0.12;
    }
# Wireless IP camera
host ipcamera {
    hardware ethernet ww:ww:ww:ww:ww:ww;
    fixed-address 10.0.0.15;
    }
}


 # home.net
 subnet 10.0.0.0 netmask 255.255.255.0 {
authoritative;
range 10.0.0.20 10.0.0.100;
default-lease-time 86400;
max-lease-time 86400;
option subnet-mask 255.255.255.0;
option broadcast-address 10.0.0.255;
option routers 10.0.0.3;
}

相关内容