DHCP "option start" change range

I have static IPs that are reserved from 192.168.0.100-600. I'd like to start the dynamic leases at 800. I thought this would be as simple as changing option start, but after changing /etc/config/dhcp below and rebooting the router, dynamic IPs are still being assigned in the 100 range.

config dhcp 'lan'
        option interface 'lan'
        option start '800'
        option limit '150'
        option leasetime '12h'
        option dhcpv6 'server'
        option ra 'server'
        option ra_management '1'

Am I doing this wrong? I'd rather not configure VLANs or get into anything complicated like that unless necessary.

What are your LAN subnet settings?

192.168.0.1 is the LAN/Subnet

I changed it from the default because I'd like to access via VPN another external router's config page/subnet @ 192.168.1.1

If you want to stay solely in 192.168.0.x then you're limited to 254 addresses. You can't go higher than 192.168.0.254.

2 Likes

Thanks. This is a standard limitation I suppose?

I'll just change the routers I manage to start at 192.168.1.x, 192.168.2.x, etc.

Is that best practice? What do you all do?

Yes. An IPv4 is actually made up of 4 sets of 8 binary digits, these are then converted into decimal as it's easier for us to deal with. But this means each part of the address can be between 0 and 255. You can't have an address using any number outside that range.

It all depends on what your network setup is. I'm guessing you don't have much experience of subnetting?

Is there a point to this?

1 Like

Oh. Yes little experience. So it's not possible to setup 192.168.1.1xx for DHCP and then 192.168.1.8xx for static IPs? I'm trying to avoid the situation where my static IPs are assigned in the same range that my dynamic IPs are set.

I also want to be able to access my other routers when I login to them via VPN. So I put them on a different subnet 192.168.2.1, etc.

No, but do you have that many devices to connect? For many small networks having the first 98 addresses (i.e. 192.168.x.1 - 192.168.x.99) for static devices and then the remaining addresses (192.168.x.100 - 192.168.x.254) as DHCP is likely to be sufficient. I believe such a setup is pretty much how it defaults in OpenWRT.

3 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.