Joined: 31 Jul 2021 Posts: 2146 Location: All over YOUR webs
Posted: Fri Jun 17, 2022 21:35 Post subject:
paxoutlaw wrote:
No error message that I could see. My error was leaving the lease expiration blank.
Leaving entry blank is an immortal lease (I use them and it works for some specific LAN devices I choose). You cant compare current builds with old ass builds either, dnsmasq has been upgraded several times, bugs have been fixed in the DD-WRT backend to the UI
Adding leases via UI has not changed in years, add one save, add another save etc, you want to populate the list in one go use CLI and the right format enclosing the lot in ""
e.g. nvram set static_leases="bla bla bla bla" && nvram commit and refresh UI.
I seem to have to "save" every entry. Just hitting "add" loses the entry I just made. A tad irritating when you are migrating and have 30+ entries to make.
Hit add 30 times, fill out the boxes and hit save once.
Joined: 05 Oct 2008 Posts: 666 Location: Helsinki, Finland / nr. Alkmaar, Netherlands
Posted: Sat Jun 18, 2022 13:42 Post subject:
If you have a /jffs partition, you can use a file with reserved IP's and an Dnsmasq Infrastructure, Additional option like:
conf-file=/jffs/Reserved_IPs.custom
sample:
# DNSmasq WILL FAIL if there are leading zeroes in IP addresses,
# or characters other than letters, numbers and hyphens in a device name!!!
# This file is linked using an option in Additional DNSmasq Options:
# conf-file=/jffs/dnsmasq.custom
# Edit this file (on the JFFS partition of the router) if desired and
# hit Apply Settings on the Services, Services page in the DD-WRT GUI
# (or reboot the router).
you can also have two MAC codes, e.g. from a wireless if and from the ethernet port like so:
dhcp-host=00:00:00:00:00:00,00:00:00:00:00:00,<hostname>,192.168.x.y,3600s
If you have a /jffs partition, you can use a file with reserved IP's and an Dnsmasq Infrastructure, Additional option like:
conf-file=/jffs/Reserved_IPs.custom
Joined: 05 Oct 2008 Posts: 666 Location: Helsinki, Finland / nr. Alkmaar, Netherlands
Posted: Sun Jun 19, 2022 8:43 Post subject:
wenzhuo wrote:
ArjenR49 wrote:
If you have a /jffs partition, you can use a file with reserved IP's and an Dnsmasq Infrastructure, Additional option like:
conf-file=/jffs/Reserved_IPs.custom
sample:
dhcp-hostsfile seems better for the purpose.
I try to keep up with the dd-wrt Joneses or should I say gurus, but I only ever learned about using the conf-file option for the purpose of defining so-called static leases.
Now that I looked for the dhcp-hostsfile option I did find mention of it. The format seems to be the same, except no dhcp-option= at the start of every line. Cleaner that way.
Is it better in other ways, too?
Going by its name the conf-file probably could take other dnsmasq options as well, but I have never used it for that.
My latest startup script waits for the /jffs to be mounted, but I have not explicitly restarted dnsmasq. It apparently happens automatically, too.
Joined: 16 Nov 2015 Posts: 6445 Location: UK, London, just across the river..
Posted: Sun Jun 19, 2022 10:15 Post subject:
Using jffs for leases and waiting for it to mount....
it interferes with the normal boot operations a bit..as DNS could be vital for some services to start up first(with priority)...
I don't see any reason to keep a long list of leases on USB /jffs, instead copy paste them in DNSmasq advanced box...
(that is what i do for my 40-50 leases)
The only purpose i see of using JFFS, is only if you move all your leases from one router to another...even thou i would ve do copy paste...
Well..... there is another bit of hassle, if you have 128 or 256 leases...plus some other lines in advanced DNSmasq box, it may not handle that many lines there and fetch those to dnmasq.conf file ...unless BS removed that limitation on the newer builds... _________________ Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Would you just list multiple entries on separate lines in the "Additional DHCPd Options" box in the UI for multiple static definitions? _________________ --Netgear R7800--
DD-WRT v3.0-r49492 std (07/14/22)
Joined: 31 Jul 2021 Posts: 2146 Location: All over YOUR webs
Posted: Sun Jun 19, 2022 14:38 Post subject:
zabolots wrote:
would you just list multiple entries on separate lines in the "Additional DHCPd Options" box in the UI for multiple static definitions?
Separate lines is perhaps overkill. Consider that more lines consume more nvram, best single line, not so pretty but its more optimized.
Personally I use regular nvram set static_leases="blablabla" && nvram commit, one liner enclosed between the quotes, my default config is scripted by now so it takes around 2 seconds for the lot (not just static leases but Wifi/vap/mac addressesmac filetrs/access restrictions/firewall/etc, then refresh the UI and walla done.
W
hat I did was dump the nvram config to human readable format e.g. nvram show > /tmp/some-id-date.txt then kerked around with a a bash script which takes the specific entries from that text file and uses them as variables and sets them/commits them. all I do is hit F5 on web interface when script is done.
The only purpose i see of using JFFS, is only if you move all your leases from one router to another...even thou i would ve do copy paste...
I put everything in the Additional DHCPd Options box, and I keep a copy the text in a file on my NAS. Easy to maintain, easy to copy and paste, and I don't have my configuration split into different parts. _________________ Netgear R9000
DD-WRT v3.0-r55819 std (04/17/24)
Linux 4.9.337 #722 SMP Wed Apr 17 04:16:49 +07 2024 armv7l
Gateway, AP, DNSMasq, Clock 2000MHz
VAP on wlan1 for internet devices
IPv4 & IPv6 (Prefix Delegation)
Static Leases & DHCP
CloudFlare, no SFE, SmartDNS, no QoS
2.4GHz: Vanilla, Airtime Fairness, NG-Mixed, ACK Timing 3150, WPA2 w/AES & WPA3
5GHz: Vanilla, Airtime Fairness, AC/N Mixed, ACK Timing 3150, WPA2 w/AES & WPA3
2 Netgear AX1800 WiFi Mesh Extenders
Xfinity 1.2Gbps/35Mbps
Router/Version: Linksys EA8500 / Box Rev. A00 PCB REV:205(XC) hw_rev=1 hw_ver=XB / r49212 (06/16/22)
File/Kernel: CLI Flash dd-wrt-webupgrade.bin / Linux 4.9.318 #1023 SMP Thu Jun 16 03:42:52 +07 2022 armv7l
Previous/Reset: r49197 (06/14/22) / No (r49197 2.4 GHz died failed to lookup txq for peer_id, 43 hours uptime)
Mode/Status: AP Gateway / VaNiLLa Mixed 20 MHz Ch 1 & 149 TX Power 30 dBm Short Preamble, ttraff disabled
Issues/Errors: up 45 hours received unexpected tx_fetch_ind event: in push mode, 58 hours failed to lookup txq
r49212 5 GHz died, previous three builds 2.4 GHz less than two days uptime. EA8500 last "stable" r48971, r49049.
Never needed revert to old builds just reboot, also saw changeset 49246, so now have high hopes running r49268.
Upon receiving the HUP signal, dnsmasq rereads the dhcp-hostsfile. It does not reread the configuration file. Quote dnsmasq man page:
Quote:
NOTES
When it receives a SIGHUP, dnsmasq clears its cache and then re-loads /etc/hosts and /etc/ethers and any file given by --dhcp-hostsfile, --dhcp-hostsdir, --dhcp-optsfile, --dhcp-optsdir, --addn-hosts or --hostsdir. The DHCP lease change script is called for all existing DHCP leases. If --no-poll is set SIGHUP also re-reads /etc/resolv.conf. SIGHUP does NOT re-read the configuration file.
ArjenR49 wrote:
Going by its name the conf-file probably could take other dnsmasq options as well, but I have never used it for that.
My latest startup script waits for the /jffs to be mounted, but I have not explicitly restarted dnsmasq. It apparently happens automatically, too.
Personally I use regular nvram set static_leases="blablabla" && nvram commit, one liner enclosed between the quotes, my default config is scripted by now so it takes around 2 seconds for the lot (not just static leases but Wifi/vap/mac addressesmac filetrs/access restrictions/firewall/etc, then refresh the UI and walla done.
I must say it's very difficult to maintain the static leases on the web UI. I did the nvram hack too before I needed to update the static leases regularly, and figured out dhcp-hostsfile is a better solution.