Suppose I have these 3 IP Prefixes :

and I want find the aggregate prefix.

I convert each address to its' binary equivalent:


And we see that the common pattern lasts until the end of the third octet (24 digits). So shouldn't the aggregate be ? Why is it ?


Looking at the prefixes without their length is not sufficient. You need to make sure that you don't inadvertently aggregate subnets in between.

One method would be to decrease a prefix length by one bit and check if the resulting prefix encompasses more/all other subnets.

In your example,

A. ( -
B. ( -
C. ( -

A and B can be cleanly aggregated to Note that also includes an additional subnet, which may or may not be a problem. also includes the entire subnet. You're not giving a clue to why that should be required.

| improve this answer | |
  • I'm reading the book TCP/IP Illustrated and it has a very incomprehensible example. So if the addition of the subnet isn't a problem then for those 3 subnets the correct aggregate is right ? – NickDelta Oct 6 '19 at 10:23
  • Yes. I've broken down the subnets into start/end addresses above. I hope it makes it easier to comprehend. – Zac67 Oct 6 '19 at 11:04
  • I've just pulled the book and that's pretty much what it says in there, too. – Zac67 Oct 6 '19 at 11:16
  • I just couldn't understand why the should be added. You made me get that this subnet is an extra. Thank you very much. – NickDelta Oct 6 '19 at 11:35

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