1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
| # dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#
# option definitions common to all supported networks...
#此行我修改为自己的域名
option domain-name "liuliancao.com";
#此处servers我修改为自己dns的地址
option domain-name-servers 192.168.177.130,192.168.177.133;
#修改默认租约
default-lease-time 6000;
max-lease-time 72000;
# Use this to enble / disable dynamic dns updates globally.
#ddns-update-style none;通常这不是安全的做法,会修改dns服务器的内容,建议关闭
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
#定义不同的日志级别,这里默认吧
log-facility local7;
# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.
#让服务知道,这是一个不被允许使用的域,我把它注释掉了
#subnet 10.152.187.0 netmask 255.255.255.0 {
#}
# This is a very basic subnet declaration.
#最基本的设置,有子网的定义,地址池的设置,路由(网关)的设置,此处我也注释掉
#subnet 10.254.239.0 netmask 255.255.255.224 {
# range 10.254.239.10 10.254.239.20;
#option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}
# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.
#BOOTP的使用说明,不使用
#subnet 10.254.239.32 netmask 255.255.255.224 {
# range dynamic-bootp 10.254.239.40 10.254.239.60;
#option broadcast-address 10.254.239.31;
#option routers rtr-239-32-1.example.org;
#}
#典型的配置,我修改了下成为自己的配置
# A slightly different configuration for an internal subnet.
subnet 192.168.177.0 netmask 255.255.255.0 {
range 192.168.177.10 192.168.177.20;
#默认情况下为130-254虚拟机dhcp分配,等会用来比较接受了哪个服务器
option domain-name-servers 192.168.177.130,192.168.177.133;
option domain-name "liuliancao.com";
option routers 192.168.177.1;
# option broadcast-address 10.5.5.31;
default-lease-time 600;
max-lease-time 7200;
}
#定义特殊的主机,并为之绑定ip地址,即固定ip地址,这里先不用
#host server {
#通过mac定位
# hardware ethernet 00:0C:29:1D:07:88;
# fixed-address 192.168.177.133;
#}
|