<?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 Match IP address to IP range with a lookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Match-IP-address-to-IP-range-with-a-lookup/m-p/344731#M102124</link>
    <description>&lt;P&gt;I have an index=logs that has an ip_address field like 5.9.100.100&lt;BR /&gt;
I want to correlate it against a csv file that has list of ip ranges to see owner. first field contains range beginning and second is range end. so in case of 5.9.100.100, it should match with csv file below&lt;/P&gt;

&lt;P&gt;Is there a way to lookup csv ip ranges and join on ip_address field in index=logs? Also, if csv file contained IP range in CIDR format instead, would this be a better way to lookup against?&lt;/P&gt;

&lt;P&gt;5.9.0.0 5.9.255.255 Owner1&lt;BR /&gt;
5.10.64.0   5.10.127.255 Owner2&lt;/P&gt;</description>
    <pubDate>Mon, 06 Nov 2017 17:59:22 GMT</pubDate>
    <dc:creator>spark2310</dc:creator>
    <dc:date>2017-11-06T17:59:22Z</dc:date>
    <item>
      <title>Match IP address to IP range with a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Match-IP-address-to-IP-range-with-a-lookup/m-p/344731#M102124</link>
      <description>&lt;P&gt;I have an index=logs that has an ip_address field like 5.9.100.100&lt;BR /&gt;
I want to correlate it against a csv file that has list of ip ranges to see owner. first field contains range beginning and second is range end. so in case of 5.9.100.100, it should match with csv file below&lt;/P&gt;

&lt;P&gt;Is there a way to lookup csv ip ranges and join on ip_address field in index=logs? Also, if csv file contained IP range in CIDR format instead, would this be a better way to lookup against?&lt;/P&gt;

&lt;P&gt;5.9.0.0 5.9.255.255 Owner1&lt;BR /&gt;
5.10.64.0   5.10.127.255 Owner2&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 17:59:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Match-IP-address-to-IP-range-with-a-lookup/m-p/344731#M102124</guid>
      <dc:creator>spark2310</dc:creator>
      <dc:date>2017-11-06T17:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: Match IP address to IP range with a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Match-IP-address-to-IP-range-with-a-lookup/m-p/344732#M102125</link>
      <description>&lt;P&gt;For lookups to use CIDR the address column in your lookup must be in CIDR notation. And you need to define the field as a CIDR lookup as in this answers post.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/5916/using-cidr-in-a-lookup-table.html"&gt;https://answers.splunk.com/answers/5916/using-cidr-in-a-lookup-table.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 18:29:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Match-IP-address-to-IP-range-with-a-lookup/m-p/344732#M102125</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2017-11-06T18:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Match IP address to IP range with a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Match-IP-address-to-IP-range-with-a-lookup/m-p/344733#M102126</link>
      <description>&lt;P&gt;So only way is to convert ranges to a CIDR format in all the csv file?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 18:35:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Match-IP-address-to-IP-range-with-a-lookup/m-p/344733#M102126</guid>
      <dc:creator>spark2310</dc:creator>
      <dc:date>2017-11-06T18:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: Match IP address to IP range with a lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Match-IP-address-to-IP-range-with-a-lookup/m-p/344734#M102127</link>
      <description>&lt;P&gt;If you want to do the lookup based on network ranges yes. Otherwise you are looking up by string matching what happens to also be an IP.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 18:44:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Match-IP-address-to-IP-range-with-a-lookup/m-p/344734#M102127</guid>
      <dc:creator>starcher</dc:creator>
      <dc:date>2017-11-06T18:44:35Z</dc:date>
    </item>
  </channel>
</rss>

