What is Subnetting?
Subnetting is the practice of dividing a network into two or smaller networks. It increases routing efficiency, which helps to enhance the security of the network and reduces the size of the broadcast domain.
IP Subnetting designates high-order bits from the host as part of the network prefix. This method divides a network into smaller subnets.
It also helps you to reduce the size of the routing tables, which is stored in routers. This method also helps you to extend the existing IP address base & restructures the IP address.
Why Use Subnetting?
Here are important reasons for using Subnetting:
- It helps you to maximise IP addressing efficiency.
- Extend the life of IPV4.
- Public IPV4 Addresses are scarce.
- IPV4 Subnetting reduces network traffic by eliminating collision and broadcast traffic and thus improves overall performance.
- This method allows you to apply network security policies at the interconnection between subnets.
- Optimized IP network performance.
- Facilitates spanning of large geographical distances.
- Subnetting process helps to allocate IP addresses that prevent large numbers of IP network addresses from remaining unused.
- Subnets are usually set up geographically for specific offices or particular teams within a business that allows their network traffic to stay within the location.
What is Subnet Mask?
A subnet mask is a 32 bits address used to distinguish between a network address and a host address in IP address. A subnet mask identifies which part of an IP address is the network address and the host address. They are not shown inside the data packets traversing the Internet. They carry the destination IP address, which a router will match with a subnet.
Two types of subnet masks are:
- The default Subnet Mask is the number of bits which is reserved by the address class. Using this default mask will accommodate a single network subnet in the relative class.
- A Custom Subnet Mask can be defined by an administrator to accommodate many Network
How to Use a Subnet Mask?
The subnet mask is used by the router to cover up the network address. It shows which bits are used to identify the subnet.
Every network has its own unique address, Like here, class B network has network address 172.20.0.0, which has all zeroes in the host portion of the address.
Example IP address: 11000001. Here 1st and 2nd bits are 1, and the 3rd bit is 0; hence, it is class C.
Above example shows how IP addresses should be deconstructed, which makes it simple for Internet routers to find the right Network to route data into. However, in a Class A network there could be millions of connected devices, and it could take some time for the router to find the right device.
Methods of Subnet Masking
We can subnet the masking process in two ways: Straight or Short-cut.
You should use the binary notation method for both the address and the mask and then apply the AND operation to get the block address.
2) Short-Cut Method
- In case the byte in the mask is 255, you need to copy the byte in the destination address.
- When the byte in the mask is 0, then you need to replace the byte in the address with 0.
- When the byte in the mask is neither 255 nor 0, then you should write the mask and the address in binary and use the AND operation.
- In case if the extracted network address matches the local network ID, and the destination is located on the local Network. However, if they do not match, the message must be routed outside the local Network.
|Class||Default subnet mask||No. of networks||No. of host per network|
Important formulas to determine the subnets
Use the 2s – 2 formula and do not use the zero and broadcast ranges if:
- You can use classful routing method.
- RIP version 1 is used
- The no IP subnet-zero command is configured on your router.
Use the 2s formula and use the zero and broadcast ranges if:
- You can use a classless routing or VLM method.
- RIP version 2. EIGRP. or OSPF is used
- The IP subnet-zero command is configured on your router.
- IP subnetting is the practice of dividing a network into two or smaller networks.
- Subnetting helps you to maximize IP addressing efficiency.
- A subnet mask is a 32 bits address used to distinguish between a network address and a host address in IP address.
- The subnet mask is used by the router to cover up the network address. It shows which bits are used to identify the subnet.
- Two way to subnet the masking process are: 1) Straight 2) Short-cut Method.