What Is Subnet Mask and How to Find Subnet Mask?
A subnet is a physical segment of a TCP / IP network that uses IP addresses with a common network identifier. To subdivide a network into multiple subnets, you must use a different network ID for each segment. Unique subnet IDs are created by splitting the host ID into two groups of bits.
The first of them serves to identify a segment of the interconnected network, the second – to identify a specific node. This mechanism is called subnet working. It is not necessary on an isolated network (i.e., not connected to the Internet).
IP Address Classes
The class system is used to more rationally define the size of the network. It allows distinguishing which part of the IP address refers to the network number and the host number. The class system uses the value of the first bit of the address. But such that the meanings of these first bits of the address are indications of which class a particular IP address belongs to.
Consider the table below. There are ranges of network numbers, as well as the maximum number of nodes corresponding to each class of networks:
|Class||The first bits||The smallest network address||The largest network address||Maximum number of nodes|
|A||0||220.127.116.11||18.104.22.168||2²⁴ (16 777 216-2|
If the sequence 1110 is the beginning of the address, then this address belongs to class D. It designates a special, group address which is called multicast. If the destination address is a class D address, then such a package is available to all nodes to which this address is assigned.
Sequence 11110 at the beginning of the address specifies its belonging to class E. Addresses of this class are reserved for future applications. Thus, it becomes obvious that large networks are assigned class A addresses, medium – receive class B addresses, and small – class C. The network number can be represented by the first 8, 16, or 24 bits, and the host number – by the last 24, 16, or 8 bits. It all depends on what class the address belongs to.
Subnet Masks in IP Addressing
We have already considered the traditional scheme of distribution of the IP address on node number and network number. The classification is based on the concept of class. The first few bits of the address determine the class. In this regard, it becomes obvious that since the first byte of the address 22.214.171.124 falls in the range 128-191, this address belongs to class B. The first two bytes, which are supplemented by two zero bytes 126.96.36.199, are the network number. Accordingly, the node number will be – 0.0.44.206. Experts note that determining the network numbers by the first bytes of the address also cannot be called a flexible and efficient mechanism for addressing. Therefore, it is recommended to allocate another feature that would help more flexibly define the boundary between the node number and the network number.
Subnet masks are widely used today as such a feature. A subnet mask is a binary number that contains units in those bits that belong to the extended network prefix. The subnet mask allows divides the IP address into two main parts: the subnet number and the number of a device. The mask describes the address space of the subnet, from which address the subnet begins and which ends. The mask is widely used in conjunction with the IP address but does not replace it. It is possible to allocate a node number from a network number by means of a mask quickly and effectively. The binary mask entry includes ones in those bits that are signified as the network number in the IP address and zeros in those bits that are defined as the host number. Each class has its own IP address. And it is usually used by default.
The network number is the whole part of the address. Consequently, the ones in the subnet mask must represent a continuous sequence.
For example, the address 188.8.131.52 corresponds to the mask 255.255.255.0. Therefore, the network number will be 184.108.40.206, although the rules of the class system establish a 220.127.116.11 network number.
How to Find Subnet Mask?
In modern IP routing, the mask mechanism is quite common. Subnet masks are actively used for various purposes. Due to subnet masks, an administrator can easily structure his network. In this case, additional network numbers are not required from the service provider.
Using a mask mechanism, service providers quickly combine the address spaces of multiple networks. This is due to the introduction of so-called “prefixes,” which allows to reduce the volume of routing tables and improve the performance of the routers in general.
Administrators and many other people who need to master computer networks often have the question of how to find a subnet mask. We will talk about this in detail below.
How to Detect a Subnet Mask if the IP Network Class is Known?
As mentioned above, there are five classes of IP addresses to date. It is not difficult to determine the class of an IP address. You just need to convert it to binary and pay attention to the beginning of the bit sequence. Based on this, you can set the subnet mask. Just remember the ranges that belong to the classes.
Is It Possible to Learn a Mask If a Prefix Is Known?
The mask is often written as a prefix. It indicates the number of bits in the network. The system of prefixes has been approved for a long time since the advent of CIDR. Its advantage is the absence of the need for classes, as well as the use of any number of IP bits to identify the network. If the prefix is known, you can easily set the subnet max according to the corresponding table.
In conclusion, we should note that it is also possible to find the subnet mask by using a VPN. This is an effective and fairly reliable method that many people use today.