Steps to install and configure a DHCP Server

This configuration will work on all RPM based linux distributions (Redhat,Fedora,CentOS,etc.)

Configure DHCP ( Dynamic Host Configuration Protocol ) Server. If you make your linux computer DHCP server, it’s neccesarry to disable DHCP function on router in LAN.
Step1Install dhcp packages
[root@server ~#]yum install dhcp
Step2: Edit the dhcp configuration file located in /etc/dhcp/dhcpd.conf
[root@server ~#]vi /etc/dhcp/dhcpd.conf
#[Note: The lines to add or edit in dhcpd.conf file is colored brown. Enable the lines by removing ‘#’ if required and edit. Allways backup the configuration file before editing.]
#Add your domain name
option domain-name    "";
#Add DNS  server addresses(for clients)
option domain-name-servers,;
#Set lease time
default-lease-time 600;
#set maximum lease time
max-lease-time 7200;
#activate dhcp server
#Add your ip address pool in below format. In this example network and ip address pool is  to 250 for clients,gateway=
subnet netmask {
  range dynamic-bootp;
  option broadcast-address 10.1010.255;
  option routers;
#This is the way to Reserve an ip address  for a special client named Accounts . [ MACaddress based reservation]. Here 00:E0:5D:A0:6A:0C is the mac address of accounts pc’s NIC card(optional).
host Accounts {
  hardware ethernet 00:E0:5D:A0:6A:0C;
Step3: Start dhcp service
[root@server ~#]service dhcpd start
Step4: Add dhcp service to startup
[root@server ~#]chkconfig dhcpd on
Step5: To do in client computers
Set Obtain ip automatically in all windows and “Use DHCP” in linux client computers.