<b>CentOS 5.5 DHCP服务器安装指南</b>[服务器安全]
本文“<b>CentOS 5.5 DHCP服务器安装指南</b>[服务器安全]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
CentOS 5.5 DHCP服务器安装指南:
1.直接用yum -y dhcp安装好dhcp rpm软件包.也可以到http://pbone.net上下载便可.
2.安装好之后就是拷贝配置文件dhcpd.conf文件,在/usr/share/doc/dhcp-3.0/dhcpd.conf.example 把这个样本文件拷重新命名拷贝到 /etc/dhcpd.conf便可
3.vi /etc/dhcpd.conf 内容以下这个是我已经改恰好的,只要改正这个文件便可.
下载dhcpd.conf for CentOS 5.5
ddns-update-style interim;
ignore client-updates;
subnet 192.168.10.0 netmask 255.255.255.0 { //subnet一个子网中的客户端,动态地指定ip地址,则在此subnet声明中,必须包含一组ip地址范围.
# --- default gateway
option routers 192.168.10.15; //网关地址
option subnet-mask 255.255.255.0;//子网掩码
option nis-domain "my.lk.org";
option domain-name "my.lk.org";
option domain-name-servers 202.101.172.35; //dns ip地址
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.10.128 192.168.10.254; //地址池pool范围地址
default-lease-time 21600;//默许的ip租用时间期限单位为秒
max-lease-time 43200;//ip租用最长的期限单位为秒
# we want the nameserver to appear at a fixed address //用来绑定服务器的mac物理地址.
host ns {
next-server stationx.example.com;
hardware ethernet 00:0C:29:7E:7F:86;
fixed-address 192.168.10.223;
}
}
4.service dhcpd start 便可启动,假如想开机启动可以ntsysv 服务当中挑选dhcpd星号便可.
配置文件也可以写成以下情势:
#//192.168.10.*
subnet 192.168.10.0 netmask 255.255.255.0 {
option routers 192.168.10.15; 网关
option subnet-mask 255.255.255.0; //子网掩码
option broadcast-address 192.168.10.255; //广播地址
option domain-name-servers
202.101.172.xx,202.101.172.4.xx
range dynamic-bootp 192.168.10.20 192.168.10.150; //地址池范围
default-lease-time 21600;
max-lease-time 43200;
}
以上是“<b>CentOS 5.5 DHCP服务器安装指南</b>[服务器安全]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |