DHCP Server Configuration

DHCP stands for Dynamic Host Configuration Protocol. This protocol reduces the workload. dhcp-3.0.1-59.EL4, dhcp-3.0.1-58.EL4, dhcp-3.0.1-54.EL4 — anyone of these packages are used for dhcp server. At first we have to check the package whether it is installed or not. We can check this with the following command.

#rpm -qa | grep dhcpd*

Here the * sign after the ‘dhcpd’ means anything after ‘dhcpd’ wil be grep. If the package is installed than we can directly go for configuration. If no output appears than we have to install the package. We can do this with the following command.

#rpm -ivh dhcpd*

Now, the package is installed. We have to edit the /etc/dhcpd.conf file to configure the dhcp server.

vi /etc/dhcpd.conf

Sometimes we will not find any file like /etc/dhcpd.conf . At such situation we have to go to /usr/share/doc/ directory. There we will find another folder named like dhcp-3.01. We will enter into that directory.

#cd /usr/share/doc

#cd dhcp-3.01

Here will find a file named dhcpd.conf.sample. We will copy this file as follows.

cp dhcpd.conf.sample /etc/dhcpd.conf

Now we will edit the file.

vi /etc/dhcpd.conf

And in this file we will change the file as follows.

{

optionrouters 192.168.100.1

optionnetmask 255.255.255.0

domainnameserver 192.168.0.1, 4.2.2.1;

optionbroadcastaddress 192.168.100.255

optionbootp 192.168.100.2 192.168.100.254

defaultleasttime 21600

maxleasttime 43200

}

This will configure dhcp server. If we want to enter fixed IP, than we have to add the folowing after the previous command.

host DNS

{

hw ether 00:21:D3:C1:11:12

fixed-address 192.168.100.5

}

This is important as some pc connected to printer will need to have fixed IP.

Thats all according to my knowledge. Expect some comments about this issue.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

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

%d bloggers like this: