System: Calculating Subnets
Subnet and Network masks (Netmasks) are used for all sorts of tasks from firewalls to networking. It can be a time-consuming process to work out the appropriate netmask and subnet mask for different IP addresses. The form below makes it simple.
Netmask and Subnet Calculator
Enter two valid (and different) IPv4 addresses in the form below. It will calculate the most specific netmask and subnet mask that cover both addresses. If you have a range of IP address that appear to be from the same subnet, enter the lowest and highest for best results:
You can also paste an ip range ("A.B.C.D - E.F.G.H") into either field and it will be separated into a start and end address. Thanks to Andrew for the suggestion.
The calculated subnet mask will appear in the section below.
Netmask and subnet mask
The table below displays the two IP addresses you entered in binary format so you can see how they compare:
|1st address||01010110 00111011 01110110 10010000 (188.8.131.52)|
|2nd address||01010110 00111011 01110110 10011111 (184.108.40.206)|
|Subnet mask||220.127.116.11/28 (16 addresses)|
The netmask indicates the number of bits that they have in common starting from the high (left) end.
The subnet mask defines the smallest subnet that contains both addresses. It's used mostly in network administration or when specifying ip address ranges to block using iptables (firewall).
Send a message to The Art of Web:
press <Esc> or click outside this box to close