Question

I just want to understand how this software works: http://www.subnet-calculator.com/

Was it helpful?

Solution

It's not really calculating the address mask from the address. Rather it's calculating the network mask, address, number of sub-nets and size of each subnet from the class of network you supply (A, B or C). Most of this is defined in RFC 1918 (see §3 in particular).

Edit: I should probably add that class A, B, and C have been obsolete since CIDR (Classless InterDomain Routing) was introduced in 1993. The current definition is in RFC 4632, in case you happen to really care (but for the most part, you probably don't).

OTHER TIPS

You can't calculate the subnet mask from the ip address. You calculate the subnets (ips range) from the subnet mask by performing a bitwise AND with the ip address.

So for example, with a subnet mask of 255.255.255.0 only the fourth part of an ip address can vary, resulting in 255 possible addresses for 192.168.0.x.

Sorry for the lack of precise vocabulary, this was quite a quick and dirty explanation... Wikipedia has a better one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top