Change the pool of DHCP IP addresses

I have a network and subnet of (Lets not get into why. There are many reasons)
I want OpenWRT to give out ip addresses ONLY. Other IP addresses will be set in Static Leases.
How do I do this?

Read the wiki/doc for /etc/config/dhcp?

So I think that Wiki assumes I know more about networking then I actually do, as it uses many terms I am not familiar with. The only way I can see to do it, and I don't know if it will work, or if I will just end up breaking things is to set the
"option start '256'" as that should, in my way of thinking, start at However I have a feeling it isn't expecting a number higher then 255 there.
So if its not too much to ask, can I ask for a bit more detailed guidance? Unless of course the option start solution is the correct one.

Not the way I see it expressed in the wiki.

  • Specifies the offset from the network address of the underlying interface to calculate the minimum address that may be leased to clients. It may be greater than 255 to span subnets.

Behind the scenes, it would calculate your range like this (use 513 for start, and 254 for limit):

# /bin/ 513 254

513 is the needed offset from, not

1 Like

So I was right on what to set, just not what to set it to?, I just set the option start to 513? Limit can stay at 100.. I will never have that many DHCP clients.
Or is that output actually suppose to go somewhere?

Just use the 513 as your Start value on the LAN DHCP server. Behind the scenes, dnsmasq will run that ipcalc command to figure out the actual range.


The router's IP address doesn't have an effect on the start and limit calculations of the dynamic IP range or pool.

It isn't a problem here, but dynamic IP range can't overlap the router's IP address.

Conventionally the router's IP address is the first usable address in the subnet (usually .1), but I suppose you have reasons to do that differently.

1 Like

Off topic/nitpick: you would not believe that out there in the wild there are a bunch of old grey beard netops who uses "conventionally" the second last address on a subnet... :man_shrugging:


I am not one of them, I use .1 :wink:

1 Like

Hey! I resemble that remark :wink: