Kitz Forum

Computers & Hardware => Networking => Topic started by: bignose2 on February 14, 2022, 12:01:48 PM

Title: Will changing from /24 to /23 mean a static device .255.0 will be un-contactable
Post by: bignose2 on February 14, 2022, 12:01:48 PM
Hi

About to change routers & ISP & while I am about it want to give myself a larger IP range.

Currently 192.168.2.1 /24, so 1 - 255
I have very many static devices in range 192.168.2.1 to 192.168.2.100 so all set up with 255.255.255.0
DHCP 101 - 255

If I put this new router in, set up with /23 so 192.168.2.1 - 192.168.3.255 (.3.) : 255.255.254.0

Will I be able to access these devices via a browser etc. on the LAN, i.e not have to plug in direct to each device.

To either change the subnet mask immediately or ideally leave as it is & change at my leisure.

They would still be in the new routers IP range but not sure how the subnet mask effects how the router will see them & other broadcasting potential issues.

Thanks I/A

Also, before everyone says, who needs more than 254, firstly with so many devices & IoT, smart devices/plugs 254 is actually not that huge but the way I like to manage my static does mean it is spread out & perhaps not really 254 devices.
v. roughly e.g.
192.168.2.x
1 - 5 : 2 Modems & router
10 - 20 : Main PC's - only 3 in use, other dhcp
21 - 30 : phone system & NAS , only 3 in use
31- 50 : Business IP cameras, 12 in use
51 - 60 : home IP cameras, 8 in use
61 - 70 : Business WiFi access points, 4 in use
71 - 80 : Home WI Access Points, 3 in use
etc. etc/
I like to give static ranges to Sky devices, Shelly1 devices etc etc so v. easy to get to 130 or more.

If you don't leave a decent gap, all of sudden they area mess.

DHCP then on many phones, tablets, other PC's, dozens of smart sockets/plugs, watches, ip phones...
Title: Re: Will changing from /24 to /23 mean a static device .255.0 will be un-contactable
Post by: burakkucat on February 14, 2022, 05:21:14 PM
Does the following help?  :-\

[bcat ~]$ for CIDR in 20 21 22 23 24; do whatmask 192.168.2.0/$CIDR; done

------------------------------------------------
           TCP/IP NETWORK INFORMATION
------------------------------------------------
IP Entered = ..................: 192.168.2.0
CIDR = ........................: /20
Netmask = .....................: 255.255.240.0
Netmask (hex) = ...............: 0xfffff000
Wildcard Bits = ...............: 0.0.15.255
------------------------------------------------
Network Address = .............: 192.168.0.0
Broadcast Address = ...........: 192.168.15.255
Usable IP Addresses = .........: 4,094
First Usable IP Address = .....: 192.168.0.1
Last Usable IP Address = ......: 192.168.15.254


------------------------------------------------
           TCP/IP NETWORK INFORMATION
------------------------------------------------
IP Entered = ..................: 192.168.2.0
CIDR = ........................: /21
Netmask = .....................: 255.255.248.0
Netmask (hex) = ...............: 0xfffff800
Wildcard Bits = ...............: 0.0.7.255
------------------------------------------------
Network Address = .............: 192.168.0.0
Broadcast Address = ...........: 192.168.7.255
Usable IP Addresses = .........: 2,046
First Usable IP Address = .....: 192.168.0.1
Last Usable IP Address = ......: 192.168.7.254


------------------------------------------------
           TCP/IP NETWORK INFORMATION
------------------------------------------------
IP Entered = ..................: 192.168.2.0
CIDR = ........................: /22
Netmask = .....................: 255.255.252.0
Netmask (hex) = ...............: 0xfffffc00
Wildcard Bits = ...............: 0.0.3.255
------------------------------------------------
Network Address = .............: 192.168.0.0
Broadcast Address = ...........: 192.168.3.255
Usable IP Addresses = .........: 1,022
First Usable IP Address = .....: 192.168.0.1
Last Usable IP Address = ......: 192.168.3.254


------------------------------------------------
           TCP/IP NETWORK INFORMATION
------------------------------------------------
IP Entered = ..................: 192.168.2.0
CIDR = ........................: /23
Netmask = .....................: 255.255.254.0
Netmask (hex) = ...............: 0xfffffe00
Wildcard Bits = ...............: 0.0.1.255
------------------------------------------------
Network Address = .............: 192.168.2.0
Broadcast Address = ...........: 192.168.3.255
Usable IP Addresses = .........: 510
First Usable IP Address = .....: 192.168.2.1
Last Usable IP Address = ......: 192.168.3.254


------------------------------------------------
           TCP/IP NETWORK INFORMATION
------------------------------------------------
IP Entered = ..................: 192.168.2.0
CIDR = ........................: /24
Netmask = .....................: 255.255.255.0
Netmask (hex) = ...............: 0xffffff00
Wildcard Bits = ...............: 0.0.0.255
------------------------------------------------
Network Address = .............: 192.168.2.0
Broadcast Address = ...........: 192.168.2.255
Usable IP Addresses = .........: 254
First Usable IP Address = .....: 192.168.2.1
Last Usable IP Address = ......: 192.168.2.254

[bcat ~]$


[Edited to change the example 192.168.0.0 address to the used 192.168.2.0 address.]
Title: Re: Will changing from /24 to /23 mean a static device .255.0 will be un-contactable
Post by: meritez on February 14, 2022, 06:46:31 PM
Does everything need to talk to everything else?
Title: Re: Will changing from /24 to /23 mean a static device .255.0 will be un-contactable
Post by: Reformed on February 14, 2022, 08:56:31 PM
Not quite sure what the issue is.

Change DHCP to hand out leases with /23 255.255.254.0 mask.

Adjust devices with fixed IPs to use /23 masks.

Force all DHCP devices to get a new lease, which will include the new subnet.

In summary:

Adjust the DHCP scope.
Adjust the statically addressed devices.
Force DHCP client machines to renew their lease.
You're done.
Title: Re: Will changing from /24 to /23 mean a static device .255.0 will be un-contactable
Post by: bignose2 on February 18, 2022, 02:50:13 PM
Hi,

Yes, I do want everything to talk to itself.
Mostly that from my main PC or a couple of others PC's I can always access every single device, be it a camera, access point or smart sockets etc.

"Adjust devices with fixed IPs to use /23 masks."
problem with this is I must have over 70 so quite a lot of work in one go & more my question was would I have to either:

a) Whilst the router is still 255.255.255.0 change all the devices to .254 & if so, would all these devices now NOT be visible or work until the router is changed
or
b) First change the router to 254. & might the devices still be visible on the network to change (or even leave) & then change the router afterwards

b) is my preference & was actually hoping that many of these devices will still work OK without changing, like IP camera's & that it would just be PC's that may want access to .3 range that definitely would need changing immediately.
I have quite a few Access Points also on static on .3.
Then just change others at my leisure.

DHCP of course will look after itself.
Title: Re: Will changing from /24 to /23 mean a static device .255.0 will be un-contactable
Post by: Alex Atkin UK on February 19, 2022, 05:04:02 AM
I find it bizarre that you're going to all this trouble just to keep gaps between your IP allocations.

I gave up on such OCD behaviour years ago after realising, it just doesn't matter.  Do all allocations via DHCP and call it a day.  If you're never going to have more than 254 devices, this is seriously overkill.

With DHCP I have a nice list of every client and its assigned IP and can DNS lookup on its hostname in a pinch.
Title: Re: Will changing from /24 to /23 mean a static device .255.0 will be un-contactable
Post by: Weaver on February 19, 2022, 05:11:54 AM
Alex with respect, I am with the OP. Being able to ping specific devices or identify their doings in logs is easier if you just know where they are. I’ve given DNS addresses to my fixed IP hosts too. I don’t think it’s such a bad idea of the OP’s.

The OP could go all the way and set 192.168.0.0/16 even, which is the maximum, but there’s no need.
Title: Re: Will changing from /24 to /23 mean a static device .255.0 will be un-contactable
Post by: burakkucat on February 19, 2022, 03:12:54 PM
I am another who does not enable a DHCP server on the LAN. Each device has been manually assigned a static address (and will keep that address until the device is no more). In my case a /24 is sufficient.
Title: Re: Will changing from /24 to /23 mean a static device .255.0 will be un-contactable
Post by: Alex Atkin UK on February 19, 2022, 05:16:18 PM
Alex with respect, I am with the OP. Being able to ping specific devices or identify their doings in logs is easier if you just know where they are. I’ve given DNS addresses to my fixed IP hosts too. I don’t think it’s such a bad idea of the OP’s.

The OP could go all the way and set 192.168.0.0/16 even, which is the maximum, but there’s no need.

Identifying them in the logs and pinging them is easier if they're NOT statically assigned on the client.  You set them as static DHCP assignments once and you're done.  For example getting to my modem is a lot easier typing http://zen.lan than http://192.168.1.240.  If you're maintaining DNS for the LAN, it makes no sense to not do DHCP too when they can both be done at the same time with a single entry.

Having a central database that controls all your allocations is far far superior.

I used to be a stickler for static IPs, but once you have more than say 10 devices it becomes a PITA.
Title: Re: Will changing from /24 to /23 mean a static device .255.0 will be un-contactable
Post by: francisuk1989 on February 19, 2022, 09:58:16 PM
To the OP - Can your router do Bridging with DHCP sever?
If so

Bridge 1 - 192.168.0.0/24 (LANs)
Bridge 2 - 192.168.1.0/24 (Main WiFi)
Bridge 3 - 192.168.2.0/24 (Guess WiFi)
Bridge 4 - 192.168.3.0/24 (Mobile)
Bridge 4 - 192.168.4.0/24 (Smart devices)

so on.

and then Bridge to WAN, So Bridge 1 > WAN, Bridge 2 > WAN so in this case nothing talks to each other, other then WAN interface.

If not, the largest you can go for a home network is 192.168.0.0/16, Making this 192.168.0.0-192.168.255.255 with a subnet of 255.255.0.0

Edit
If you wont to go the LAN ports route with some kinda switch behind it?, so:

LAN port 1 - 192.168.5.0/24
LAN port 2 - 192.168.6.024

then look into VLAN for this.
Title: Re: Will changing from /24 to /23 mean a static device .255.0 will be un-contactable
Post by: Weaver on February 20, 2022, 12:52:41 AM
Alex, I have been doing as you say, using fixed assignments set by DHCP. I wasn’t making sense  ???
Title: Re: Will changing from /24 to /23 mean a static device .255.0 will be un-contactable
Post by: Reformed on February 20, 2022, 06:53:49 AM
Devices will be reachable as long as they have a default gateway that's reachable and the router behaves. The ones with /23 mask will talk directly with both networks, the ones with /24 will talk directly in their own subnet and go via default gateway, your router, for the other subnet. Ensure that

You end up with asymmetry but this probably doesn't matter that much - wireless devices are going via an access point or router anyway.

The second /24 will obviously be new devices so these will have the /23 mask right away which is the key thing as these won't have access to 192.168.2.1 with a 24-bit mask, the devices in 192.168.2.0/24 now will use the router to talk to 192.168.3.0/24, 3 will return traffic directly.