How it works
The check is done by applying the subnet mask (derived from the CIDR prefix) to both the network address and the given IP, and comparing the result — if the two resulting "network addresses" match, the IP belongs to the subnet.
Common use
Useful for quickly checking whether a server, device or firewall range is within the expected reach of a subnet, without doing the binary math by hand.
Worked examples with expected results
- 10.0.5.77 in 10.0.4.0/22: belongs. The range runs from 10.0.4.0 to 10.0.7.255, and a third octet of 5 sits inside it.
- 192.168.1.130 in 192.168.1.0/25: does not belong. That /25 ends at 192.168.1.127.
- 172.16.31.255 in 172.16.16.0/20: belongs, and it is the broadcast address of the range.
Common mistakes when checking
The most frequent one is assuming /24 and /25 "look the same" and forgetting that a /25 cuts the last octet in half. Another is typing a CIDR with host bits filled in (say 10.0.5.77/22): only the network bits are compared, so the answer is still right, but the real base address is 10.0.4.0.
When to use it over another tool
For a single IP against a single subnet, this check is enough. To see every boundary of the range, use a subnet calculator; to compare two ranges with each other, the overlap checker fits better.
Frequently asked questions
Do the network address and broadcast count as "belonging"?
Yes, they technically belong to the subnet range, though they aren't addresses assignable to a host (they're reserved to identify the network and for broadcast).
Does it work with any prefix, from /0 to /32?
Yes — including /32 (a single host) and /31 (used in point-to-point links, with no reserved network/broadcast addresses).