I have a list of about 50 subnets and corresponding names like this:
"subnet","subnet_name" "192.168.0.0/16","office" "10.10.10.0/24","datacenter1" "10.10.20.0/24","datacenter2" ...
What I would like to do is look up an IP from an existing field and create an additional field that shows the name of the subnet to which it belongs. So, for example, looking up 192.168.1.1 would return ‘office’.
I had originally thought I could do this with a CSV Lookup Table, but if my understanding is correct, I would need to have each individual IP in the lookup table instead of the CIDR definition - is this correct or can a cidr_match be performed on the key of the lookup table?
I also looked at using a MaxMind DB for this as described at https://blog.maxmind.com/2015/09/29/building-your-own-mmdb-database-for-fun-and-profit/, but it appears that the lookup table data adapter only supports City- or Country-MMDBs.
Does anyone have a pointer on how this could be accomplished without having to populate a CSV with every single IP in each subnet?