DHCP and TFTP servers

By jbayer - Last updated: Tuesday, March 22, 2011 - Save & Share - Leave a Comment

TFTP servers are used to provide configuration files for local systems.  An easy way to tell systems the address of the tftp server is to use DHCP option 66.

DHCP can provide quite a lot of information when it provisions an address.  For a complete listing, go to this link, however all we are concerned with right now is option 66, which is what is used to specify a tftp server address

The dhcpd daemon which is supplied with most Linux distributions take the following syntax.  The following fragment specifies the tftp server to be at address 192.168.30.12, a router and name server to be at 192.168.30.1, and a pool of address 192.168.30.75-115 for systems to get addresses from.

option tftp66 code 66 = string;
subnet 192.168.30.0 netmask 255.255.255.0 {
  option tftp66 "192.168.30.12";
  authoritative;
  option routers 192.168.30.1;
  option domain-name "localnet.net";
  option domain-name-servers 192.168.30.1;
  pool {
    option routers 192.168.30.1;
    range 192.168.30.75 192.168.30.115;
  }
}
Posted in Administration, Open Source • Tags: Top Of Page
6,450 views

Write a comment

asd