Dynamic Host Configuration Protocol provides internet protocol address to its client computer in the network.

DHCP plays a vital role where there are lots of computer and eradicate the time to manually add ip address to its client

computer. To make a Ubuntu server a DHCP server, we need a package called dhcp3-server, which is the lasted version.

We could manually enter the required class of ip address and also add network information like subnet mask, default gateway,

reserve Ip address for specific client computer, add domain name, manage range, etc.

Important note to consider is the DHCP server should have a static IP address.

1) configuring DHCP server in ubuntu:

#sudo apt-get install dhcp3-server
## 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;
}

 

2)  If you need to specify a WINS server for your Windows clients,
you will need to include the netbios-name-servers option, e.g.

option netbios-name-servers 192.168.1.1;

3) configuring dhcp client

#vi /etc/network.interfaces

auto eth0
iface eth0 inet dhcp

Enjoy !!!!

 

Advertisements