Subnetting Simplified: Mastering Network Division in TCP/IP

Last Edited




Welcome to the world of subnetting, a crucial concept in the vast universe of networking! Imagine you’re organizing a big party (your network) and need to ensure everyone has enough space and resources to have fun. Now, what if you divide your guests into smaller groups (subnets) and arrange multiple mini-parties? This way, everyone gets to enjoy more with less chaos. That’s subnetting for you, but in the realm of computers and networks!

In this detailed article, we’re going to explore the ins and outs of subnetting. Think of it as your guide to understanding how big networks are broken down into smaller, more efficient ones. We’ll start by understanding what subnetting is, why it’s important, and then dive deep into how it works. We’ll cover IP addresses, subnet masks, and even walk through some examples to make subnetting a piece of cake for you. Whether you’re a student, a budding IT professional, or just a curious mind, this guide is your ticket to mastering subnetting in TCP/IP networking. So, gear up to unravel the magic of organizing networks efficiently!

In this article:

  1. What is Subnetting?
  2. Why Do We Need Subnetting?
  3. How Does Subnetting Work?
  4. Example of Subnetting
  5. References

1. What is Subnetting?

Imagine your school’s network as a big neighborhood. This neighborhood (network) has a certain number of houses (devices like computers, printers, etc.). In a big neighborhood, it can be hard to keep track of where everyone lives. So, what if we divide this big neighborhood into smaller blocks or sections? Each section would have a certain number of houses. This is basically what subnetting does to a network.

In technical terms, subnetting is the process of dividing a single network into smaller networks, known as subnets. It’s like creating smaller, manageable neighborhoods within a big one.


2. Why Do We Need Subnetting?

  1. Organization: It helps in organizing a large network into smaller, more manageable sections.
  2. Performance: Smaller networks mean fewer devices on each network, which can reduce traffic and increase performance.
  3. Security: It can enhance security. It’s easier to monitor and control a smaller network.
  4. Efficient Use of IP Addresses: Subnetting helps in using IP addresses more efficiently. Without it, even a small network might need to use a large network address, wasting many addresses.

3. How Does Subnetting Work?

Every device on a network has an IP address, a unique number assigned to it. Think of an IP address like a house address in our neighborhood analogy.

  1. IP Address: It’s made up of two parts: the network part (which neighborhood you’re in) and the host part (the specific house in that neighborhood).
  2. Subnet Mask: This is like a rule that tells you how to divide the neighborhood. It determines which part of the IP address belongs to the network and which part belongs to the host.
  3. Creating Subnets: By changing the subnet mask, you can control how many subnets you create and how many hosts (devices) can be in each subnet.

To subnet a TCP/IP network, you take the assigned network ID and borrow bits from the host ID to establish a group of subnet IDs, one for each subnet. The more bits you borrow, the more subnets you produce, but the fewer the number of possible hosts for each subnet. The borrowing process also defines a unique custom subnet mask for the network.

For example, consider a class B network that uses the network ID If this network needs to be subnetted into six subnets, you can accomplish this using a custom subnet mask of Each subnet can be shown to support a maximum of 8190 hosts. The IP address blocks for the six subnets are as follows:

  • to
  • to
  • to
  • to
  • to
  • to

Subnetting calculation

Manual calculation of custom subnet masks and subnet IDs is tedious. You can download numerous subnetting calculators from the Internet, some of them for free. To use these calculators to subnet your network, you must first determine how many subnets you need and the maximum number of hosts on each subnet.

4. Example of Subnetting

Let’s say we have an IP address like The subnet mask that goes with this might be something like This tells us that the first three numbers (192.168.1) are the network part, and the last number (0) is for hosts. In this subnet, we can have hosts with addresses from to

If we change the subnet mask to, we divide this big subnet into smaller ones. Now, we have two subnets ( to and to, each with fewer hosts.

In summary, subnetting in TCP/IP networking is like dividing a large group of houses into smaller blocks for better management, security, and efficiency. It’s a fundamental concept that helps networks operate smoothly and efficiently.

Rules for Subnetting

  1. Determine the Size of the Network:
    • First, decide how many subnets you need. This could be based on the number of separate networks you want to create within your organization.
    • More subnets = more bits borrowed for the network part.
  2. Calculating the Subnet Mask:
    • Start with the default subnet mask for your IP class.
    • Add bits to the subnet part to create the required number of subnets.
    • Use the formula 2^n ≥ Number of Subnets, where n is the number of bits you borrow from the host part of the IP address.
    • Find the smallest n where this inequality holds true.
  3. Identify Subnet Addresses:
    • Calculate the range of addresses in each subnet.
    • The first address is the subnet address, and the last is the broadcast address.
  4. Assigning IP Addresses:
    • Assign IP addresses to devices, ensuring they are within the correct subnet range.

Example Scenario

Imagine you have an IP address block of with a default subnet mask of (a Class C network).

Goal: Create 4 subnets, each with its own range of IP addresses.


  1. Determine New Subnet Mask:
    • To create 4 subnets, we need 2 bits (2^2 = 4).
    • So, we change the subnet mask to (borrowing 2 bits).
  2. Calculate Subnet Ranges:
    • The subnets will be:
      • Subnet 1: to
      • Subnet 2: to
      • Subnet 3: to
      • Subnet 4: to
  3. Assigning Addresses:
    • You can assign IP addresses within each range to devices, excluding the first and last address in each range (reserved for subnet address and broadcast address).

5. References

Books on Subnetting and TCP/IP Networking

  1. TCP/IP Guide: A Comprehensive, Illustrated Internet Protocols Reference” by Charles M. Kozierok
    • This book covers a wide range of topics in TCP/IP networking, including detailed sections on subnetting.
  2. TCP/IP Network Administration” by Craig Hunt
    • Offers practical guidance on managing TCP/IP networks, including subnetting concepts.
  3. Internetworking with TCP/IP Volume 1: Principles, Protocols, and Architecture” by Douglas E. Comer
    • A classic text that provides a thorough understanding of TCP/IP, including network structuring with subnetting.
  4. Network Warrior” by Gary A. Donahue
    • While not solely focused on subnetting, this book covers practical aspects of network management, including subnetting strategies.
  5. IP Subnetting for Beginners” by Ramon A Nastase
    • A practical guide specifically aimed at mastering subnetting in various networking scenarios.

RFCs (Request for Comments)

  1. RFC 950 – Internet Standard Subnetting Procedure
    • This is a fundamental RFC that describes the initial standard procedure for subnetting in the IP network.
  2. RFC 791 – Internet Protocol
    • This foundational document of the TCP/IP protocol suite covers IP addressing and basic principles that are key to understanding subnetting.
  3. RFC 1918 – Address Allocation for Private Internets