I've seen this around and am a bit confused. I am currently running ddwrt on my home LAN. Been having some issues, so I decided to look at OpenWrt. I was able to get it loaded on my Router no problem, and was looking at moving over all the special things I have set up. One is OpenVPN and that seems to be well covered. I have not yet embarked on that as the more pressing thing is DHCP reservations. I have a lot of devices on my network and have a big DNSMASQ configuration which reserves the IPs for the known MACs on m LAN. Also, I have a tftp server and a PXE boot config. How do I put in a simple list in a txt file somewhere with the absic dnsmasq settings? i.e.
The configuration is done with help of the uci-configuration file: /etc/config/dhcp , but you can use this together with the file /etc/dnsmasq.conf .
It is possible to mix the traditional /etc/dnsmasq.conf configuration file with the options found in /etc/config/dhcp .
The dnsmasq.conf file does not exist by default but will be processed by dnsmasq on startup if it is present. Note that options in /etc/config/dhcp take precendence over dnsmasq.conf since they are translated to command line arguments.
I am trying to move to openwrt from ddwrt and am struggling to wrap my head around the differences and how I can move my setup to this new system. I do appreciate any help, but this is a bit complicated to dig through as I try to move my complex home system to openWRT..
SO, in summary, if you are so inclined to put your DHCP reservations in a text file, all you need to do is edit the /etc/dnsmasq.conf file from the SSH login and add lines for each reservation you want to have in the standard dnsmasq format:
dhcp-host=XX:XX:XX:XX:XX:XX,name,ip_address,infinite
That will work, but it is not the recommended practice.
DHCP reservations are fully supported by OpenWrt's UCI system. The web interface has a Network-- DHCP and DNS -- Static Leases page to enter the lease details directly. These end up in /etc/config/dhcp. CLI users should enter the settings in /etc/config/dhcp as config host sections (see https://openwrt.org/docs/guide-user/base-system/dhcp#static_leases)
Just before dnsmasq is started, that file is parsed to generate a dnsmasq-format configuration in /var/etc (on the RAM disk). OpenWrt's philosophy is to concentrate most or all user settings in /etc/config/* in a unified format, then on the fly produce RAM based application-specific configuration files at runtime.
/etc/dnsmasq.conf is referenced as an include in the generated file, as a hook for possible esoteric configurations that the existing UCI scripts cannot handle. Ordinarily /etc/dnsmasq.conf contains only commented-out lines, and unless there is a good reason it should stay that way.