IP Addressing & Subnetting
This section is one of the highest-yield topics on Network+. You must be able to:
- Identify IPv4 vs IPv6 formats
- Recognize private vs public IP ranges
- Convert between dotted decimal, binary, and CIDR notation
- Calculate subnets, hosts, usable addresses, and subnet masks quickly
- Solve subnetting problems in under 60 seconds per question
IPv4 Addressing Basics
- 32-bit address, written in dotted decimal (four octets, 0–255 each)
Example: 192.168.10.45 - Classes (legacy, still useful for understanding defaults):
- Class A: 1.0.0.0 – 126.255.255.255 (/8), 16M hosts
- Class B: 128.0.0.0 – 191.255.255.255 (/16), 65K hosts
- Class C: 192.0.0.0 – 223.255.255.255 (/24), 254 hosts
- Class D: 224.0.0.0 – 239.255.255.255 (multicast)
- Class E: 240.0.0.0+ (experimental)
Private IPv4 Ranges (RFC 1918) – Never routed on public Internet
- 10.0.0.0 – 10.255.255.255 (/8)
- 172.16.0.0 – 172.31.255.255 (/12)
- 192.168.0.0 – 192.168.255.255 (/16)
Special IPv4 Addresses
- 127.0.0.1 – Loopback (localhost)
- 169.254.0.0/16 – APIPA (Automatic Private IP – when DHCP fails)
- 0.0.0.0 – Default route / any address
- 255.255.255.255 – Limited broadcast
Subnetting & CIDR Notation
CIDR (Classless Inter-Domain Routing) replaces classful addressing.
/ notation = number of network bits (1s in mask).
Subnet mask = 32 bits, contiguous 1s followed by 0s.
Common subnet masks & host counts:
| CIDR | Subnet Mask | Binary (last octet example) | Total Addresses | Usable Hosts | Increment (block size) |
|---|---|---|---|---|---|
| /24 | 255.255.255.0 | 11111111 | 256 | 254 | 1 |
| /25 | 255.255.255.128 | 10000000 | 128 | 126 | 128 |
| /26 | 255.255.255.192 | 11000000 | 64 | 62 | 64 |
| /27 | 255.255.255.224 | 11100000 | 32 | 30 | 32 |
| /28 | 255.255.255.240 | 11110000 | 16 | 14 | 16 |
| /29 | 255.255.255.248 | 11111000 | 8 | 6 | 8 |
| /30 | 255.255.255.252 | 11111100 | 4 | 2 | 4 |
| /31 | 255.255.255.254 | 11111110 | 2 | 2 (point-to-point) | 2 |
| /32 | 255.255.255.255 | 11111111 | 1 | 1 (host route) | — |
Formula cheat sheet:
- Total addresses per subnet = 2^(32 – CIDR suffix)
- Usable hosts = 2^(32 – CIDR) – 2 (subtract network + broadcast)
Exception: /31 has 2 usable (no network/broadcast waste in point-to-point)
Quick Subnetting Method (Most Common Exam Style)
Given network: 192.168.10.0 /24
Question: Create 6 subnets. How many bits to borrow? What are the subnets?
- Need at least 6 subnets → 2^3 = 8 subnets (borrow 3 bits)
- New mask = /24 + 3 = /27
- Block size (increment) = 256 – 224 = 32 (or 2^(8–3) = 32)
- Subnets:
192.168.10.0 /27
192.168.10.32 /27
192.168.10.64 /27
192.168.10.96 /27
192.168.10.128 /27
192.168.10.160 /27
(and two more unused)
For each subnet:
- Network ID = first address
- First usable = network + 1
- Last usable = broadcast – 1
- Broadcast = next subnet – 1
Example for 192.168.10.64 /27:
- Network: 192.168.10.64
- First host: 192.168.10.65
- Last host: 192.168.10.94
- Broadcast: 192.168.10.95
IPv6 Addressing Basics
- 128-bit address, hexadecimal, 8 groups of 4 hex digits
Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 - Shorthand rules:
- Leading zeros in each group can be omitted
- One consecutive section of all zeros → double colon (::) once only
Example: 2001:db8::8a2e:370:7334
IPv6 Address Types
- Global Unicast: 2000::/3 (public, routable)
- Unique Local: fc00::/7 (private, like IPv4 private)
- Link-Local: fe80::/10 (auto-generated on every interface, used for local comms)
- Multicast: ff00::/8
- Loopback: ::1
- Unspecified: ::
IPv6 Subnetting
- Standard LAN size: /64 (huge – 2^64 hosts)
- Common prefixes: /48 or /56 for organizations, then subnet to /64 per LAN
- No NAT needed – global addresses everywhere
Example: 2001:db8🔡0000::/48
- Subnet to /52 → 16 subnets (0000 to f000 in fourth hextet)
- Subnet to /64 → 65,536 subnets per /48
Exam Hot Spots & Practice Questions Types
- Given IP and mask, identify network ID, broadcast, usable range
- How many subnets/hosts if borrow X bits?
- What is the new CIDR after borrowing bits for Y subnets?
- Convert mask to binary or vice versa
- Identify private vs public IP
- IPv6 shorthand / type identification
- VLSM (variable-length subnet mask) – allocate subnets of different sizes efficiently
Quick Reference Cheat Sheet (Memorize)
- /24 = 256 total, 254 hosts
- Each bit borrowed: subnets ×2, hosts ÷2
- Last octet subnetting: 256 – mask value = increment
- IPv6: /64 = standard LAN, ::1 = loopback, fe80:: = link-local
Study Strategy
- Practice subnetting 20–30 problems daily (use subnetting.net, ipcalc, or Professor Messer worksheets).
- Time yourself: aim for less than 45 seconds per basic subnet question.
- Memorize private ranges, common / notation host counts, and IPv6 prefixes.
- Flashcards: Front = 192.168.5.0/26 → Back = mask, subnets possible, usable hosts, range
- Understand why we subnet: reduce broadcast domain, security, efficient IP use.
Master subnetting – it appears in PBQs (calculate subnets, assign addresses) and dozens of multiple-choice questions. Nail this and most of Domain 1 becomes easier.