<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to remove overlapping address ranges from a field of address ranges? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-overlapping-address-ranges-from-a-field-of-address/m-p/353100#M104527</link>
    <description>&lt;P&gt;I have a field of address ranges where i want to dedup any that overlap. For example:&lt;BR /&gt;
10.10.20.0/23&lt;BR /&gt;
10.10.20.160/27&lt;BR /&gt;
10.10.20.192/26&lt;BR /&gt;
10.10.20.64/26&lt;BR /&gt;
10.10.21.0/26&lt;BR /&gt;
The first range, 10.10.20.0/23, contains all the other list of ranges so I want to get rid of all the other ranges, 10.10.20.160/27, 10.10.20.192/26, 10.10.20.64/26, 10.10.21.0/26. &lt;/P&gt;</description>
    <pubDate>Mon, 06 Nov 2017 20:06:22 GMT</pubDate>
    <dc:creator>cofisher</dc:creator>
    <dc:date>2017-11-06T20:06:22Z</dc:date>
    <item>
      <title>How to remove overlapping address ranges from a field of address ranges?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-overlapping-address-ranges-from-a-field-of-address/m-p/353100#M104527</link>
      <description>&lt;P&gt;I have a field of address ranges where i want to dedup any that overlap. For example:&lt;BR /&gt;
10.10.20.0/23&lt;BR /&gt;
10.10.20.160/27&lt;BR /&gt;
10.10.20.192/26&lt;BR /&gt;
10.10.20.64/26&lt;BR /&gt;
10.10.21.0/26&lt;BR /&gt;
The first range, 10.10.20.0/23, contains all the other list of ranges so I want to get rid of all the other ranges, 10.10.20.160/27, 10.10.20.192/26, 10.10.20.64/26, 10.10.21.0/26. &lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 20:06:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-overlapping-address-ranges-from-a-field-of-address/m-p/353100#M104527</guid>
      <dc:creator>cofisher</dc:creator>
      <dc:date>2017-11-06T20:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove overlapping address ranges from a field of address ranges?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-overlapping-address-ranges-from-a-field-of-address/m-p/353101#M104528</link>
      <description>&lt;P&gt;It would be helpful to understand the use case. What is the problem you're trying to solve? &lt;/P&gt;

&lt;P&gt;You could create a custom search command using a utility like &lt;A href="https://pypi.python.org/pypi/netaddr"&gt;Python netaddr&lt;/A&gt;, more specifically &lt;A href="https://netaddr.readthedocs.io/en/latest/tutorial_03.html"&gt;IP Sets&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;gt;&amp;gt;&amp;gt; from netaddr import *
&amp;gt;&amp;gt;&amp;gt; ips = [IPNetwork('10.10.20.0/23'),IPNetwork('10.10.20.160/27'),IPNetwork('10.10.20.192/26'),IPNetwork('10.10.20.64/26'),IPNetwork('10.10.20.64/26'),IPNetwork('10.10.21.0/26')]
&amp;gt;&amp;gt;&amp;gt; print IPSet(ips)
IPSet(['10.10.20.0/23'])
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Nov 2017 00:45:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-overlapping-address-ranges-from-a-field-of-address/m-p/353101#M104528</guid>
      <dc:creator>shaskell_splunk</dc:creator>
      <dc:date>2017-11-07T00:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove overlapping address ranges from a field of address ranges?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-remove-overlapping-address-ranges-from-a-field-of-address/m-p/353102#M104529</link>
      <description>&lt;P&gt;Yes, I know I am posting to an old thread.&lt;/P&gt;

&lt;P&gt;Use case 1:&lt;BR /&gt;
I have an ACL that has multiple lines that may contain overlaps and I want to streamline the list.&lt;/P&gt;

&lt;P&gt;Use case 2:&lt;BR /&gt;
I have two tools. &lt;/P&gt;

&lt;P&gt;The first tool allows overlapping ranges and and determines meta data by the most restrictive.&lt;BR /&gt;
example..&lt;BR /&gt;
  10.10.0.0/22 Production&lt;BR /&gt;
  10.10.1.0/24 Production_webservers&lt;/P&gt;

&lt;P&gt;if the address is 10.10.0.10, it will use the meta of Production. Easy...&lt;/P&gt;

&lt;P&gt;Tool two doesn't like the overlap, so the same list would have to be split into multiples with no overlap.&lt;BR /&gt;
example..&lt;BR /&gt;
  10.10.0.0/24 Production&lt;BR /&gt;
  10.10.1.0/24 Production_webservers&lt;BR /&gt;
  10.10.2.0/23 Production&lt;/P&gt;

&lt;P&gt;Crazy, right?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Apr 2018 20:20:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-remove-overlapping-address-ranges-from-a-field-of-address/m-p/353102#M104529</guid>
      <dc:creator>bsinkk</dc:creator>
      <dc:date>2018-04-17T20:20:29Z</dc:date>
    </item>
  </channel>
</rss>

