Subnet calculator

Add to website Metainformation

Other tools

IP subnet calculator

IP subnet calculator

A device's IP address is a unique identifier that contains information about the location of this device and the degree of its availability for contact with it.

The presence of an IP address for devices is a prerequisite for the exchange of information between them. For a simplified understanding of the term “IP address”, we can draw an analogy with a well-known postal address, which allows delivering a letter or parcel to a strictly defined addressee. A similar process occurs when sending information (messages) from one device to another. In this operation, the role of the postal address is played by the IP address. The abbreviation IP stands for "Internet Protocol" and refers to a set of rules that determine the format of the data we send over the Internet (local area network).

IP address device specifics

The standard IP address that we can see on the network is a set of numbers divided into 4 groups using dots.

192.168.0.1 is the most common IP address for most routers and modems. Many of us have repeatedly entered this combination of characters to enter the modem or router settings menu.

In the above address, we have 4 numbers, each of which is represented as an octet - an eight-digit binary number. Its values can be described in the range from 0000 0000 to 1111 1111. Also, the description can be written in decimal notation and have a range from 0 to 255 (256 values).

In this case, the address range is 0.0.0.0 to 255.255.255.255. When counting all possible entries, that is, IP addresses, we get the number 4,294,967,296.

The above record format is called IPv4 and is the standard 32-bit form of an address. Currently, it is the most popular and in demand on the network. However, IPv4 is not the only one possible, there is also a 128-bit standard called IPv6. The number of addresses in this format has such a value that it can provide trillions of addresses for every inhabitant of our planet.

In our description, we will adhere to the IPv4 standard, however, all the rules and principles are quite relevant for IPv6.

Composition of the IP address

A standard IP address is not just a set of numbers, this entry contains information, and structurally it can be divided into two parts:

  • host numbers,
  • network number.

For example, the familiar 192.168.1.34 address entry contains the following information:

  • 192.168.1 — network number,
  • 34 is your device (host) number.

By the way, all devices on the same network will start at 192.168.1. If the IP address of the device contains the entry 192.168.2, then it will not be able to contact the previous device (192.168.1). To connect such devices to each other, you will need a separate router that will ensure this task is completed. This router will act as a bridge - data from one network will be able to get through it to another network.

IP address classification

In order to streamline work with IP addresses, they are classified according to the following types.

  • Class A - large networks.
  • Class B - medium networks.
  • Class C - small networks.
  • Class D - reserved addresses of the format 127.0.0.0 (localhost).
  • Class E - reserved addresses in the format 192.168.X.X. (ID of modems and routers).

Despite the seemingly huge number of available IP addresses, there is a dearth of them compared to the number of devices (hosts) on the network. This problem led to the transition to the active use of IP-addresses of the IPv6 standard in the work of Internet providers. However, if an address in IPv4 format is easily converted to IPv6, then it is no longer possible to convert it back to IPv4.

Given that not all providers have transferred their subscribers from the IPv4 format to the IPv6 format, there is a dominance of both addresses in the network. The problem with this combined use of different standards is their incompatibility, and to solve it, a special algorithm called "tunneling" is used. It consists in creating a special channel through which devices with different IP address standards can exchange information.

Knowing the features of the IP address device is a prerequisite if you need to independently design networks, as well as when solving a number of other tasks related to setting up the Internet and local networks.

Subnet mask calculator

Subnet mask calculator

A subnet mask is a special algorithm that allows you to extract the network number and device (host) number from an IP address. Visually, the subnet mask entry can be easily confused with a regular IP address, but, in reality, its designation contains a sequence of ones and zeros, showing how many bits in the IP address are occupied by the network number, and how many bits are by the device (host) number.

In addition, with the help of this algorithm, several subnets are created within a single large network. If this method is implemented, subnets can be connected using one computer that acts as a router. This approach allows hosts from different networks to connect to each other.

What is a subnet mask and how to calculate it

A subnet mask, like an IP address, consists of four numbers: 255.255.0.0.

The beginning of the entry visually resembles the format of an IP address. If the above entry is represented in binary code, then the following sequence will be obtained: 1111 1111 0000 0000. In this entry, zeros provide information about the device (host) number, and ones - about the network number.

To create a mask, as a rule, use the logical operators "AND" and "NOT". Knowing how they work, we can practically get the subnet mask from any given IP address.

How the subnet mask is chosen

In most cases, the subnet mask is set programmatically. This can be done when configuring the server or system. In order for the user to find out the subnet mask, you need to find its description, which can be found in the advanced network settings.

The mask contains information about the number of bits in the network number. For example, for a large network, only the first number is a number: 255.0.0.0. For a small network, the entry 255.255.255.0 will be relevant, in which the network number is indicated by the first three numbers.

Another way subnet masks are used

Highlighting device and network numbers using a subnet mask is not their only useful feature.

Using this algorithm, it is possible to divide large networks into smaller ones. For example, we can use this opportunity when we are faced with the task of dividing the general network of the company into departments and offices that are separated from each other, but located in the same building.

Let's say we have a network number of 185.12.0.0 with a mask of 255.255.0.0. This network is capable of providing more than 65,000 devices, which is enough to accommodate all computers in one office.

But what to do when we have several small offices in the same building, and we need them all to be connected to the network? Creating a new network with tens of thousands of IP addresses for each individual office is a rather irrational solution. Therefore, we believe that the most practical way out of the situation is to break the 185.12.0.0 network into separate subnets.

To implement this task, we take the mask 255.255.255.0 instead of 255.255.0.0. As a result, we will have 256 small subnets within one large one. Each subnet is capable of supporting 256 devices.

For an office with more devices, we can use the mask 255.255.254.0. This will allow us to connect up to 512 devices to the network, however, the number of subnets will decrease to 128.

How to count subnets

It often becomes necessary to calculate the subnet mask - this is relevant for cases when it is important for us to determine the number of IP addresses in one subnet, or to configure devices such as a modem, router, and so on.

For those who want to calculate the number of subnets manually, you can use the universal basic formula:

232 - N - 2,

where N is the length of the subnet (number of bits).

However, rarely does anyone count the number of subnets manually, because for this purpose there are special calculators on the network that allow you to make all the calculations online.

Calculating a subnet mask is a fairly complex task, for the implementation of which you need to know the basics of building networks. However, to simplify this task, experts have created special calculators that can greatly simplify the task of calculating the subnet mask in the presence of all the initial data.