This tutorial explains step by step how to create subnets with examples. Find out what the IP subnet is, subnet components such as network ID, broadcast ID, network part, host part, FLSM, VLSM, eligible subnet bits, reserved network bits and host bits, including detailed subnet rules.

What is the IP subnet?

The IP subnet is a process of dividing a large IP network into smaller IP networks. In Subnetting, we create multiple small manageable networks from a single large IP network.

Let’s take an example.

To make the best use of the available addresses if we put more than 16,000,000 hosts in a single network, due to broadcast and collision, this network will never work. If we put fewer hosts, the remaining addresses will be wasted.

The subnet offers a better way to deal with this situation. The subnet allows us to create smaller networks from a single large network that not only meets the needs of our hosts, but also offers several other networking benefits.

I have already explained the benefits of the subnet as well as the reasons why the subnet is needed in the previous parts of this tutorial. In this part, I will mainly focus on subnet components and terminology.

Network part vs host part

Identifying the network part and the host part in an IP address is the first step in the subnet. The subnet can only be made in the host part. The subnet mask is used to distinguish the network part from the host part in an IP address.

Both an IP address and a subnet mask collectively provide a digital identity to an interface. The two addresses are always used together. Without a subnet mask, an IP address is an ambiguous address, and without an IP address, a subnet mask is just a number.

Both addresses are 32 bits long. These bits are divided into four parts. Each part is known as a byte and contains 8 bits. The bytes are separated by periods and written in a sequence.

The subnet mask assigns an individual bit for each IP address bit. If the IP bit belongs to the network part, the allocated subnet mask bit will be activated. If the IP bit belongs to the host party, the assigned subnet mask bit will be disabled.

There are two popular notations for writing the IP address and the subnet mask; Decimal notation and binary notation.

In decimal notation, a range of values ​​from 1 to 255 represents an activated bit while a value 0 (zero) represents an deactivated bit.

IP address with decimal subnet mask notation

In binary notation, 1 (one) represents an activated bit while 0 (zero) represents an deactivated bit.

IP address in binary notation

Examples of IP addresses with subnet mask in binary format

00001010.00001010.00001010.00001010
11111111.00000000.00000000.00000000

10101100.10101000.00000001.00000001
11111111.11111111.00000000.00000000

11000000.10101000.00000001.00000001
11111111.11111111.11111111.00000000

Examples of IP addresses with subnet mask in decimal format

10.10.10.10
255.0.0.0

172.168.1.1
255.255.0.0

192.168.1.1
255.255.255.0

In the examples above, the network part is formatted in bold text.

Reserve IP classes, network bits and host bits

Each IP address belongs to a predefined IP class. There are five predefined IP classes; A, B, C, D and E. From these classes, classes D and E are reserved and cannot be used in the subnet.

To learn more about the IP address and its classes, you can see this tutorial.

Explanation of IP address classes and their definitions

It explains the IP address, IP classes, IP address types, private IP address, public IP address and much more.

In class A, B and C: –

  • The first 8, 16 and 24 bits are reserved for the network part, respectively.
  • The last 2 bits (31 and 32) are reserved for the host part.

reserved network bits

Reserved network bits and host bits cannot be used in the subnet.

IP class First class IP address Last class IP address Default subnet mask Default network bits Host Bits Reserved host bits
A 0.0.0.0 127255255255 255.0.0.0 First 8 bits 9 to 30 31, 32
B 128.0.0.0 191255255255 255.255.0.0 First 16 bits 17 to 30 31, 32
VS 192.0.0.0 223.255.255.255 255.255.255.0 First 24 bits 25 to 30 31, 32

Eligible host bit subnet

After excluding reserved network bits and host bits, the remaining bits are considered host bits eligible for the subnet.

eligible bit subnet

The subnet can only be made in the bits eligible for the subnet.

Subnet

A subnet is a single small network created from a large network. In Subnetting, we break a single large network into several small networks. These networks are called subnets.

Network address and broadcast address

In each network, there are two special addresses; network address and broadcast address. The network address represents the network itself while the broadcast address represents all of the hosts that belong to it. These two addresses cannot be assigned to any individual host on the network. Since each subnet represents an individual network, it also uses these two addresses.

In simple language, in a single network, only two IP addresses will be used for these addresses. But if we split this network into two small networks, four IP addresses will be used for these addresses.

network address broadcast address

The network address and the broadcast address are also called the network ID and the broadcast ID, respectively.

Valid host addresses

All addresses between the network address and the broadcast address are called valid host addresses. Only valid host addresses can be assigned to devices on a network. These devices include end-user devices such as computers, laptops, tablets, smartphones, IP phones, servers, printers, terminals, IP cameras, and network devices such as switches, routers , firewalls and proxy servers. In short, any device that uses the IP protocol for data transfer needs a valid host address.

Block size

The block size is the sum of the network address, valid host addresses, and the broadcast address. For example, if in a network there are 6 valid hosts, the block size of this network is 8 (1 network address + 6 valid hosts + 1 broadcast address).

Power of 2

An IP address is constructed from different combinations of IP bits. Understanding the number of combinations provided by the number of bits or getting the number of combinations we need is the second essential step of the subnet.

  • A combination of the 32 represents a unique IP address.
  • A combination of network bits in the IP address represents the number of networks or subnets.
  • A combination of host bits in the IP address represents the total number of hosts.

To find out how many combinations the number of bits provides or to get the number of combinations how many bits are needed, we use the power of 2.

For example, to break a single large network into 4 subnets, we need 2 (22 = 4) subnet bits. That way, if we have 3 subnet bits, we can create 8 (23 = 8) additional networks.

The following table lists the power from 2 to 32.

2X Value 2X Value 2X Value 2X Value
1 2 9 512 17 131072 25 33554432
2 4 ten 1024 18 262144 26 67108864
3 8 11 2048 19 524288 27 134217728
4 16 12 4096 20 1048576 28 268435456
5 32 13 8192 21 2097152 29 536870912
6 64 14 16384 22 4194304 30 1073741824
seven 128 15 32768 23 8388608 31 2147483648
8 256 16 65536 24 16777216 32 4294967296

In 2X the X is the number of bits.

Subnet management

The subnet always flows in one direction (from left to right) without skipping any bits. This simple rule gives us the exact location of the subnet bits in an address space. Let’s take an example.

A class C network is divided into 4 subnets. Find the number of host bits used in the subnet and their location in the address space.

To create 4 subnets, we need 2 (22 = 4) Subnet of eligible host bits.

Since in class C network space, the bits eligible for the subnet start at 25 and the subnet always goes from left to right without ignoring any bits, the bits used in this network are 25 and 26.

subnet management

Slash notation

It is a compact representation of the subnet mask. In this notation, a forward slash sign (/) and the total number of active bits in the subnet mask are written with the IP address instead of the full subnet mask.

The following table lists some examples of IP addresses with subnet mask in the three notations.

In Slash notation In binary notation In decimal notation
10.10.10.10/8 00001010.00001010.00001010.00001010
11111111.00000000.00000000.00000000
10.10.10.10
255.0.0.0
172.168.1.1/16 10101100.10101000.00000001.00000001
11111111.11111111.00000000.00000000
172.168.1.1
255.255.0.
192.168.1.1/24 11000000.10101000.00000001.00000001
11111111.11111111.11111111.00000000
192.168.1.1
255.255.255.0
192.168.1.1/28 11000000.10101000.00000001.00000001
11111111.11111111.11111111.11110000
192.168.1.1
255.255.255.240

Subnet type

There are two types of FLSM and VLSM subnets. In FLSM, all subnets have an equal number of host addresses and use the same subnet mask. In VLSM, subnets have a flexible number of host addresses and use a different subnet mask.

The following figure shows an example of FLSM and VLSM.

FLSM vs VLSM subnet

FLSM is easy to implement and simple to use, but wastes a lot of IP addresses. VLSM is difficult to implement and complex to use, but uses maximum IP addresses.

Several steps involve both types of subnets. Due to the length of this tutorial, I will explain the two types of subnets individually in the next parts of this article.

That’s it for this part. In the next part, we will learn how to perform a FLSM subnet step by step in detail with practical examples. If you have any suggestions or comments regarding this tutorial, let me know. If you like this tutorial, share it with your friends.

Author

Write A Comment