[root@chenxi ~]# cat /etc/dhcp/dhcpd.conf
# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#
# option definitions common to all supported networks...
option domain-name "chenxi"; # 自動分配的域名
option domain-name-servers 144.144.144.144; #dns地址
#option routers 192.168.8.1 ; # 網(wǎng)關(guān)服務(wù)
default-lease-time 600; #服務(wù)器以秒為單位的租期.
max-lease-time 7200; #客戶端最大要求的租期以秒為單位.
# Use this to enble / disable dynamic dns updates globally.
#ddns-update-style none;
# 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 192.168.9.0 netmask 255.255.255.0 {
range 192.168.9.10 192.168.9.70; #分配9.0網(wǎng)端
option routers 192.168.9.1 ; # 分配網(wǎng)關(guān)地址;如果這里做了配置默認(rèn)這里優(yōu)先級高
}
subnet 192.168.8.0 netmask 255.255.255.0 {
range 192.168.8.10 192.168.8.70; #如果這行注釋表示不分配自己所在的IP網(wǎng)段捆昏;只分配9.0網(wǎng)段地址
option routers 192.168.8.1 ; # 網(wǎng)關(guān)地址
}
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.
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 10.5.5.0 netmask 255.255.255.224 {
range 10.5.5.26 10.5.5.30;
option domain-name-servers ns1.internal.example.org;
option domain-name "internal.example.org";
option routers 10.5.5.1;
option broadcast-address 10.5.5.31;
default-lease-time 600;
max-lease-time 7200;
}
# Hosts which require special configuration options can be listed in
# host statements. If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.
host passacaglia {
hardware ethernet 0:0:c0:5d:bd:95; # 表示只要此msck地址我就給你分配下面的地址
fixed-address 192.168.8.100;
server-name "toccata.fugue.com";
option domain-name "internal.example.org";
}
# Fixed IP addresses can also be specified for hosts. These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
host fantasia {
hardware ethernet 08:00:07:26:c0:a5;
fixed-address fantasia.fugue.com;
}
# You can declare a class of clients and then do address allocation
# based on that. The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.
class "foo" {
match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
}
shared-network 224-29 {
subnet 10.17.224.0 netmask 255.255.255.0 {
option routers rtr-224.example.org;
}
subnet 10.0.29.0 netmask 255.255.255.0 {
option routers rtr-29.example.org;
}
pool {
allow members of "foo";
range 10.17.224.10 10.17.224.250;
}
pool {
deny members of "foo";
range 10.0.29.10 10.0.29.230;
}
}
DHCP的配置
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
- 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來地沮,“玉大人嗜浮,你說我怎么就攤上這事∧σ桑” “怎么了危融?”我有些...
- 文/不壞的土叔 我叫張陵,是天一觀的道長雷袋。 經(jīng)常有香客問我吉殃,道長,這世上最難降的妖魔是什么楷怒? 我笑而不...
- 正文 為了忘掉前任蛋勺,我火速辦了婚禮,結(jié)果婚禮上率寡,老公的妹妹穿的比我還像新娘迫卢。我一直安慰自己,他們只是感情好冶共,可當(dāng)我...
- 文/花漫 我一把揭開白布乾蛤。 她就那樣靜靜地躺著,像睡著了一般捅僵。 火紅的嫁衣襯著肌膚如雪家卖。 梳的紋絲不亂的頭發(fā)上,一...
- 文/蒼蘭香墨 我猛地睜開眼逛薇,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了疏虫?” 一聲冷哼從身側(cè)響起永罚,我...
- 正文 年R本政府宣布液肌,位于F島的核電站挟炬,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏嗦哆。R本人自食惡果不足惜谤祖,卻給世界環(huán)境...
- 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望老速。 院中可真熱鬧粥喜,春花似錦、人聲如沸橘券。這莊子的主人今日做“春日...
- 文/蒼蘭香墨 我抬頭看了看天上的太陽旁舰。三九已至锋华,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間箭窜,已是汗流浹背毯焕。 一陣腳步聲響...
推薦閱讀更多精彩內(nèi)容
- 一活孩、給路由器安裝上模塊 路由器0物遇、1乖仇、2都接上模塊TX 二、端口IP配置 路由器2: Router>enable ...
- 文/ 珂倩_520 連續(xù)更文第88篇询兴,加油乃沙! 2017年11月13日 星期一 天氣晴 今天是雙十一之后的第一個...