rpm –ivh dhcp-3.0.5-7.el5.i386.rpm        //rpm安装DHCP的服务器端
cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf                           
//小提示:DHCP服务器默认情况下是没有配置文件的,需要从/usr目录下复制样本,然后再进行修改,
[root@loaclhost Server]cd /etc
[root@loaclhost etc]vi dhcpd.conf
Ddns-update-style interim;               
Ignore client-updates;                   //动态DNS解析
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";       //NIS域名为domain.org
            Option domai-name               "domain.org";       //域名为domain.org
            Option domain-name-servers      "192.168.1.1";      //DNS
            Option time-offset              -18000; # eastern Standard Time         //
#           Option ntp-servers              192.168.1.1;
#           Option netbios-name-servers     192.168.1.1;
# --- Selscts point-to-point node (default is hybrid). don't change thisunless
# -- 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;           //默认租约时间21600s
            Max-lease-time 43200;               //最大租约时间为43200s
            # 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 192.168.0.11;
            }
}

service dhcpd stop
service dhcpd start
这是要注意是dhcpd,而不是dhcp.
还要注意不要用restart .

 

 

;这里我做的测试环境是基于red 5和虚拟机的XP
服务开启后xp顺利的拿到了IP。