IP subnet filtering with Python
In this blog post I want to share, and talk about, Python program I wrote to solve problem of filtering out child prefixes. Contents Problem description Solution Naïve algorithm Patricia tree aka binary radix tree Python implementation Load testing Module and cli version Closing thoughts References Problem description So what exactly is the problem we're trying to solve? Imagine that you have a group of prefixes, assigned to servers, or clients, and you want to only keep prefixes that are not subnets of any other prefix. This could be because of your routing requirements or because you want to minimise...