- 1). Determine the number of network segments (subnets) you need to support.
- 2). Determine the number of hosts you need to support in each network.
- 3). Choose a private network address. This tutorial will use the class C address of 192.168.1.0. A class C address has a default subnet mask of 255.255.255.0, which can also be written as /24 because the left-most 24 bits define the network address. This leaves 8 bits to be used to assign host addresses. Since a host address cannot be all 0s or all 1s, the supported range of host addresses for our example address with the default subnet mask is 192.168.1.1 through 192.168.1.254.
- 1). Convert the default subnet mask to binary. The binary representation of the class C default subnet mask is:
11111111.11111111.11111111.00000000
The 1s identify the network portion of the address and the 0s identify the host portion of the address. Therefore, an address of 192.168.1.20 with the default subnet mask identifies a host with the address of 20 in the 192.168.1.0 subnet. - 2). Change the leftmost bit that has a value of 0 to 1. This creates a subnet mask of 255.255.255.128, which can also be written as /25 because 25 bits are used to define the network address.
- 3). Calculate the number of subnets. Each bit can have one of two values: 0 or 1. One additional bit is used for the network portion of the address, so raise 2 to the power of 1 to determine that this configuration can support two subnets.
- 4). Calculate the number of hosts supported for each subnet. There are 7 bits remaining to define the host address. Raise 2 to the power of 7 to determine the total number of distinct bit combinations. A host address cannot be all 1s or all 0s, so subtract 2. The /25 subnet mask can support up to 126 hosts in each subnet.
- 5). Continue changing the leftmost 0 to a 1 if you need to support more networks. The /26 subnet mask supports four networks with 62 hosts in each. The /27 subnet mask supports eight networks with 30 hosts in each. The /28 subnet mask supports 16 networks with 14 hosts in each.
next post