Calculate subnet information, CIDR notation, and binary representations for any IP address and subnet mask.
Untangling Subnets:
The Neighborhoods of the Internet think of the internet as a massive city. An entire city with just street addresses would be chaos—it’s impossible to find anything.
So, we break the city down into neighborhoods. A subnet is exactly that: a smaller, more manageable neighborhood within the vast network city.
What is Subnetting?
Subnetting is the simple act of carving a large network into smaller, separate pieces. The device that acts as the border control between these neighborhoods is called a router. It decides which traffic can cross from one subnetwork to another, keeping things organized and secure.
Currently, most of the internet runs on a system called IPv4, but we are gradually transitioning to a newer system with expanded addresses, referred to as IPv6.
IP Addresses: The Street Addresses of the Internet
Every networked device—including your laptop and your smartphone—needs a unique identifier: an IP Address. This address has two vital parts:
The Network Part (The Neighborhood): This is the first part of the address, and it specifies which subnet “neighborhood” the device is a part of.
Every device within the same subnet shares this network number.
The Host Part (The House Number): This is the second part of the address, and it identifies the particular device within that neighborhood.
This house number must be unique to every device on the same subnet.
How We Tell the Two Parts Apart:
The question is how to determine where the block name stops and the house number starts. There are two primary tools for this.
1.The Subnet Mask (Most Common for IPv4)
Think about the function of a highlighter. The subnet mask is like a highlighter that highlights the “network” portion of the address.
Consider the example of a typical subnet mask for a home network as 255.255.255.0. This tells your computer that the first three sets of
numbers are the neighborhood, and the last set is your unique house number.
2. CIDR Notation (The Shorthand)
Engineers love shortcuts and CIDR notation is one of the common ones. You’ll come across this in the form of /24 after an IP address
(e.g., 192.168.1.1/24). This /24 is just a quicker way of saying “use a subnet mask that highlights the first 24 bits,” which is the exact same as
255.255.255.0.
A Quick Note on the Old Days
Before these modern methods, we had a rigid class system (Class A, B, and C networks) that was very inefficient.
The move to CIDR and flexible subnet masks gave network administrators the freedom to create subnets of any size they needed, making the internet much more efficient.