“Dividing a network into subnets” cheat sheet

27 February 2024 4 minutes Author: Cyber Witcher

One of the fundamental aspects of network design is the division of the network into subnets, or subnetting, which allows you to effectively manage the address space, increase security, and improve network performance. In this article, we will review the key concepts and practical aspects of network subnetting.

An example of dividing a network into subnets

The process of dividing the network into subnets is easier to explain with a specific example. Let’s imagine that we have a network of three routers, three switches and several computers, which needs to be divided into 6 subnets. The network diagram is shown in the figure below.

We were allocated one IP address for the entire network, which we need to divide into 6 subnets. In binary form, this IP address looks like this (I’ll bold the network portion): 11000000.10101000.00000000. 00000000.

The required number of nodes (hosts, in this case computers) in each subnet:

  • Subnet A – 100 nodes

  • Subnet B – 50 nodes

  • Subnet C – 20 nodes

  • Subnets D – 2 nodes

  • Subnet E – 2 nodes

  • Subnet F – 2 nodes

Remember that you need to start dividing the network from the network with the maximum number of nodes. “/24” is the subnet mask prefix (shorthand for mask). The full entry of the subnet mask is In binary representation, the subnet mask looks like this: 11111111.11111111.11111111.00000000 which means we have 8 bits available to divide the network.

Use the cheat sheet above (namely the “BIN to DEC” table). The first subnet A needs to be allocated IP addresses for 100 nodes. In the “BIN to DEC” table, we see that by taking one bit out of eight in the mask, we get 1 bit to the network portion (which is 2 subnets) and 7 bits to the address portion (01111111 = 127). 127 together with zero in number equals 128, this is the full number of addresses that satisfies the requirements (and there are even a few addresses to spare). And yes, we change the mask from “/24” to “25” (in binary format it will be 11111111.11111111.11111111.10000000). Let’s apply a new mask to our network and get 2 subnets (I will highlight the portion of the network in bold): 1 – 11000000.10101000.00000000.0 0000000 (network 192.100.000) hedgehog

In the two new networks, the network portion is 7 bits. Using the formula (which is in the cheat sheet), we will check whether 7 bits are enough for a network with 100 nodes. 2^7-2=128-2=126, which means 7 bits gives us 126 node addresses. (Let me remind you of the formula: 2^X-2=number of addresses for nodes, where X is equal to the number of zeros, and “-2” is for special addresses that cannot be assigned to nodes.)

We have one network left,, and we need an address for nodes for subnet B 50. As before, we can see in the table “BIN to DEC” 00111111 = 63, this is more than 50, which means it meets the requirements. We occupy one more bit near the portion of the address, which remains 6 (2 6-2 = 62). The mask becomes one more than /26, we apply it to our network and get two new subnets (I will highlight the portion of the network in bold): 1 – 11000000.10101000.00000000.10 000000 (network . 0000000.11 000000 (network We also separate 1 bit from the node address portion (00011111 = 31, which more than 20, and therefore suits us), the mask is already /27.

Again two networks:

  1. 1- 11000000.10101000.00000000.110 00000 (network

  2. 2 – 11000000.10101000.00000002 27)

It remains for us to allocate 3 subnets with 2 addresses for the nodes. The table shows that only two bits (00000011 = 3) are enough for the node address portion, 2^2-2=2 addresses for two nodes. In turn, two bits (2^2=4, the formula from the cheat sheet) are enough for three subnets of the same size. There are only 32 bits in the IP address, we subtract the 2 we need and get 30, so we use the /30 mask. For our network, it looks like this (I will highlight the portion of the network in bold): 11000000.10101000.00000000.111000 00 (network

We divide our new network into 3 subnets:

  • 1 – 11000000.10101000.00000000.11100000 (network .

  • 2 – 11000000.10101000.00000000.111001 00 (network

  • 3 – 11000000.10101000.00000000.111010 00 (network

Done, task completed:
  • Subnet A is

  • Subnet B is

  • Subnet C is

  • Subnet D –

  • Subnet E –

  • Subnet F –

And now the cheat sheet from PDF is translated into HTML

Here are some tables to help you divide networks into subnets.

Here are some tables to help you divide networks into subnets

Other related articles
Found an error?
If you find an error, take a screenshot and send it to the bot.