Say I have two IPs:
startip = '220.127.116.11' and
endip = '18.104.22.168'
I understand that in python
netaddr.iprange_to_cidrs(startip, endip) will give you a list of CIDR subnets that fit exactly between the boundaries. However, I was hoping to go for one CIDR subnet that covers it all even if it gives a few more IPs.
I prefer a function that does it, but I would also welcome any math/logic to calculate it and eventually turn it into code.