DHCP服务!哪位兄弟来帮帮我!

由 yxheyong 在 08-09-2003 22:04 发表:

DHCP服务!哪位兄弟来帮帮我!

DHCP服务启动失败

看了北南兄写的“怎样设置DHCP[参考篇]”后自己用现有网络也配置了一下DHCP服务但吂后

失败。请Linuxsir的兄弟们帮帮我!!!

我的网络环境是:

主机:双网卡ADSL共享上网。Radhat9.0

外卡接ADSL:10.0.0.3 255.255.255.0

内卡DHCP服务:192.168.1.1 255.255.255.0

注:我没有用HUB 是双网卡叉接的。双网卡共享上网正常。客户机是WIN2K。我只想为192.168.1.0的网段提供服务。对了北南兄配置的DHCP服务中没有向客户机分配网关啊。请问 option broadcast-address 192.168.1.1; 这一句是不是就是向客户机分配网关?

根据北南兄的贴子。我的dhcpd.conf配置为:

ddns-update-style interim;

ignore client-updates;

subnet 192.168.1.0 netmask 255.255.255.0 {

option routers 192.168.1.1;

option subnet-mask 255.255.255.0;

option nis-domain "domain.org";

option domain-name "domain.org";

option domain-name-servers 61.139.2.69;

option time-offset -18000;

range 192.168.1.2 192.168.1.255;

default-lease-time 21600;

max-lease-time 43200;

}

subnet 10.0.0.3 netmask 255.255.255.0 { }

启动DHCP后报错信息如下:

[root@server root]# dhcpd start

Internet Software Consortium DHCP Server V3.0pl1

Copyright 1995-2001 Internet Software Consortium.

All rights reserved.

For info, please visit http://www.isc.org/products/DHCP

/etc/dhcpd.conf line 17: subnet 10.0.0.3: bad subnet number/mask combination.

subnet 10.0.0.3 netmask 255.255.255.0

^

Configuration file errors encountered -- exiting

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 [email protected]

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.


业精于勤而荒于嬉,行成于思而毁于惰。


由 wangguoqin1001 在 08-10-2003 15:51 发表:


你把10.0.0.3那行注释掉。

还有启动dhcpd好像是用/etc/init.d/dhcpd start的,不过我用的是debian。


欢迎访问: http://dev.8866.org

欢迎来信: [email protected]

为什么不能删除自己的帖子?


由 tower 在 08-10-2003 17:28 发表:


是这个问题吧

subnet 10.0.0.3 netmask 255.255.255. 255 { }


由 tower 在 08-10-2003 21:14 发表:


刚才又仔细看了一下 dhcpd 的 man ,应该可以指定dhcp工作在指定网卡上 dhcpd ethx 就可以了;如果是rh,在/etc/sysconfig/dhcpd中加上 "DHCPDARGS=ethx"再 重起服务就可以了


由 yxheyong 在 08-12-2003 21:49 发表:

还是不行。

1-

wangguoqin1001兄说的/etc/init.d/dhcpd start启动也是启动的一种。我试过的不能正确启动。

2-

tower兄说的。第一个问题和第二个问题我也设置过。设置后出现

[root@server etc]# /etc/init.d/dhcpd start

启动 dhcpd:Internet Software Consortium DHCP Server V3.0pl1

Copyright 1995-2001 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 eht1 (0.0.0.0).

** Ignoring requests on eht1. If this is not what

you want, please write a subnet declaration

in your dhcpd.conf file for the network segment

to which interface eht1 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 [email protected]

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.


业精于勤而荒于嬉,行成于思而毁于惰。


由 nobody_am 在 08-13-2003 02:00 发表:


下面是我的配置文件:

======================================================================

ddns-update-style interim;

ignore client-updates;

subnet 192.168.0.0 netmask 255.255.255.0 {

--- default gateway

option routers 192.168.0.1;

option subnet-mask 255.255.255.0;

option nis-domain "domain.org";

option domain-name "andsky.com";

option domain-name-servers 192.168.0.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.1 192.168.0.2;

default-lease-time 21600;

max-lease-time 43200;

we want the nameserver to appear at a fixed address

#host ns {

next-server marvin.redhat.com;

hardware ethernet 12:34:56:78:AB:CD;

fixed-address 207.175.42.254;

#}

}

====================================================================

可以工作,我的也是两台机.我的DHCP服务器是副机上,让主机的内网卡,获取192.168.0.1.这样作没什么意义,仅为作作试验而已.


解放思想,实事求是!!


由 yxheyong 在 08-13-2003 20:51 发表:

nobody_am兄

你 dhcpd.conf和我的没有什么区别啊。

我现在的dhcpd.conf是这样设置的。请大家在帮我看看。我自己觉得在dhcpd.conf文件的设置中应该没什么问题。但就是不能启用。

dhcpd.conf内容

ddns-update-style interim;

ignore client-updates;

subnet 192.168.1.0 netmask 255.255.255.0 {

option routers 192.168.1.1;

option subnet-mask 255.255.255.0;

option nis-domain "domain.org";

option domain-name "domain.org";

option domain-name-servers 61.139.2.69;

option broadcast-address 192.168.1.255;

range dynamic-bootp 192.168.1.2 192.168.1.254;

option time-offset -18000;

default-lease-time 21600;

max-lease-time 43200;

}

subnet 10.0.0.3 netmask 255.255.255.255 { }

dhcpd start后报错内容:

[root@server etc]# dhcpd start

Internet Software Consortium DHCP Server V3.0pl1

Copyright 1995-2001 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 start (0.0.0.0).

** Ignoring requests on start. If this is not what

you want, please write a subnet declaration

in your dhcpd.conf file for the network segment

to which interface start 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 [email protected]

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.

本人E文不好。对于报错的信息不是懂。翻译了一下好象是说dhcp不能着用于eth1。在No subnet declaration for start (0.0.0.0).这一句中说是subnet的问题。还请大家帮我看看还有什么地方不对的。


业精于勤而荒于嬉,行成于思而毁于惰。


由 Glue 在 08-13-2003 21:11 发表:


把下面这行去掉试试,我觉得这行没有必要。

subnet 10.0.0.3 netmask 255.255.255.255 { }


-_-


由 yyja 在 08-13-2003 21:58 发表:


此问题是dhcpd服务不知道在那个介面侦听,与配置文件格式无关,但我不清楚如何在命令行设置dhcpd侦听介面


由 yxheyong 在 08-13-2003 22:27 发表:


Glue兄:

不能正确启动的原因不是

subnet 10.0.0.3 netmask 255.255.255.255 { }

这句。我将它删除后也不能启动。


业精于勤而荒于嬉,行成于思而毁于惰。


由 nobody_am 在 08-13-2003 22:32 发表:


把/var/lib/dhcp/dhcpd.lease清空看看


解放思想,实事求是!!


由 yxheyong 在 08-16-2003 21:25 发表:

/var/lib/dhcp/dhcpd.lease

里只有几行注解其它什么信息也没有。


业精于勤而荒于嬉,行成于思而毁于惰。


由 nobody_am 在 08-17-2003 00:04 发表:


删除这句后,

subnet 10.0.0.3 netmask 255.255.255.255 { }

不能启动的提示是什么?


解放思想,实事求是!!


由 yxheyong 在 08-17-2003 01:02 发表:


我现在dhcpd.conf设置如下:

ddns-update-style interim;

ignore client-updates;

subnet 192.168.1.0 netmask 255.255.255.0 {

option routers 192.168.1.1;

option subnet-mask 255.255.255.0;

option domain-name "domain.org";

option domain-name-servers 61.139.2.69;

option broadcast-address 192.168.1.255;

range dynamic-bootp 192.168.1.2 192.168.1.254;

default-lease-time 21600;

max-l

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus