G
G
graf_Alibert2021-09-14 14:27:17
Computer networks
graf_Alibert, 2021-09-14 14:27:17

Why are 192.168.1.0/23 and 192.168.0.0/23 the same thing?

There is a network 192.168.1.0/23, why the IP addresses of hosts in it start with 192.168.0.1, as if we took the network 192.168.0.0/23, i.e. network range: 192.168.0.0 - 192.168.1.255 instead of 192.168.1.0 - 192.168.2.255. And so with all the odd "subnets"

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
Rsa97, 2021-09-14
@graf_Alibert

You simply do not understand the meaning of the short mask notation.
/23 means that the first 23 bits of the mask are 1 and the last 32-23 = 9 bits are 0.
Thus, the mask will be 11111111.11111111.11111110.00000000 = 255.255.254.0
Now let's expand your addresses bit by bit:

Маска:   11111111.11111111.11111110.00000000 = 255.255.254.0
Адрес 1: 11000000.10101000.00000000.00000000 = 192.168.0.0
Адрес 2: 11000000.10101000.00000001.00000000 = 192.168.1.0
To translate these addresses on the network, you need to perform a bitwise logical AND of the address with a mask. Get
192.168.0.0 & 255.255.254.0 = 192.168.0.0
192.168.1.0 & 255.255.254.0 = 192.168.0.0
Thus, both addresses are included in the same network of size /23.
The correct designation for this network is 192.168.0.0/23.

M
Maxim Grishin, 2021-09-14
@vesper-bot

Recall the binary AND operation that is performed on an address and a mask to get the base address of a network. The /23 mask is 11111111 11111111 11111110 00000000, for reference. And since .1.x and .2.x differ not only in those bits where the /23 mask is zero, the addresses end up on different subnets with this mask.

Z
Zzzz9, 2021-09-14
@Zzzz9

Just look at those octets in binary and the mask too. Decimal numbers are used for ease of notation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question