分类: LINUX
2009-05-08 18:31:53
sudo apt-get install dhcp3-server 安裝dhcp server相關套件
sudo cp /etc/default/dhcp3-server /etc/default/dhcp3-server_backup 複製一預設的dhcp server網卡設定檔 sudo gedit /etc/default/dhcp3-server 修改dhcp server的網卡設定檔 INTERFACES="" => INTERFACES="eth2" 將dhcp server網卡設為eth1
sudo cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_backup 複製一預設的dhcp server設定檔 sudo gedit /etc/dhcp3/dhcpd.conf 修改dhcp server的網卡 # A slightly different configuration for an internal subnet.
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.0 192.168.1.255;
option domain-name-servers 140.112.254.4,140.112.2.2;
option domain-name "ubtw.net";
option routers 192.168.0.1;
option broadcast-address 192.168.1.255;
default-lease-time 600;
max-lease-time 7200;
}設定dhcp server的對內網卡(eth2)
將對內網卡eth2設一個固定IP: | dhcp Server |
sudo /etc/init.d/dhcp3-server restart | 重新啟動dhcp Server |