Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is something strange happening with my OpenWrt firmware. The scope for my DHCP is 100 to 250 in the 192.168.1.* range but the first IP it gave is

Is there any reason it started from 189? Can it be random? I'm sure I have some static IPs configured but only 3 or 4 in the 100 - 200 range.

How does DHCP distribute or choose which IP to give within the scope?

Note: I am using the Gargoyle firmware based on OpenWrt (which works pretty well).

share|improve this question
Just a note to: I'm sure I have some static IPs configured but only 3 or 4 in the 100 - 200 range. exclude the static addresses from the DHCP range. If the DHCP doesn't check the IP before delivering you will run in problems. – boboes Dec 9 '14 at 18:28

I realize this is an old question, but...

I believe Gargoyle (and many other third-party firwares for routers) use dnsmasq for their DNS/DHCP service, which by default gives an IP based on a hash of the device's MAC address. The documentation gives a little more detail:


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.

share|improve this answer

The client can request to use the ip it had last.

share|improve this answer
If the ip is example and it lease.. will his next ip gonna be *.125 ? – Rushino Nov 12 '11 at 3:25
When the client sends a DHCPDISCOVER again (instead of DHCPREQUEST directly) should the server offer the same address for the MAC when the lease time is not over and the address is not assigned to another node? – harper Dec 3 '13 at 18:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .