K
K
KTG2019-06-20 20:47:18
Computer networks
KTG, 2019-06-20 20:47:18

How to determine the subnet mask by IP range (I don’t understand something)?

I want to make a subnet for 1000+ addresses.
Those. 192.168.101.1 to 192.168.104.254 The online
calculator gives the mask: / 20 -
255.255.240.0 .101.0/22 ​​First host address: 192.168.100.1 Last: 192.168.103.254 Addresses (hosts): 1022 Actually how to limit the subnet to addresses: 192.168.101.1 - 192.168.104.254 So that they do not climb into the 100th subnet.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry, 2019-06-20
@KTG

1) First, we determine the "length" of the network (how many hosts are needed on the network) - 1000 hosts are placed on the /22 network (1024 addresses are the address of the network and broadcast)
2) It does not fit exactly on your range: or take 192.168.96.0/22 ​​( 192.168.96.1-192.168.99.254) or 192.168.100.0/22 ​​(192.168.100.1-192.168.103.254)
If for academic purposes (read - a question on an exam / interview / etc.) - then the correct answer is 192.168.96.0/20, since this is the minimum subnet of 1000 addresses that falls under your range.

B
brar, 2019-06-20
@brar

No way. Think of it as constant values.
It will be easier for you to understand if you translate the subnet address and host ID into binary system. If the mask is less than 24 bits, the host identifier is shifted to the left of the dot 4 octets, and this is clearer in binary than in 10.
To make it even easier to understand, let's write your task using a 24-bit mask as an example.
You say I want a subnet of 254 hosts, which is /24. But how to do it so as not to climb into the range 192.168.0.1-192.168.0.11

V
Valentin, 2019-06-20
@vvpoloskin

If you operate only with a mask and there is a restriction on one network, then nothing. In your case, the third octet of the Asya network address must be a multiple of four.

M
Maxim Korneev, 2019-06-23
@MaxLK

in the range 192.168.0.0 it is impossible to create a network of more than 254 hosts - this is class C. If you need 1000 hosts, you need to choose networks either 172.0.0.0 or 10.0.0.0. Creating a network for 1000 hosts is the deepest mistake, such a network will be bent under broadcast traffic, it will eat up more than 50% of the available bandwidth. Unless you beat it into subnets with routing between them.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question