What's new

Is there a way to end a DHCP lease from router?

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

It seems a pretty basic function for a router to accurately display all the clients connected to it, and to be able to cancel a DHCP lease.

No, it's not. DHCP leases can only be released by a client, a server cannot force a release. It could issue a FORCERENEW request, but not all DHCP clients support it.
 
I should have been clearer and specified cancelling a redundant lease. Rebooting the Asus clears the redundant DHCP addresses from the client list and allows the active fixed IP to be displayed, but this should not be necessary. The server would not be forcing a release, as the client is not connected to the DHCP address, and never will be again.
 
The server would not be forcing a release, as the client is not connected to the DHCP address, and never will be again.
But the server has no way of knowing what the client is doing or if or why it is unreachable. Assuming that the client was offline and therefore freeing up the IP for another device would lead to all sorts of bad things. :)
 
I must be misunderstanding how this works. I thought that when the client connects with DHCP the router allocates an address of its choice, which the client just accepts.

But this does not address the problem. Only the Asus shows the DHCP address as the working connection after the client device has been reconnected with a fixed IP. This is a bug, not a feature.
 
@Richard20 If you cleared the DHCP lease file using the method in post #13 the problem isn't with DHCP.

More likely it's an issue with the client list itself, which is generated by the closed-source network map code. So this would be something Asus will have to fix. There was a similar discussion here where a transient IP address never disappeared from the client list.
 
Thanks for the replies, everyone.

Asus don't seem very responsive to this kind of annoyance, but there is always hope. I sometimes wonder if they ever actually use their own products.
 
I must be misunderstanding how this works. I thought that when the client connects with DHCP the router allocates an address of its choice, which the client just accepts.

But this does not address the problem. Only the Asus shows the DHCP address as the working connection after the client device has been reconnected with a fixed IP. This is a bug, not a feature.

Your client has to release the dhcp lease if you want it off your dhcp server’s lease list.

If your client doesn’t release the least first, the dhcp server doesn’t know it is connecting with a static op.

This is not a bug, this is simply how it works.

The dhcp server does not go comparing MAC addresses of connected devices to see if it should drop leases from machines that connect with a static IP.
 
I don't care if the lease remains on the server's lease list. I just want the Asus connected clients list to show the IP in use, not a redundant one which was once used to set up a fixed IP and then disconnected. Showing an IP as connected when it is not connected looks very much like a bug to me.

In other words, I would like it to behave like every other router I have used.
 
I don't care if the lease remains on the server's lease list. I just want the Asus connected clients list to show the IP in use, not a redundant one which was once used to set up a fixed IP and then disconnected. Showing an IP as connected when it is not connected looks very much like a bug to me.

In other words, I would like it to behave like every other router I have used.

Just click on Refresh then, networkmap will initiate a complete rescan of the network through ARP, and will build a list based on what devices are actively found then.
 
Just click on Refresh then, networkmap will initiate a complete rescan of the network through ARP, and will build a list based on what devices are actively found then.

I think he wants the dhcp lease list updated.
I'd suggest he shorten the dhcp least time if it really bothers him.

It's not going to remove unexpired leases that aren't being used (due to his assignment of static ips on the client), but it will age them off the list quicker.
 
Just click on Refresh then, networkmap will initiate a complete rescan of the network through ARP, and will build a list based on what devices are actively found then.

No, it won't. That is the problem.

Colin Taylor's answer looks right to me. This is something only Asus can fix.
 
...
Code:
killall dnsmasq
rm /var/lib/misc/dnsmasq.leases
service restart_dnsmasq
Basically removed the /tmp before /var

Alternative: don't remove the file. Edit the lease file and remove the entries that you need to remove, and then restart the dnsmasq file.
Code:
killall dnsmasq
nano /var/lib/misc/dnsmasq.leases
service restart_dnsmasq

With that you have removed the DNS lease - don't forget to restart the device (or DHCP renew command on device OS) so that device can get new lease.
 

Sign Up For SNBForums Daily Digest

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