The mother address is X, have Y numbers of subnets (children), we already know 2 of the mother's children, they're: /20 [edited] /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.

  • BTW, apologizes to your mother, but the correct term is “supernet.”
    – Ron Trunk
    Jul 24 '20 at 11:36

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: = 00001010.00000001.11000000.00000000 = 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 = /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.

  • 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 (or ::/0). Regarding the administration, well, that's a totally different question.
    – JFL
    Jul 24 '20 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.