What is a subnet mask?

The subnet mask is a 32-bit address used to distinguish between the network address and the host address in the IP address. The subnet mask determines which part of the IP address is the network address and the host address.

What is a subnet mask?

The subnet mask is a 32-bit address used to distinguish between the network address and the host address in the IP address. The subnet mask determines which part of the IP address is the network address and the host address. They are not displayed inside data packets traveling over the Internet. They carry the destination IP address that the router will match to a subnet.

Picture 1 of What is a subnet mask?

There are two types of subnet masks:

  1. The default subnet mask is the number of bits reserved by the address layer. Using this default mask will provide a unique network subnet in the relative layer.
  2. Custom subnet masks can be defined by the administrator to provide multiple networks

How to use subnet mask?

The subnet mask is used by the router to hide the network address. It indicates which bit is used to identify the subnet.

Each network has its own unique address, Like here, the Class B network has network address 172.20.0.0, which has all zeros in the host part of the address.

Example IP address: 11000001. Here the first and second bits are 1 and the third bit is 0; so it's Class C.

Picture 2 of What is a subnet mask?

The example above shows how to interpret the IP address structure, which makes it easier for Internet routers to find the right network to route data in. However, in a Class A network there can be millions of devices connected, and it can take a while for the router to find the right device.

Methods of subnet mask

The subnet mask process can be divided into two methods: Direct or reduced.

1. Directly

You should use the binary notation method for both the address and the mask, and then apply the AND function to get the block address.

2. Shorten

  1. In case the byte in the mask is 255, you need to copy the byte in the destination address.
  2. When the byte in the mask is 0, then you need to replace the byte in the address with 0.
  3. When the byte in the mask is neither 255 nor 0, then you should write the mask and address in binary and use the AND function.
  4. Use in case if extracted network address matches local network ID and destination is on local network. However, if they do not match, the information must be routed outside the local network.
Class Default Subnet Mask Number of networks Number of hosts per network
A 255.0.0.0 256 16,777,214
REMOVE 255.255.0.0 65,536 65,534
OLD 255.255.255.0 16,77,216 126

Important formulas for determining subnet

Use the formula 2s – 2, do not use range 0 and broadcast if:

  1. You can use the full routing method.
  2. RIP version 1 is used
  3. The no IP subnet-zero command is configured on your router.

Use the 2s formula, range 0 and broadcast if:

  1. You can use the VLM approach or classless routing.
  2. RIP version 2. EIGRP. or OSPF is used
  3. The IP subnet-zero command is configured on your router.

What is Subnetting?

Subnetting is a way of dividing a network into two or more smaller networks. It increases routing efficiency, enhances network security, and reduces the size of broadcast domains.

IP Subnetting specifies 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 are stored in the routers. This method also helps you to expand your existing IP address base and restructure IP addresses.

Why Use Subnetting?

Here are important reasons to use Subnetting:

  1. It helps you maximize IP address efficiency.
  2. Extend the life of IPV4.
  3. Public IPV4 addresses are scarce.
  4. IPV4 Subnetting reduces network traffic by eliminating conflicting and broadcast traffic, thus improving overall performance.
  5. This method allows you to apply network security policies at the connection point between subnets.
  6. Optimize IP network performance.
  7. Facilitating large geographical distances.
  8. Subnetting helps to allocate IP addresses to prevent a large number of IP network addresses from being used.
  9. Subnets are often geographically set up for specific offices or groups within a business, allowing their network traffic to reside within that area.
Update 27 June 2023
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile