Life in code, apps and OS's

How to install DHCP Server on Ubuntu Server 6.06

Posted on: May 20, 2007

Assumed that “eth0” is the interface for network card

IP Address Range: 192.168.0.100 to 192.168.0.200
Subnet Mask: 255.255.255.0
DNS Servers: 202.188.0.133, 202.188.1.5
Domains: tm.net.my
Gateway Address: 192.168.0.1
sudo apt-get install dhcp3-server 
sudo cp /etc/default/dhcp3-server /etc/default/dhcp3-server_backup 
gksudo gedit /etc/default/dhcp3-server
  • Find this line
... 
INTERFACES=""
  • Replace with the following line
INTERFACES="eth0"
  • Save the edited file
sudo cp /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf_backup 
gksudo gedit /etc/dhcp3/dhcpd.conf
  • Find this section
... 
# 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; 
...
  • Replace with the following lines
# 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;
  • Find this section
... 
# 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; 
#} 
...
  • Replace with the following lines
# A slightly different configuration for an internal subnet. 
subnet 192.168.0.0 netmask 255.255.255.0 { 
 range 192.168.0.100 192.168.0.200; 
 option domain-name-servers 202.188.0.133, 202.188.1.5; 
 option domain-name "tm.net.my"; 
 option routers 192.168.0.1; 
 option broadcast-address 192.168.0.255; 
 default-lease-time 600; 
 max-lease-time 7200; 
}
  • Save the edited file
sudo /etc/init.d/dhcp3-server restart

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


  • How To Dyndns Ubuntu | Order Goods: […] DynDNS Client Setup on Ubuntu | Life in code, apps and OS’s – May 18, 2008  · 7 Responses to "DynDNS Client Setu
  • lizrandolph10886: Wonderful article! We are linking to this particularly great post on our website.nKeep up the great writing. Click
  • waseem Ahmad: Dear. i have a separate application server and a separate mysql database server. when i want to access the application server to login from the local
%d bloggers like this: