Setting up Centos 6 Linux DHCP

This is more for my own reference than anything, but others are welcome to follow.

1. yum -y install dhcp

2. vi /etc/dhcp/dhcpd.conf

3. Put in the following text


4. vi /etc/sysconfig/network-scripts/ifcfg-eth0

5. put in the following text:


6. /etc/rc.d/init.d/dhcpd start

7. chkconfig dhcpd on

8. Make sure your router is set to 192.168.1.10 in this case.

Debugging notes

1. For some reason could not get dhcp server working with ip 192.168.0.anything has to be 192.168.1.anything

2. "netstat -r" is a good way to find out if router ip is set in gateay, should be under default

3. "service network restart" restarts your ethernet port

4. "service dhcpd start | tail -100f /var/log/messages" will output error messages if something went wrong with starting dhcp server
---------------------

This was set up using centos6 on 4/10/2011 (installed centos using netinstall)

os from:
32 bit: http://mirror.centos.org/centos/6/os/i386/
64 bit: http://mirror.centos.org/centos/6/os/x86_64/
link to tutorial from where installed os: http://scottlinux.com/2011/07/17/centos-6-netinstall-url/

No comments:

Post a Comment