DHCP配置文件dhcpd.conf

9次阅读

[root@searu ~]# cat /etc/dhcpd.conf

# — 设置 DHCP 服务器与 DNS 服务器的动态信息更新模式
ddns-update-style interim;

# — 忽略客户端更新
ignore client-updates;

# — 声明设置子网信息
subnet 192.168.1.0 netmask 255.255.255.0 {

# — 设置默认网关
option routers 192.168.1.22;
option subnet-mask 255.255.255.0;

# — 设置域名及 DNS 服务器
option nis-domain “searu.org”;
option domain-name “searu.org”;
option domain-name-servers 192.168.1.22;

# — 设置 NTP 相关时间同步信息
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;

# — 选择点对点模式(默认是混合模式)
# — 除非你很了解 Netbios,否则不要改变
# option netbios-node-type 2;

# — 设置地址池、默认租约时间、最大租约时间
range dynamic-bootp 192.168.1.10 192.168.1.30;
default-lease-time 21600;
max-lease-time 43200;

# — 指定一个固定的地址给名为 searu 的主机
# — IP 为 192.168.1.254,该网络接口 MAC 地址为 90:FB:A6:3F:BC:6C
host searu {
hardware ethernet 90:FB:A6:3F:BC:6C;
fixed-address 192.168.1.254;
}
}
[root@searu ~]#

其他:

# 定义主机名(无盘)
next-server marvin.redhat.com;

# 声明分享地址池(relay)
shared-network test {}

正文完