Cartoon Crowd, Network ProxiesRecently I had an issue that I couldn’t find a solution for using the power of Google. My company has a wonderful tool from BMC called ADDM. It’s an enterprise tool that allows you to scan your network and discovery the things that live on the network. One of the configuration tasks is to provide the tool with a set of subnets to scan and when to scan. Unfortunately I can’t do subnetting in my head and the list of subnets I did have were of all sizes. What I found out quickly was that I had overlapping subnets supplied to the application, this meant that some subnets were getting scanned multiple times a day which isn’t ideal in the enterprise. I could get a simple CSV extract of all the scans I had configured and what subnets were in each but I couldn’t find any tools that would allow me to load up that CSV file and identify the overlaps.

Thankfully I have a rather long background in development and after spending about an hour building it in Visual Studio 2013, I had a self-made tool that would load the extract of scans and subnets from ADDM and tell me where I had overlap. It took me about five minutes to remove the overlaps and I was done! All in, I had invested more time searching for a solution than it took to make my own! Just goes to show you how limited life can be if you don’t have the ability to find your own solutions to life’s problems.

For those who may use ADDM at work, or really anyone who has a list of subnets and wants to identify overlaps. The CSV file was a simple select all and extract to CSV from ADDM. I removed the header and made user all lines had quotes around the subnets. Format is below and I’ve attached the code to this post, you can find the .exe in the bin folder after you extract the zip. As always this is open to the world but unsupported, use at your own risk. Requires .NET 4 framework.

Each line should look like this (scan or subnet name a comma and then a comma delimited list of subnets in CIDR format with quotes around the list):

Subnet or Scan name,”one or more subnets comma deliminated in CIDR format 10.2.1.0/23, 10.20.1.0/24″

SubnetOverlapTester
Title: SubnetOverlapTester (1538 clicks)
Caption:
Filename: subnetoverlaptester.zip
Size: 258 KB