New Build - 06/16/2022 - r49212

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page Previous  1, 2, 3, 4  Next
Author Message
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Fri Jun 17, 2022 21:35    Post subject: Reply with quote
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 agree the UI way is a pita especially when the save button is far down the bottom end of page but its the way it has always worked for as long as I can remember.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)


Last edited by the-joker on Fri Jun 17, 2022 21:42; edited 1 time in total
Sponsor
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2036

PostPosted: Fri Jun 17, 2022 21:41    Post subject: Reply with quote
paxoutlaw wrote:
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.

Or use the easier to add, delete, and bakup

Additional DNSMASQ Options.

dhcp-host=29:xx:1F:11:22:33,tv,192.168.1.104,infinite
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Fri Jun 17, 2022 21:44    Post subject: Reply with quote
bushant wrote:
Hit add 30 times, fill out the boxes and hit save once.

I once tried that, didn't take, but was a different router and a long time ago. But if it works these days its a good idea.

I think Ill suggest to have at least 10 entries by default waiting to be filled and not have to press save in between would also go a long way to better UX.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2036

PostPosted: Fri Jun 17, 2022 22:01    Post subject: Reply with quote
I haven't done it in a long time as I don't use the GUI method anymore but it used to work.
ArjenR49
DD-WRT Guru


Joined: 05 Oct 2008
Posts: 666
Location: Helsinki, Finland / nr. Alkmaar, Netherlands

PostPosted: Sat Jun 18, 2022 13:42    Post subject: Reply with quote
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).

dhcp-host=00:00:00:00:00:00,<hostname>,192.168.x.y,3600s

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
wenzhuo
DD-WRT User


Joined: 22 Apr 2011
Posts: 191

PostPosted: Sat Jun 18, 2022 23:27    Post subject: Reply with quote
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.

e.g.
Code:
dhcp-hostsfile=/jffs/etc/dhcp-hosts
[/code]
ArjenR49
DD-WRT Guru


Joined: 05 Oct 2008
Posts: 666
Location: Helsinki, Finland / nr. Alkmaar, Netherlands

PostPosted: Sun Jun 19, 2022 8:43    Post subject: Reply with quote
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.

Thanks for the hint!
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 6436
Location: UK, London, just across the river..

PostPosted: Sun Jun 19, 2022 10:15    Post subject: Reply with quote
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
zabolots
DD-WRT User


Joined: 02 Dec 2015
Posts: 122

PostPosted: Sun Jun 19, 2022 12:44    Post subject: Reply with quote
bushant wrote:


Or use the easier to add, delete, and bakup

Additional DNSMASQ Options.

dhcp-host=29:xx:1F:11:22:33,tv,192.168.1.104,infinite


So the format is

Code:
dhcp-host=<mac>,<hostname>,<ip>,<expires>


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)
the-joker
DD-WRT Developer/Maintainer


Joined: 31 Jul 2021
Posts: 2146
Location: All over YOUR webs

PostPosted: Sun Jun 19, 2022 14:38    Post subject: Reply with quote
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.

I did take some inspiration from how easy ddup does it.

_________________
Saving your retinas from the burn!🔥
DD-WRT Inspired themes for routers
DD-WRT Inspired themes for the phpBB Forum
DD-WRT Inspired themes for the SVN Trac & FTP site
Join in for a chat @ #style_it_themes_public:matrix.org or #style_it_themes:discord

DD-WRT UI Themes Bug Reporting and Discussion thread

Router: ANus RT-AC68U E1 (recognized as C1)
MLandi
DD-WRT Guru


Joined: 04 Dec 2007
Posts: 1020

PostPosted: Sun Jun 19, 2022 14:42    Post subject: Reply with quote
Alozaros wrote:
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
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2036

PostPosted: Sun Jun 19, 2022 14:51    Post subject: Reply with quote
Obviously there are many options available.
Other methods:

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1218080#1218080

https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1219779&highlight=#1219779
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5700

PostPosted: Sun Jun 19, 2022 14:52    Post subject: Reply with quote
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.
wenzhuo
DD-WRT User


Joined: 22 Apr 2011
Posts: 191

PostPosted: Sun Jun 19, 2022 22:34    Post subject: Reply with quote
ArjenR49 wrote:


Is it better in other ways, too?


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.

Thanks for the hint!


Here is how I do it in rc_startup:

Code:
echo "starting" | logger -p 6 -t "rc_startup[$$]"
i=0; while [ $i -lt 3 ] && ! grep -qs /jffs /proc/mounts; do sleep 5; i=$((i+1)); done
[/quote]
wenzhuo
DD-WRT User


Joined: 22 Apr 2011
Posts: 191

PostPosted: Sun Jun 19, 2022 22:54    Post subject: Reply with quote
the-joker wrote:

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.
Goto page Previous  1, 2, 3, 4  Next Display posts from previous:    Page 3 of 4
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum