Cisco CCNA 200-301 Exam Study Notes

2. Subnet Masking – Part I

Introduction

Subnet masking is a crucial concept in IP networking that allows network administrators to divide large IP networks into smaller, more manageable segments known as subnets. This enhances routing efficiency, improves network security, and optimizes the use of IP address space.

What is a Subnet Mask?

A subnet mask is a 32-bit number used with an IP address to determine which part of the address is the network and which part is the host. It "masks" the IP address and separates the network ID from the host ID.

For example:

  • IP Address: 192.168.1.10

  • Subnet Mask: 255.255.255.0

This means:

  • Network portion: 192.168.1

  • Host portion: .10

Structure of Subnet Mask

A subnet mask uses binary values:

  • 1s represent the network portion

  • 0s represent the host portion

So, 255.255.255.0 in binary is:

11111111.11111111.11111111.00000000

The first 24 bits are the network part, and the remaining 8 bits are for hosts.

Default Subnet Masks (Classful Subnetting)

Class Default Subnet Mask CIDR Notation Hosts per Network
A 255.0.0.0 /8 16,777,214
B 255.255.0.0 /16 65,534
C 255.255.255.0 /24 254

Note: The number of hosts excludes the network and broadcast addresses.

CIDR Notation

Classless Inter-Domain Routing (CIDR) is a shorthand for subnet masks. For example:

  • /24 = 255.255.255.0

  • /16 = 255.255.0.0

CIDR helps in flexible and efficient IP address allocation.

Why Subnet?

  1. Reduce Broadcast Traffic: Smaller networks reduce unnecessary traffic.

  2. Better Security: Isolates groups of hosts.

  3. Improved Network Management: Easier to troubleshoot and maintain.

  4. Efficient IP Utilization: Allows organizations to maximize their IP space.

How Subnetting Works

Let’s say you have a Class C IP block: 192.168.1.0/24

  • Total IPs: 256 (0–255)

  • Usable IPs: 254 (excluding network .0 and broadcast .255)

You want to divide it into 4 subnets. You need:

  • 2 bits from the host portion: 22 = 4 subnets

So the new subnet mask:

  • Original mask: /24 → 255.255.255.0

  • Add 2 bits: /26 → 255.255.255.192

New subnets:

Subnet IP Range Usable IPs Broadcast
1 192.168.1.0/26 .1 to .62 192.168.1.63
2 192.168.1.64/26 .65 to .126 192.168.1.127
3 192.168.1.128/26 .129 to .190 192.168.1.191
4 192.168.1.192/26 .193 to .254 192.168.1.255

Formulae to Remember

  • Number of Subnets = 2n (n = number of borrowed bits)

  • Hosts per Subnet = 2h - 2 (h = remaining host bits)

Subnetting Process (Step-by-Step)

  1. Determine how many subnets or hosts you need.

  2. Calculate the number of bits to borrow.

  3. Determine the new subnet mask.

  4. Divide the IP block into subnet ranges.

  5. Identify valid host addresses and broadcast addresses.

Example

You are given 192.168.10.0/24 and need 6 subnets.

  • Needed bits: 3 (23 = 8 subnets)

  • New subnet mask: /27 → 255.255.255.224

Each subnet has:

  • 25 = 32 IPs

  • Usable IPs: 30

First subnet:

  • Network: 192.168.10.0

  • Usable: 192.168.10.1 – 192.168.10.30

  • Broadcast: 192.168.10.31

Repeat for the next subnets.

Common Subnet Masks and Usable Hosts

Subnet Mask CIDR Usable Hosts
255.255.255.0 /24 254
255.255.255.128 /25 126
255.255.255.192 /26 62
255.255.255.224 /27 30
255.255.255.240 /28 14
255.255.255.248 /29 6
255.255.255.252 /30 2

Advantages of Subnetting

  • Optimized network performance.

  • Segmented network for better administration.

  • Prevent broadcast storms.

  • Improved fault isolation.

Conclusion

Subnet masking is essential for segmenting a network and managing IP addresses effectively. It allows scalable network designs and lays the groundwork for advanced topics like routing and VLANs. Part II will explore advanced subnetting techniques, VLSM (Variable Length Subnet Masking), and practical subnet design.


Anand Software and Training Pvt. Ltd. is not associated with Cisco® organization or any other company. CCNA is a trademarks of Cisco® organization. All trademarks are duly acknowledged. All practice tests and study material provided here is the copyright of Anand Software and Training Pvt. Ltd. All rights reserved.