Table of Contents |
As networks grow, so does the challenge of managing them. A single, large network with hundreds of devices can quickly become difficult to organize and secure. That is where subnetting comes in.
Subnetting is the process of dividing a larger network into smaller, more manageable segments called subnets. Each subnet acts like a smaller neighborhood within a city, making it easier to assign addresses, limit traffic, and improve security. Subnets help networks run more smoothly by keeping related devices grouped together and reducing unnecessary communication between unrelated parts of the network.
ITN026
Although IP address classes created some organization, this system often wasted addresses. For example, a small office might be stuck with hundreds of extra, unused IPs just because the class it was assigned was too large.
To solve this problem, engineers developed CIDR notation, which stands for Classless Inter-Domain Routing. CIDR replaced rigid classes with a flexible system that allows networks to be sized exactly as needed. It is like being able to custom-build shelves that fit your books perfectly, instead of settling for one-size-fits-all.
Together, subnetting and CIDR help network engineers organize addresses in a way that is efficient, scalable, and easier to manage. You will find them at work in everything from your home Wi-Fi network to large corporate systems.
CIDR is a flexible way to define the size of a network. In earlier systems, networks were assigned fixed blocks of addresses based on classes (A, B, or C), which often gave organizations far more addresses than they needed. CIDR allows network administrators to create subnets that fit the actual number of devices required. This helps avoid wasting IP addresses and allows more efficient use of the available address space.
CIDR uses slash notation to show how an IP address is divided between the network portion and the host portion. The number after the slash tells us how many bits of the 32-bit IP address are used to identify the network. For example, in the address 192.168.1.0/24, the “/24” means that the first 24 bits are used for the network portion. The remaining 8 bits are available for hosts, which are the individual devices on the network.
Think of it like a mailing address. The network portion is like the street name; it tells you which neighborhood or area the address belongs to. The host portion is like the house number; it tells you which specific building or apartment to deliver to on that street. CIDR notation tells routers exactly where to split the address between the two parts, so the data can be delivered efficiently and accurately.
EXAMPLE
Let’s say you are setting up a network for a small office that needs to support up to 60 devices. A /26 subnet gives you 64 total addresses, 62 of which are usable. That is a perfect fit.We’ve already covered the basics of how we use host and network addresses and how they are split into network and host parts to help data find its way. Now, let’s turn to a subnet mask, a special 32-bit number that works alongside an IP address to identify which part of the address refers to the network and which part refers to the host (the specific device). Like an IP address, a subnet mask is written in four octets, such as 255.255.255.0.
You can think of the subnet mask as a filter. It tells devices which portion of an IP address to read as the network and which portion to read as the host. The mask does this by marking the network bits with 1s and the host bits with 0s. In binary, the mask 255.255.255.0 looks like this:
11111111.11111111.11111111.00000000
This mask means the first 24 bits of the address are reserved for the network, and the remaining 8 bits are for host devices. That setup supports up to 254 usable hosts in that subnet.
Subnet masks are essential because they define the boundaries of a subnet. When you apply subnetting, you change the mask to “borrow” some bits from the host portion and use them to create additional subnets. This reduces the number of hosts per subnet but allows you to organize the network more efficiently.
ITN17
EXAMPLE
A standard Class C mask is 255.255.255.0, which allows for 254 usable host addresses. If you change the mask to 255.255.255.192, you’re borrowing 2 bits from the host portion. This creates four smaller subnets, each with 62 usable addresses.CIDR notation and subnet masks are two ways of expressing the same idea: how much of an IP address is used for the network portion and how much is used for the host portion The subnet mask shows this using decimal numbers, such as 255.255.255.0. CIDR uses a slash followed by a number, such as /24, to show how many bits are used for the network portion.
CIDR Notation | Subnet Mask | Network Bits | Host Bits | Usable Hosts |
---|---|---|---|---|
/24 | 255.255.255.0 | 24 | 8 | 254 |
/25 | 255.255.255.128 | 25 | 7 | 126 |
/26 | 255.255.255.192 | 26 | 6 | 62 |
/27 | 255.255.255.224 | 27 | 5 | 30 |
/28 | 255.255.255.240 | 28 | 4 | 14 |
/29 | 255.255.255.248 | 29 | 3 | 6 |
/30 | 255.255.255.252 | 30 | 2 | 2 |
Network devices, such as routers and switches, use this information to determine whether an IP address belongs inside the same network or if it should be sent outside to another network. CIDR notation is easier to read and use, especially when designing or organizing networks. Instead of writing out a full subnet mask, you can simply say “this is a /26 network,” and any networking device will know how to handle it. Understanding both formats helps when working with different tools or reading network documentation. Some systems use CIDR notation, while others still show subnet masks in dotted decimal form.
A network address is the first address in a subnet. It is used to identify the entire subnet itself, not a specific device. You can think of it like the name of a neighborhood. It does not belong to any one house, but it helps define the area.
Every IP address is made up of a network portion and a host portion. The network portion tells devices which subnet an IP address belongs to. When all the bits in the host portion are set to 0, the result is the network address.
Routers and other networking devices use the network address to route traffic. When a router receives a data packet, it compares the destination IP address to known network addresses to decide where to send the packet next. Without the network address, the router would not know which subnet to forward the data to.
The network address is never assigned to a device. It serves as the official reference point for the subnet as a whole. Any communication to the subnet starts by locating its network address.
EXAMPLE
Here are the details of the subnet 192.168.1.0/24:A host address is any IP address within a subnet that is assigned to an individual device, such as a computer, printer, router, or smartphone. While the network address identifies the entire subnet, host addresses are used to identify and communicate with specific devices inside that subnet. A host address includes both the network portion and a unique host portion. The network portion tells devices which subnet the host belongs to, and the host portion identifies the specific device on that subnet.
You can think of a host address like a house number on a street. The street name (network portion) tells you the general location, and the house number (host portion) tells you which building to go to.
In every subnet, two addresses are reserved and cannot be used for hosts:
Every IP address is made up of two parts: the network portion and the host portion. Together, they help devices communicate efficiently within and across networks.
The network portion, defined by the subnet mask or CIDR notation, tells a device which subnet an IP address belongs to. This is like identifying the street or neighborhood. Routers use the network portion to decide where to forward data.
The host portion identifies a specific device within that subnet. This is like the house number that tells you exactly where to deliver the message on that street.
When a device sends data to another IP address, it first checks the network portion to see if the destination is in the same subnet. If it is, the data is sent directly. If it is not, the data is sent to the router, which uses the destination’s network address to route the packet correctly.
ITN027
For this system to work, every subnet needs the following:
EXAMPLE
Here are the details of the subnet 192.168.1.0/26:Source: THIS TUTORIAL WAS AUTHORED BY SOPHIA LEARNING. PLEASE SEE OUR TERMS OF USE.