31 Oct
2015
31 Oct
'15
3:51 p.m.
John, Without going through the hassle of installing a full-blown IPAM solution you could use Python's netaddr library to accomplish what you are asking:
from netaddr import * cidr = IPSet(['192.168.0.0/24']) used = IPSet(['192.168.0.1','192.168.0.8/29','192.168.0.64/26']) cidr ^ used IPSet(['192.168.0.0/32', '192.168.0.2/31', '192.168.0.4/30', '192.168.0.16/28', '192.168.0.32/27', '192.168.0.128/25'])
Jeremiah Millay Senior Network Engineer Vermont Telephone Co., Inc. 354 River Street Springfield, VT 05156