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.
Edit the network interface
Go to Network → Interfaces and edit the interface where you want TFTP to work.
Add the DHCP option(s)
Go to DHCP Server and click on Advanced settings.
Feel free to add any DHCP options here. Syntax is as follows:Option,Value,AnotherValue,...
So, for TFTP you’ll want to use options 66 and 150 (server name/IP).
An example:
66,192.168.0.15
150,192.168.0.15
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:
http://www.networksorcery.com/enp/protocol/bootp/options.htm
No comments yet.