Expanding DHCP IP pool?

I'm managing a small/mid sized office using a server running openwrt to do firewall/router things, alongside various switches/APs/servers handling other things like branching out, wifi, dns, vpn, etc.

There is a desire now to expand the DHCP IP pool because the site is nearing the limits of the current /21. I've identified a suitable /20 subnet, not adjacent but close. The desire is to keep the old /21 (to not break existing configs), and add in the new /20 for Openwrt to also assign DHCP lease IPs from. Ideally the DHCP server would hand out IPs from both.

I've done this in larger Cisco managed networks so I'm certain it's possible, but I'm not familiar enough with what was going on under the hood to replicate it in Openwrt. I've looked around a bit but I'm not seeing anything obvious for this use case. Even pointers in the right direction would be appreciated. I can do the deep digging myself if I just understand the general architecture of what it should look like.

Thank you

Do you mind to explain?

IIUYC, you do not want to renumber? Do you want to assign another subnet to an interface and add an additional DHCP pool for dnsmasq?

Why can't you just expand the existing network up to a /16?

Networking isn't my primary role, sorry.. I want the existing /21 subnet to be available to LAN devices to use and set as static IPs, and also to be assigned out from the LAN DHCP pool of addresses. I want to add the new subnet to expand that pool of addresses, so devices in the LAN can get an address from the /20, but can also still reach devices in the /21 or /20. If possible the DHCP server should also serve addresses from both subnets.

Expanding the existing network would overlap with some other networks the machines use, unfortunately this site wasn't really designed in a forward thinking way :slight_smile:

Perhaps this a good opportunity to bit the bullet and reconfigure everything...

1 Like

Probably so. What I've done for now is set up a sufficiently large subnet for DHCP on the LAN using the standard way in luci. i.e. network > interfaces > LAN > IPv4 address. However in the same field (it accepts multiple entries), I gave the LAN interface an IP from the old subnet as well.

Now the DHCP server does not hand out IPs from both subnets, only the first larger one (is this documented behavior?). However this is okay as the routing still works to the old subnet, and the devices that have IPs in the old subnet set them statically, and things seem to be working.

The downside, and something I'm still interested in understanding, is that the pool of IPs available hasn't actually expanded, it just pulls from the one subnet still. Since it's larger now, the underlying issue is solved, but in an academic sense I'd still like to understand how one would build a pool of IPs for DHCP to use that actually consist of multiple subnets. Maybe the setup I'm remembering from the Cisco network was actually more complex, or maybe it's an offering unique to a Cisco product that under the hood does something more complex.

I'd like to generally propose a different approach for your network...

Unless you have managed switches and APs blocking multicast/broadcast traffic and client-to-client connections, your network may be getting to large in general. As the number of devices on a network increases, the efficiency of the network can begin to degrade at a nonlinear rate. This is not an issue for small networks. But when you're talking about 500+ devices on the same subnet, the 'chatter' between the devices occupies a non-trivial amount of the network's bandwidth. As an example, think about how loud a party gets (just conversation, not counting music) as the number of people grows -- a group of 50 people chatting is way more than 2x the volume of 25 people talking.

With that in mind, you may be better off with subnets of size /24 or /23 which is a good compromise of size vs efficiency. Depending on your needs, you can make these all route openly to each other, or you can limit this with the firewall. Common ways to divide subnets would be along the lines of logical groups (such as by department or floor, device type, server/network infrastructure, guest vs trusted users, iot devices, etc.).

2 Likes

Thanks for the feedback, I'm interested in improving this network so I will research this further.