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 a 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 0 and 99 and computers 0 and 99 and computers are not allowed to be assigned.
We could use the following arrangement to create our label:
- computer 11, classroom 24
We just need to select one and tell everyone about the labeling scheme there are a lot of possible permutations.
Let’s suppose we went to 2411, where 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, a network and node component are divided into two components by an IP address.
The 10.0.2.1 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, C 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 Class||First IP Address of class||Last IP Address of class||Default Subnet Mask||Default Network bits||Host bits||Reserved host bits|
|A||0.0.0.0||127.255.255.255||255.0.0.0||First 8 bits||9 to 30||31, 32|
|B||184.108.40.206||220.127.116.11||255.255.0.0||First 16 bits||17 to 30||31, 32|
|C||192.0.0.0||18.104.22.168||255.255.255.0||First 24 bits||35 to 30||31, 32|