Identify IPv4 address classes and their default subnet masks
Convert between decimal, binary, and CIDR notation
Calculate network address, broadcast address, and usable host range
Apply VLSM to allocate subnets of different sizes
Recognize private (RFC 1918) and special-purpose address ranges
IPv4 Address Structure
An IPv4 address is a 32-bit number divided into four 8-bit octets, written in dotted decimal notation. Every IP address has two parts: the network portion (identifies the network) and the host portion (identifies a specific device on that network).
The original classful addressing scheme divided the IPv4 space into five classes. While classful routing is obsolete (replaced by CIDR), understanding classes is still required for certification exams.
Class
First Octet
Default Mask
Networks
Hosts/Net
Purpose
A
1-126
/8 (255.0.0.0)
126
16,777,214
Large organizations
B
128-191
/16 (255.255.0.0)
16,384
65,534
Medium organizations
C
192-223
/24 (255.255.255.0)
2,097,152
254
Small organizations
D
224-239
N/A
N/A
N/A
Multicast
E
240-255
N/A
N/A
N/A
Experimental
Why 127 is Missing:
The 127.0.0.0/8 range is reserved for loopback. 127.0.0.1 is "localhost" -- traffic sent here never leaves the machine. Used for testing the TCP/IP stack locally.
Private Address Ranges (RFC 1918)
These ranges are reserved for internal use and are not routable on the public internet. NAT translates them to public addresses for internet access.
Class
Range
CIDR
Common Use
A
10.0.0.0 - 10.255.255.255
10.0.0.0/8
Enterprise networks
B
172.16.0.0 - 172.31.255.255
172.16.0.0/12
Mid-size networks
C
192.168.0.0 - 192.168.255.255
192.168.0.0/16
Home/small office
CIDR and Subnetting
Classless Inter-Domain Routing (CIDR) replaced classful addressing in 1993. Instead of fixed class boundaries, the subnet mask can be any length. The notation /24 means the first 24 bits are the network portion.
Step 1: How many subnets? 4. Bits needed: 2^2 = 4. Borrow 2 bits.
Step 2: New prefix: /24 + 2 = /26 (255.255.255.192)
Step 3: Block size: 256 - 192 = 64Subnet 1:192.168.10.0/26
Network: 192.168.10.0
First host: 192.168.10.1
Last host: 192.168.10.62
Broadcast: 192.168.10.63
Subnet 2:192.168.10.64/26
Network: 192.168.10.64
First host: 192.168.10.65
Last host: 192.168.10.126
Broadcast: 192.168.10.127
Subnet 3:192.168.10.128/26
Network: 192.168.10.128
First host: 192.168.10.129
Last host: 192.168.10.190
Broadcast: 192.168.10.191
Subnet 4:192.168.10.192/26
Network: 192.168.10.192
First host: 192.168.10.193
Last host: 192.168.10.254
Broadcast: 192.168.10.255
VLSM -- Variable Length Subnet Masking
VLSM allows different subnets within the same network to have different prefix lengths. This prevents IP address waste by sizing each subnet to the actual number of hosts needed.
/* Scenario: 10.0.0.0/24 -- allocate for these departments: */
Engineering: 60 hosts --> /26 (62 usable) --> 10.0.0.0/26
Marketing: 28 hosts --> /27 (30 usable) --> 10.0.0.64/27
Accounting: 12 hosts --> /28 (14 usable) --> 10.0.0.96/28
Server VLAN: 6 hosts --> /29 ( 6 usable) --> 10.0.0.112/29
WAN link: 2 hosts --> /30 ( 2 usable) --> 10.0.0.120/30/* Rule: Always allocate the largest subnet first,
then work downward. This prevents address overlap. */
Exam Strategy:
On subnetting questions, always write out the binary. AND the IP address with the subnet mask to get the network address. The broadcast is the network address with all host bits set to 1.
Special Addresses
0.0.0.0/0Default route. Matches all destinations. Used as the "route of last resort."
255.255.255.255Limited broadcast. Sent to all hosts on the local network segment. Never forwarded by routers.
169.254.0.0/16APIPA (Automatic Private IP Addressing). Assigned when DHCP fails. Link-local only.
100.64.0.0/10Carrier-grade NAT (CGN). Used by ISPs for address sharing between customers.
Key Takeaways
IPv4 = 32 bits, 4 octets. Network portion + Host portion defined by the subnet mask.
Private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 -- not routable on the internet
CIDR replaced classful addressing: /prefix notation defines the mask length