Monday, February 23, 2009

How to Install DHCP Server on Ubuntu 8.04

1. Edit dhcpd.conf file

#vi /etc/dhcp3/dhcpd.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 10.0.0.255;
option routers 10.0.0.1;
option domain-name-servers 10.0.0.1, 10.0.0.2;
option domain-name "mydomain.example";

subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.20 10.0.0.200;

2.  Set Default Interface for broadcasting DHCP 

# vi /etc/default/dhcp3-server

# Sample /etc/default/dhcp3-server
INTERFACES="eth1"

3. Start DHCP Service

# /etc/init.d/dhcp3-server start


Reference
http://www.jusupov.com/2007/07/06/how-to-install-dhcp3-server-in-ubuntu/