LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 742|回复: 6

dhcp启动不了

[复制链接]
发表于 2004-9-5 16:08:27 | 显示全部楼层 |阅读模式
dhcp.conf文件如下
ddns-update-style interim;
ignore client-updates;

subnet 192.168.0.0 netmask 255.255.255.0 {


range 192.168.0.10 192.168.0.15;
# --- default gateway
option routers 219.243.36.1;
option subnet-mask 255.255.255.0;

option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 202.113.15.2;

option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;

# range dynamic-bootp 192.168.0.128 192.168.0.254;
default-lease-time 21600;
max-lease-time 43200;

}













启动时出错,显示如下:

Starting dhcpd: Internet Software Consortium DHCP Server V3.0pl2
Copyright 1995-2003 Internet Software Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
Wrote 0 leases to leases file.

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

If you did not get this software from ftp.isc.org, please
get the latest from ftp.isc.org and install that before
requesting help.

If you did get this software from ftp.isc.org and have not
yet read the README, please read it before requesting help.
If you intend to request help from the dhcp-server@isc.org
mailing list, please read the section on the README about
submitting bug reports and requests for help.

Please do not under any circumstances send requests for
help directly to the authors of this software - please
send them to the appropriate mailing list as described in
the README file.

exiting.


我是第一次用
求救高手
发表于 2004-9-5 18:05:54 | 显示全部楼层

貼一份我在用的..你看一看吧..

ddns-update-style none;
subnet 192.168.7.0 netmask 255.255.255.0 {
         option routers 192.168.7.252;
        option subnet-mask 255.255.255.0;
        option domain-name "sh.excell.com.tw";
        # Seting up an ip address is better here
        option domain-name-servers 192.168.7.112,202.101.10.10;
        range dynamic-bootp 192.168.7.10 192.168.7.200;
        default-lease-time 21600;
        max-lease-time 43200;
host peter{
          hardware ethernet 00:E0:4C:1F:BB:BB;
          fixed-address 192.168.7.123;
          option routers 192.168.7.252;
          option domain-name-servers 192.168.7.112,202.101.10.10;}
发表于 2004-9-5 18:06:44 | 显示全部楼层

/etc/hosts

127.0.0.1               localhost
192.168.7.109   erp0
192.168.1.6     fileserver
192.168.7.112           shlinux.sh.at-scale.com shlinux
发表于 2004-9-5 18:08:06 | 显示全部楼层

/etc/sysconfig/network

NETWORKING=yes
HOSTNAME=shlinux.sh.at-scale.com
发表于 2004-9-5 18:09:28 | 显示全部楼层

/etc/sysconfig/network-scripts/ifcfg-eth0

BOOTPROTO=none
GATEWAY=192.168.7.252
DEVICE=eth0
MTU=""
NETMASK=255.255.255.0
BROADCAST=192.168.7.255
IPADDR=192.168.7.112
MII_NOT_SUPPORTED=no
WIRELESS_ENC_KEY=""
NETWORK=192.168.7.0
ONBOOT=yes
发表于 2004-9-6 08:28:24 | 显示全部楼层
Not configured to listen on any interfaces!
发表于 2004-9-6 13:38:59 | 显示全部楼层
错误很明显示的
就是这两段
option routers 219.243.36.1;
option subnet-mask 255.255.255.0;
你现在给客户机分配的网段是192.168.0这个网段
你又把默认的网关设置成了另外一个网段
你不知道不同网段间是不能访问的嘛
这样一来你的客户机根本就访问不了网关更谈不上包的转发了
下面DNS的错误也是由这引起来的
把这里解决了DNS也就没有问题了
option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 202.113.15.2;

option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 202.113.15.2;
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表