最新的最明顯

2011年1月14日 星期五

Ubuntu Dhcp server 設定

其實Linux Dhcp server的設定以及FORWARD轉址的設定是彈指間的事,只是用久了Ubuntu美麗的桌面卻忘了以前的單純。
設定/etc/network/interfaces 加上對內與對外的連線啟用
設定/etc/sysctl.conf,啟用net.ipv4.ip_forward=1 ,再#sudo sysctl -p
#sudo apt-get install dhcp3-server
#sudo vi /etc/dpcp3/dpchd.conf加上
# Sample /etc/dhcpd.conf
# (add your comments here) 
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.example";

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
} 
還有/etc/default/dpcp3-server裡也要加上正確的介面卡
#sudo /etc/init.d/dhcp3-server start

沒有留言: