<?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: How to search for a range of IP addresses (example: 10.10.10.32 through 10.10.10.96)? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203635#M59154</link>
    <description>&lt;P&gt;your query | rex field=_raw "10.10.10.(?\d{1,3})" | where range &amp;gt;=32 AND range&amp;lt;=96 &lt;/P&gt;

&lt;P&gt;for the IP range 10.10.10.32 - 10.10.10.96&lt;/P&gt;

&lt;P&gt;your query | rex field=_raw "10.10.10.(?\d{1,3})" | where range &amp;gt;=1 AND range&amp;lt;=128&lt;/P&gt;

&lt;P&gt;for the IP range 10.10.10.1 - 10.10.10.128&lt;/P&gt;</description>
    <pubDate>Fri, 02 Mar 2018 13:38:11 GMT</pubDate>
    <dc:creator>logloganathan</dc:creator>
    <dc:date>2018-03-02T13:38:11Z</dc:date>
    <item>
      <title>How to search for a range of IP addresses (example: 10.10.10.32 through 10.10.10.96)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203631#M59150</link>
      <description>&lt;P&gt;Does anyone know the criteria to search for a range of IP address under the following conditions. &lt;/P&gt;

&lt;P&gt;I want to narrow the results down to IP addresses that fall within 10.10.10.32 - 10.10.10.96 or say 10.10.10.1 - 10.10.10.128.&lt;/P&gt;

&lt;P&gt;I've used the regex _ip="10.10.10.(3[0-9])" and got successful results for addresses in 10.10.10.30-39. But how can I do what I'm asking above.&lt;/P&gt;

&lt;P&gt;Any help is greatly appreciated.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 19:58:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203631#M59150</guid>
      <dc:creator>kmulcahy</dc:creator>
      <dc:date>2016-11-02T19:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for a range of IP addresses (example: 10.10.10.32 through 10.10.10.96)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203632#M59151</link>
      <description>&lt;P&gt;CIDR notation might be what you're looking for&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; _ip=10.10.10.32/27 OR _ip=10.10.10.64/27 OR _ip=10.10.10.96
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;would give you a range of 10.10.10.32-10.10.10.96.  Or you expand the regex to something like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;regex _ip="10.10.10.(3[2-9]|[4-8][0-9]|9[0-6])"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Nov 2016 20:38:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203632#M59151</guid>
      <dc:creator>LCM_BRogerson</dc:creator>
      <dc:date>2016-11-02T20:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for a range of IP addresses (example: 10.10.10.32 through 10.10.10.96)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203633#M59152</link>
      <description>&lt;P&gt;If all you need is a range comparison on &lt;CODE&gt;"10.10.10.xxx"&lt;/CODE&gt; what you could do is extract the range and compare on it as:&lt;/P&gt;

&lt;P&gt;10.10.10.32 - 10.10.10.96&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yourBaseQuery to give you ips
| rex "10\.10\.10\.(?&amp;lt;range&amp;gt;\d{1,3})"
| where range &amp;gt;=32 AND range&amp;lt;=96
| complete your Query
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or similarly for 1-128&lt;/P&gt;

&lt;P&gt;If you want more dynamic ips then that can be regexed too like below as long as you keep track of those range numbers&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yourBaseQuery to give you ips
| rex "\d{1,3}\.\d{1,3}\.\d{1,3}\.(?&amp;lt;range&amp;gt;\d{1,3})"
| where range &amp;gt;=32 AND range&amp;lt;=96
| complete your Query
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Nov 2016 21:01:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203633#M59152</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2016-11-02T21:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for a range of IP addresses (example: 10.10.10.32 through 10.10.10.96)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203634#M59153</link>
      <description>&lt;P&gt;@kmulcahy - Did any of the below answers help you out? If yes, please don't forget to click "Accept" below the best answer. If no, please leave a comment with some additional feedback. Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 19 Nov 2016 00:25:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203634#M59153</guid>
      <dc:creator>aaraneta_splunk</dc:creator>
      <dc:date>2016-11-19T00:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for a range of IP addresses (example: 10.10.10.32 through 10.10.10.96)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203635#M59154</link>
      <description>&lt;P&gt;your query | rex field=_raw "10.10.10.(?\d{1,3})" | where range &amp;gt;=32 AND range&amp;lt;=96 &lt;/P&gt;

&lt;P&gt;for the IP range 10.10.10.32 - 10.10.10.96&lt;/P&gt;

&lt;P&gt;your query | rex field=_raw "10.10.10.(?\d{1,3})" | where range &amp;gt;=1 AND range&amp;lt;=128&lt;/P&gt;

&lt;P&gt;for the IP range 10.10.10.1 - 10.10.10.128&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 13:38:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203635#M59154</guid>
      <dc:creator>logloganathan</dc:creator>
      <dc:date>2018-03-02T13:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for a range of IP addresses (example: 10.10.10.32 through 10.10.10.96)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203636#M59155</link>
      <description>&lt;P&gt;I downvoted this post because not properly explained&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 13:38:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203636#M59155</guid>
      <dc:creator>logloganathan</dc:creator>
      <dc:date>2018-03-02T13:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for a range of IP addresses (example: 10.10.10.32 through 10.10.10.96)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203637#M59156</link>
      <description>&lt;P&gt;Hi @logloganathan&lt;/P&gt;

&lt;P&gt;Downvoting should only be reserved for suggestions/solutions that could be potentially harmful for a Splunk environment or goes completely against known best practices. Simply commenting with constructive feedback on the post you are concerned with will be more beneficial for the community to learn from. &lt;/P&gt;

&lt;P&gt;Some of the most active members in Answers have helped set the standard of how voting etiquette should work in the Splunk community which distinguishes our culture apart from other Q&amp;amp;A forums. Upvote early and often to give credit where it’s due for high quality posts, comment where you think feedback needs to be given, and only downvote if something potentially dangerous is suggested or people are just being inappropriate. &lt;/P&gt;

&lt;P&gt;If you’re interested in seeing how this voting etiquette was developed, check out this Splunk Answers post: &lt;A href="https://answers.splunk.com/answers/244111/proper-etiquette-and-timing-for-voting-here-on-ans.html"&gt;https://answers.splunk.com/answers/244111/proper-etiquette-and-timing-for-voting-here-on-ans.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Mar 2018 15:55:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203637#M59156</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2018-03-02T15:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to search for a range of IP addresses (example: 10.10.10.32 through 10.10.10.96)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203638#M59157</link>
      <description>&lt;P&gt;@LCM_BRogerson, @kmulcahy -&lt;/P&gt;

&lt;P&gt;That regex would also match "10X10Q10!39".  The periods need to be escaped, or they will match any character.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | regex _ip="10\.10\.10\.(3[2-9]|[4-8][0-9]|9[0-6])"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Mar 2018 16:29:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-for-a-range-of-IP-addresses-example-10-10-10-32/m-p/203638#M59157</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2018-03-02T16:29:31Z</dc:date>
    </item>
  </channel>
</rss>

