<?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 Client IP to Network Range Lookups &amp; Reporting in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Client-IP-to-Network-Range-Lookups-Reporting/m-p/79423#M20106</link>
    <description>&lt;P&gt;Hi All &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I may have had too much coffee, because I'm having some trouble getting my head around this one.&lt;/P&gt;

&lt;P&gt;I have a some web logs in which I have used Splunk to extract out a list of unique source IP addresses for incoming customer requests, and I would like to find out what ISP the requests originated from.&lt;/P&gt;

&lt;P&gt;I have created a csv lookup table from the output of a 'show ip bgp' and a scripted 'whois' that is structured as follows:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;network-range&amp;gt;,&amp;lt;as-number&amp;gt;,&amp;lt;isp-name&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;eg. &lt;CODE&gt;223.165.96.0/19,9268,Over The Wire Pty Ltd&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So as far as my caffeine-riddled bloodsystem can tell I need to:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Compare the IP address to the network-range in the lookup table&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;eg. The IP address &lt;CODE&gt;223.165.96.2&lt;/CODE&gt; will be a unique match, as will &lt;CODE&gt;223.165.96.78&lt;/CODE&gt;.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Lookup the &lt;CODE&gt;as-number&lt;/CODE&gt; or &lt;CODE&gt;isp-name&lt;/CODE&gt; as my report sees fit&lt;/LI&gt;
&lt;LI&gt;Do a count on the number of entries per unique ISP&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;eg. Two from the example listed above.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Make a purdy pie graph showing what percentage of users came from where&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;...and I'm stuck on... step 1.&lt;/P&gt;

&lt;P&gt;Is it possible to evaluate to see if a &lt;CODE&gt;client_ip&lt;/CODE&gt; is present in a network range that is in an external lookup table, or am I going to need to script this up? &lt;/P&gt;

&lt;P&gt;I'm running 4.2 and I have seen the &lt;CODE&gt;cidrmatch&lt;/CODE&gt; command as well as the Splunk&amp;gt;Answers "&lt;A href="http://answers.splunk.com/questions/202/how-to-best-determine-ip-range-membership" rel="nofollow"&gt;How to best determine IP range membership?&lt;/A&gt;", however when dealing with 100,000+ routes I'm not sure this is the correct tool or way to do this.&lt;/P&gt;

&lt;P&gt;As always, any help or suggestions gratefully received &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Apr 2011 13:24:02 GMT</pubDate>
    <dc:creator>rturk</dc:creator>
    <dc:date>2011-04-12T13:24:02Z</dc:date>
    <item>
      <title>Client IP to Network Range Lookups &amp; Reporting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Client-IP-to-Network-Range-Lookups-Reporting/m-p/79423#M20106</link>
      <description>&lt;P&gt;Hi All &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I may have had too much coffee, because I'm having some trouble getting my head around this one.&lt;/P&gt;

&lt;P&gt;I have a some web logs in which I have used Splunk to extract out a list of unique source IP addresses for incoming customer requests, and I would like to find out what ISP the requests originated from.&lt;/P&gt;

&lt;P&gt;I have created a csv lookup table from the output of a 'show ip bgp' and a scripted 'whois' that is structured as follows:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&amp;lt;network-range&amp;gt;,&amp;lt;as-number&amp;gt;,&amp;lt;isp-name&amp;gt;&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;eg. &lt;CODE&gt;223.165.96.0/19,9268,Over The Wire Pty Ltd&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So as far as my caffeine-riddled bloodsystem can tell I need to:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Compare the IP address to the network-range in the lookup table&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;eg. The IP address &lt;CODE&gt;223.165.96.2&lt;/CODE&gt; will be a unique match, as will &lt;CODE&gt;223.165.96.78&lt;/CODE&gt;.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Lookup the &lt;CODE&gt;as-number&lt;/CODE&gt; or &lt;CODE&gt;isp-name&lt;/CODE&gt; as my report sees fit&lt;/LI&gt;
&lt;LI&gt;Do a count on the number of entries per unique ISP&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;eg. Two from the example listed above.&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Make a purdy pie graph showing what percentage of users came from where&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;...and I'm stuck on... step 1.&lt;/P&gt;

&lt;P&gt;Is it possible to evaluate to see if a &lt;CODE&gt;client_ip&lt;/CODE&gt; is present in a network range that is in an external lookup table, or am I going to need to script this up? &lt;/P&gt;

&lt;P&gt;I'm running 4.2 and I have seen the &lt;CODE&gt;cidrmatch&lt;/CODE&gt; command as well as the Splunk&amp;gt;Answers "&lt;A href="http://answers.splunk.com/questions/202/how-to-best-determine-ip-range-membership" rel="nofollow"&gt;How to best determine IP range membership?&lt;/A&gt;", however when dealing with 100,000+ routes I'm not sure this is the correct tool or way to do this.&lt;/P&gt;

&lt;P&gt;As always, any help or suggestions gratefully received &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2011 13:24:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Client-IP-to-Network-Range-Lookups-Reporting/m-p/79423#M20106</guid>
      <dc:creator>rturk</dc:creator>
      <dc:date>2011-04-12T13:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Client IP to Network Range Lookups &amp; Reporting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Client-IP-to-Network-Range-Lookups-Reporting/m-p/79424#M20107</link>
      <description>&lt;P&gt;As of Splunk 4.2 you can specify a &lt;CODE&gt;match_type&lt;/CODE&gt; for a lookup in transforms.conf. See &lt;A href="http://www.splunk.com/base/Documentation/latest/Admin/Transformsconf" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/latest/Admin/Transformsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Setting the match_type to &lt;CODE&gt;CIDR&lt;/CODE&gt; for your IP range field is probably what you are looking for.&lt;/P&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mylookup]
filename = isp.csv
match_type = CIDR(network-range)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Apr 2011 16:10:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Client-IP-to-Network-Range-Lookups-Reporting/m-p/79424#M20107</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2011-04-12T16:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Client IP to Network Range Lookups &amp; Reporting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Client-IP-to-Network-Range-Lookups-Reporting/m-p/79425#M20108</link>
      <description>&lt;P&gt;Thanks Ziegfried, I'll give that a try and let you know &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2011 11:08:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Client-IP-to-Network-Range-Lookups-Reporting/m-p/79425#M20108</guid>
      <dc:creator>rturk</dc:creator>
      <dc:date>2011-04-14T11:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Client IP to Network Range Lookups &amp; Reporting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Client-IP-to-Network-Range-Lookups-Reporting/m-p/79426#M20109</link>
      <description>&lt;P&gt;Yep, that worked a treat! Interesting sidenote... the change to use:&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;match_type = CIDR(network-range)&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;Can't be done via the GUI which is fine, &lt;I&gt;however&lt;/I&gt; if you make any changes in the GUI after doing this (eg. max_matches = 1), then the transforms.conf is reset to the values that may ONLY be set via the GUI.&lt;BR /&gt;&lt;BR /&gt;That is to say, I lost my &lt;B&gt;match_type&lt;/B&gt; command.&lt;BR /&gt;&lt;BR /&gt;Thanks again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:27:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Client-IP-to-Network-Range-Lookups-Reporting/m-p/79426#M20109</guid>
      <dc:creator>rturk</dc:creator>
      <dc:date>2020-09-28T09:27:51Z</dc:date>
    </item>
  </channel>
</rss>

