Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The number of subnets depends on the number of borrowed bits, but with the number of usable host is the thing that is not clear to me just like in this example.. I don't know where did the raised number come from....

enter image description here

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Every IP address can be split into two parts: a "prefix", which basically specifies which network the associated host is on, and a host number on that network. An address can thus be considered to have a "netmask" or "prefix length", which determines where that split occurs (ie: which bits are in the prefix vs the host address). This information is often shown in one of two forms:

  • As an "IP address" where all one-bits represent the prefix and all zero-bits represent the host, like 255.255.255.192; or
  • As a number between 0 and 32, which represents the prefix length. That number typically follows the IP address, and is immediately preceded by a slash. For instance, the 255.255.255.192 netmask has 26 one-bits, so an address with that netmask would look like 192.168.1.37 /26.)

The 216, 211, etc come from the number of bits in the host part of the address -- that is, the number of bits not taken up by the prefix. The exponent is equal to the number of zero-bits in the netmask, or (32 - the prefix length). For example, the netmask for 192.168.1.0/26 has (32 - 26) == 6 zero-bits, so there are 26 == 64 possible addresses on that network.

There are two special addresses, though, which is where the "- 2" in the math comes from. If the host-part of the address has all bits 0, that's the network address and is considered semi-special. If they're all 1, it's the broadcast address for that subnet. Most networks will not assign either of those addresses to hosts on the network, as all sorts of wackiness could ensue.

With all that said, it looks like your example pic considers the effect of splitting an existing /16 ("class B") address block into smaller subnets by "borrowing" bits from the host part of the address to lengthen the prefix.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.