Subnetting: What is Subnet Mask?

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.

In this networking tutorial, you will learn:

Why Use Subnetting?

Here are important reasons for using Subnetting:

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.

represent network 0 represent hosts

Two types of subnet masks are:

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.

How to identify which class the IP address belongs to

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.

1) Straight

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

Class Default subnet mask No. of networks No. of host per network
A 255.0.0.0 256 16,777,214
B 255.255.0.0 65,536 65,534
C 255.255.255.0 16,77,216 126

Important formulas to determine the subnets

Use the 2s - 2 formula and do not use the zero and broadcast ranges if:

Use the 2s formula and use the zero and broadcast ranges if:

Summary:

 

YOU MIGHT LIKE: