Friday, November 6, 2009

Setting up a DHCP server

assuming the Network you want to add a DHCP server to is the network

your router IP Address is

Your ISP's DNS servers IP Address is

the leases that you want to give out are to

first install the DHCP server software.

yum install dhcp.i386

once installed

edit /etc/dhcpd.conf (if it doesn't exist create it)

vi /etc/dhcpd.conf

add in the following lines

ddns-update-style interim;
ignore client-updates;

subnet netmask {


default-lease-time 21600;
max-lease-time 43200;
option routers;
option ip-forwarding off;
option domain-name-servers;
option broadcast-address;
option subnet-mask;

save the file :wq

next, configure the dhcpd service to start at start up

chkconfig dhcpd on

to make sure it is running either reboot or type
/etc/init.d/dhcpd start

that's it , your done. Your DHCP server will give out IP addresses to any clients that connect to your network.
there are many other options that you can add to your DHCP server, like reserving an IP address for a specific mac-address etc

to see all of these option just check out the man pages of dhcpd
man dhcpd

1 comment:

liam said...