一盏智慧的明灯 放之宇宙万物开朗
分类: LINUX
2013-05-22 22:47:01
安装dhcp服务软件
yum install -y dhcp
cat /usr/share/doc/dhcp*/dhcpd.conf.sample >> /etc/dhcp/dhcpd.conf
默认模版配置文件内很多注释看起来比较麻烦 可以把所有的注释删除,再加入如下配置内容即可
#vi /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
ddns-update-style none;
log-facility local7;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.80 192.168.1.90;
option domain-name-servers 8.8.8.8;
option routers 192.168.1.1;
option broadcast-address 192.168.1.255;
default-lease-time 600;
max-lease-time 7200;
}
host fantasia {
hardware ethernet 08:00:27:AE:8F:17;
fixed-address 192.168.1.88;
}
以上配置相关地方以本地配置实际为准
service dhcpd start 启动dhcp 服务