Subnetting is a fundamental concept in networking that enables the efficient allocation and management of IP addresses. In this post, we’ll explore the basics of subnetting, its benefits, and how it’s applied in IT environments.
Classless Inter-Domain Routing (CIDR)
Classless Inter-Domain Routing (CIDR) revolutionized IP addressing by removing the fixed boundaries of traditional classes (e.g., /8, /16, /24). CIDR allows networks to be divided into smaller, more manageable subnets, meaning they can be tailored to fit specific parts of a network or specific purposes. For example, 175.10.10.0/20 splits a larger network into smaller subnets, optimizing address utilization and minimizes address waste.
Benefits of CIDR:
- Efficient Address Allocation: Companies receive address ranges tailored to their needs.
- Route Summarization: Aggregated blocks of networks reduce the size of routing tables and improve efficiency.
Example of Route Summarization:
- ISP A doesn’t have to store every individual /24 network from ISP B. A single summarized route, such as 175.11.0.0/16, is enough. This approach reduces memory consumption, lowers CPU usage, and confines routing problems to ISP A’s network.
Subnetting Overview
Subnetting involves dividing a network into smaller subnets by borrowing host bits and adding them to the network portion of the IP address.
How to Calculate Subnets:
- Formula: 2 ^ Borrowed bits – Borrowing 3 bits from the host portion in a /24 network creates 2^3 = 8 subnets, such as 192.168.1.0/27, 192.168.1.32/27, and so on.
- Example 1: For a Class C network with a /28 subnet mask, 4 bits are borrowed from the default /24, yielding 2^4 = 16 subnets.
- Example 2: For a Class B network with a /28 mask, 12 bits are borrowed from the default /16, yielding 2^12 = 4096 subnets.
Calculating Hosts:
- Formula: 2 ^ Host Bits – 2 (We subtract 2 due to network and broadcast addresses)
- Example: For a Class C network with a /28 subnet mask, 4 bits remain for hosts. 2^4 – 2 = 14 usable host addresses.

Note: Hosts on different subnets must communicate through a router.
Key Subnetting Concepts
Class C Subnets
- /31 Subnet (255.255.255.254):
- Accommodates 2 hosts per subnet.
- Ideal for point-to-point links where network and broadcast addresses aren’t required.
- Example: 190.12.4.10/31 provides two host addresses: 190.12.4.10 and 190.12.4.11.
- /30 Subnet (255.255.255.252):
- Leaves 2 bits for hosts, allowing 2^2 = 4 addresses per subnet. Subtract 2 for network and broadcast addresses, resulting in 2 usable host addresses.
- Example: Given 200.15.10.0/24:
- Subnet: 200.15.10.0/30
- Host range: 200.15.10.1 – 200.15.10.2
- Broadcast: 200.15.10.3
- /29 Subnet (255.255.255.248):
- Leaves 3 bits for hosts, allowing 2^3 = 8 addresses. Subtract 2 for network and broadcast, resulting in 6 usable hosts.
- Example: Given 200.15.10.0/24:
- Subnet: 200.15.10.0/29
- Host range: 200.15.10.1 – 200.15.10.6
- Broadcast: 200.15.10.7
/31 vs. /30 Subnets
- /31: Supports 128 subnets with 2 hosts each. Maximizes address space usage.
- /30: Supports 64 subnets with 2 hosts each. Commonly used in WAN subnets.
Variable Length Subnet Masks (VLSM)
Modern routing protocols support VLSM, which enables subnets of varying sizes within the same network. For example, protocols like OSPF and EIGRP allow for flexible subnetting tailored to the needs of each network segment, ensuring efficient IP address utilization. This ensures optimal use of IP addresses based on specific requirements.
Subnet Design Considerations
When designing subnets, consider the following:
- Number of locations and hosts in each location.
- IP addressing requirements for each location.
- Appropriate subnet size to minimize waste while leaving room for growth.
Approach:
- Identify the largest segment and allocate a suitable subnet.
- Assign smaller subnets for other segments.

Subnetting Large Networks
- Example 1: Class B 135.15.0.0/16
- Subnet into /29 networks (3 bits for hosts): 2^3 – 2 = 6 hosts per subnet.
- Borrowing 13 bits for networks: 2^13 = 8192 subnets.
- Example 2: Class A 60.0.0.0/8
- Apply /28 mask (4 bits for hosts): 2^4 – 2 = 14 hosts per subnet.
- Borrowing 20 bits for networks: 2^20 = 1,048,576 subnets.
Magic Number Method: Subtract the subnet mask’s decimal value from 256 to determine address increments. For example, with 255.255.255.248 (/29), 256 – 248 = 8. Subnets increase in multiples of 8.
Private Address Ranges
Certain IP ranges are reserved for private use:
- Class A: 10.0.0.0 – 10.255.255.255 (/8).
- Class B: 172.16.0.0 – 172.31.255.255 (/12).
- Class C: 192.168.0.0 – 192.168.255.255 (/16).
Networks Today
Modern networks often use the following conventions:
- /24: For end-host subnets.
- /30: For point-to-point links.
- /32: For loopbacks.
- Complex VLSM strategies maximize public IP address usage within enterprise networks.
Reference Resources
- Cisco Subnetting Guide
- Subnetting Practice Tool
- IP Addressing and Subnetting Cheat Sheet
- RFC 4632 – CIDR
Mastering subnetting is essential for effective network design and management. With these basics in hand, you can confidently allocate IP addresses, optimize routing, and build scalable networks.

Leave a reply to Understanding The OSI Model: The Network Layer (Layer 3) – Ctrl+Alt+Route Cancel reply