What does it do?
Calculates everything about an IPv4 subnet from an IP with its prefix (192.168.1.10/24) or mask: the network address, broadcast, first and last host, number of usable hosts, mask, wildcard and their binary form.
Why does it matter?
Assigning IPs without getting the subnet right leads to hard-to-find mistakes: devices that can't see each other, out-of-range IPs or duplicate addresses. It's a calculation done every day when configuring routers, firewalls and servers, and an easy one to get wrong in your head.
How does it work?
The prefix says how many bits of the address belong to the network. The mask is applied to the IP (an AND operation) to get the network, the host bits are set to get the broadcast, and the usable range sits in between. Everything is calculated in your browser, instantly and without sending anything to the server. /31 and /32 follow RFC 3021 (point-to-point links and single hosts).
How to read the result
- Network
- The first address: it identifies the subnet. It isn't assigned to devices.
- Broadcast
- The last address: it reaches every device in the subnet. It isn't assigned either.
- First and last host
- The range you can assign to devices.
- Wildcard
- The inverted mask, used in Cisco access lists and OSPF.
What is it for?
- Plan addressing for a LAN, a VLAN or a DHCP server.
- Check whether two IPs are on the same subnet.
- Convert between prefix (CIDR) and dotted mask.
- Study for networking certifications such as CCNA or MTCNA.