Setup DHCP server on Centos 6 :
Installing DHCP server on Centos 6:
Update yum repositories and packages by typing the below command
[root@localhost ~]# yum update
[root@localhost ~]# yum install dhcp
Step 2 » After installing dhcp server packages along with dependencies .Assign a static ip (eg: “192.168.1.11”) in the same DHCP range for the listening interface ( eg : “eth0″ ). Open /etc/sysconfig/network-scripts/ifcfg-eth0 file and make the changes as per your requirement .
Step 3 » Now open /etc/sysconfig/dhcpd file and add the preferred interface name to DHCPDARGS variable as below
Step 4 » open /etc/dhcp/dhcpd.conf file and paste the below lines and save it.
Step 5 » Now start the service
[root@localhost ~]# service dhcpd start
and type this below command to start dhcp service automatically while booting.
[root@localhost ~]# chkconfig --levels 235 dhcpd on
That’s it .Clients can get IP from DHCP server and Please ensure you don’t have any other dhcp servers in the same network ( Routers might have DHCP enabled ).