Wednesday, 28 December 2011

Dynamic Host Configuration Protocol

DHCP SERVER
Dynamic Host Configuration Protocol
This server is used to allocate the IP ADDRESS dynamically for the hosts connected to this server
PACKAGE REQUIRED : dhcp
yum list dhcp
IF THE RPM IS NOT INSTALLED THEN USING YUM TO INSTALL
yum install dhcp
STEP 1: Copy the sample file and rename it
cd /usr/share/doc/dhcp-3.0.1/
cp dhcpd.conf.sample /etc/dhcpd.conf
STEP 2: Edit the configuration file as follows
vi /etc/dhcpd.conf
option routers
option subnet-mask
option domain-name
option domain-name-servers
if we want to allocate IP dynamically then do the following:
range dynamic-bootp 192.168.0.200 192.168.0.225;
default-lease-time 21600;
max-lease-time 43200;
if we want to specify a particular HOSTNAME should have to assign a same IP then do the following:
host station201 {
192.168.0.254;
255.255.255.0;
"linux.com";
192.168.0.254;
next-server station201.linux.com;
hardware ethernet 00:50:FC:2A:AB:9D;
fixed-address 192.168.0.201;
}
:wq!
STEP 3: To enable the services
service dhcpd start/restart/reload
chkconfig dhcpd on

No comments:

Post a Comment