DHCP is Dynamic Host Configuration Protocol and for our purposes is used to supply an IP address to the CerfBoard.
TFTP is Trivial File Transfer Protocol, a non-error-checked file transfer protocol, with no login and password required. It is intended for booting clients from a network.
Your host Linux system will run these DHCP and TFTP daemons, which the CerfBoard will use.
You can find DHCP and TFTP as RPM (Redhat Package Manager) files on a Redhat mirror, a local (UW) one is ftp://redhat.cac.washington.edu. Some quick links are
Connect your CerfBoard (Serial 3) to the serial port of a desktop computer running a terminal program.
The Cerfboards should be running at 9600 or 38400 baud (both 8-n-1), and may switch between the two
when it starts the Linux kernel.
If your CerfBoard has a working Linux kernel, you should let it boot up, then log in and
type
dmesg
There will be the MAC address amongst the rest of the information.
Otherwise you should press a key when you get the "Waiting for RTC..." message to
get to the bootloader. Type
tftp foo
This will cause the CerfBoard to broadcast a DHCP request on the network. The server will
not respond yet (because we have not configured it yet) but the status message printed will
include the MAC address.
deny unknown-clients; # for security... allow bootp; # enable bootp subnet 192.168.1.0 netmask 255.255.255.0 { option routers 192.168.1.100; # also tftp/"bootp" server IP option subnet-mask 255.255.255.0; } group { next-server 192.168.1.100; # tftp/"bootp" server IP host cerf1 { # hostname hardware ethernet 00:D0:CA:F1:1F:22; # client MAC address fixed-address 192.168.1.1; # client IP } host cerf2 { hardware ethernet 00:D0:CA:F1:47:23; fixed-address 192.168.1.2; } }
The IP addresses 192.168.0.* are private and cannot be seen outside of your network (or switch, I believe, if you have one). Avoid using the addresses ending in .0 or .255, as they have special meanings - there may be others I do not know about.
You can use whatever host names you like for your clients, as long as the names are unique.
Before running the DHCP daemon for the first time, you will need to use the following
command to create the leases file:
touch /var/state/dhcp/dhcpd.leases
It only has data written into it if you assign dynamic IPs to your CerfBoards but the file is needed regardless.
The DHCP daemon can be started with the following command:
/etc/rc.d/init.d/dhcpd start
stopped with:
/etc/rc.d/init.d/dhcpd stop
and stopped and started with:
/etc/rc.d/init.d/dhcpd restart
It is possible to place the start command in the appropriate runlevel script file but this generally isn't needed unless other people without root privilege will be booting CerfBoards from your host when you aren't around. The relevant files are in the directory /etc/rc.d.
Send a SIGHUP to the inetd to get the TFTP daemon running.