B
B
BlagoYar Silence2021-06-14 13:46:57
Network administration
BlagoYar Silence, 2021-06-14 13:46:57

Why are subnet masks needed?

Why do we need for example / 24 or / 16, etc.
if you can specify the maximum?

PS. This affects performance or something I do not understand.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
vreitech, 2021-06-14
@BlagoYar

subnet masks are used to indicate the size of a subnet. the subnet size must be specified in order to indicate to the network stack which address range belongs to the broadcast domain and does not require routing, and which addresses belong to other networks so that packets are routed to them through the routing table (default gateway or other gateways, subnets for which are also specified using the subnet mask).
the maximum can be specified only if it can be specified, and if it cannot be specified, then it cannot.
subnet masks do not affect performance directly.

R
Rodion Kudryavtsev, 2021-06-24
@rodkud

if in a simple way, on the fingers, then, by its mask, the host determines whether it needs the help of a router to access the destination ip, or is it its native network and it can access this dest ip

F
fpir, 2021-06-24
@fpir

This is rather not an answer why they are needed, but an answer, why understand why they are needed. It just happened 2 days ago.
There is a certain office with remote branches. The gateways on it are microtics connected to each other by oEIP tunnels and all branches are located in 21 subnets. Accordingly, the first branch has a gateway of 0.1, the second has 1.1, and so on.
So, yesterday the Internet was. today it doesn’t work (more precisely, it works for some, for others it doesn’t), they didn’t do anything, they didn’t change anything. After several hours of dancing with a tambourine, the story turned out: in the branch, where the gateway was a microtic with an internal ip 2.1, they bought a household dlink router to distribute Wi-Fi, plugged the lan port into the switch and everything worked for them. Guess what ip he had by default? Fortunately, the branch was half an hour away and the closest. So, after cutting off all ports, except for one in the first office and several arp cache resets, we went there right away. And there was a branch and for a couple of thousand kilometers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question