IP Subnetting Explained Step-by-Step with Practical Examples


Introduction

This IP subnetting tutorial explains how subnetting works in a practical, step-by-step way. If you have ever wondered how to subnet an IP, this guide will help you understand the core networking math without unnecessary complexity. Think of it as a compact IP addressing guide for students, developers, and IT beginners.

What Is IP Subnetting?

IP subnetting is the process of dividing one larger IP network into smaller logical networks called subnets. This helps improve routing, reduce broadcast traffic, and organize devices more efficiently.

For example, instead of putting 200 devices into one flat network, you can split them into smaller groups such as servers, printers, and employee devices.

Key Concepts You Need First

IP Address and Subnet Mask

An IPv4 address has 32 bits, usually written like 192.168.1.0. A subnet mask defines which part identifies the network and which part identifies hosts.

Example:

  • IP address: 192.168.1.10
  • Subnet mask: 255.255.255.0
  • CIDR notation: /24

Here, /24 means the first 24 bits are for the network, leaving 8 bits for hosts.

CIDR and Host Count

To calculate usable hosts:

2^(host bits) - 2

The minus 2 accounts for the network address and broadcast address.

For a /24:

  • Host bits = 8
  • 2^8 - 2 = 254 usable hosts

How to Subnet an IP Step by Step

Step 1: Identify the Required Number of Subnets or Hosts

Suppose you have network 192.168.1.0/24 and need 4 subnets.

Step 2: Borrow Bits

A /24 has 8 host bits. To create at least 4 subnets, borrow 2 bits because:

  • 2^2 = 4 subnets

New prefix:

  • /24 + 2 = /26

Step 3: Calculate Hosts per Subnet

You now have 6 host bits left:

  • 2^6 - 2 = 62 usable hosts per subnet

Step 4: Find the Block Size

In a /26, the subnet mask is 255.255.255.192. The block size is:

  • 256 - 192 = 64

So subnets increase by 64 in the last octet.

Practical Example

Subnetting 192.168.1.0/24 into 4 Subnets

The resulting subnets are:

  • 192.168.1.0/26
  • 192.168.1.64/26
  • 192.168.1.128/26
  • 192.168.1.192/26

Let’s inspect the first subnet:

  • Network address: 192.168.1.0
  • First usable host: 192.168.1.1
  • Last usable host: 192.168.1.62
  • Broadcast address: 192.168.1.63

Second subnet:

  • Network address: 192.168.1.64
  • Usable range: 192.168.1.65 - 192.168.1.126
  • Broadcast: 192.168.1.127

Quick Networking Math Trick

A simple way to speed up networking math is to remember common CIDR values:

  • /24 = 255.255.255.0
  • /25 = 255.255.255.128
  • /26 = 255.255.255.192
  • /27 = 255.255.255.224
  • /28 = 255.255.255.240

Then use:

Block size = 256 - mask value in the changing octet

/26 => 255.255.255.192256 - 192 = 64Subnets: .0, .64, .128, .192

Common Mistakes to Avoid

Confusing Network and Broadcast Addresses

You cannot assign the first or last address in a subnet to a device.

Using the Wrong Host Formula

Always subtract 2 for traditional IPv4 subnetting when calculating usable hosts.

Ignoring Future Growth

Choose subnet sizes that leave room for more devices later.

Conclusion

Subnetting becomes much easier once you break it into steps: identify requirements, borrow bits, calculate hosts, and determine block size. This IP subnetting tutorial gives you a repeatable method for how to subnet an IP in real scenarios. With practice, the networking math becomes faster, and this compact IP addressing guide can serve as a reliable reference whenever you design or troubleshoot networks.