一般来说我们在安装linux时如果选了everything,那么你的dhcp也就有了。真好啊~!但是你想要它 能够正常工作起来 ,那还得你自己动动手。
DHCPd后台程序总是读取配置文件/etc/dhcpd.conf, 下面给出一我主机上的DHCP配置文件的例子:
ddns-update-style interim;
ignore client-updates;
subnet 192.168.25.0 netmask 255.255.255.0 {
# --- default gateway
option routers 192.168.25.15;
option subnet-mask 255.255.255.0;
# option nis-domain "uc88.domain";
option domain-name "uc88.domain";
option domain-name-servers 202.96.128.68,192.168.25.15;
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.25.100 192.168.25.254;
default-lease-time 259200;
max-lease-time 518400;
# we want the nameserver to appear at a fixed address
# host ns {
# next-server marvin.RedHat.com;
# hardware ethernet 12:34:56:78:AB:CD;
# fixed-address 207.175.42.254;
# }
}
