Subnetting Made Easy: A Beginner's Guide to Subnet Masks, CIDR & Host Ranges

Subnetting Made Easy: A Beginner's Guide to Subnet Masks, CIDR & Host Ranges
Networking ATN Campus September 01, 2026 4 views

Subnetting Made Easy: A Beginner's Guide to Subnet Masks, CIDR & Host Ranges

Subnetting is one of the most important networking concepts to understand if you're studying CCNA, CCNP, Network Engineering, or Cybersecurity. ????

At first, subnetting can look complicated because it involves binary numbers, subnet masks, CIDR notation, network addresses, broadcast addresses, and host ranges.

But once you understand the basic rules, subnetting becomes much easier.

In this guide, we'll learn what subnetting is, how subnet masks work, what CIDR means, how to calculate host ranges, and how to solve simple subnetting problems step by step.


???? What is Subnetting?

Subnetting is the process of dividing one larger IP network into multiple smaller networks called subnets.

Instead of using one large network for every device, an organization can divide the network into smaller logical sections.

Large Network
      |
      +------------------+
      |                  |
      ↓                  ↓
   Subnet 1           Subnet 2
      |                  |
   Users              Servers
        

Subnetting helps organizations improve network organization, address management, performance, and security.


???? What is an IP Address?

An IPv4 address is a 32-bit address divided into four octets.

For example:

192.168.1.10
        

Each octet can contain a value from 0 to 255.

192   .   168   .   1   .   10
 ↓         ↓         ↓       ↓
Octet    Octet     Octet   Octet
        

An IPv4 address contains two important parts:

  • Network portion
  • Host portion

???? What is a Subnet Mask?

A subnet mask tells us which part of an IPv4 address represents the network and which part represents the hosts.

A common example is:

IP Address  : 192.168.1.10
Subnet Mask : 255.255.255.0
        

In this example, the first three octets represent the network portion, while the final octet is used for host addresses.

192.168.1 | .10
----------+----
 Network  | Host
        

???? Common Subnet Masks

CIDR Subnet Mask Total Addresses Usable Hosts*
/24 255.255.255.0 256 254
/25 255.255.255.128 128 126
/26 255.255.255.192 64 62
/27 255.255.255.224 32 30
/28 255.255.255.240 16 14
/29 255.255.255.248 8 6
/30 255.255.255.252 4 2

*For traditional IPv4 subnets, usable hosts are generally calculated by excluding the network and broadcast addresses. There are special cases such as /31 point-to-point networks.


???? What is CIDR?

CIDR stands for Classless Inter-Domain Routing.

CIDR represents the number of bits used for the network portion of an IPv4 address.

For example:

192.168.1.0/24
        

The /24 means that the first 24 bits are used for the network portion.

/24

11111111.11111111.11111111.00000000
       Network            Host
        

This leaves 8 bits for hosts.


???? How Many Hosts Can a Subnet Have?

A common IPv4 host calculation is:

Usable Hosts = 2^h - 2
        

Where h is the number of host bits.

Example: /24

A /24 network has 8 host bits.

2^8 - 2

256 - 2

= 254 usable hosts
        

Therefore:

192.168.1.0/24

Network Address   : 192.168.1.0
First Host        : 192.168.1.1
Last Host         : 192.168.1.254
Broadcast Address : 192.168.1.255
        

???? Simple Subnetting Example

Let's say a company has the following network:

192.168.1.0/24
        

The company wants to divide this network into two smaller networks.

We can borrow one host bit and create a /25 network.

Original:

192.168.1.0/24

        ↓

New:

192.168.1.0/25
192.168.1.128/25
        

1️⃣ First /25 Subnet

Network Address   : 192.168.1.0
First Host        : 192.168.1.1
Last Host         : 192.168.1.126
Broadcast Address : 192.168.1.127
        

This subnet provides 126 usable host addresses.


2️⃣ Second /25 Subnet

Network Address   : 192.168.1.128
First Host        : 192.168.1.129
Last Host         : 192.168.1.254
Broadcast Address : 192.168.1.255
        

This subnet also provides 126 usable host addresses.


???? Visualizing the Two Subnets

192.168.1.0/24
       |
       +-----------------------+
       |                       |
       ↓                       ↓
192.168.1.0/25        192.168.1.128/25
       |                       |
       ↓                       ↓
  126 Hosts               126 Hosts
        

This allows an organization to separate devices into different networks while using the original address space more efficiently.


???? Another Example: /26

Suppose we have:

192.168.10.0/24
        

We want to divide it into smaller /26 networks.

A /26 subnet contains 64 total addresses and normally provides 62 usable host addresses.

Subnet 1

Network   : 192.168.10.0
Hosts     : 192.168.10.1 - 192.168.10.62
Broadcast : 192.168.10.63
        

Subnet 2

Network   : 192.168.10.64
Hosts     : 192.168.10.65 - 192.168.10.126
Broadcast : 192.168.10.127
        

Subnet 3

Network   : 192.168.10.128
Hosts     : 192.168.10.129 - 192.168.10.190
Broadcast : 192.168.10.191
        

Subnet 4

Network   : 192.168.10.192
Hosts     : 192.168.10.193 - 192.168.10.254
Broadcast : 192.168.10.255
        

???? The Subnet Block Size

One useful technique for subnetting is calculating the block size.

For example, consider:

255.255.255.192
        

The block size is:

256 - 192 = 64
        

Therefore, the subnets increase by 64:

0
64
128
192
        

This makes it easier to identify the network and broadcast addresses quickly.


???? Real-World Subnetting Example

Imagine a company has different departments:

  • Human Resources
  • Finance
  • IT
  • Management

Instead of placing every device into one large network, the company can create separate subnets.

Company Network
192.168.10.0/24
       |
       +---- HR
       |
       +---- Finance
       |
       +---- IT
       |
       +---- Management
        

This improves organization and can also support security policies and traffic control between departments.


???? Subnetting and Network Security

Subnetting can help organizations separate different groups of devices and apply different network policies.

For example:

VLAN 10 → Employees
VLAN 20 → Servers
VLAN 30 → Guest Wi-Fi
VLAN 40 → Management
        

Firewalls, ACLs, and routing policies can then be used to control communication between these networks.

Remember that subnetting itself is not a complete security solution. It is one part of a broader network security design.


???? Subnetting Cheat Sheet

CIDR Mask Total Addresses Usable Hosts
/24 255.255.255.0 256 254
/25 255.255.255.128 128 126
/26 255.255.255.192 64 62
/27 255.255.255.224 32 30
/28 255.255.255.240 16 14
/29 255.255.255.248 8 6
/30 255.255.255.252 4 2

⚡ Common Subnetting Mistakes

  • Confusing the network address with a usable host address.
  • Assigning the broadcast address to a device.
  • Forgetting that traditional IPv4 host calculations exclude the network and broadcast addresses.
  • Confusing subnet mask notation with CIDR notation.
  • Calculating the wrong block size.
  • Not checking whether the subnet provides enough host addresses.

The best way to avoid these mistakes is to practice subnetting regularly.


???? Practice Question

Try solving this problem before looking for the answer:

What are the network address, first host, last host, and broadcast address for 192.168.5.70/26?
???? Click here to reveal the answer

✅ Answer

A /26 subnet has a block size of 64.

Subnet ranges:

0 - 63
64 - 127
128 - 191
192 - 255
                

Since 70 falls between 64 and 127:

Network Address   : 192.168.5.64
First Host        : 192.168.5.65
Last Host         : 192.168.5.126
Broadcast Address : 192.168.5.127
                

Therefore, 192.168.5.70 belongs to the 192.168.5.64/26 subnet.


???? Why Should CCNA Students Learn Subnetting?

Subnetting is an essential networking skill. It helps you understand how IP networks are designed and divided.

If you're preparing for CCNA or planning to become a Network Engineer, you should be comfortable calculating network addresses, host ranges, broadcast addresses, and subnet sizes.

Don't just memorize subnetting tables. Practice until you can calculate subnet ranges confidently. ????????

Master Networking with ATN Campus

Want to master subnetting, IP addressing, routing, switching, networking security, and other essential networking concepts?

ATN Campus provides industry-focused networking and cybersecurity training that combines theoretical knowledge with practical hands-on learning.

Courses Available

  • CCNA – Cisco Certified Network Associate
  • CCNP – Cisco Certified Network Professional
  • CEH – Certified Ethical Hacker
  • Cisco CyberOps
  • Network Security
  • Cloud Networking
  • Python for Network Automation
  • Practical Networking Labs
  • Cybersecurity Fundamentals
  • Career Guidance & Certification Preparation

Whether you're a beginner learning networking fundamentals or preparing for an industry-recognized certification, ATN Campus can help you build practical skills for today's IT industry.

???? Learn networking. ???? Master subnetting. ???? Practice with real-world labs. ???? Prepare for certifications. ???? Build your IT career with ATN Campus.
Document ATN CAMPUS