dhcp服务的主要配置文件是位于/etc目录下的dhcpd.conf文件,dhcp服务安装之后,该文件中只有以下几行内容(以#号开头的表示注释行):
#
#DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
#
1、手动配置dhcp服务
命令:vi /etc/dhcpd.conf
dhcpd.conf文件中基本内容如下:
ddns-update-style none; (该行必选)
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
subnet 192.168.27.0 netmask 255.255.255.0 {
interface eth0;
range 192.168.27.81 192.168.27.100;
default-lease-time 604800;
max-lease-time 7200;
option routers 192.168.27.254;
option domain-name-servers 192.168.27.234;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.27.255;
# 以下配置静态IP
host syzx-fangjy {
hardware ethernet 00:0C:29:89:0D:A4;
fixed-address 192.168.27.230;
}
}
2、设置防火墙
命令:lokkit
选择Customize (自定义),然后在Other Ports:栏输入dhcp:udp,dhcp:tcp,在Custom Rules:栏输入67,68,之后选择OK。
3、启动(或重新启动dhcp服务)
service dhcpd start (service dhcpd restart)
经过以上步骤后,dhcp服务配置成功。
fanpei 于 2010-11-16 16:10:56发表:
我没有ho时间看.保存网页再说