A Python script to find the overlapping IP Subnets between two different sources using Radix Tree.
This file categorizes the overlapping subnets based on the following three categories
- No_Overlap - The current subnet doesn't overlaps with any record in the whole dataset.
- Self_Overlap_A - The current subnet overlaps with another subnet in the column A itself.
- Self_Overlap_B - The current subnet overlaps with another subnet in the column B itself.
- Cross_Overlap - The current subnet in the column B is overlapping with another subnet in the column A or vice-versa
An Output file will be generated once the script is completed and all the above categorization will be represented in the Output file in a ".csv" format. When you open the file you will see three different columns Self_Overlap_A, Self_Overlap_B and Cross_Overlap_B. In these three columns, two possible values are as follows
- No_Overlap - As the name says, there is no "OVERLAP" and this subnet is unique. Hence, it is good to proceed with this subnet.
- Index {Num} - When you see an index in the output, it represents that the current subnet overlaps with another subnet. Further detailing can be identified based on the column where it is located.
- Self_Overlap_A - If you see an index in the "SELF_OVERLAP_A" column, then the current subnet present in the column 'A' is overlapping with another subnet present in the 'index' of the same column 'A' respectively.
- Self_Overlap_B - If you see an index in the "SELF_OVERLAP_B" column, then the current subnet present in the column 'B' is overlapping with another subnet present in the 'index' of the same column 'B' respectively.
- Cross_Overlap - The current subnet present in the column 'B' overlaps with another subnet in the column 'A' mentioned in the index.