What is subnetting?
Why do we need subnetting?
What is the benefit of subnetting?
I know there are a whole lot of questions running in your mind right now.
Hold on, You will get to know all the answers by the end of this post.
Hold on, You will get to know all the answers by the end of this post.
Let's dive in.
What is Subnetting?
In simpler terms, The process of dividing a larger network into smaller sub-networks is called 'Subnetting'.
These smaller sub-networks are called 'subnets'.
The formal definition says, The process of converting host bits to network bits is known as Subnetting.
Now that you've understood what subnetting is, let's now see what is the cause for subnetting.
Why do we need Subnetting?
We all know that an IP address is a combination of a network ID and Host ID.
IPv4 address is of 32 bits.
Class A IP consists of 8 bits of network id and 24 bits of host id.
Class B IP consists of 16 bits of network id and 16 bits of host id.
Class C IP consists of 24 bits of network id and 8 bits of host id.
So, Class A IP has the capacity to hold 2^24 - 2 = 16,777,214hosts (As there are 24 bits in host id part)
Class B IP has the capacity to hold 2^16 - 2 = 65,534 hosts (As there are 16 bits in host id part)
Class C IP has the capacity to hold 2^8 - 2 = 254 hosts (As there are 8 bits in host id part)
Everything's fine till here.
Now the scenario comes, Imagine I want to build a network that will support up to 30 devices in four different segments. Without subnetting, I will need four (4) Class C networks to support this design. For example:
Network #1: 192.168.1.0
Network #2: 192.168.2.0
Network #3: 192.168.3.0
Network #4: 192.168.4.0
Each of these networks will support 254 IP addresses leading to wastage of (254 * 4) – (30 * 4) IP addresses i.e. 896 IP addresses!
If you look at the design requirement of 30 hosts per network, you will discover that I only need 5 bits in the host ID portion of a Class C network to satisfy my requirement.
That is, 2^5 - 2 = 30 hosts.
This means I still have 3 bits unused and with subnetting, I can use those three bits to create smaller networks. For this example, let’s take the 192.168.1.0 network:
By borrowing 3 bits, I can create 8 subnets:
192.168.1.0
192.168.1.32
192.168.1.64
192.168.1.96
192.168.1.128
192.168.1.160
192.168.1.192
192.168.1.224
With subnetting, not only have we used only one Class C network, we have created 8 subnets from that network, each one supporting up to 30 hosts! We can use 4 of these subnets for our network and reserve the remaining 4 subnets for future expansion. This results in great waste reduction – from 896 wasted IP addresses to 120 reserved IP addresses.
I know it seems so messy to understand if you are a beginner, but it becomes so easy with repetition.
Benefits of Subnetting:
- Minimises the wastage of IPs.
- Maintenance is easy for smaller networks.
We will discuss the types of subnetting and other topics related to subnetting in future posts.
Comments
Post a Comment