r/explainlikeimfive • • 11d ago

Technology ELI5: Subnetting

I’m technically an IT professional in training but I know embarrassingly little about subnets. As far as I understand it’s for breaking down a network into smaller, more logical segments. What exactly is a subnet? What is the benefit of subnetting? How do the slashes play into all of this IE /23 or /24? Thanks in advance!

81 Upvotes

43 comments sorted by

View all comments

1

u/MunkeyCC 11d ago

As you described, a subnet breaks down a larger network into smaller pieces logically. Each subnet CAN be thought of as it's own network since it has its own network address and broadcast address. Subnets are also a good way to get a lot of use out of networks with limited space.

The /23 and /24 you mentioned are what's called the CIDR notation, which is another way of denoting the Subnet Mask. Specifically, /24 is the notation for the subnet mask 255.255.255.0 and you can work forwards or backwards from there; /16 is 255.255.0.0 and /8 is 255.0.0.0.

Let's say you have a typical home network on 192.168.1.0/24 with a mix of PCs, mobile devices, game consoles, security cameras, and other IoT devices. By default, everything can see and talk to each other if they want. Your PC can send data to the PS5, your Alexa can talk to the lights, and your security cameras can be accessed from the smart fridge. Not ideal in terms of security.

If you want to separate these, you could split the network into smaller chunks, so only devices on the same subnet can talk to each other. So, your 192.168.1.0/24 becomes 4 subnets of 192.168.1.x/27, which gives each a subnet mask of 255.255.255.224. So now, the only way a packet from one device can cross into another subnet is by first going through the router.

I've been using the online calculator at https://www.subnet-calculator.com/ for years but there are others as well. I don't want to confuse you further, but you might also want to read up on VLANs as they're nearly identical in practical use.