Why do we subnet? Well, the main reason is because network engineers do not want to waste too many IP addresses in each network. Because you’ve probably heard or read that we already ran out of IPv4 addresses.
If you, for instance, would have two routers directly connected to each other (Also called a ‘point-to-point’ connection) with a full class-C subnet, you would be wasting 252 addresses. With subnetting we could provide this same scenario with only two addresses per network but gaining 64 unique networks from that same Class-C network address.
If we would have to use a new subnet for each two routers connected to each other and do this multiple times we would need networks like this:
192.168.1.0 – 192.168.1.255
192.168.2.0 – 192.168.2.255
192.168.3.0 – 192.168.3.255, and so on.
With subnetting we would need networks like this:
192.168.1.0 – 192.168.1.3
192.168.1.4 – 192.168.1.7
192.168.1.8 – 192.168.1.11, and so on.
As you can see, this wastes way less addresses because you can see the latter example is still in the 192.168.1.x range.