Your go-to reference for IP networking magic! This concise guide unlocks the secrets of IP subnetting, empowering you to divide networks efficiently and allocate addresses like a pro. Explore the world of CIDR notation, subnet masks in decimal, and the number of host addresses per subnet. Get ready to optimize your network and boost your networking confidence with this precise subnet mask cheat sheet!
Subnet Mask Cheat Sheet
To make subnetting calculations more straightforward, networking professionals often rely on subnet mask cheat sheets. These cheat sheets provide quick references for common subnet masks and their corresponding CIDR (Classless Inter-Domain Routing) notations.
CIDR notation expresses the subnet mask using a slash followed by the number of bits that represent the network portion.
Below is a handy subnet mask cheat sheet:
Subnet Mask | CIDR Notation | Number of Host Addresses |
---|---|---|
255.255.255.255 | /32 | 1 |
255.255.255.254 | /31 | 2 |
255.255.255.252 | /30 | 4 |
255.255.255.248 | /29 | 8 |
255.255.255.240 | /28 | 16 |
255.255.255.224 | /27 | 32 |
255.255.255.192 | /26 | 64 |
255.255.255.128 | /25 | 128 |
255.255.255.0 | /24 | 256 |
255.255.254.0 | /23 | 512 |
255.255.252.0 | /22 | 1024 |
255.255.248.0 | /21 | 2048 |
255.255.240.0 | /20 | 4096 |
255.255.224.0 | /19 | 8192 |
255.255.192.0 | /18 | 16384 |
255.255.128.0 | /17 | 32768 |
255.255.0.0 | /16 | 65536 |
255.254.0.0 | /15 | 131072 |
255.252.0.0 | /14 | 262144 |
255.248.0.0 | /13 | 524288 |
255.240.0.0 | /12 | 1048576 |
255.224.0.0 | /11 | 2097152 |
255.192.0.0 | /10 | 4194304 |
255.128.0.0 | /9 | 8388608 |
255.0.0.0 | /8 | 16777216 |
CIDR Notation | Usable IPs | Addresses | Subnet Mask | Amount of a Class C |
/30 | 2 | 4 | 255.255.255.252 | 1/64 |
/29 | 6 | 8 | 255.255.255.248 | 1/32 |
/28 | 14 | 16 | 255.255.255.240 | 1/16 |
/27 | 30 | 32 | 255.255.255.224 | 1/8 |
/26 | 62 | 64 | 255.255.255.192 | 1/4 |
/25 | 126 | 128 | 255.255.255.128 | 1/2 |
/24 | 254 | 256 | 255.255.255.0 | 1 |
/23 | 510 | 512 | 255.255.254.0 | 2 |
/22 | 1022 | 1024 | 255.255.252.0 | 4 |
/21 | 2046 | 2048 | 255.255.248.0 | 8 |
/20 | 4094 | 4096 | 255.255.240.0 | 16 |
/19 | 8190 | 8192 | 255.255.224.0 | 32 |
/18 | 16382 | 16384 | 255.255.192.0 | 64 |
/17 | 32766 | 32768 | 255.255.128.0 | 128 |
/16 | 65534 | 65536 | 255.255.0.0 | 256 |
Since /30’s are used a lot, see the table below:
/30 — 64 Subnets — 2 Hosts/Subnet
Network # | Broadcast | IP Range |
.0 | .3 | .1-.2 |
.4 | .7 | .5-.6 |
.8 | .11 | .9-.10 |
.12 | .15 | .13-.14 |
.16 | .19 | .17-.18 |
.20 | .23 | .21-.22 |
.24 | .27 | .25-.26 |
.28 | .31 | .29-.30 |
.32 | .35 | .33-.34 |
.36 | .39 | .37-.38 |
.40 | .43 | .41-.42 |
.44 | .47 | .45-.46 |
.48 | .51 | .49-.50 |
.52 | .55 | .53-.54 |
.56 | .59 | .57-.58 |
.60 | .63 | .61-.62 |
.64 | .67 | .65-.66 |
.68 | .71 | .69-.70 |
.72 | .75 | .73-.74 |
.76 | .79 | .77-.78 |
.80 | .83 | .81-.82 |
.84 | .87 | .85-.86 |
.88 | .91 | .89-.90 |
.92 | .95 | .93-.94 |
.96 | .99 | .97-.98 |
.100 | .103 | .101-.102 |
.104 | .107 | .105-.106 |
.108 | .111 | .109-.110 |
.112 | .115 | .113-.114 |
.116 | .119 | .117-.118 |
.120 | .123 | .121-.122 |
.124 | .127 | .125-.126 |
.128 | .131 | .129-.130 |
.132 | .135 | .133-.134 |
.136 | .139 | .137-.138 |
.140 | .143 | .141-.142 |
.144 | .147 | .145-.146 |
.148 | .151 | .149-.150 |
.152 | .155 | .153-.154 |
.156 | .159 | .157-.158 |
.160 | .163 | .161-.162 |
.164 | .167 | .165-.166 |
.168 | .171 | .169-.170 |
.172 | .175 | .173-.174 |
.176 | .179 | .177-.178 |
.180 | .183 | .181-.182 |
.184 | .187 | .185-.186 |
.188 | .191 | .189-.190 |
.192 | .195 | .193-.194 |
.196 | .199 | .197-.198 |
.200 | .203 | .201-.202 |
.204 | .207 | .205-.206 |
.208 | .211 | .209-.210 |
.212 | .215 | .213-.214 |
.216 | .219 | .217-.218 |
.220 | .223 | .221-.222 |
.224 | .227 | .225-.226 |
.228 | .231 | .229-.230 |
.232 | .235 | .233-.234 |
.236 | .239 | .237-.238 |
.240 | .243 | .241-.242 |
.244 | .247 | .245-.246 |
.248 | .251 | .249-.250 |
.252 | .255 | .253-.254 |
The Need for Subnetting
With the exponential growth of the internet and the number of connected devices, the exhaustion of available IPv4 addresses became inevitable. To counter this issue, the concept of subnetting was introduced.
Subnetting involves dividing a large IP address space into smaller, more manageable subnetworks, or subnets. Each subnet can then host a limited number of devices, conserving IP addresses and optimizing network performance.
Introducing the Subnet Mask
A subnet mask is a 32-bit value that accompanies an IP address. It serves as a filtering mechanism that determines which part of the IP address represents the network portion and which part represents the host portion.
The subnet mask consists of a series of contiguous 1s followed by a series of contiguous 0s, represented in a format like 255.255.255.0.
Let’s take an example to illustrate the concept.
Consider an IP address of 192.168.1.50 with a subnet mask of 255.255.255.0. In binary representation, the subnet mask looks like 11111111.11111111.11111111.00000000. By performing a bitwise AND operation between the IP address and the subnet mask, we get the network address, which, in this case, is 192.168.1.0. The remaining bits represent the host address within that network, allowing for the connection of devices in the same subnet.
Subnetting in Practice
Now, let’s explore a real-world example to see how subnetting works in practice. Consider a company with the IP address block of 192.168.10.0/24 (subnet mask 255.255.255.0). This means the first 24 bits are reserved for the network portion, and the remaining 8 bits are for the host portion.
The company wants to divide its network into multiple subnets to separate different departments. After careful planning, they decide to allocate three subnets for Engineering, Sales, and IT, with 50, 30, and 20 host addresses required in each subnet, respectively.
Subnetting Calculation
To accommodate the required number of host addresses in each subnet, we need to determine the appropriate subnet mask for each division.
We can do this by calculating the number of bits required for the host portion, based on the maximum number of hosts in each subnet.
1. Engineering:
50 hosts → 2^6 (64) addresses required. So, we need 6 bits for the host portion (2^6 = 64).
2. Sales:
30 hosts →2^5 (32) addresses required. So, we need 5 bits for the host portion (2^5 = 32).
3. IT:
20 hosts → 2^5 (32) addresses required. So, we need 5 bits for the host portion (2^5 = 32).
Next, we add the number of host bits to the original 24 bits for the network portion:
1. Engineering:
24 (network bits) + 6 (host bits) = /30 subnet mask (255.255.255.192)
2. Sales:
24 (network bits) + 5 (host bits) = /29 subnet mask (255.255.255.248)
3. IT:
24 (network bits) + 5 (host bits) = /29 subnet mask (255.255.255.248)
Now the company has three subnets with the following configurations:
1. Engineering:
Subnet 192.168.10.0/26 (255.255.255.192) – Range: 192.168.10.1 to 192.168.10.62
2. Sales:
Subnet 192.168.10.64/29 (255.255.255.248) – Range: 192.168.10.65 to 192.168.10.70
3. IT:
Subnet 192.168.10.72/29 (255.255.255.248) – Range: 192.168.10.73 to 192.168.10.78
Conclusion
In conclusion, subnetting is a crucial technique for efficient IP address allocation and network management. The subnet mask plays a central role in defining the boundaries of each subnet, separating the network and host portions of an IP address. Understanding how to subnet is essential for networking professionals, as it allows them to create optimal network architectures and avoid IP address exhaustion.