I want to expand my network ip addresses but I'm kinda new at this

Everything on my network is pretty plain vanilla, I have one router and 'out of the box' openwrt.

I have DHCP starting at 50 (192.168.1.50 - 254)
and static below that

What I want is to create a range of static ips from 192.168.2.1 - 254

How can I do that?

Start at 10 and get 254-10 ie 244 addresses. Static entries can be in and out of this range.
for network .2. you need another subnet, like a copy if lan network with different address.
Consider segmenting network, initially without firewall, like kids to other net and printers to another, could come handy later.
You can also decrease netmask to 23 and have 509 usable addresses in subnet.
Or reduce dhcp lease time to 1h to recuperate used up addresses faster.
You need to describe problem ipo blaming self fir own doubts ...

1 Like

Is this in addition to, or in lieu of the current range of the DHCP addresses?

If in lieu of the current range, do you wish to have 192.168.1.1-192.168.1.254 to remain in the addressable space of your network (i.e. 510 addresses instead of just 254)?

This would be in addition to my current network range, so all sharing the same network. I think @brada4 mentioned changing the netmask. That sounds like that would have the exact affect that I want.

To follow up, how can I change the netmask? I see this page, but I'm not sure if that's where I want to change the setting?

1 Like

image

1 Like

Yes, changing the netmask is the way to do this. However, you need to go to a much larger network to fit those two ranges together. It needs to be a /22 network (255.255.252.0). If you are willing to use 192.168.0.1-192.168.1.254 instead, that can be a /23 (255.255.254.0).

The DHCP server pool is calculated based on the offset from the base address and then the size of the pool you want to have.

1 Like

Oh, that's good info, yeah, I don't mind dropping down to .0

WRT DHCP, if I understand correctly, if I change to /23 then I would add 254 (or 255?) to my offset? so right now it's 50, but after the change I should update it to be 304 ?

You can prepare reducing DHCP lease time to 1h then in a day do the change. DHCP will arrange that no conflicts occur. In that transition moment newly acquired addresses will not be able to communicate with those with old netmask.

1 Like

DHCP server is very smart, it will exclude own address, broadcast addresses and pingable addresses, you can set it zero to million if you like.

For smoother transition I would recommend to add 2nd LAN network on br-lan device 192.168.0.1/24 range 2-254 and disable dhcppp server on .1. network interface, then when no clients are left in .1. network extend netmask and range on new network and delete old one

Yes. But, increasing the subnet size of your current network to /23 will make your totla network 192.168.0.1-192.168.1.254, so you're not getting into the .2 range.

If you want to get into the .2 range, you need to use a /22. And then the offset is from 192.168.0.1 - 192.168.2.1 (I believe that works out to an even 512).

No, this is not correct. In fact, we have seen situations where the router's address is within the DHCP pool and it causes a failure. Further, do not set the limit higher than the maximum number of addresses available (when considering the offset) to the top of the network range.

I actually want my DHCP to stay in the .1 and have static in the .2, so I think I could just change the netmask to /22 (255.255.253.0 ???) and change the DHCP offset to 257 (which should push it to 192.168.1.2) with a range of 253 IPs for DHCP?

Yes, that will work. Note the transition time dictated by dhcp lease time.

/22 equates to 255.255.252.0, or a /23 is 255.255.254.0.

In either case, your base network address is 192.168.0.0 (note that this not a valid host address, the first host address is .1).

so if my CIDR table lookup is correct /22 would translate to opening the network from 192.168.0.1 up to 192.168.3.254? Which is why DHCP would need to start at 513 to start at 192.168.1.2?

Yes.

Sorry... I might have muddied the water. 256 for the offset should get you to 192.168.1.2. You'd need 512 to get you into the .2 range.

1 Like

Thanks @psherman and @brada4 I'm updating the router now!

UPDATE (let's GOOOOOO!):

ifconfig en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	options=50b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV,CHANNEL_IO>
	ether 3c:a6:f6:b0:ba:b4
	inet6 fe80::cc7:fb19:2c7b:7251%en0 prefixlen 64 secured scopeid 0x6
	inet6 fd71:cdcf:3287:0:1820:a1da:5e0f:3a08 prefixlen 64 autoconf secured
	inet 192.168.2.1 netmask 0xfffffc00 broadcast 192.168.3.255
	nd6 options=201<PERFORMNUD,DAD>
	media: autoselect (1000baseT <full-duplex,flow-control>)
	status: active
1 Like

BTW, you can force all of your DHCP clients to request new/renew leases by power cycling them or quickly disconnecting their ethernet/wifi. You don't need to change the DHCP lease timing. In fact, changing the lease time will only affect the next lease they get, rather than the existing leases that would otherwise need to expire.

1 Like

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