nvram set static_leasenum='X';
nvram set static_leases="
MAC1=HOSTNAME1=192.168.1.62=1440
MAC2=HOSTNAME2=192.168.1.63=1440
MAC3=HOSTNAME3=192.168.1.64=1440
MAC4=HOSTNAME4=192.168.1.65=1440 "
This seems to assign them correctly; they do show up in the list on the services tab. However, after I reboot the router and the newly assigned devices, the whole network has no internet. I can still reach the router, but no device can communicate outside. If I delete the static lease assignments everything works again.
So you add them all at once there, no need to use nvram
The problem might be non alphanumeric characters in the hostname, the rules are more strict nowadays.
Use only alphanumeric characters and a simple hyphen (underscore might work)
If you use "wrong" characters DNSMasq does not start
I tried putting the list in additional DNSmasq. A few worked (where I assigned them the same IP they already used) but if I added others, I had the same effect of no internet for anyone, and no DHCP clients listed.
I've checked the list that I pasted from notepad++ and there don't seem to be any characters other than alphanumeric and hyphen.
Deleting the entries in that table restores access.
Also, you mention this is wrong forum for this question; which would be a more appropriate one? The Broadcom forum seems to have lots of question about the R7000
A typo does seem like a reasonable first thing to check, for sure.
A couple of questions that I haven't been able to find answers to:
Do I need to reboot the router between each addition?
What's the best way to deal with there being devices already granted leases for some of the IP address I'd like to now assign to a different device? I've tried setting a short lease time in hopes that they will all have to renew within an hour to fix any collisions.
Do IP addresses assigned this way need to be within the "Start IP Address" range in network setup? I assume they do, but if they did not have to be, it would provide another option to avoid conflicts.
Joined: 18 Mar 2014 Posts: 12882 Location: Netherlands
Posted: Fri Feb 26, 2021 17:40 Post subject:
mooseo wrote:
A typo does seem like a reasonable first thing to check, for sure.
A couple of questions that I haven't been able to find answers to:
Do I need to reboot the router between each addition?
What's the best way to deal with there being devices already granted leases for some of the IP address I'd like to now assign to a different device? I've tried setting a short lease time in hopes that they will all have to renew within an hour to fix any collisions.
Do IP addresses assigned this way need to be within the "Start IP Address" range in network setup? I assume they do, but if they did not have to be, it would provide another option to avoid conflicts.
You do not have to reboot just add them one by one in the additional config Save /Apply and check if DNSMasq keeps running with ps from command line like:
Joined: 04 Jan 2007 Posts: 11564 Location: Wherever the wind blows- North America
Posted: Fri Feb 26, 2021 18:37 Post subject:
I add static leases in as you do since there are so many in my list.
They need to be outside the DHCP address range as stated earlier.
Try making the list all on the same line. Keeping a space between each of your leases (after the =1440 in your list)....and a space after the last =1440 as well.
example
nvram set static_leasenum=X
nvram set static_leases="MAC1=HOSTNAME1=192.168.1.62=1440 MAC2=HOSTNAME2=192.168.1.63=1440 MAC3=HOSTNAME3=192.168.1.64=1440 MAC4=HOSTNAME4=192.168.1.65=1440 "
nvram commit
In the case above X would be 4...and your DHCP range is not 192.168.1.62-65
I have 22 static leases on my setup working with the above setup. (don't forget the nvram commit or you it might not keep the settings after a reboot.
redhawk _________________ The only stupid question....is the unasked one.
Posted: Sat Feb 27, 2021 8:19 Post subject: SOLVED: Thanks!
Thanks for this advice, it got me working. I think the problem was that I was assigning the static IPs in the DHCP space.
I did also find a typo in my list (using same IP twice), but that one hadn't been deployed to cause issues yet, so that was pre-emptive help.
I am curious, though, about the difference between assigning static IPs using the nvram method or the DNSmasq method. In reading through some posts, I thought the mechanism changed with later builds, but perhaps both work?