P
P
Phorcys2021-05-09 23:46:55
Computer networks
Phorcys, 2021-05-09 23:46:55

How to correctly calculate the number of subnets?

It always seemed to me that, for example, on the network: 192.168.0.0/25 (255.255.255.128) there are two subnets - 192.168.0.0 and 192.168.0.128, but I'm testing on one well-known site and it gives me completely different values ​​​​- 512 subnets in the above example, well, or see another example in the picture:
6098498527082912184705.jpeg
Apparently I don’t understand something in networks, so I want to understand it, otherwise I’m completely confused now :(

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2021-05-10
@Phorcys

This is because the question is poorly written.
In fact, you are being asked how many subnets with the specified mask can be on a network with a class to be determined from the address.
That is, 192.168.0.0 is class C, range 192.168.0.0-192.168.255.255.
Therefore, 16 bits can be changed, of which 7 are cut off by the /27 mask.
There are 9 bits left, which gives 2 9 = 512 subnets.
But, in general, the question is outdated, since categorization was abandoned in 1993 and classless CIDR addressing is used.

I
igorzakhar, 2021-05-11
@igorzakhar

For example in the picture:
number of hosts (mask with /28 prefix) = 14: 32-28 = 4; 2^4 = 16-2(1 network address and 1 broadcast address) = 14 hosts per subnet.
Number of subnets: 16-4=12; 2^12 = 4096.
In case of 192.168.0.0/25: 32-25=7; 2^7=128 hosts, but actually 126 hosts per subnet. -1 for the network address and -1 for the broadcast address. Subnets: 16-7=9; 2^9=512 subnets.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question