Computers, Information Technology
What is a subnet mask? IP address and subnet mask
As you know, every computer, no matter what network it is, has a certain digital address, called an IP address. Naturally, this rule is relevant only for networks based on the TCP / IP protocol, however, today almost any network is based on it. Anyway, in addition to this address, the network workstation has several other parameters that affect its interaction with other devices. First of all, one of them is a network mask, which we will discuss in this article.
Subnet mask, gateway and address ...
If you try to get information about the current connection, then in addition to the IP address allocated to your computer, you will also see such fields as the subnet mask, the default gateway, and one or several CSN servers, or rather their addresses. For an uninitiated person, all these data represent only a heap of numbers, but if you are planning on configuring computer networks based on the TCP / IP protocol, you need to know a little more about these indicators.
A few words about IP-addresses
Before diving into the jungle and explaining what a subnet mask is, you should remember what an IP address is: what the numbers in it are and what values they can take. In advance, we will specify one point: all information in this article will concern the IPv4 protocol, since it is still the most "current" one.
About local addresses
Gateway
What is the subnet mask for?
So, we got close to the question of what a subnet mask is. In fact, this is a brief reference about which computers are on the same network as yours, and which ones require a gateway to connect. A mask is a kind of pattern that the computer superimposes on the IP address with which it wants to connect. If the pattern "falls flat", then everything is fine, if not - the request is sent to the device specified in the network settings as the default gateway.
What does the subnet mask look like?
If you are an average user of a home network consisting of several computers that has a gateway to access the Internet, then your subnet mask, most likely, looks like this: 255.255.255.0. These numbers are the so-called subnet mask 24, which indicates that if the first three digits in the IP address of the computer match your address, it is directly accessible.
Can I find out the subnet mask?
Despite the fact that this question has little meaning, users do not stop asking it to search engines. It is almost impossible to determine the IP subnet mask by IP, because, based solely on the IP address, it is impossible to say exactly which scale a local or distributed network has. In some cases, information about the gateway can help, for example, if your computer has an address of 192.168.1.2 and the gateway is 192.168.0.1, then the subnet mask must be at least 255.255.0.0, otherwise the gateway will be unreachable.
About the price of errors
And what can happen if you make a mistake? Proceeding from the fact that we now already know what a subnet mask is, one can confidently state that if it is set incorrectly, there is a high probability that your computer will be cut off from the outside world. For example, if you enter 0.0.0.0 as a mask, then the operating system will treat any IP address as local and will not even attempt to use the gateway, which will result in the loss of the ability to communicate with computers outside your local network.
If you make another mistake by specifying a too "tight" subnet mask, then your computer may start experiencing problems already with connecting to "neighbors" over the local network - even if you access local IP, the subnet mask will indicate that access To it is possible only through the gateway, and this can lead either to an increased load on the network, or to the absolute inaccessibility of computers in the "locale".
Subnet masking options
Different operating systems use appropriate approaches to the formulation of the network mask. While in Windows standard writing is considered to specify four eight-bit numbers, other operating systems, in particular those based on Unix, use a record based on specifying the IP address of the workstation, as well as the number of bits that must remain static.
And what about the more conventional version of the subnet mask that is used in most intra-apartment LANs? The conversation, of course, is about 255.255.255.0. If you carefully read this article, then about this mask the conversation was already going, and the number of its fixed bits is 24 (i.e. the first three numbers of 8 bits).
Thus, you can perform a simple logical chain - for each fixed number there are 8 bits, which means that the same 255.0.0.0 will be written as / 8, since only the first number is fixed in it.
As for the intermediate variants, for example, 255.255.255.128, their bit rate is also easily computable, in this case it is 25-25 bits of the first three fixed numbers, and also one more bit dividing the segment from 0 to 255 exactly in half.
If you need more options and examples, you can always turn your attention to specialized sources. On their pages, devoted to the topic of our article, there is a table of subnet masks, which includes almost all possible variants of composing these sequences.
Similar articles
Trending Now