This FAQ assumes you have root access to your linux machine, dhcp is installed, and also assumes you have some knowledge of the linux operating system.
You will need to find the dhcpd.conf file, this is the configuration file used to configure DHCP.
Let's assume that the files were already there which would be the case for most default systems.
However, if they were not there you would need to create them like so:
The dhcpd.conf file will contain all of the configuration data. The dhcpd.leases file will be used by the daemon to keep track of which machines it has leased IP addresses to.
NOTE: You must have multicast support built into your kernel to support dhcp, if you do not have this you will need to recompile your kernel.
This is what the normal dhcpd.conf file may look like:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.50 192.168.1.100;
}
If you are setting up a DHCP server supporting more than one subnet, you must create a subnet entry for each of your subnets. For example adding a second subnet would be simple like this:
This is very useful if you plan to firewall and forward packets to specific machines, but want to use DHCP on the whole network. You will always know which machine has which address, very useful.
Now because Windows handles dhcp in a different way, you will need to make some routing changes if you plan to support windows clients.
route add -host 255.255.255.255 dev eth0
NOTE: Make sure you add this line to your boot up file so it gets activated at boot.
You will also need to make a startup script for dhcp to start or add it your bootup like this:
chkconfig --level 35 dhcpd on
chkconfig --level 01246 dhcpd off
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.