Commands :
$ sudo -s
# apt-get install dhcp3-server
# cd /etc/default/
# cp dhcp3-server dhcp3-server.bak
# vim dhcp3-server
Change :
INTERFACES=""
to :
INTERFACES="eth0"
Save,
Coomands :
# cd ../dhcp3/
# cp dhcpd.conf dhcpd.conf.bak
# vim dhcpd.conf
Change :
# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;
default-lease-time 600;
max-lease-time 7200;
...
To :
# option definitions common to all supported networks...
#option domain-name "example.org";
#option domain-name-servers ns1.example.org, ns2.example.org;
#default-lease-time 600;
#max-lease-time 7200;
Change :
# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
# range 10.5.5.26 10.5.5.30;
# option domain-name-servers ns1.internal.example.org;
# option domain-name "internal.example.org";
# option routers 10.5.5.1;
# option broadcast-address 10.5.5.31;
# default-lease-time 600;
# max-lease-time 7200;
#}
To :
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option domain-name-servers 208.67.222.222, 208.67.220.220;
option domain-name "XXX.dyndns.org";
option routers 192.168.0.1;
option broadcast-address 192.168.0.255;
default-lease-time 600;
max-lease-time 7200;
}
Save,
Coomands :
# /etc/init.d/dhcp3-server restart