What's new

ASUS DHCP Hashing Algorithm?

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

krick

Regular Contributor
Does anyone know how the ASUS DHCP IP address allocation works?

The IP address assignment appears to be somewhat randomly distributed across the IP pool and my devices almost always get the same IP address assigned to them so I assume there's some kind of hashing algorithm in play, probably based on the device's MAC address.

Any thoughts?
 
From the dnsmasq man page (http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html):

--dhcp-sequential-ip
Dnsmasq is designed to choose IP addresses for DHCP clients using a hash of the client's MAC address. This normally allows a client's address to remain stable long-term, even if the client sometimes allows its DHCP lease to expire. In this default mode IP addresses are distributed pseudo-randomly over the entire available address range. There are sometimes circumstances (typically server deployment) where it is more convenient to have IP addresses allocated sequentially, starting from the lowest available address, and setting this flag enables this mode. Note that in the sequential mode, clients which allow a lease to expire are much more likely to move IP address; for this reason it should not be generally used.
 
I believe it's actually your clients that remember the last address that they had and request that same address when they reconnect.
 
I believe it's actually your clients that remember the last address that they had and request that same address when they reconnect.

I don't think it works that way. If I turn my desktop computer off, then back on, it just requests an IP from the router and the router decides what to assign. As far as I know, there's no way for the client to request a specific IP from the DHCP server.
 
I don't think it works that way. If I turn my desktop computer off, then back on, it just requests an IP from the router and the router decides what to assign. As far as I know, there's no way for the client to request a specific IP from the DHCP server.

look in the router syslog for DHCPREQUEST/DHCPACK sequences......

EDIT: Here's a post from another thread debugging a problem (ended up there were two DHCP servers), but the client is requesting the address.

http://forums.smallnetbuilder.com/showpost.php?p=157710&postcount=14
 
Last edited:
look in the router syslog for DHCPREQUEST/DHCPACK sequences......

EDIT: Here's a post from another thread debugging a problem (ended up there were two DHCP servers), but the client is requesting the address.

http://forums.smallnetbuilder.com/showpost.php?p=157710&postcount=14

Maybe when the client knows that the lease has expired it can request the same IP again. But I'm pretty sure if you power cycle the client, it won't ask for a specific address. But I'm not an expert by any means so it's completely possible that I'm totally wrong.
 
Maybe when the client knows that the lease has expired it can request the same IP again. But I'm pretty sure if you power cycle the client, it won't ask for a specific address. But I'm not an expert by any means so it's completely possible that I'm totally wrong.
It depends on the circumstances and the client involved. If the lease expires or the router is disconnected/rebooted the client usually asks for the same IP address from DHCP.

Windows remembers the last IP an interface had by putting it in the registry. Even if the PC has been powered off it will ask for the same IP address when it's powered on (assuming it hasn't expired). My mobile phone works the same way.
 

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