Skip to content
OpenWRT LAN Interface

Specifying DHCP options in OpenWRT (TFTP)

In the following tutorial, you’ll learn how to specify a TFTP server address as a DHCP option in OpenWRT. A device that needs TFTP (e.g. PXE boot or Cisco IP Phones) would then get automatically get the IP address of the server.

Login to LuCI

First, log in to the LuCI webinterface of your router. If you don’t know the IP of your router, enter ipconfig in your Windows command prompt or route -n in your Terminal if you’re on Linux. Look for the “(Default) Gateway” address of your network interface.

OpenWRT Login
Log in with your credentials. Default username: root

Edit the network interface

Go to Network → Interfaces and edit the interface where you want TFTP to work.

OpenWrt Interfaces
Edit the interface.

Add the DHCP option(s)

Go to DHCP Server and click on Advanced settings.

OpenWrt DHCP Server
Click on DHCP Server.
OpenWRT Advanced Settings
Add the DHCP options here.

Feel free to add any DHCP options here. Syntax is as follows:

So, for TFTP you’ll want to use options 66 and 150 (server name/IP).
An example:


After setting this up, e.g. Cisco IP Phones are able to automatically retrieve their config files from the specified IP address.

You can also specify different DNS servers via option 6. (As described in the screenshot).

Here’s a list of DHCP options:

No comments yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

Comments (0)