This page provides three subnet mask tables containing essential information about IP subnetting, allowing network administrators to effectively manage IP address allocation and subnet configurations:
The subnet parameters table shown below provides information about various subnet masks, including the number of bits in the mask, the subnet mask itself, the number of hosts available on each subnet, and the wildcard mask or inverse mask. Here's how the data in the table can be read and interpreted:
Bits in Mask: This column indicates the number of bits that are set to 1 in the subnet mask. It represents the length of the network portion of the IP address.
Subnet Mask: This column displays the actual subnet mask in dotted-decimal notation. The subnet mask is used to divide the IP address into network and host portions.
Hosts: This column shows the number of available host addresses within each subnet, excluding the network address and the broadcast address. The number of hosts is calculated as 2^(32 - Bits in Mask) - 2 *.
Wildcard Mask or Inverse Mask: This column represents the wildcard mask or inverse mask associated with each subnet mask. The wildcard mask is the complement of the subnet mask, where each octet is subtracted from 255.
For example, let's consider the row with "Bits in Mask" equal to 24 and "Subnet Mask" equal to 255.255.255.0. This subnet mask represents a network, where the first 24 bits are used for the network address, and the last 8 bits are available for hosts. The number of available hosts is calculated as 2^(32 - 24) - 2, which equals 254. The corresponding wildcard mask would be 0.0.0.255, obtained by subtracting each octet of the subnet mask from 255.
Bits in Mask | Subnet Mask | Hosts | Wildcard Mask |
8 | 255.0.0.0 | 16777214 | 0.255.255.255 |
9 | 255.128.0.0 | 8388606 | 0.127.255.255 |
10 | 255.192.0.0 | 4194302 | 0.63.255.255 |
11 | 255.224.0.0 | 2097150 | 0.31.255.255 |
12 | 255.240.0.0 | 1048574 | 0.15.255.255 |
13 | 255.248.0.0 | 524286 | 0.7.255.255 |
14 | 255.252.0.0 | 262142 | 0.3.255.255 |
15 | 255.254.0.0 | 131070 | 0.1.255.255 |
16 | 255.255.0.0 | 65534 | 0.0.255.255 |
17 | 255.255.128.0 | 32766 | 0.0.127.255 |
18 | 255.255.192.0 | 16382 | 0.0.63.255 |
19 | 255.255.224.0 | 8190 | 0.0.31.255 |
20 | 255.255.240.0 | 4094 | 0.0.15.255 |
21 | 255.255.248.0 | 2046 | 0.0.7.255 |
22 | 255.255.252.0 | 1022 | 0.0.3.255 |
23 | 255.255.254.0 | 510 | 0.0.1.255 |
24 | 255.255.255.0 | 254 | 0.0.0.255 |
25 | 255.255.255.128 | 126 | 0.0.0.127 |
26 | 255.255.255.192 | 62 | 0.0.0.63 |
27 | 255.255.255.224 | 30 | 0.0.0.31 |
28 | 255.255.255.240 | 14 | 0.0.0.15 |
29 | 255.255.255.248 | 6 | 0.0.0.7 |
30 | 255.255.255.252 | 2 | 0.0.0.3 |
31 | 255.255.255.254 | 2* | 0.0.0.1 |
*Number of hosts on a /31 subnet:
Generally, within a subnet, two host addresses - all-zeros and all-ones are reserved as network address and
broadcast, respectively. The same approach applied to a /31 subnet with only two possible addresses in the host identifier
would leave no usable addresses for host assignment.
RFC3021: Using 31-Bit Prefixes on IPv4 Point-to-Point Links
allows assignment of the all-zeros and all-ones IP addresses to hosts on point-to-point links.
This VLSM table provides information about subnets with prefixes from /25 to /30. It illustrates how a /24 IP range can be partitioned into smaller subnets with longer prefixes. For each prefix length, the table shows the last octet of the network address as well as the host range.
Here's how the data in the table should be interpreted:
Each column (/25 - /30) contains cells representing subnets with the particular prefix length that can be allocated under a single /24 IP range. Each cell shows the last octet of the network address in bold and the corresponding host range in parentheses, for example ".16 (.17 - .30)". Remember, the first IP address of a subnet is reserved for the network address and the last one is reserved for the broadcast address.
The cells in this table are aligned vertically to show the correlation between IP address ranges for subnets with different prefixes.
For example, let's consider an IP range 192.168.1.0/24 and illustrate how it can be partitioned into subnets with the prefix length /26:
There are four cells under the /26 column representing network addresses with the following last octets: .0, .64, .128, and .192. Base on this, we can construct four /26 subnet within our IP range:
192.68.1.0/26
192.68.1.64/26
192.68.1.128/26
192.68.1.192/26
Corresponding host IP ranges are:
192.68.1.1 - 192.168.1.62
192.68.1.65 - 192.168.1.126
192.68.1.129 - 192.168.1.190
192.68.1.193 - 192.168.1.254
/25 | /26 | /27 | /28 | /29 | /30 |
Net (Hosts) | Net (Hosts) | Net (Hosts) | Net (Hosts) | Net (Hosts) | Net (Hosts) |
.0 (.1 - .126) | .0 (.1 - .62) | .0 (.1 - .30) | .0 (.1 - .14) | .0 (.1 - .6) | .0 (.1 - .2) |
.4 (.5 - .6) | |||||
.8 (.9 - .14) | .8 (.9 - .10) | ||||
.12 (.13 - .14) | |||||
.16 (.17 - .30) | .16 (.17 - .22) | .16 (.17 - .18) | |||
.20 (.21 - .22) | |||||
.24 (.25 - .30) | .24 (.25 - .26) | ||||
.28 (.29 - .30) | |||||
.32 (.33 - .62) | .32 (.33 - .46) | .32 (.33 - .38) | .32 (.33 - .34) | ||
.36 (.37 - .38) | |||||
.40 (.41 - .46) | .40 (.41 - .42) | ||||
.44 (.45 - .46) | |||||
.48 (.49 - .62) | .48 (.49 - .54) | .48 (.49 - .50) | |||
.52 (.53 - .54) | |||||
.56 (.57 - .62) | .56 (.57 - .58) | ||||
.60 (.61 - .62) | |||||
.64 (.65 - .126) | .64 (.65 - .94) | .64 (.65 - .78) | .64 (.65 - .70) | .64 (.65 - .66) | |
.68 (.69 - .70) | |||||
.72 (.73 - .78) | .72 (.73 - .74) | ||||
.76 (.77 - .78) | |||||
.80 (.81 - .94) | .80 (.81 - .86) | .80 (.81 - .82) | |||
.84 (.85 - .86) | |||||
.88 (.89 - .94) | .88 (.89 - .90) | ||||
.92 (.93 - .94) | |||||
.96 (.97 - .126) | .96 (.97 - .110) | .96 (.97 - .102) | .96 (.97 - .98) | ||
.100 (.101 - .102) | |||||
.104 (.105 - .110) | .104 (.105 - .106) | ||||
.108 (.109 - .110) | |||||
.112 (.113 - .126) | .112 (.113 - .118) | .112 (.113 - .114) | |||
.116 (.117 - .118) | |||||
.120 (.121 - .126) | .120 (.121 - .122) | ||||
.124 (.125 - .126) | |||||
.128 (.129 - .254) | .128 (.129 - .190) | .128 (.129 - .158) | .128 (.129 - .142) | .128 (.129 - .134) | .128 (.129 - .130) |
.132 (.133 - .134) | |||||
.136 (.137 - .142) | .136 (.137 - .138) | ||||
.140 (.141 - .142) | |||||
.144 (.145 - .158) | .144 (.145 - .150) | .144 (.145 - .146) | |||
.148 (.149 - .150) | |||||
.152 (.153 - .158) | .152 (.153 - .154) | ||||
.156 (.157 - .158) | |||||
.160 (.161 - .190) | .160 (.161 - .174) | .160 (.161 - .166) | .160 (.161 - .162) | ||
.164 (.165 - .166) | |||||
.168 (.169 - .174) | .168 (.169 - .170) | ||||
.172 (.173 - .174) | |||||
.176 (.177 - .190) | .176 (.177 - .182) | .176 (.177 - .178) | |||
.180 (.181 - .182) | |||||
.184 (.185 - .190) | .184 (.185 - .186) | ||||
.188 (.189 - .190) | |||||
.192 (.193 - .254) | .192 (.193 - .222) | .192 (.193 - .206) | .192 (.193 - .198) | .192 (.193 - .194) | |
.196 (.197 - .198) | |||||
.200 (.201 - .206) | .200 (.201 - .202) | ||||
.204 (.205 - .206) | |||||
.208 (.209 - .222) | .208 (.209 - .214) | .208 (.209 - .210) | |||
.212 (.213 - .214) | |||||
.216 (.217 - .222) | .216 (.217 - .218) | ||||
.220 (.221 - .222) | |||||
.224 (.225 - .254) | .224 (.225 - .238) | .224 (.225 - .230) | .224 (.225 - .226) | ||
.228 (.229 - .230) | |||||
.232 (.233 - .238) | .232 (.233 - .234) | ||||
.236 (.237 - .238) | |||||
.240 (.241 - .254) | .240 (.241 - .246) | .240 (.241 - .242) | |||
.244 (.245 - .246) | |||||
.248 (.249 - .254) | .248 (.249 - .250) | ||||
.252 (.253 - .254) |
This table contains subnet masks from 255.0.0.0 to 255.255.255.254 in both dotted-decimal and dotted-binary formats:
Subnet Mask (Decimal) | Subnet Mask (Binary) |
---|---|
255.0.0.0 | 11111111.00000000.00000000.00000000 |
255.128.0.0 | 11111111.10000000.00000000.00000000 |
255.192.0.0 | 11111111.11000000.00000000.00000000 |
255.224.0.0 | 11111111.11100000.00000000.00000000 |
255.240.0.0 | 11111111.11110000.00000000.00000000 |
255.248.0.0 | 11111111.11111000.00000000.00000000 |
255.252.0.0 | 11111111.11111100.00000000.00000000 |
255.254.0.0 | 11111111.11111110.00000000.00000000 |
255.255.0.0 | 11111111.11111111.00000000.00000000 |
255.255.128.0 | 11111111.11111111.10000000.00000000 |
255.255.192.0 | 11111111.11111111.11000000.00000000 |
255.255.224.0 | 11111111.11111111.11100000.00000000 |
255.255.240.0 | 11111111.11111111.11110000.00000000 |
255.255.248.0 | 11111111.11111111.11111000.00000000 |
255.255.252.0 | 11111111.11111111.11111100.00000000 |
255.255.254.0 | 11111111.11111111.11111110.00000000 |
255.255.255.0 | 11111111.11111111.11111111.00000000 |
255.255.255.128 | 11111111.11111111.11111111.10000000 |
255.255.255.192 | 11111111.11111111.11111111.11000000 |
255.255.255.224 | 11111111.11111111.11111111.11100000 |
255.255.255.240 | 11111111.11111111.11111111.11110000 |
255.255.255.248 | 11111111.11111111.11111111.11111000 |
255.255.255.252 | 11111111.11111111.11111111.11111100 |
255.255.255.254 | 11111111.11111111.11111111.11111110 |
See Also
IPv4 Subnet Calculator
IPv4 Address and Subnet Mask Visual Calculator
IPv6 Calculator
Private IP Addresses