OpenWrt Forum Archive

Topic: DHCP address assignment

The content of this topic has been archived on 25 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

It appears that the DHCP service on the OpenWRT (Barrier Breaker) firmware does not assign IP addresses in order, it appears to assign IP addresses completely randomly.

Why is this and can I change it so it will go in order from 100 to 240 instead of 110, 215, etc.

Why is that important to you? If you want devices to get specific IP addresses I would recommend you to assign IP addresses to the respective MAC addresses to accomplish that. Otherwise the order in which addresses get assigned is completely unimportant and I do not know why you would need to worry about it.

You can't, unless you patch the sources of dnsmasq and/or odhcpd.

BTW, the choosen ip address is not random, it's a hash on the MAC address. So the same MAC will always get the same IP. (Unless it's already taken)

The discussion might have continued from here.