What's new

Feature Request on DHCP

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Lighthammer

New Around Here
Greetings,

I'd like to make two requests regarding the DHCP setup:

First off, I'd like to request a method to sort your current assigned list.

Secondly, though the 128 is a BIG improvement over the default ASUS limit of, what? 50? I'd like to request 256 or 512 entry allowance. I feel as though the 128 might be there due to physical limitations, but if it's not and that number was chosen somewhat arbitrarily, I'd like to request the number get raised.

Thanks for all the work you do on these custom setups. It's much appreciated!
 
Allowing too many DHCP reservations would require going all over the firmware code and increasing various buffers to accomodate the potentially large variable containing names and leases. Not gonna happen. Quite frankly if you manage a network that requires so many reservations, you should be looking at a corporate solutions, or rethinking your network topology.
 
Thanks for the response.

The desire for more IPs is more of an organizational thing then anything for me.

I manage our home network similar to how one might manage a corporate network by creating inventory pools corresponding to a spreadsheet that has all devices mac addresses, SNs, MNs, purchase dates etc. This means I log both wired and wireless macs (which most my devices have both).

I can technically work within the 128 limit, but in an ideal world, I'd like to be able to have the order of the DHCP on the router be identical to the spreadsheet.

Beyond local devices, we have enough people who here for small durations and anyone who frequently uses the network, I like to have their Mac/IP logged for security purposes.

Inside of these two scopes, there's plenty of legitimate reasons to desire to want to a bigger pool.

Your explanation is reasonable why its hard/difficult/impossible and I appreciate that, though I wanted you to wholly under the purpose for the request in my case. I'm sure others may have similar or related reasons.

As far as the wiki entry goes, I'm gathering I'm supposed to run the script on the router. I seem to recall seeing a place to run scripts through the router page, but I can't for the life find it anymore. I'm on build 376.49.5. Could you perhaps point me in the right direction?

Also, I understand your explanation on the page why it's not possible to sort in a traditional column/row filter like setup, but would it be possible to simply take the script and make a button out of that?

Thanks for your time!
 
You may want to have a look at customizing dnsmasq configuration file. See: https://github.com/RMerl/asuswrt-merlin/wiki/Custom-config-files.

The idea here is that dnsmaq act as the DHCP server (as well as DNS forwarder/cache and it can also act as a PXE server). While you are somewhat limited from the Web UI (which is normal, it’s not meant for advanced configurations), you are pretty much free to do what you want once in the config file. Dnsmasq is mostly designed to manage a network of roughly 50 devices, but I see no reason why it would not support more.

You could choose to replace entirely its config file by creating the file “/jffs/configs/dnsmasq.conf” or simply append lines to it with the file “/jffs/configs/dnsmasq.conf.add”. Since you want to manage a lot of devices, I would recommend using a dhcp-hostfile. In order to do so, you would have to create a file on your device, which would contain entries in this fashion:

# PC1
<MAC ADDRESS1>,<MAC ADDRESS2>,<HOSTNAME>,<IP>
# PC2
<MAC ADDRESS>,<HOSTNAME>,<IP>
# PC3
<MAC ADDRESS1>,<MAC ADDRESS2>,<IP>

I usually store the dhcp-hostfile to “/jffs/configs/dhcp.dnsmasq”.

Please note the #PC lines are simply comments to make the file easier to read, they are in no way required.

PC1 is configured with 2 MAC address, a hostname and an IP. Say this would be a PS3. There is both a wired and wireless network card on it, both with its own MAC. Both interfaces will never be online at the same time, but one may wish the console to get the same IP regardless if it’s connected wired or wireless. By setting multiple MAC, it will assign the IP to the first one it sees. The hostname will simply assign a DNS entry to it and will also define the name displayed in the client status list.

PC2 only has 1 MAC address defined, the rest is the same.

PC3 has 2 MAC address defined, but no hostname. This means that whatever name the computer/device publishes will be used. I believe this is the default behaviour of asuswrt anyway.

Instead of an IP, you could also set a tag, which would translate to a pool of IP (configured in dnsmasq.conf), although I think this would require you to replace entirely dnsmasq.conf with you own custom file.

In order to manage the reservation with a dhcp-hostfile, create the file “/jffs/configs/dnsmasq.conf.add” and add the following line: “dhcp-hostsfile=/jffs/configs/dhcp.dnsmasq” (no quotes). Then create the file “/jffs/configs/dhcp.dnsmasq” and add in as many reservations you would like. You will be able to control in whichever order they appear in the file and you’ll be able to go beyond 128 reservations.

Please note you will have to stop using the Web UI to manage your IP reservation.
 
Last edited:
Thanks, I appreciate the info.

The way my IP pool is structured, this methodology would easily satisfy my needs, though I have to decide if I am willing to give up the convince of the DHCP web client.
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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