Technowine

The Search Ends Here

How To Configure Dhcp Server On Redhat/Linux?

Posted by admin On June - 19 - 2009

1.zoomDynamic Host Configuration Protocol (DHCP) is a network application protocol used by devices to obtain configuration information for operation in an Internet Protocol network .This protocol reduces system administration and we can add new devices easily within the network.

DHCP also finds application in booting the diskless station.Diskless station sends out RARP signal to dhcp server and the server in response gives the ip-address along with netmask and gateway.
Configuring dhcp server is not a difficult task and dhcp-server can be setup with some easy steps mentioned below

INSTALLATION STEPS:

Step 1. )First of all check whether the package is installed on your system or not.we can check this by :-

#rpm –qa|grep dhcp

A package named dhcp-3.0.5-18.el5.rpm should show up..If it shows up in the result that means the package is installed on your system.Otherwise install it through yum.This can be done by running the following command

#yum install dhcp
or use the following command.
#rpm –ivh 3.0.5-18.el5

Again check with rpm –qa|grep dhcp..The package should show up now.
Step 2.)Linux by default doesn’t put the default dhcp configuration file in location but does it in some other location.

To move to its original location type the following commands
# cp /usr/share/doc/dhcp-3.0pl1/dhcpd.conf.sample /etc/dhcpd.conf

**Location of the default file may vary with linux versions.So one can find the file using the following command:

#locate dhcpd.conf.sample

Step 3.)Edit the dhcp configuration file with your favourite editor:

I am using vi for this:

vi /etc/dhcpd.conf

add the following parameters:
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option domain-name “thedomain.com”;
option domain-name-servers 192.168.1.1;
option time-offset -18000; # Eastern Standard Time
range 192.168.1.200 192.168.1.250;
next-server 192.168.1.1;
}
Step 4.) Save and exit from the editor.

Step 5. )For other dhcp option go to dhcp man page..
# man dhcp-options

Step 6.) Next we need to create a new .leases file because older versions don’t have the .leases file by default :
# touch /var/lib/dhcp/dhcpd.leases

Step 7.)Start the dhcpd service:

#service dhcpd start

Step 8.)If any changes are made to the configuration settings then we need to restart the service:

# service dhcpd restart

Step 9.)dhcp server is up and running.

Step10.)To enable dhcp service at boot time,go for following command:

#chkconfig dhcpd on


Bookmark and Share

Related articles
How to configure yum server

How to make a nfs server

3 Responses to “How To Configure Dhcp Server On Redhat/Linux?”

  1. [...] Related articles How to configure dhcp server on redhat/linux [...]

  2. [...] Related articles How to configure dhcp server on redhat/linux [...]

  3. [...] How to configure dhcp server on redhat/linux How To, Linux [...]

Leave a Reply

Sponsors

About Me

Hello everyone, My name is Jaskiran Singh and I am currently pursuing B. Tech final year from Maharaja Agrasen Institute of technology.I am currently RHCT,RHCE,RHCSS certified.

Twitter

    Photos

    Activate the Flickrss plugin to see the image thumbnails!