Home | 簡體中文 | 繁體中文 | 雜文 | 知乎專欄 | Github | OSChina 博客 | 雲社區 | 雲棲社區 | Facebook | Linkedin | 視頻教程 | 打賞(Donations) | About
知乎專欄多維度架構 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者”

第 32 章 DHCP

目錄

32.1. DHCP Server
32.2. dhclient
32.3. release matching connections

32.1. DHCP Server

eth0 公網ip

eth1 192.168.0.1 255.255.255.0

eth2 192.168.1.1 255.255.255.0

		
dhcpd.conf配置內容如下:

#Sample /etc/dhcpd.conf
default-lease-time 1200;
max-lease-time 19200;
option domain-name-servers 202.102.192.68,202.102.199.68; 
#option domain-name "test.test";
ddns-update-style ad-hoc;

subnet 192.168.0.0 netmask 255.255.255.0 {
	range 192.168.0.20 192.168.0.200;
	option subnet-mask 255.255.255.0;
	option broadcast-address 192.168.0.255;
	option routers 192.168.0.1;
}
subnet 192.168.1.0 netmask 255.255.255.0 {
	range 192.168.1.20 192.168.1.200;
	option subnet-mask 255.255.255.0;
	option broadcast-address 192.168.1.255;
	option routers 192.168.1.1;
}