Quick dhcpd & tftpd setup

This is a quick note to remember how to setup a dhcpd server and tftpd when dealing with Embedded Devices which often retrieve updates via tftp specified via dhcp response.

This both tools are launched in foreground mode so they can be quickly stopped and the log is output to the stderr so in can be easily monitored as well.

  • dhcpd:

Version: Internet Systems Consortium DHCP Server 4.1.1-P1

Configuration File: Have in mind that the next-server field is the one telling the device which should be its tftp server.

ddns-update-style none;
subnet 192.168.5.0 netmask 255.255.255.0 {
range 192.168.5.200 192.168.5.254;
default-lease-time 1800;
max-lease-time 7200;
next-server 192.168.5.1;
}

Command line:

dhcpd -d eth0
  • tftpd:

Version: atftp-0.7
Command Line:

atftpd --no-fork --daemon --verbose=6 --listen-local --trace --bind-address 0.0.0.0 --logfile - /tftpboot/