.
What is a Subnet ?
.
Once you have been allocated a Network by the IANA (for example a the Class B Network: 150.10.0.0), you have 65534 IP addresses available... You wont have all these IPs on the physical sub-network, will you ? That's the main reason for creating subnets. Another big reason is security: subneting enables using security rules between subnets.
.
The Host part of the IP address is divided in two parts, the first one codes the Subnet and the second one codes the Host. The number of bits used for the Subnet is variable and depends on the number of hosts you need in this subnet (and vice versa).
.
For example, you can decide to have for a Class B: nnnnnnnn.nnnnnnnn.ssssssss.hhhhhhhh where "n"s represent the network, "s"s the Subnet and "h"s the Host.
In this example you have 8 bits for the Subnet and 8 bits for the Host.
But you can also choose to to use: nnnnnnnn.nnnnnnnn.sssssshh.hhhhhhhh, 6 bits for the Subnet and 10 for the Host.
.
It is not recommended to use subnets with all "s"s to "0" or all "s"s to 1 but it is tolerated. However in a production environment, it is strongly unrecommended since "old" standards prohibit these subnets.
.
In the Host part, all "h" bits to "0" is the "Subnet Address" (also called "Network address" or "Network Number") and all to "1" is the Broadcast Address.

.

.
.
Copyright (c) 2002 - Guillaume Péan
www.shunsoft.net