Install the DHCP server from ISC ( http://www.isc.org/) by using Red Hat's RPM ftp://ftp.redhat.com/pub/redhat/redhat-7.2-en/os/i386/RedHat/RPMS/dhcp-2.0pl5-8.i386.rpm
Before you can start the daemon, you need to create an empty leases file:
bash# touch /etc/dhcpd.leases.
Secondly, you need a configuration file /etc/dhcpd.conf which looks
similar to this example:
deny unknown-clients;
not authoritative;
option domain-name "slac.stanford.edu";
option domain-name-servers 192.168.0.9, 192.168.0.10;
option subnet-mask 255.255.255.0;
allow bootp;
allow booting;
option ip-forwarding false; # No IP forwarding
option mask-supplier false; # Don't respond to ICMP Mask req
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
}
group {
next-server tftpsrv; # name of your TFTP server
filename "pxelinux.0"; # name of the bootloader program
host node1 {
hardware ethernet 00:02:B3:1D:16:E1;
fixed-address 192.168.0.11;
}
host node2 {
hardware ethernet 00:02:B3:1D:9F:87;
fixed-address 192.168.0.12;
}
}
Because PXE does really use bootp, you need to have a TFTP server running on the same machine where your DHCP server runs.
In the above example, all clients are directed towards "next-server"
tftpsrv. You can use a simple round-robin method to distribute the
load evenly over several TFTP server by putting the server name into each
host section instead of having only one for all hosts in a group.
group {
filename "pxelinux.0"; # name of the bootloader program
host node1 {
hardware ethernet 00:02:B3:1D:16:E1;
fixed-address 192.168.0.11;
next-server tftpsrv1; # name of first TFTP server
}
host node2 {
hardware ethernet 00:02:B3:1D:9F:87;
fixed-address 192.168.0.12;
next-server tftpsrv2; # name of second TFTP server
}
}
Talk to your Networking department about the DHCP protocol! Ours had switched off forwarding the DHCP broadcasts over the routers. I needed to have an extra IP helper address configured in some routers because my DHCP server is not in the same subnet as the clients.
While you are at it: ask them to disable "auto-negotiation" on all your machine ports. Also ask them to enable "PortFast" on all ports where your machines are connected. This disables the spanning tree protocol network gear uses. If you don't have both of these settings you can run into trouble with PXE during the early stages of your install.
Perhaps you need some sort of load balancing for your DHCP server or you are concerned about the stability of your DHCP server and want some backup. In this case you might try to use two (or more) DHCP servers sharing the same configuration file over a shared file system (NFS or AFS for example). The common configuration file makes maintaining more than one DHCP server simple and the clients will talk to the one that is available and least loaded.