DHCP服务器安装:
apt-get instll dhcp3-server
/etc/default/dhcp3-server:配置监听接口
/etc/init.d/dhcp3-server restart:重启dhcp3-server服务器
/etc/resolv.conf: 本机域名
一般例子:
/etc/dhcp3/dhcpd.conf:配置文件
ddns-update-style none; #动态更新DNS
default-lease-time 36000;#默认租用时间
max-lease-time 72000; #最大租用时间
subnet 192.168.10.0 netmask 255.255.255.0
{
option domain-name “chen.com”; #域名设置
option netbios-name-servers 192.168.10.1; #设置netsios服务器
option routers 192.168.10.1; #默认网关
range 192.168.10.2 192.168.10.126;
option subnet-mask 255.255.255.0;
}
#绑定特定主机
host chen
{
hardware Ethernet client_mac;
fixed-address ip;
option routers gw_ip; # 可以省略,使用subnet的配置。
}
服务器地址和分配地址在同一网段,则只需要为服务器分配一个该网段固定的地址即可;如果服务器地址不在该网段,则需要为服务器所在网段设置一个空地址池。