RedHad 4 DHCP服务器的安装

环境: RedHat as4
主机ip 10.8.8 .2 255.255.255.0
地址分配:多子网分配网段为 10.1.6 (7\11\13).0  10.3(4\7\9 21).0
DHCP 安装包: dhcp-3.0pl2-6.14.rpm
安装后文件生成位置
/etc/rc.d/init.d/dhcpd dhcp 启动、停止、重启配置文件)
/etc/rc.d/init.d/dhcrelay
/etc/sysconfig/dhcpd
/etc/sysconfig/dhcrelay
/var/lib/dhcp/dhcpd.leases dhcp ip 地址租凭记录)
/etc/dhcpd.conf dhcp 配置文件)
 
Dhcpd.conf 正确配置实例
default-lease-time 604800; ip 租凭有效时间)
ddns-update-style ad-hoc; (动态 DNS 解析)
# aidf6 (子网)
subnet 10.1.6 .0 netmask 255.255.255.0 {
        option domain-name-servers 202.106.0.20 , 202.106.196.115 , 202.106.46.151;
        option routers 10.1.6 .254;
        range 10.1.6 .30 10.1.6.99;
        }
# aidf10 (子网)
subnet 10.1.10 .0 netmask 255.255.255.0 {
        option domain-name-servers 202.106.0.20, 202.106.196.115, 202.106.46.151;
        option routers 10.1.10 .254;
        range 10.1.10 .30 10.1.10.99;
        }
# DHCP (子网)
subnet 10.8.8 .0 netmask 255.255.255.0 {
        ddns-updates on; (这一句很重要)
        option domain-name-servers 202.106.46.151, 202.106.195.68, 202.106.0.20;
        option routers 10.8.8 .254;
        range 10.8.8 .30 10.8.8.99;
        }
 
第一次安装后配置了两个子网 aidf6 aidf10 ,启动 dhcp etc/rc.d/init.d/dhcpd start )启动报错
启动dhcpd 失败 :
 
Starting dhcpd: Internet Systems Consortium DHCP Server V 3.0.1
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
 
** You must add a ddns-update-style statement to /etc/dhcpd.conf.
   To get the same behaviour as in 3.0b2pl11 and previous
   versions, add a line that says "ddns-update-style ad-hoc;"
   Please read the dhcpd.conf manual page for more information. **
 
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.
根据出错的提示反馈是在 etc/dhcpd.conf 里少了一项 ddns-update-style ad-hoc; (动态域名解析) ,加上这一项后再次启动依旧报错
启动dhcpd 失败
 
No subnet declaration for eth0 ( 10.8.8 .2).
** 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!
根据出错提示反馈在 dhcpd.conf 配置文件里没有关于 eth0 的子网声明,原来在配置 dhcpd.conf 时先要将网卡所在的子网配置上
DHCP SERVER 怎么给一个机器赋域名
因为 dhcp3.0 以后新添加了 ddns-update-style (动态 DNS 解析)因配合 bin8 以后所使用的一种新功能。如果你是使用 dns2go 之类的这种软件做动态 dns 解析,你可以启动 ddns-update-style, 如果不是做动态 dns 解析,你需要把 ddns-update-style off 掉。
关于 dhcp 共有三种启动方式
   ddns-update-style ad-hoc
   ddns-update-style interim
   ddns-update-style none

你可能感兴趣的:(服务器,职场,DHCP,休闲,RedHad)