The practice of Subnetting is to divide a network into two or more smaller networks. It increases routing efficiency, improves network security and reduces the domain size.

Analogy of Subnets

Like an analogy, we need to divide school into classrooms.

Why divide it into classrooms, however?

The answer is to stop the interference of the classes.

Suppose, each classroom now has a computer desk and we have to create a computer labeling system.

We now have a maximum of 30 students and computers in 30 classrooms.

For example, if we want to assign numbers to our classrooms and computers: computer 11, classroom 24

For the classroom, we need two digit numbers that allow up to 100 classrooms(0-99)

We need two digits to allow up to 100 computers(0-99) for the computer.

In addition, we have no more than 98 classrooms and 98 computers, which can be provided for your specific requirements, if you say that classroom numbers and 99 and computers and 99 and computers are not allowed to be assigned.

We could use the following arrangement to create our label:

  • computer 11, classroom 24
  • 24-11
  • 11-24
  • 2411
  • etc

We just need to select one and tell everyone about the labeling scheme there are lot of possible permutations.

Let’s suppose we went to 2411where the classroom was 24 and the computer was 11.

So we now know that this is class 2 and computer 23 when we see the following 0223.

We do this easily when we know the labeling scheme.

Subnetting and IP addresses

As with our classroom model, network and node component are divided into two components by an IP address.

The address is therefore divided into the network plus the node.

This is the 10th, 10.2 or 10.0.2 network?

Well, the number of bytes allocated to the network-component was defined in early IPv4 network address classes.

Class A, B, were the principal classes. With the following allocation:

  • Class A network,node,node,node
  • Class B network,network,node,node
  • Class C network,network,network,node

You had to check the most important byte ( to the far left) for the class.

  • 0-127 Class A
  • 128-191 Class B
  • 192-ccc Class C

The Subnetting cannot use reserved network bits and host bits.

IP ClassFirst IP Address of classLast IP Address of classDefault Subnet MaskDefault Network bitsHost bitsReserved host bits
A0.0.0.0127.255.255.255255.0.0.0First 8 bits9 to 3031, 32
B128.0.0.0191.255.255.255255.255.0.0First 16 bits17 to 3031, 32
C192.0.0.0223.255.255.255255.255.255.0First 24 bits35 to 3031, 32