alemangui wrote:
I realised I was counting the same IPv4 addresses many times, by adding those of 4.0.0.0/8 and 4.0.0.0/9 and 4.21.103.0/24 despite being most the same. So I am a little stuck here. I wonder if there is another way to see the routed addresses in the IPv4 world, or if there is an approach I should take towards analising the Internet routing table.
I would recommend converting the IP address range into a DWORD integer range. This will allow you to perform numeric comparisons on the address ranges. For example: In your example you find both the 4.0.0.0/8 and 4.21.103.0/24 ranges. Lets convert them to DWORD ranges and check for overlap. [4.0.0.0/8] 4.0.0.0 == 67108864 4.255.255.255 == 83886079 [4.21.103.0/24] 4.21.103.0 == 68511488 4.21.103.255 == 68511743 You can easily see that 68511488 is greater than 67108864 and 68511743 is less than 83886079. So the 4.21.103.0/24 address range can be identified as a redundancy and therefore be eliminated. Best Wishes, -David Delaune