IP Subnet
An IPv4 subnet groups addresses under a common network prefix. Classless Inter-Domain Routing (CIDR) notation such as 192.168.1.10/24 states how many of the 32 IPv4 bits belong to the network portion.
The governing equation
N_{\mathrm{addresses}}=2^{32-p}\quad (0\le p\le32)The governing equation
The governing equation
IPv4 address, prefix and address semantics
IPv4 address [text] Four decimal octets in dotted notation; each is 0–255.
CIDR prefix [integer] From 0 through 32.
Address interpretation [choice] Automatic CIDR semantics (default), Traditional LAN host count, or /31 point-to-point link.
Apply a CIDR mask
Enter a valid IPv4 address such as 192.168.1.10 and prefix 24. Choose the interpretation matching the intended network, then Calculate. For /24, the mask is 255.255.255.0 and network is 192.168.1.0/24.
Network, usable range and special routes
Network address/prefix is primary. The result can show Subnet mask, traditional broadcast, usable host count, usable range, /31 endpoint addresses or /32 host route, according to prefix and interpretation. Invalid octets and prefixes trigger errors.
A worked /24 calculation
A /24 leaves eight host bits: 2⁸ = 256 addresses, of which the traditional usable range is .1 through .254 (254 hosts); .0 identifies network and .255 broadcast.
A /24 leaves eight host bits: 2⁸ = 256 addresses, of which the traditional usable range is .1 through .254 (254 hosts); .0 identifies network and .255 broadcast.
Why /31 and /32 are special
For /31 Automatic or point-to-point interpretation, both addresses become endpoints under RFC 3021. A /32 in Automatic mode represents one host route. Traditional mode uses its reserved-address counting behaviour.
For /31 Automatic or point-to-point interpretation, both addresses become endpoints under RFC 3021. A /32 in Automatic mode represents one host route. Traditional mode uses its reserved-address counting behaviour.
How to read the binary mask
The mask for /24 has 24 consecutive one-bits and eight zero-bits. Bitwise AND with the input address removes the host part and identifies the network. The mask visual labels both portions.
The mask for /24 has 24 consecutive one-bits and eight zero-bits. Bitwise AND with the input address removes the host part and identifies the network. The mask visual labels both portions.
Quick answers
What prefix does 255.255.255.0 correspond to?
/24, because its first 24 bits are ones.
How many traditional usable hosts does a /24 have?
254.
Can the app handle a /31 link?
Yes. Choose Automatic CIDR semantics or /31 point-to-point link for two endpoints.
What does /32 mean?
A single-address host route in the automatic interpretation.
