Devices not always available via DNS hostnames

Hello,

Sometimes my devices seems to (re)connect to the router (I often have power outages) without DHCP [?]. They are keeping their IP address as before but they are no longer accessible via hostname assigned to them in "Network -> DHCP and DNS -> Status Leases" and they are not even listen on "Active DHCP Leases" list on Overview.

Can I force them to use DHCP? I rely on their hostnames.

Welcome to the club.

Thing is, keeping a valid address until the lease expires is good behaviour. When the router reboots, the file with the outstanding lease assignments is lost so the router basically has amnesia.

Short of saving the file in flash (and wearing it down a bit faster) your next best bet is probably forcing your client to renew the lease early. Or perhaps even assigning a static host entry.

2 Likes

How do I force the client to renew the lease?

You can't, there is no communication between clients and the DHCPd before (half-) of the lease tome has expired. If you need to change the client's network settings, you have to attend to the client (e.g. by pulling the cable or explicitly releasing the DHCP lease client side).

You can utilize one of the following methods:

@slh
Hmm. But my clients are down during power outage too. So both client and the server (router) should start with clean state.

I also don't understand why my client is not accessible via srv (the hostname I've assigned in Static Leases) and not visible on Overview, but srv.lan still resolves just fine.

@vgaetera I don't have control over software on every client, so setting up mDNS is not a way to go for me. I will try setting domain names way.

Nope: the clients typically write the lease information to permanent storage (disk or flash) so they do not forget about it. There is however no catchall method to clear the saved state, it depends on the OS and the network stack.