<?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: Can I use a lookup table of IP ranges + location names to add a location field to network traffic based on IP range? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-lookup-table-of-IP-ranges-location-names-to-add-a/m-p/305836#M91817</link>
    <description>&lt;P&gt;Hi md_zali,&lt;BR /&gt;
I found a problem using CIDR that usually works in searches but it seems that doesn't match in lookups.&lt;BR /&gt;
So a workaround is to write each address in a different row.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;IP,location
10.10.10.1,site1
10.10.10.2,site1
10.10.10.3,site1
10.10.10.4,site1
10.10.10.5,site1
10.10.10.6,site2
10.10.10.7,site2
10.10.10.8,site2
10.10.10.9,site2
10.10.10.10,site2
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so you can use a search like this&lt;BR /&gt;
    index=your_index &lt;BR /&gt;
    | lookup range_location.csv range AS IP  OUTPUT location &lt;BR /&gt;
    |table _time IP location&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 16:15:03 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2020-09-29T16:15:03Z</dc:date>
    <item>
      <title>Can I use a lookup table of IP ranges + location names to add a location field to network traffic based on IP range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-lookup-table-of-IP-ranges-location-names-to-add-a/m-p/305833#M91814</link>
      <description>&lt;P&gt;I have a lookup table of IP ranges with location names. I'm trying to search network traffic and add a "location" field to the result based on what IP range the src_ip falls under. I do not have access to any of the configuration files and would like to know if I can do this within the search.&lt;/P&gt;

&lt;P&gt;Example of my lookup table (range_location.csv):&lt;BR /&gt;
range                    location&lt;BR /&gt;
50.106.56.0 /21   site_1&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:14:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-lookup-table-of-IP-ranges-location-names-to-add-a/m-p/305833#M91814</guid>
      <dc:creator>md_zali</dc:creator>
      <dc:date>2020-09-29T16:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use a lookup table of IP ranges + location names to add a location field to network traffic based on IP range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-lookup-table-of-IP-ranges-location-names-to-add-a/m-p/305834#M91815</link>
      <description>&lt;P&gt;Hi md_zali,&lt;BR /&gt;
yes you can manage location lookup as a normal lookup relating the lookup's IP ranges with the search results.&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 07:09:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-lookup-table-of-IP-ranges-location-names-to-add-a/m-p/305834#M91815</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-10-13T07:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use a lookup table of IP ranges + location names to add a location field to network traffic based on IP range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-lookup-table-of-IP-ranges-location-names-to-add-a/m-p/305835#M91816</link>
      <description>&lt;P&gt;Thanks Giuseppe,&lt;BR /&gt;
Can you please help me with the search?&lt;BR /&gt;
As mentioned, I need to compare source IPs with the ranges and return the location as a new field.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2017 12:58:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-lookup-table-of-IP-ranges-location-names-to-add-a/m-p/305835#M91816</guid>
      <dc:creator>md_zali</dc:creator>
      <dc:date>2017-10-13T12:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use a lookup table of IP ranges + location names to add a location field to network traffic based on IP range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-lookup-table-of-IP-ranges-location-names-to-add-a/m-p/305836#M91817</link>
      <description>&lt;P&gt;Hi md_zali,&lt;BR /&gt;
I found a problem using CIDR that usually works in searches but it seems that doesn't match in lookups.&lt;BR /&gt;
So a workaround is to write each address in a different row.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;IP,location
10.10.10.1,site1
10.10.10.2,site1
10.10.10.3,site1
10.10.10.4,site1
10.10.10.5,site1
10.10.10.6,site2
10.10.10.7,site2
10.10.10.8,site2
10.10.10.9,site2
10.10.10.10,site2
...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so you can use a search like this&lt;BR /&gt;
    index=your_index &lt;BR /&gt;
    | lookup range_location.csv range AS IP  OUTPUT location &lt;BR /&gt;
    |table _time IP location&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:15:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-lookup-table-of-IP-ranges-location-names-to-add-a/m-p/305836#M91817</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-29T16:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use a lookup table of IP ranges + location names to add a location field to network traffic based on IP range?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-lookup-table-of-IP-ranges-location-names-to-add-a/m-p/305837#M91818</link>
      <description>&lt;P&gt;Try this&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>Wed, 04 Jul 2018 11:08:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-I-use-a-lookup-table-of-IP-ranges-location-names-to-add-a/m-p/305837#M91818</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2018-07-04T11:08:17Z</dc:date>
    </item>
  </channel>
</rss>

