0

The mother address is X, have Y numbers of subnets (children), we already know 2 of the mother's children, they're:

10.1.192.0 /20 [edited]

10.1.240.0 /20

Is it possible to know the value of X and Y according to the given details?

I hope you can understand what I mean.

Mathew
  • 3
  • 1

1 Answers1

3

Yes, we can calculate the smallest supernet that contains 2 given networks (or any number of networks).

The easiest way to do this is in binary (yes really):

First convert your two addresses in binary:

10.1.192.0 = 00001010.00000001.11000000.00000000
10.1.240.0 = 00001010.00000001.11110000.00000000

As you can see, the part that is common to this two addresses is 00001010.00000001.11 which is 18 bits long.

So we now we are looking for a /18 network.

To get the network address we take those 18 bits and complete to 32 bits with trailing zeros and we get:

00001010.00000001.11000000.00000000 /18 = 10.1.192.0 /18

Now to calculate your Y value, assuming subnet of equal size, i.e. /20, this boil down to "how many /20 subnet do we have in a /18 network".

To calculate this we the take the size difference and square it.

20 - 18 = 2
2^2 = 4 = Y => we have 4 /20 subnets.

JFL
  • 19,405
  • 1
  • 32
  • 64
  • 1
    While your arithmetic is sound, you can't know whether a supernet actually *exists* (ie. whether it is administrated by a single entity) or if it is (much) larger even. – Zac67 Jul 24 '20 at 12:55
  • @Zac67, from a pure IP perspective, a supernet always exist, up to 0.0.0.0/0 (or ::/0). Regarding the administration, well, that's a totally different question. – JFL Jul 24 '20 at 13:03