# Days 13, 14, 15: IPv4 Subnetting

# CCNA 200-301 Study Guide: Network Fundamentals &amp; IPv4 Subnetting

## 1.0 Understanding the CCNA 200-301 Exam Landscape

The Cisco Certified Network Associate (CCNA) certification is the industry benchmark for associate-level networking. Mastery of these domains is the first step toward a successful networking career.

### Exam Blueprint at a Glance

<div align="left" dir="ltr" id="bkmrk-attribute-details-ex"><table><colgroup><col width="128"></col><col width="145"></col></colgroup><tbody><tr><td>Attribute

</td><td>Details

</td></tr><tr><td>Exam Code

</td><td>200-301 v1.1

</td></tr><tr><td>Duration

</td><td>120 Minutes

</td></tr><tr><td>Passing Score

</td><td>Variable (scaled)

</td></tr></tbody></table>

</div>### Core Knowledge Domains

- Network Fundamentals (20%)
- Network Access (20%)
- IP Connectivity (25%) — The largest and most critical domain.
- IP Services (10%)
- Security Fundamentals (15%)
- Automation and Programmability (10%)

## 2.0 IPv4 Addressing: The Foundation

An IPv4 address is a 32-bit logical identifier. It is presented in Dotted Decimal Notation (e.g., 192.168.1.1), where 32 bits are divided into four 8-bit octets.

### Legacy Classful Addressing

Before CIDR, IP addresses were assigned in rigid blocks. While largely obsolete, these boundaries still inform default behaviors in Cisco IOS.

<div align="left" dir="ltr" id="bkmrk-class-first-octet-ra"><table><colgroup><col width="65"></col><col width="100"></col><col width="154"></col><col width="134"></col><col width="147"></col></colgroup><tbody><tr><td>Class

</td><td>First Octet Range

</td><td>Default Mask

</td><td>Max Usable Hosts

</td><td>Original Purpose

</td></tr><tr><td>A

</td><td>1 - 126

</td><td>255.0.0.0 (/8)

</td><td>$16,777,214$

</td><td>Global Organizations

</td></tr><tr><td>B

</td><td>128 - 191

</td><td>255.255.0.0 (/16)

</td><td>$65,534$

</td><td>Mid-to-Large Networks

</td></tr><tr><td>C

</td><td>192 - 223

</td><td>255.255.255.0 (/24)

</td><td>$254$

</td><td>Small Local Networks

</td></tr></tbody></table>

</div>## 3.0 CIDR: Modern IP Allocation

Classless Inter-Domain Routing (CIDR) replaced the rigid classful system in 1993. It allows for Variable-Length Subnet Masking (VLSM), enabling administrators to ignore class boundaries and use any prefix length (e.g., /25, /29).

Benefits of CIDR:

- Efficiency: Allocates only the space needed.
- Aggregation: Allows multiple routes to be summarized into one.
- Conservation: Slows the exhaustion of the limited IPv4 address space.

## 4.0 Mastering Subnetting Mechanics

### Key Terminology

- Network Portion: Identified by binary 1s in the mask; defines the "neighborhood."
- Host Portion: Identified by binary 0s in the mask; defines the specific "house."
- Borrowed Bits ($S$): Bits taken from the host portion to create subnets.

### Core Formulas

1. Total Subnets: $2^S$
2. Usable Hosts per Subnet: $2^H - 2$

Critical Exam Tip: Always subtract $2$. Every subnet reserves the Network Address (all host bits 0) and the Broadcast Address (all host bits 1).

### The Block Size (The "Magic Number")

The Block Size is the decimal value of the last bit "borrowed" in the mask.

- Metaphor: Think of block size as the standard spacing for street addresses. If the block size is $64$, the "streets" (subnets) start at .0, .64, .128, and .192.

## 5.0 Practical Application Scenarios

### 5.1 Scenario: Meet Host Requirements

Given: 192.168.1.0/24. Need: 4 subnets with ~45 hosts each.

- Subnets: $2^S \\ge 4 \\Rightarrow S=2$.
- Hosts: Remaining host bits $H = 8 - 2 = 6$.
- Calculation: $2^6 - 2 = 62$ usable hosts (Requirement met).
- New Prefix: $/24 + 2 = /26$.
- Block Size: $64$ (from the $/26$ mask bit value).

Resulting Subnets:

1. 192.168.1.0/26
2. 192.168.1.64/26
3. 192.168.1.128/26
4. 192.168.1.192/26

### 5.2 Scenario: Skill Check

Problem: Find the Subnet ID for host 192.168.5.57/27.

1. Block Size: $/27$ means the increment is $32$ ($256 - 224 = 32$).
2. Subnet Ranges: $0, 32, 64, 96 \\dots$
3. Find the Fit: $.57$ falls between $32$ and $64$.
4. Answer: Subnet ID is 192.168.5.32/27.

## 6.0 Special-Use Prefix Lengths

<div align="left" dir="ltr" id="bkmrk-prefix-usage-notes-%2F"><table><colgroup><col width="68"></col><col width="164"></col><col width="371"></col></colgroup><tbody><tr><td>Prefix

</td><td>Usage

</td><td>Notes

</td></tr><tr><td>/30

</td><td>Traditional P2P Link

</td><td>Provides $2$ usable addresses ($2^2 - 2$).

</td></tr><tr><td>/31

</td><td>Modern P2P Link

</td><td>$2$ usable addresses; no separate net/broadcast (RFC 3021).

</td></tr><tr><td>/32

</td><td>Host Route / Loopback

</td><td>Identifies exactly one IP address.

</td></tr></tbody></table>

</div>## 7.0 VLSM: Maximum Efficiency

The "Golden Rule" of Variable-Length Subnet Masking (VLSM): Always allocate address blocks starting from the largest host requirement and proceed to the smallest.

Example Allocation ($192.168.1.0/24$):

1. LAN A (110 hosts): Needs $/25$. Assigned: 192.168.1.0/25 (Range: .0 – .127).
2. LAN B (45 hosts): Needs $/26$. Assigned: 192.168.1.128/26 (Range: .128 – .191).
3. LAN C (29 hosts): Needs $/27$. Assigned: 192.168.1.192/27 (Range: .192 – .223).
4. WAN Link (2 hosts): Needs $/30$. Assigned: 192.168.1.240/30 (Range: .240 – .243).

## 8.0 Rapid Reference Cheat Sheet

<div align="left" dir="ltr" id="bkmrk-prefix-mask-%28last-oc"><table><colgroup><col width="68"></col><col width="153"></col><col width="100"></col><col width="120"></col></colgroup><tbody><tr><td>Prefix

</td><td>Mask (Last Octet)

</td><td>Block Size

</td><td>Usable Hosts

</td></tr><tr><td>/24

</td><td>.0

</td><td>$256$

</td><td>$254$

</td></tr><tr><td>/25

</td><td>.128

</td><td>$128$

</td><td>$126$

</td></tr><tr><td>/26

</td><td>.192

</td><td>$64$

</td><td>$62$

</td></tr><tr><td>/27

</td><td>.224

</td><td>$32$

</td><td>$30$

</td></tr><tr><td>/28

</td><td>.240

</td><td>$16$

</td><td>$14$

</td></tr><tr><td>/29

</td><td>.248

</td><td>$8$

</td><td>$6$

</td></tr><tr><td>/30

</td><td>.252

</td><td>$4$

</td><td>$2$

</td></tr><tr><td>/31

</td><td>.254

</td><td>$2$

</td><td>$2$

</td></tr><tr><td>/32

</td><td>.255

</td><td>$1$

</td><td>$1$

</td></tr></tbody></table>

</div>