What's new

DNS Fails Until DHCP Lease Using dhcp-host Entries

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

Kevin K

Regular Contributor
When I add DNS names via dhcp-host entries in dnsmasq.conf, they don't work until the device requests a DHCP lease. Is there a way to make them take effect even when the device hasn't requested a DHCP lease yet?

I put items in my /jffs/configs/dnsmasq.conf.add:
Code:
dhcp-host=00:1B:A9:F9:19:24,192.168.1.9,fred,60m
dhcp-host=0C:9D:92:20:16:81,192.168.1.10,mary,60m

I rebooted the router. nslookup and ping can't find fred or mary until they request a DHCP lease.

I know I could *also* create entries in hosts.dnsmasq, but that would be redundant data and, as a database guy, I know that when you have redundant data, at least one copy is usually wrong.
 
You can make them request a lease by restarting the network. It’s a nuclear option, but the client determines when it requests or renews a lease.

service restart_net_and_phy
 
You can make them request a lease by restarting the network. It’s a nuclear option, but the client determines when it requests or renews a lease.

service restart_net_and_phy
surely by rebooting the router it would have done the same thing? OP already said it didn't help so I assume there are probably some network switches in the way
 
Not sure how much feedback you will get for this because I would assume that most people do this through the Asus router GUI which stores the info in an nvram variable /jffs/nvram/dhcp_staticlist
 
You can make them request a lease by restarting the network. It’s a nuclear option, but the client determines when it requests or renews a lease.

service restart_net_and_phy
What service get restarted with this service command? That solved a problem I have had for a while. :)
 
Last edited:

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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