This post illustrates two examples for subnet creation. In the first example, an office network with two departments is taken and in the second example, an office network with four departments is taken.
Example 1: An office network with two subnets
Assume that the ISP has assigned the network 200.20.20.x with 256 IP addresses to the office and also assume that the office has two internal departments, namely Engineering and Accounts. The example splits this network internally into two equal subnetworks, so that each subnetwork can be used by a single department.
The diagram given below illustrates the office network with two departments and a subnet being created for each of the two departments
The diagram given below illustrates the basic splitting of the main ISP assigned address space into two internal subnets of equal size. Note that the first bit of the host (25th bit of the IP address space) is borrowed to create two subnets. The first subnet has a value of 0 in this bit position and the second subnet has a value of 1 in this bit position, as highlighted in green color in the diagram below:
For each subnet created, the first and last address are treated as special addresses and reserved for specific purposes. While the first IP address in the subnet block (got by assigning a 0 to all host bit positions) is used to denote the subnet itself, the last IP address in the subnet block (got by assigning a 1 to all host bit positions) is used to denote the broadcast address within the subnet and is used whenever an IP packet need to be broadcast to all hosts inside a specific subnet.
The diagram given below illustrates the different addresses assigned to the first department (Accounts).
The diagram given below illustrates the different addresses assigned to the second deparment (Engineering).
Example 2: An office network with four subnets
Assume that the ISP has assigned the network 200.20.20.x with 256 IP addresses to the office and also assume that the office has four internal departments, namely Engineering, HR, Marketing and Accounts. The example splits this network internally into four equal subnetworks, so that each subnetwork can be used by a single department.
The diagram given below illustrates the office network with four departments and a subnet being created for each of the four departments
The diagram given below illustrates the process of borrowing 2 bits from the host portion of the network, in order to create four subnets
The diagram given below illustrates the basic splitting of the main ISP assigned address space into four internal subnets of equal size. Note that the first two bits of the host (25th and 26th bits of the IP address space) are borrowed to create four subnets. The first subnet has a value of 00, the second subnet has a value of 01, the third subnet has a value of 10 and the fourth subnet has a value of 11 in these two bit positions allotted for the subnet, as highlighted in green color in the diagram below:
The diagram given below illustrates the different addresses assigned to the first department (Accounts).
The diagram given below illustrates the different addresses assigned to the second department (HR).
The diagram given below illustrates the different addresses assigned to the third department (Engineering).
The diagram given below illustrates the different addresses assigned to the fourth department (Marketing).