Tuesday, December 20, 2011

HOW TO CONFIGURE DHCP ON RHEL 6



Dynamic Host Configuration Protocol (DHCP) is a network protocol that automatically assigns TCP/IP information to client machines. Each DHCP client connects to the centrally located DHCP server, which returns that client's network configuration (including the IP address, gateway, and DNS servers).


First configure ipaddress in server then restart his service….

Step 1. You need to install DHCP package.

Example:
[root@localhost ~]# yum install dhcp*

Sample file copy and paste the specified location /etc/dhcp/dhcpd.conf and get the dhcp service.

-Step 2. [root@localhost ~]# cd /usr/share/doc/dhcp-4.1.1

-Step 3. [root@localhost ~]# cp -v dhcpd.conf.sample /etc/dhcp/dhcpd.conf

Open the DHCP configuration file and add the following

Step 4.[root@localhost ~]# vim /etc/dhcp/dhcpd.conf

#Change subnet, netmask, and range

subnet 192.168.
1.0 netmask 255.255.255.0 {
  range 192.168.
1.5 192.168.0.100;
 
#option domain-name-servers ns1.internal.example.org;
 # option domain-name "internal.example.org";
# option routers 192.168.1.1
;
  op
tion broadcast-address 192.168.1.255;
  default-lease-time 600;
  max-lease-time 7200;
}


Step 5. [root@localhost ~]# service dhcpd restart

Step 6. [root@localhost ~]# chkconfig dhcpd on

 
This is all this in DHCP server

No comments: