What Is a Subnet?
As you may know from other articles on this WhatIsMyIPAddress.com website, an IP address contains information that identifies the network a computer is connected to, as well as the computer (or "host") itself. The IP address system provides a way of networking hardware to recognize the network as well as the host segments of an IP address.
When the Internet was just beginning, the technical architects devised a blueprint for organizations with networks of different sizes...from incredibly large networks to smaller ones. But even with that solution, they realized that even a large network might want to have smaller networks inside of it...such as one department (let's say Accounting) of a business.
That's where subnetting comes in, and it is vitally important to running an efficient network and keeping people connected. Subnetting lets a network administrator break a network into "subnets"—in other words, it allows them to connect more people to the network without getting more IP addresses.
"A" for effort: classes of networks.
When the IP address system was drawn up, networks were categorized by class—Classes A, B, C and D. (You can read about that here.) There were a few Class A networks, but they were enormous and could serve millions of hosts (computers connected to the network). On the other end, there were millions of Class C networks, but they served, in general, fewer hosts.
Subnetting initially was closely linked to a network's address class, but that's changed over the years as technology has allowed a new way to identify subnet types. Keep in mind that subnetting isn't strictly a technical topic for network geeks—if technology couldn't quickly figure out what network—or sub-network—you're connected to, it wouldn't be able to deliver to YOU the information that YOU specifically requested! It might make it to the network, but then it could get lost in transmission as it tried to find your computer.
Despite how well it worked on paper, the IP addressing class system posed a problem: While it was relatively easy to identify a network by its number (which identified its class type), it was difficult to zero in on ALL of the host computers that might be connected to it.
In other words, all the subnets weren't that easy for networking hardware/software to figure out. Case in point: Data could arrive from the outside world, destined for a host computer on a large Class A network. It would arrive at the network "gateway," from which data is distributed...however, there could be millions of host computers on that network.
Subnets to the rescue.
But by breaking up a large network into smaller ones—subnetting—the delivery of data could move along more efficiently. But more than that, creating a number of physical networks from the larger network allows an organization to take full advantage of the network's capacity.
Think of it like a large 50-story office building that is home to hundreds of companies, each with hundreds of employees. The building itself has only one address on the street front, yet somehow physical letters and packages arrive at their proper destinations. If there weren't a mailroom system to distinguish individual employees—by company, by building floor, by department, etc.—mailroom workers would quit after a day on the job.
That's the challenge a network faces. There needs to be a way for routers to know how and where to send data once it's ready to move on from the gateway. There needs to be a way to subdivide the address space once you move past the network ID to make data delivery more efficient.
Subnetting provides that next tier of logical organization after the network ID. Routers are able to deliver data to the right subnets, which generally are still corresponding to the network segment.
If you read the articles about IP addresses, you'll learn that the numbers break down into 1) the network ID and 2) the host ID. So where does this subnet ID come from? That is, what part of the address identifies a subnet (if there is one) and the right subnet (if there's more than one)?
The intelligent IT brains who designed the TCP/IP system devised a way to borrow some of the "bits" from the host ID to create a subnet address. Something called the "subnet mask" is used to assign some of the IP address bits to a subnet, while leaving some for the host/computer ID.
Just hit "send." It'll get there.
Go back to the large building and mailroom analogy: In a "snail mail" world, to mail something to a business colleague, you would need to know a wealth of information to address your package: the name of the company they work for, the floor they work on, and perhaps their internal company mail code, which might identify the department they work in, as well as the desk number.
Of course, you'd need the right city, state and ZIP code on the package as well.
But if you wanted to send that same person the same message in an email, you wouldn't need to know their IP addresses, network and host IDs, subnets and subnet masks, and what class of network they're attached to.
You'd just write your email and hit "send." And then silently thank the "geeks" who designed the TCP/IP architecture.