YazDHCP - feature expansion of DHCP assignments (increasing limit on the number of DHCP reservations)

  • ATTENTION! You'll notice a Prefix dropdown when you create a thread. If your post applies to one of the topics listed, please use that Prefix for your post. When browsing the thread list you can use the Prefix to filter the view.
  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

Jack Yaz

Part of the Furniture
Awesome. Will give it a run after dinner. Do you think the same problem exists on line 120? echo "$DHCPCLIENTS" | sed 's/|/:/g;s/></\n/g;s/>/ /g;s/<//g' > /tmp/yazdhcp_clients_parsed.tmp
I would hope not given I build the string a little differently in the WebUI, but there is probably an issue with hostnames when missing...
EDIT: a quick test saving the below worked OK for me (there's an extra comma creeping in but it escapes parsing errors, I'll still fix it)
EDIT2: this should be fixed too now...thanks for keeping me honest @dave14305
1610489681488.png
 
Last edited:

dave14305

Part of the Furniture
I would hope not given I build the string a little differently in the WebUI, but there is probably an issue with hostnames when missing...
EDIT: a quick test saving the below worked OK for me (there's an extra comma creeping in but it escapes parsing errors, I'll still fix it)
EDIT2: this should be fixed too now...thanks for keeping me honest @dave14305
View attachment 29450
I installed fresh and everything converted perfectly!
 

dave14305

Part of the Furniture
I would hope not given I build the string a little differently in the WebUI, but there is probably an issue with hostnames when missing...
EDIT: a quick test saving the below worked OK for me (there's an extra comma creeping in but it escapes parsing errors, I'll still fix it)
EDIT2: this should be fixed too now...thanks for keeping me honest @dave14305
View attachment 29450
I added an entry without a hostname and ended up with a line in the .hostsnames when the IP should probably not be written there (last entry).
Code:
# cat .hostnames
192.168.50.4 HPOJ9018
192.168.50.5 HPOJ8600
192.168.50.6 SAMSUNGTV
192.168.50.7
 

Jack Yaz

Part of the Furniture
I added an entry without a hostname and ended up with a line in the .hostsnames when the IP should probably not be written there (last entry).
Code:
# cat .hostnames
192.168.50.4 HPOJ9018
192.168.50.5 HPOJ8600
192.168.50.6 SAMSUNGTV
192.168.50.7
I haven't run through checks on the sub-files yet after changes to getting DHCP_Clients looking right, I'll get on that first thing tomorrow. Just approaching midnight here and spent the evening working on updates to vpnmgr including a new feature :)
 

dave14305

Part of the Furniture
When you wake up in the morning, I’m back with another annoying report. Check for Update doesn’t return because of a yazdhcp case-mismatch between the webui action_script and the service-event handler using the $SCRIPT_NAME variable.

We only report bugs to the ones we love. :cool:

Can you tell I’m avoiding working on my own add-on today?
 

Jack Yaz

Part of the Furniture
When you wake up in the morning, I’m back with another annoying report. Check for Update doesn’t return because of a yazdhcp case-mismatch between the webui action_script and the service-event handler using the $SCRIPT_NAME variable.

We only report bugs to the ones we love. :cool:

Can you tell I’m avoiding working on my own add-on today?
I knew that would catch me out somewhere. I should just stick to lower case across the board
 

dave14305

Part of the Furniture
Here’s an idea for future consideration: allow DHCP reservations for a hostname without an IP. This would be equivalent to dhcp-host=AA:BB:CC:DD:00:11,myhostname which allows you to map a hostname without caring what IP it receives.

This issue has come up a couple times recently on the forums where someone wants a hostname for a device and the workaround (from @ColinTaylor) is to create a DHCP reservation just to be able to create a hostname in dnsmasq.
 

SomeWhereOverTheRainBow

Very Senior Member
Here’s an idea for future consideration: allow DHCP reservations for a hostname without an IP. This would be equivalent to dhcp-host=AA:BB:CC:DD:00:11,myhostname which allows you to map a hostname without caring what IP it receives.

This issue has come up a couple times recently on the forums where someone wants a hostname for a device and the workaround (from @ColinTaylor) is to create a DHCP reservation just to be able to create a hostname in dnsmasq.

^^^^^ @dave14305 Genious idea.
or only a hostname to an IP. some devices have changing mac-address' but have manually configured IP address, I would like to be able to assign host names to specific IP' only. as well
 

JR Godwin

Occasional Visitor
Just out of curiosity, to revert back to "not" using this script, is there anything that needs to be done before/after uninstalling this script or safe to assume that the uninstall reverts back everything (assuming the assignments are less than the max)?
 

Jack Yaz

Part of the Furniture
Here’s an idea for future consideration: allow DHCP reservations for a hostname without an IP. This would be equivalent to dhcp-host=AA:BB:CC:DD:00:11,myhostname which allows you to map a hostname without caring what IP it receives.

This issue has come up a couple times recently on the forums where someone wants a hostname for a device and the workaround (from @ColinTaylor) is to create a DHCP reservation just to be able to create a hostname in dnsmasq.
I can look into that. I'd probably make a new section though, i wouldn't want to make the IP "optional" in the existing table. A hostname to IP GUI editor is already planned
 

spanjap

Regular Contributor
Thanks for this great addon. Installed it on my RT-AX88U because of 80+ DHCP recervations.
The only thing not working yet in the GUI is the 64 devices limit. Changed 2 times addRow_Group(25) to addRow_Group(254) in the Advanced_DHCP_Content.asp file and it works!

Thanks again for this nice and very helpful script.
 

Jack Yaz

Part of the Furniture
Thanks for this great addon. Installed it on my RT-AX88U because of 80+ DHCP recervations.
The only thing not working yet in the GUI is the 64 devices limit. Changed 2 times addRow_Group(25) to addRow_Group(254) in the Advanced_DHCP_Content.asp file and it works!

Thanks again for this nice and very helpful script.
Addrowgroup is currently at 128 to see if that's enough. It can always be increased if the character count of the reservations isn't met by someone using all 128 rows.
 

Jack Yaz

Part of the Furniture
Addrowgroup is currently at 128 to see if that's enough. It can always be increased if the character count of the reservations isn't met by someone using all 128 rows.
If I wanted to be really clever I could make this dynamic and calculate the limit by taking the average length of a user's reservation (specifying dns obviously makes each entry longer, and not everyone uses that field, same as hostnames) and divide the total space by the average.

I'll do that
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top