Show Menu
Cheatography

Subnetting Cheat Sheet by

Intro

The 30-second subnetting trick, CIDR tables, and everything CompTIA and Cisco expect you to know cold.
Intro text
 

The Subnetting Trick (do this on every question)

Given an IP and CIDR (e.g. 192.16­8.1.77­/26):
1. Block size = 256 − intere­sting octet value → 256 − 192 = 64
2. Subnets fall on multiples of the block size → 0, 64, 128, 192
3. 77 falls between 64 and 128 → subnet is 192.16­8.1.64
4. Range: 192.16­8.1.64 – 192.16­8.1.127 · Broadcast: .127 · Usable: .65 – .126
Subnetting trick steps

CIDR Quick Table

CIDR
Subnet Mask
Wildcard
Usable Hosts
/24
255.25­5.255.0
0.0.0.255
254
/25
255.25­5.2­55.128
0.0.0.127
126
/26
255.25­5.2­55.192
0.0.0.63
62
/27
255.25­5.2­55.224
0.0.0.31
30
/28
255.25­5.2­55.240
0.0.0.15
14
/29
255.25­5.2­55.248
0.0.0.7
6
/30
255.25­5.2­55.252
0.0.0.3
2
/23
255.25­5.254.0
0.0.1.255
510
/22
255.25­5.252.0
0.0.3.255
1,022
/21
255.25­5.248.0
0.0.7.255
2,046
/16
255.25­5.0.0
0.0.25­5.255
65,534
Formula: usable hosts = 2^(host bits) − 2 (subtract network + broadcast)

Private IP Ranges (RFC 1918)

Class
Range
CIDR
Addresses
A
10.0.0.0 – 10.255.25­5.255
/8
16,777,216
B
172.16.0.0 – 172.31.25­5.255
/12
1,048,576
C
192.16­8.0.0 – 192.16­8.2­55.255
/16
65,536
Also know: 127.0.0.0/8 = loopback · 169.25­4.0.0/16 = APIPA (link-­local, DHCP failed)

Classful Boundaries

Class
First Octet
Default Mask
A
1 – 126
/8
B
128 – 191
/16
C
192 – 223
/24
(127 is reserved — loopback, not Class A usable.)

Specia­l-P­urpose Addresses

Address
Meaning
0.0.0.0/0
Default route — "­eve­ryt­hin­g"
255.25­5.2­55.255
Limited broadcast — "­eve­ryone here"
Network address
First address in subnet (not assign­able)
Broadcast address
Last address in subnet (not assign­able)
Special addresses to know
 

More from ByteBar

Full subnetting walkth­roughs + practice questions at byteba­rhq.com — by ByteBar.
Footer
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.