Here’s a concise cheatsheet to help you solve subnetting problems effectively. This summary is designed to cover the key concepts and steps you need, making it a handy reference for tackling such problems.
Subnetting Cheatsheet
1. Understanding IP Addresses and Subnet Masks
- IP Address: A 32-bit address split into network and host portions (e.g., 192.168.1.0).
- Subnet Mask: Defines the network part (1s) and host part (0s). Written as:
- Dotted decimal (e.g., 255.255.255.0)
- CIDR notation (e.g., /24, where 24 is the number of network bits).
- Key Idea: The mask determines how many bits are used for the network vs. hosts.
2. Calculating Subnets and Hosts
- Number of Subnets: Borrow
s bits from the host portion → Subnets = 2ˢ.
- Number of Hosts per Subnet: With
h host bits left → Total addresses = 2ʰ, Usable hosts = 2ʰ - 2 (subtract network and broadcast addresses).
3. Finding the Subnet Mask
- For Subnets: Choose the smallest
s where 2ˢ ≥ required number of subnets.
- For Hosts: Choose the smallest
h where 2ʰ - 2 ≥ required hosts per subnet.
- Combined: Total bits = 32. If original mask is /n, new mask = /n + s, and host bits
h = 32 - new mask.
4. Network and Broadcast Addresses
- Network Address: First address in the subnet (all host bits = 0).
- Broadcast Address: Last address in the subnet (all host bits = 1).
- How to Calculate:
- Network = IP AND Subnet Mask.
- Broadcast = Network + (2ʰ - 1).
5. Common Subnet Masks
| CIDR |
Subnet Mask |
Total Addresses |
Usable Hosts |
| /24 |
255.255.255.0 |
256 |
254 |
| /25 |
255.255.255.128 |
128 |
126 |
| /26 |
255.255.255.192 |
64 |
62 |
| /27 |
255.255.255.224 |
32 |
30 |
| /28 |
255.255.255.240 |
16 |
14 |
| /29 |
255.255.255.248 |
8 |
6 |
| /30 |
255.255.255.252 |
4 |
2 |