วันอาทิตย์ที่ 14 ธันวาคม พ.ศ. 2551

How To Set Up A DHCP Server on Ubuntu

1.sudo apt-get install dhcp3-server
2.sudo vi /etc/default/dhcp3-server

Find this line
INTERFACES=”eth0″
Replace with the following line
INTERFACES=”eth1″
Save and exit.This is optional.

3. cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_orig
4. cat /dev/null > /etc/dhcp3/dhcpd.conf
5. vi /etc/dhcp3/dhcpd.conf

6. ----------------------------------------------------------------

ddns-update-style none;
option domain-name-servers 145.253.2.75, 193.174.32.18;
default-lease-time 86400;
max-lease-time 604800;
authoritative;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.200 192.168.0.229;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
}

7. /etc/init.d/dhcp3-server restart