Monday, February 6, 2012

How To Configure DHCP Server In RHEL6

##### DHCP Dynamic Host Configuration Protocol ##########

Dynamic Host Configuration Protocol (dhcp) server automatically assign an IP adresss to a client machine.
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.0.0 netmask 255.255.255.0 {
  range 192.168.0.2 192.168.0.10;
  option domain-name-servers ns1.internal.example.org;
  option domain-name "internal.example.org";
  #option routers 10.5.5.1;
  #option broadcast-address 10.5.5.31;
  default-lease-time 600;
  max-lease-time 7200;
}
Step 5. [root@localhost ~]# service dhcpd restart
Step 6. [root@localhost ~]# chkconfig dhcpd on

****Enjoy the magic*****








Favorites