sudo apt-get install dhcp3-server
2. 設定DHCP server要發派的IP範圍和基本網路設定,更改"/etc/dhcp3/dhcpd.conf"這個檔案的設定。
sudo vim /etc/dhcp3/dhcpd.conf
default-lease-time 6000;
max-lease-time 72000;
option domain-name-servers 168.95.1.1;
subnet 192.168.10.0 netmask 255.255.255.0 {
subnet 192.168.10.0 netmask 255.255.255.0 {
range 192.168.10.2 192.168.10.253;
option routers 192.168.10.254;
option broadcast-address 192.168.10.255;
}
subnet 192.168.20.0 netmask 255.255.255.0 {
range 192.168.20.2 192.168.20.253;
option routers 192.168.20.254;
option broadcast-address 192.168.20.255;
}
3. 設定DHCP server要監聽的網路卡,更改"/etc/default/dhcp3-server"這個檔案的設定。
sudo vim /etc/default/dhcp3-server
INTERFACES="eth1 eth2"
4. 所有的基本設定完成後,重新啟動DHCP server。
sudo /etc/init.d/dhcp3-server start
[Reference]
沒有留言:
張貼留言