network_info icon indicating copy to clipboard operation
network_info copied to clipboard

(minor) multiple root nodes of the allocation tree

Open aaronkaplan opened this issue 4 years ago • 4 comments

Due to the import of multiple RIR files (afrinic, apnic, ripe, arin) we end up with multiple "root" nodes of the allocation, i.e.: multiple entries of 0.0.0.0/0:

 193.0.0.0/8 | RIPE-CIDR-BLOCK | AU                                | Not allocated by APNIC                               | MAINT-APNIC-AP |         | 2008-09-04 06:51:29 | apnic
 0.0.0.0/0   | IANA-BLK        | EU # Country is really world wide | The whole IPv4 address space                         | AFRINIC-HM-MNT |         |                     | afrinic
 0.0.0.0/0   | IANA-BLOCK      | AU                                | General placeholder reference for all IPv4 addresses | MAINT-APNIC-AP |         | 2008-09-04 06:51:49 | apnic

Proposal: the supplied SELECT statements should either dedup these or... we leave it as is (and every user needs to dedup) or we create a UNIQUE index on block.inetnum..

What's the best way to approach this? As a user of the DB , I would implicitly assume there is only one entry per inetnum and it's assigned to one of the RIRs.

aaronkaplan avatar Jun 24 '20 07:06 aaronkaplan

I think I will simply merge the entries and prepend the single fields with the source

firefart avatar Jun 25 '20 12:06 firefart

Yes, I think that makes sense. If we still have the tree structure of the assignments / sub-allocations iterable via the DB then that reflects the IP address space. Thanks :)

aaronkaplan avatar Jun 25 '20 13:06 aaronkaplan

it looks like there are overlapping netranges too which sucks :/

firefart avatar Jun 25 '20 20:06 firefart

On 25.06.2020, at 22:53, Christian Mehlmauer [email protected] wrote:

it looks like there are overlapping netranges too which sucks :/

As in: one range completely embedded in another but within different RIRs or as in: range A goes from a_1.... a_n and B from b_1.... b_m and a_1 < b_1 < a_n < b_m ?

aaronkaplan avatar Jun 25 '20 20:06 aaronkaplan