简单的dhcp配置过程 一、软件包的安装(在第二张光盘/media/cdrom/RedHat/RPMS/)
#rpm -ivh dhcp*
二、服务器的设置 #cp /usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample /etc/dhcpd.conf
#vi /etc/dhcpd.conf
ddns-update-style. interim; (dns更新的模式)
ignore client-updates; (忽略客户端更新)
subnet 192.168.0.0 netmask 255.255.255.0 { (subnet设定所要分配的子网段)
# --- default gateway
option routers 192.168.0.1; (要分配的网关)
option subnet-mask 255.255.255.0; (要分配的子网掩码)
option nis-domain "domain.org"; (nis域名)
option domain-name "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;
# --- 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.128 192.168.0.254; (分配的ip段)
default-lease-time 21600; (最小租约时间)
max-lease-time 43200; (最大租约时间)
# we want the nameserver to appear at a fixed address (保留ip)
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
}
三、dhcp服务的启动 自动启动 chkconfig --level dhcpd 35 on
启动 service dhcpd start
--------------------next---------------------