需求
1. 为 192.168.1.0/24 网段创建一个 DHCP 服务器。
2. 已知 192.168.1.0/24 网段的网关为 192.168.1.1,DHCP 服务器为 192.168.1.78
3. 已知域名为 flyshitou.com
4. 保留主机有 flyshitou,其 IP 地址为 192.168.1.100,其 MAC 地址为 12:34:56:78:AB:CD。
5. 分配的地址段为 192.168.1.11—192.168.1.254
环境情况
1.操作系统:red hat as 4.0
2.服务器软件包:
dhcp-3.0.1-12_EL.i386.rpm
dhcp-devel-3.0.1-12_EL.i386.rpm
//查看dhcp服务包是否安装,以下情况说明已经安装:



//拷贝dhcp配置例子文件到/etc目录,并命名为dhcpd.conf


//修改主配置文件
[root@localhost root]#vi /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;

subnet 192.168.1.0 netmask 255.255.255.0 {

# --- default gateway
option routers 192.168.1.1; //网关
option subnet-mask 255.255.255.0; //子网掩码

# option nis-domain "domain.org";
option domain-name "flyshitou.com"; //域名
option domain-name-servers 192.168.1.78; //服务器

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.1.11 192.168.1.254; //分配的地址范围
default-lease-time 21600; //租约时间(单位秒)
max-lease-time 43200;

# we want the nameserver to appear at a fixed address
host flyshitou { //保留地址...
# next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 192.168.1.100;
}
}































//启动DHCP服务器.并测试是否启动成功..




















