Subnetting and How It Works
Subnetting and How It Works
A subnet, or subnetwork, is a network inside a network. Subnets make networks more efficient. Through
subnetting, network traffic can travel a shorter distance without passing through unnecessary routers to
reach its destination.
Subnetting is the process of dividing a larger network into smaller subnetworks or subnets. It offers several
benefits and is commonly used in network design and management. Here are some reasons why
subnetting is used:
1. Efficient Use of IP Addresses: Subnetting allows for the efficient allocation and utilization of IP
addresses. By dividing a network into smaller subnets, you can assign IP addresses to devices more
precisely, ensuring that addresses are not wasted. This is particularly important in scenarios
where IP address availability is limited, such as in organizations with a large number of devices.
5. Scalability and Flexibility: Subnetting enables network scalability and flexibility. As a network
grows, new subnets can be created to accommodate additional devices or network segments.
Subnets can be easily added, modified, or extended without disrupting the entire network
infrastructure. This allows for greater adaptability to changing network requirements and future
growth.
Each IP address class has a matching “subnet mask,” which is an easy way of identifying which part of
the IP address relates to the network and which part relates to the host. This is essential to ensure
packets traveling through the network get to the right place.
The default matching subnet masks for each subnet class are as follows:
Class A: 0.0.0
Class B: 255.0.0
Class C: 255.255.0
When we look at the subnet masks and convert the decimal numbers back into binary, we can see which
bits of the IP address are allocated to the network and which are allocated to the host.
Here is an example:
11111111.11111111.11111111.0000000 subnet mask
Essentially, a subnet is a smaller portion of the network within class A, B, or C. Creating and using subnets
can help to keep your network organized and functional.
Example of subnetting in 3 steps:
1. Hypothesis
Let’s suppose a business wants to use four different IP address blocks for the different segments of its
network, with 50 hosts per segment. The business uses the following IP address blocks:
200.1.0.0
200.1.1.0
200.1.2.0
200.1.3.0
2. Goal
Each IP address block can create 254 IP addresses, which allows 254 x 4 total IP addresses to be created
for use in the network. This amounts to 1,016 IP addresses. But the business only wants 50 hosts on each
block, so it’ll have 816 IP addresses that don’t get used at all. This is a waste of IP addresses that could be
used by other devices. Subnetting is a way to divide an IP address block into smaller portions, so fewer IP
addresses are wasted.
3. Execution
We know for the first IP address, 200.1.0.0, 200.1.0 is the network portion, and .0 is the host portion. The
full IP address in the 32 binary bits would look like:
11001000.00000001.00000000.00000000
But we know we don’t need all 254 hosts created by this IP address block, so we can borrow some of the
host “bits” to create a new “subnetwork,” or subnet.
Using the 11001000.00000001.00000000.00000000 example, we would borrow one “bit” from the host
portion to create a subnet.
So:
11001000.00000001.00000000.00000000
would become:
11001000.00000001.00000000.10000000
As a result, the new decimal IP address would become:
200.1.0.128
Borrowing this one bit from the host portion of the IP address still leaves seven bits in the host portion.
Seven bits in the host portion allow 128 IP addresses to be created, which is still more than enough for
the business’s needs. If we follow through the process and borrow another bit from the host portion of
the IP address, four subnets can be created:
11001000.00000001.00000000.00000000 200.1.0.0
11001000.00000001.00000000.01000000 200.1.0.64
11001000.00000001.00000000.10000000 200.1.0.128
11001000.00000001.00000000.11000000 200.1.0.192
These four subnets allow 64 IP addresses to be created, and there’s far less wastage than in the example
above.
There are two hosts reserved for the IP addresses needed for the network identity itself (the first IP) and
the broadcast address (the last IP). So for each IP address block, only 12 IP addresses are wasted.
This is where subnet masks come back in. If you’ve “borrowed” bits from the host portion of the IP
address, it can be hard to tell where the network portion ends and the host portion begins. With a subnet
mask, you can specify which portions of the subnet are the network and which portions are the host.
For example, for the IP address 200.1.0.64 created above, the subnet mask would be:
REFERENCES
https://www.dnsstuff.com/subnet-ip-subnetting-guide