LinuxSir.cn,穿越时空的Linuxsir!

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

在FC6下安装dhcp遇到的问题

[复制链接]
发表于 2007-9-2 13:11:27 | 显示全部楼层 |阅读模式
环境:FC6文本模式安装的,在安装软件列表中没有要任何软件除了vim
安装完成后用yum 安装了dhcp。并用yum update对系统做了全面升级
本机用固定ip,192.168.5.254
三层交换上做好了dhcp信号的ip指定
dhcp。conf如下
[root@dhcp dhcpd]# vim /etc/dhcpd.conf
ddns-update-style none;
ignore client-updates;

subnet 192.168.5.0 netmask 255.255.255.0 {}

#配置192.168.0.0段ip分配
subnet 192.168.0.0 netmask 255.255.255.0 {
        option routers                  192.168.0.1;
        option subnet-mask              255.255.255.0;
        option domain-name-servers      202.98.192.68,202.98.198.168;
        range dynamic-bootp 192.168.0.20 192.168.0.254;
#租期6小时
        default-lease-time 21600;
#最大租期12小时
        max-lease-time 43200;
}
奇怪的是必须要有subnet 192.168.5.0 netmask 255.255.255.0 {}
如果没有dhcpd将不能启动,提示如下
[root@dhcp dhcpd]# dhcpd
Internet Systems Consortium DHCP Server V3.0.5-RedHat
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Wrote 4 leases to leases file.

No subnet declaration for eth0 (192.168.5.254).
** 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.
[root@dhcp dhcpd]#

另一个问题

如果客户机是英文文件名在dhcpd。leases中的记录就有计算机名
如果中文就没有???搞不懂
发表于 2007-9-2 21:42:18 | 显示全部楼层
道理很简单:你有多块网卡!
除非你在dhcpd启动参数中指定哪块网卡启动dhcp服务,否则在dhcpd配置中必须为每个接口指定subnet。
redhat下的dhcpd启动参数在/etc/sysconfig/dhcpd文件里,将需要启动dhcp服务的接口列到其中(具体格式见文件中的例子)。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-9-2 22:06:08 | 显示全部楼层
我只有一个网卡呀
回复 支持 反对

使用道具 举报

发表于 2007-9-15 01:01:40 | 显示全部楼层
那这句话什么意思?
No subnet declaration for eth0 (192.168.5.254).

不会是你加了ip别名吧?!

用下面命令检查一下:
ifconfig -a
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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