What is the Subnet Mask used for and why is it so important on modern networks? Let’s find out together.
The subnet mask (or subnet mask), a parameter often ignored by all users who manually configure the IP address on the computer, always using 255.255.255.0 for the parameter in question. But why do we use this address for the subnet mask? What happens if we try to change this parameter?
In this guide we will show you what a subnet mask is and how it works on PCstrying to simplify as much as possible very complex concepts from an IT point of view (you just need to know that university exams are taken on subnets for the examination of networks, so we are talking about fairly complex topics).
READ ALSO -> Finding public IP and private IP and difference
What a subnet
The subnet is a subdivision that we operate within a larger network for make it easier to manage a large number of connected hosts. In fact, if we had 1000 computers to connect all to the same network, it would be much more convenient to divide them into many subnets, so as to manage the network “in groups” and immediately recognize the computers or subnets that have malfunctions, as well as facilitating access to a specific machine.
The subnet mask allows you to identify with absolute precision how many devices we can connect within a subnet and how many subnets we can create: for a subnet mask 255.255.255.0 we can connect 254 IP addresses for each subnet and create 65,536 subnets while creating a subnet mask 255.255.254.0 we can handle 510 IP addresses for single subnet and create 32,768 subnets.
As we “go up” with the subnet mask (ie we remove some bits from the mask) the number of available IP addresses and the number of computers we can connect to a single subnet increase, but the number of subnets we can create decreases. For the record, the smallest network that can be created has a subnet mask 255.255.255.252 and offers only two exploitable IP addresses.
How to find a website’s subnet mask
Those interested can quickly obtain the subnet mask of any website and consequently know how many servers can be used to provide access to that particular site or service. What we are going to do is just an exercise but allows you to understand how a subnet works.
Let’s take for example one of the IP addresses to which the Google site responds, that is 18.104.22.168; to obtain the subnet mask, simply enter this address in a site such as Whois and launch the search.
From the page that opens we will get how CIDR 22.214.171.124/15where the suffix /15 indicates the size in bits of the subnet mask used by Google for servers in Italy. Let’s take this CIDR address and insert it in the IP Subnet Calculator page, precisely in the text field next to the item Network address blocking.
We will get all the information on how the Google subnet serving Italy is made: the subnet mask used is 255.254.0.0there is only one subnet, they are usable 131,072 IP addresses and IP addresses are included in the range 126.96.36.199 – 188.8.131.52.
How to find the subnet mask of a LAN
The same experiment seen for websites we can also apply it to our LANespecially if this is large enough to require more subnets.
To understand how large is the subnet to which the PC we are using belongs, open the command prompt on Windows and type ipconfig /all. In the screen that will appear we look for the network card to which we are connected and obtain the address in Subnet Mask.
Let’s open the IP Subnet Calculator site again and choose the same subnet mask in the field Subnet Mask.
By choosing the right subnet mask from the list we can find out immediately how many devices we can connect to the single subnet and how many subnets we can still create for the subnet mask we are currently using.
Advantages and disadvantages of the subnet
The benefits of subnets are numerous and are also the reason why subnets exist on virtually any type of network (home and otherwise). The advantages of subnets are:
- Performance: with subnets we can manage traffic between groups of devices without having to use too many routers. This improves performance by reducing network congestion and accelerating inbound and outbound traffic.
- Organization: as already mentioned in the introduction, dividing the devices into subnets offers a higher level of organization and, in case of problems, it will be sufficient to intervene only on the problematic subnet.
- Safety: if a virus begins to spread in a subnet it is possible to isolate it, so as to make only the other subnets still immune to work. You then isolate the problem subnet and try to remove the threat without blocking the entire network.
The disadvantages are related only to the technical difficultiessince very high computer skills are still required to be able to operate two networks on the same subnet mask without causing them to conflict with each other.
Many users at this point of the guide will ask themselves: but in the home is it useful to know all this? Although the subnet mask on modems and home routers is always 255.255.255.0know how it works and why it is so useful it will make it much easier to create a router cascade, since with this subnet mask we can create more than 65,000 subnets! .
There is no need to create all these subnets but, by using the same subnet mask on both routers, we can separate the network into 192.168.1.1 e 192.168.2.1leaving the devices present in each router to be well separated and accessible from each other only under certain conditions.
To learn more, we can also read our guide on how connect a new router to the modem without changing networks.