Getting the Dynamic Host Configuration Protocol (DHCP)
server running
DHCP uses TFTP (I think) so it needs to be run on the TFTP server
and the TFTP server needs to be running first. Before DHCP can be
run the /etc/dhcpd.conf needs to be created. This can be done to a
degree through YaST, but to put in all the options it problem needs to
be created through a text editor, like emacs (you'll need whole path,
which is /opt/gnu/bin/emacs, if you're root). Not sure if I've done
this properly, my dhcpd.conf at time of writing is given below
option subnet-mask 255.255.252.0;
option broadcast-address 134.225.100.0;
option domain-name "reading.ac.uk";
option domain-name-servers 134.225.32.11, 134.225.32.12;
option routers 134.225.100.254;
allow booting;
allow bootp;
default-lease-time 14400;
ddns-update-style none;
# Group the PXE bootable hosts together
group {
option root-path "/tftpboot/";
# PXE-specific configuration directives...
next-server 134.225.100.178;
filename "pxelinux.0";
# You need an entry like this for every host
# unless you're using dynamic addresses
host lapse {
option host-name "lapse";
hardware ethernet 00:30:48:21:b8:b3;
fixed-address 134.225.100.13;
}
}
subnet 134.225.100.0 netmask 255.255.252.0 {
default-lease-time 14400;
max-lease-time 172800;
}
I got most of the information for the file above at
http://syslinux.zytor.com/pxe.php.
Explanation of file:
- Top 5 lines: not sure if this is right (probably only matters if
we try and send information outside the local area network),
I've used the standard
address stuff we use for department machines, where the servers and
router are CSC machines (vids1.rdg.ac.uk is 134.225.32.11,
vids2.rdg.ac.uk is 134.225.32.12 and gw-100.disk-Ink.rdg.ac.uk is
134.225.100.254).
- allow booting: directs DHCP server to respond to queries from
particular clients.
- allow bootp: directs DHCP server to respond to bootp
queries.
- next 2 lines: not sure, I don't think they're that important
- tftp lines: option root-path specifies the tftp boot directory;
next-server needs to be the TFTP server (in this case ellesmere,
134.225.100.178) and need to specify the name of the network
bootstrap program (NBP) which is pxelinux.0.
- host stuff: need to add the MAC address and ip address for the
remote nodes we wish to carry out a PXE boot here.
- final lines: not sure what the subnet stuff is at end - probably
written by YaST when starting DHCP server, because I don't remember
doing it.
Having created the dhcpd.conf file, call up yast2 dhcp-server and
select "Start DHCP Server Now".