What's new

Hostname DHCP reservation list is too long.

  • 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!

vandriver

Regular Contributor
Morning,

I have an AC86U running Merlin 386.13_2.

I didn't realise the host names characters were limited. I've just done about 200 hostnames and have 10 left to go and hitting the following error:

DHCP reservation list is too long (6500 characters exceeds limit of apimaxlenth). Remove some, or use shorter names.

I tried searching the forums but it doesn't seem to be a much discussed topic so could find any answers.

Could someone tell me please if there is a workaround? Maybe a way to increase apimaxlenth or add the hose names via ssh? I read somewhere you can add very long host names via ssh and hoping its the answer but I cant find that thread anymore lol

Cheers
 
There is a (hard) limit.
 
Yes.

Or, probably better, just don't use them at all (or, at least not all of them).
 
L&LD, while your there please? Just thinking off the top of my head I have the routers domain name set to home.lan, if I changed that to just lan and edited the hostnames to free up some characters, does it propagate quite quickly round the network yeah?
 
Its a bit early for me lol I dont think removing home from home.lan will help as its only 4 characters, I was thinking that means 200 home.lan if that makes sence? it needs to be the actual hostnames characters I need to shorten and not that routers domain name is that right?
 
Use a dnsmasq.conf.add file and manually add the reservations there. The nvram limit is hardcoded and cannot be increased.
 
Also, the YazDHCP addon.
 
2 words

amtm->YazDHCP

Much easier to maintain. Check out the import/export feature. You can edit the exported csv spreadsheet then import back in.
 
my dnsmasq.conf.add file is currently:

addn-hosts=/jffs/addons/YazDHCP.d/.hostnames # YazDHCP_hostnames
dhcp-hostsfile=/jffs/addons/YazDHCP.d/.staticlist # YazDHCP_staticlist
dhcp-optsfile=/jffs/addons/YazDHCP.d/.optionslist # YazDHCP_optionslist

do I manually add the reservations below the list above so it looks like this?

addn-hosts=/jffs/addons/YazDHCP.d/.hostnames # YazDHCP_hostnames
dhcp-hostsfile=/jffs/addons/YazDHCP.d/.staticlist # YazDHCP_staticlist
dhcp-optsfile=/jffs/addons/YazDHCP.d/.optionslist # YazDHCP_optionslist
dhcp-host=7C:61:66:xx:xx:xx,192.168.1.xx,myhostname.home.lan
dhcp-host=7C:61:67:xx:xx:xx,192.168.1.xx,myhostname1.home.lan
dhcp-host=7C:61:68:xx:xx:xx,192.168.1.xx,myhostname2.home.lan
 
dhcp-host=7C:61:66:xx:xx:xx,192.168.1.xx,myhostname.home.lan
dhcp-host=7C:61:67:xx:xx:xx,192.168.1.xx,myhostname1.home.lan
dhcp-host=7C:61:68:xx:xx:xx,192.168.1.xx,myhostname2.home.lan
I may have missed the explanation, but what is the reasoning for appending the hostname with ".home.lan"?
Are you not using the LAN > Domain Name field?
 
I may have missed the explanation, but what is the reasoning for appending the hostname with ".home.lan"?
Are you not using the LAN > Domain Name field?

yes you are correct. I am using home.lan already in LAN > Domain Name field, so I dont need to add it in dnsmasq.conf.add and should not have appended it to my hostnames in my example above, sorry my bad.

Its my first time making a hostname list using dnsmasq.conf.add, would this work do you think?

addn-hosts=/jffs/addons/YazDHCP.d/.hostnames # YazDHCP_hostnames
dhcp-hostsfile=/jffs/addons/YazDHCP.d/.staticlist # YazDHCP_staticlist
dhcp-optsfile=/jffs/addons/YazDHCP.d/.optionslist # YazDHCP_optionslist
dhcp-host=7C:61:66:xx:xx:xx,192.168.1.xx,myhostname
dhcp-host=7C:61:67:xx:xx:xx,192.168.1.xx,myhostname1
dhcp-host=7C:61:68:xx:xx:xx,192.168.1.xx,myhostname2

does there need to be a comma after the hostname?
 
does there need to be a comma after the hostname?
If I remember right you do not need a comma after the hostname/device in your examples.
 
Last edited:
If I remember right you do not need a comma after the hostname/device in your examples.
Thank you, I appreciate the support because no doubt you have discussed this a billion times already.

Am I correct in saying that when I have manually added all my reservations (Mac, IP, host name, lease time) to dnsmasq.conf.add, I can then remove all of the entries from the DHCP server page on the router GUI to free up nvram? Cheers
 
The lease time on the DHCP server LAN page still seems to be overriding the lease time for the reservations I have set in dnsmasq.conf.add. Is there a way around this?
 

Similar threads

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