<?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 Re: CIDR raw search? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/CIDR-raw-search/m-p/260618#M78183</link>
    <description>&lt;P&gt;Just to be sure - have you gone under the covers to the transforms and added the CIDR match_type? Unfortunately unless something has changed in like 6.2+ you can't do this via the GUI. As an example I have a lookup named network-allocations and want to do CIDR lookups against the field &lt;CODE&gt;network&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[network-allocations]
filename = network-allocations.csv
match_type = CIDR(network)
max_matches = 1
min_matches = 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 03 Dec 2015 13:15:11 GMT</pubDate>
    <dc:creator>Runals</dc:creator>
    <dc:date>2015-12-03T13:15:11Z</dc:date>
    <item>
      <title>CIDR raw search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CIDR-raw-search/m-p/260617#M78182</link>
      <description>&lt;P&gt;I'm using a CIDR lookup table against raw data (find a match in the entire event, any field.)  It won't work, understandably with CIDR notation as my lookup.&lt;/P&gt;

&lt;P&gt;Is there a command that can be used to expand the CIDR notation into all possible IP combinations?&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2015 01:34:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CIDR-raw-search/m-p/260617#M78182</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2015-12-03T01:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: CIDR raw search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CIDR-raw-search/m-p/260618#M78183</link>
      <description>&lt;P&gt;Just to be sure - have you gone under the covers to the transforms and added the CIDR match_type? Unfortunately unless something has changed in like 6.2+ you can't do this via the GUI. As an example I have a lookup named network-allocations and want to do CIDR lookups against the field &lt;CODE&gt;network&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[network-allocations]
filename = network-allocations.csv
match_type = CIDR(network)
max_matches = 1
min_matches = 1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Dec 2015 13:15:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CIDR-raw-search/m-p/260618#M78183</guid>
      <dc:creator>Runals</dc:creator>
      <dc:date>2015-12-03T13:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: CIDR raw search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CIDR-raw-search/m-p/260619#M78184</link>
      <description>&lt;P&gt;Yes, I've done this.  Unfortunately, the configuration can only be applied a single field, not the entire event.&lt;/P&gt;

&lt;P&gt;The method I'm using is to apply the match to "search":&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;[| inputlookup network-allocations | rename network as search | format ]&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2015 17:48:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CIDR-raw-search/m-p/260619#M78184</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2015-12-03T17:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: CIDR raw search?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/CIDR-raw-search/m-p/260620#M78185</link>
      <description>&lt;P&gt;First thing is remove &lt;CODE&gt;| format&lt;/CODE&gt;. That command can be used to show you what the output of a search would be if it were a subsearch but you don't want to bake it into an actual subsearch.&lt;/P&gt;

&lt;P&gt;It sounds as though if you had 10.10.10.0/24 in your lookup you are wanting to search across all of your data for each of the 256 addresses - correct? I don't think there is a command that will allow you to do that. I suppose you could come up with a case statement that translates 10.10.10.0/24 into 10.10.10.* and then maybe use a regex command after the initial results to make sure your data matches an IPv4 address (ie \d{1,3}.\d{1,3}.\d{1,3}.\d{1,3} ) but that seems like it would be high overhead and becomes a pain if you aren't using A, B, or C blocks . The most ideal scenario is if address fields have been defined in your data and search on explicit fields. The state of the data might not support that currently though. &lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2015 18:10:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/CIDR-raw-search/m-p/260620#M78185</guid>
      <dc:creator>Runals</dc:creator>
      <dc:date>2015-12-03T18:10:24Z</dc:date>
    </item>
  </channel>
</rss>

