Windows 7 / Networking

IPv4 subnetting

In most cases, enterprise administrators use addresses in one of the private IP address ranges to create the subnets they need. If you are building a new enterprise network from scratch, you can choose any one of the private address blocks and make things easy on yourself by subnetting along the octet boundaries.

For example, you can take the 10.0.0.0/8 private IP address range and use the entire second octet as a subnet ID. This enables you to create up to 256 subnets with as many as 65,536 hosts on each one. The subnet masks for all of the addresses on the subnets will be 255.255.0.0 and the network addresses will proceed as follows:

  • 10.0.0.0/16
  • 10.1.0.0/16
  • 10.2.0.0/16
  • 10.3.0.0/16
  • 10.255.0.0/16

Of course, when you are working on an existing network, the subnetting process is likely to be more difficult. You might, for example, be given a relatively small range of addresses and be asked to create a certain number of subnets out of them. To do this, you use the following procedure.

  1. Determine how many subnet identifier bits you need to create the required number of subnets.
  2. Subtract the subnet bits you need from the host bits and add them to the network bits.
  3. Calculate the subnet mask by adding the network and subnet bits in binary form and converting the binary value to decimal.
  4. Take the least significant subnet bit and the host bits, in binary form, and convert them to a decimal value.
  5. Increment the network identifier (including the subnet bits) by the decimal value you calculated to determine the network addresses of your new subnets.

Using the same example from earlier in this tutorial, if you take the 192.168.43.0/24 address and allocate two extra bits for the subnet ID, you end up with a binary subnet mask value of 11111111.11111111.11111111.11000000 (255.255.255.192 in decimal form, as noted earlier).

The least significant subnet bit plus the host bits gives you a binary value of 1000000, which converts to a decimal value of 64. Therefore, if we know that the network address of your first subnet is 192.168.43.0, the second subnet must be 192.168.43.64, the third 192.168.43.128, and the fourth 192.168.43.192, as shown in Table-2.

Supernetting

In addition to simplifying network notation, CIDR also makes a technique called IP address aggregation or supernetting possible, which can help to reduce the size of Internet routing tables. A supernet is a combination of contiguous networks that all contain a common CIDR prefix. When an organization possesses multiple contiguous networks that can be expressed as a supernet, it becomes possible to list those networks in a routing table using only one entry instead of many.

For example, if an organization has the following five subnets, standard practice would be to create a separate routing table entry for each one.

  • 172.16.43.0/24
  • 172.16.44.0/24
  • 172.16.45.0/24
  • 172.16.46.0/24
  • 172.16.47.0/24
172.16.43.0	10101100.00010000.00101011.00000000
172.16.44.0	10101100.00010000.00101100.00000000
172.16.45.0	10101100.00010000.00101101.00000000
172.16.46.0	10101100.00010000.00101110.00000000
172.16.47.0	10101100.00010000.00101111.00000000

In binary form, you can see that all five addresses have the same first 21 bits. Those 21 bits become the network identifier of the supernet address, as follows:

10101100.00010000.00101

After zeroing out the host bits to form the network address and converting the binary number back to decimal form, as follows, the resulting supernet address is 172.16.40.0/21.

10101100.00010000.00101000.00000000 172.16.40.0/21

This one network address can replace the original five in routing tables duplicated throughout the Internet. Obviously, this is just an example of a technique that administrators can use to combine dozens or even hundreds of subnets into single routing table entries.

[Previous] [Contents] [Next]