<?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 perform lookup on inconsistent IPv6 format from index search with DBXquery? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/656892#M226884</link>
    <description>&lt;P&gt;Forget DBXquery. &amp;nbsp;Splunk's lookup can work with IPv6 CIDR. &amp;nbsp;You just need to build your lookup with CIDR. &amp;nbsp;See&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Lookup#2._IPv6_CIDR_match_in_Splunk_Web" target="_blank" rel="noopener"&gt;IPv6 CIDR match in Splunk Web&lt;/A&gt;&amp;nbsp;(also&amp;nbsp;&lt;A class="" href="http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Usefieldlookupstoaddinformationtoyourevents#Define_a_CSV_lookup_in_Splunk_Web" target="_blank" rel="noopener"&gt;Define a CSV lookup in Splunk Web&lt;/A&gt;).&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2023 23:04:49 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2023-09-06T23:04:49Z</dc:date>
    <item>
      <title>How to perform lookup on inconsistent IPv6 format in CSV file from index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/656887#M226882</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;How to perform lookup on inconsistent IPv6 format in CSV file from index?&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;&lt;STRONG&gt;Index&lt;/STRONG&gt; has collapsed format of IPv6:&amp;nbsp; 2001:db8:3333:4444:5555:6666&lt;STRONG&gt;&lt;FONT size="5" color="#FF0000"&gt;::&lt;/FONT&gt;&lt;/STRONG&gt;2101&lt;BR /&gt;&lt;STRONG&gt;CSV&lt;/STRONG&gt; has expanded format of IPv6:&amp;nbsp;&amp;nbsp;&amp;nbsp; 2001:db8:3333:4444:5555:6666&lt;STRONG&gt;&lt;FONT size="5" color="#FF0000"&gt;:0:&lt;/FONT&gt;&lt;/STRONG&gt;2101&lt;BR /&gt;&lt;BR /&gt;The following lookup can NOT find the IPv6 that has the inconsistent pattern, it only find the &lt;STRONG&gt;exact match&lt;/STRONG&gt;&lt;BR /&gt;| index=vulnerability_index&lt;BR /&gt;| lookup company.csv &lt;STRONG&gt;ip_address&lt;/STRONG&gt; as ip OUTPUTNEW&lt;STRONG&gt; ip_address&lt;/STRONG&gt;, company, location&lt;BR /&gt;&lt;BR /&gt;In IPv6&lt;BR /&gt;&amp;nbsp;"::" (double colon) represents consecutive zeroes&amp;nbsp; ( :0:&amp;nbsp;&amp;nbsp; or :0:0: or :0:0:0:)&lt;BR /&gt;&amp;nbsp;":0:"represents 0000&lt;BR /&gt;&lt;BR /&gt;I think this is what I am looking for, but I am not sure how to implement it.&lt;BR /&gt;&lt;A href="https://splunkbase.splunk.com/app/4912" target="_blank"&gt;https://splunkbase.splunk.com/app/4912&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you for your help&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 01:35:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/656887#M226882</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2023-09-07T01:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform lookup on inconsistent IPv6 format from index search with DBXquery?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/656892#M226884</link>
      <description>&lt;P&gt;Forget DBXquery. &amp;nbsp;Splunk's lookup can work with IPv6 CIDR. &amp;nbsp;You just need to build your lookup with CIDR. &amp;nbsp;See&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Lookup#2._IPv6_CIDR_match_in_Splunk_Web" target="_blank" rel="noopener"&gt;IPv6 CIDR match in Splunk Web&lt;/A&gt;&amp;nbsp;(also&amp;nbsp;&lt;A class="" href="http://docs.splunk.com/Documentation/Splunk/latest/Knowledge/Usefieldlookupstoaddinformationtoyourevents#Define_a_CSV_lookup_in_Splunk_Web" target="_blank" rel="noopener"&gt;Define a CSV lookup in Splunk Web&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 23:04:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/656892#M226884</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-09-06T23:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform lookup on inconsistent IPv6 format in CSV file from index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/656895#M226886</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I changed the title.&amp;nbsp; The CIDR match is used to see if a IP is within a subnet.&lt;BR /&gt;I was trying to match the same IPv6, but with different format from index with my CSV table.&lt;BR /&gt;In the example:&lt;BR /&gt;Index has collapsed format of IPv6:&amp;nbsp; 2001:db8:3333:4444:5555:6666&lt;STRONG&gt;&lt;FONT size="5" color="#FF0000"&gt;::&lt;/FONT&gt;&lt;/STRONG&gt;2101&lt;BR /&gt;CSV has expanded format of IPv6:&amp;nbsp;&amp;nbsp;&amp;nbsp; 2001:db8:3333:4444:5555:6666&lt;STRONG&gt;&lt;FONT size="5" color="#FF0000"&gt;:0:&lt;/FONT&gt;&lt;/STRONG&gt;2101&lt;BR /&gt;The following lookup can NOT find the IPv6 that has the inconsistent pattern, it only find the &lt;STRONG&gt;exact match&lt;/STRONG&gt;&lt;BR /&gt;| index=vulnerability_index&lt;BR /&gt;| lookup company.csv &lt;STRONG&gt;ip_address&lt;/STRONG&gt; as ip OUTPUTNEW&lt;STRONG&gt; ip_address&lt;/STRONG&gt;, company, location&lt;BR /&gt;&lt;BR /&gt;I think this is what I am looking for, I just don't know how to implement it&lt;BR /&gt;&lt;A href="https://splunkbase.splunk.com/app/4912" target="_blank"&gt;https://splunkbase.splunk.com/app/4912&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you for your help&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 01:36:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/656895#M226886</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2023-09-07T01:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform lookup on inconsistent IPv6 format in CSV file from index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/656906#M226889</link>
      <description>&lt;P&gt;CIDR is just a notation. &amp;nbsp;Nothing prevents you from using a 64-bit mask, i.e., host address. &amp;nbsp;For example,&amp;nbsp;2001:db8:3333:4444:5555:6666::2101/64&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 03:32:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/656906#M226889</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-09-07T03:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform lookup on inconsistent IPv6 format in CSV file from index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/656959#M226910</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I tested by following the instruction, it only worked with the sample IP provided by Splunk, but it didn't work when I tried&amp;nbsp; compare IPv6 with IPv6.&amp;nbsp; (See below)&lt;BR /&gt;It looks like CIDR match only work only if a IP is part of subnet.&lt;BR /&gt;In my environment, I tried to compare IPv6 (compressed) with IPv6 (expanded)&lt;BR /&gt;Thanks for your help&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;IP from Splunk, &lt;U&gt;expected = TRUE&lt;/U&gt;&lt;/P&gt;&lt;P&gt;| makeresults&lt;BR /&gt;| eval ip="2001:0db8:ffff:ffff:ffff:ffff:ffff:ff99"&lt;BR /&gt;| lookup ipv6test ip OUTPUT expected&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;_time&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;expected&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;ip&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;2023-09-07 09:08:54&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;TRUE&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;2001:0db8:ffff:ffff:ffff:ffff:ffff:ff99&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IP from our test, &lt;U&gt;expected = empty&lt;/U&gt;&lt;BR /&gt;| makeresults&lt;BR /&gt;| eval ip="2001:db8:3333:4444:5555:6666::2101"&lt;BR /&gt;| lookup ipv6test ip OUTPUT expected&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;_time&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;expected&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;ip&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;2023-09-07 09:10:54&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="25px"&gt;2001:db8:3333:4444:5555:6666::2101&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CSV Table&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;ip&lt;/TD&gt;&lt;TD width="50%"&gt;expected&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;SPAN&gt;2001:0db8:ffff:ffff:ffff:ffff:ffff:ff00/120&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;true&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;SPAN&gt;2001:db8:3333:4444:5555:6666::2101/64&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;test mask&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;2001:db8:3333:4444:5555:6666::2101&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;test with mask&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 07 Sep 2023 13:38:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/656959#M226910</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2023-09-07T13:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform lookup on inconsistent IPv6 format in CSV file from index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/657016#M226935</link>
      <description>&lt;P&gt;I apologize for giving wrong information. &amp;nbsp;IPv6 is 128-bit, not 64 bit. &amp;nbsp;Given this lookup table and advanced option match_type CIDR(ip):&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;expected&lt;/TD&gt;&lt;TD&gt;ip&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;true&lt;/TD&gt;&lt;TD&gt;2001:0db8:ffff:ffff:ffff:ffff:ffff:ff00/128&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;test mask&lt;/TD&gt;&lt;TD&gt;2001:db8:3333:4444:5555:6666::2101/128&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;test without mask&lt;/TD&gt;&lt;TD&gt;2001:db8:3333:4444:5555:6666::2101&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;This search now gives the correct output&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| fields - _time
| eval ip=mvappend("2001:db8:3333:4444:5555:6666:0:2101", "2001:db8:3333:4444:5555:6666::2101", "2001:0db8:ffff:ffff:ffff:ffff:ffff:ff00")
| mvexpand ip
| lookup ipv6test ip&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;expected&lt;/TD&gt;&lt;TD&gt;ip&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;test mask&lt;/TD&gt;&lt;TD&gt;2001:db8:3333:4444:5555:6666:0:2101&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;test mask&lt;/TD&gt;&lt;TD&gt;2001:db8:3333:4444:5555:6666::2101&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;true&lt;/TD&gt;&lt;TD&gt;2001:0db8:ffff:ffff:ffff:ffff:ffff:ff00&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 00:49:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/657016#M226935</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-09-08T00:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform lookup on inconsistent IPv6 format in CSV file from index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/657058#M226952</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I tested your suggestion and it worked, but my CSV file does not have /128.&lt;BR /&gt;Can you answer the following questions?&amp;nbsp; &amp;nbsp;I appreciate your help&lt;BR /&gt;&lt;BR /&gt;1. a) Should I add /128 on all IPv6 on my CSV file to get this to work?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; b) If yes, does it mean I need to put extra layer to check which one is IPv6 or IPv4 and then append /128?&lt;BR /&gt;&lt;BR /&gt;2. Will OUPUTNEW work just fine as regular lookup?&lt;BR /&gt;3. a) If I update CSV file (with new fields), will the definition lookup still work?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; b) Is there a way to automate update on the definition lookup?&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I plan on creating automatic update on CSV, but it looks like the definition ties on specific field.&lt;BR /&gt;&lt;BR /&gt;4.&amp;nbsp; Note that if I use /120, it could return multiple result like the following:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;expected&lt;/TD&gt;&lt;TD width="50%"&gt;ip&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;DIV class=""&gt;test mask 2&lt;/DIV&gt;&lt;DIV class=""&gt;test mask 4&lt;/DIV&gt;&lt;DIV class=""&gt;test mask 6&lt;/DIV&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;2001:db8:3333:4444:5555:6666::2101&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 11:57:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/657058#M226952</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2023-09-08T11:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform lookup on inconsistent IPv6 format in CSV file from index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/657094#M226963</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;1. a) Should I add /128 on all IPv6 on my CSV file to get this to work?&lt;BR /&gt;&amp;nbsp; &amp;nbsp; b) If yes, does it mean I need to put extra layer to check which one is IPv6 or IPv4 and then append /128?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;IPv4 is 32-bit, IPv6 is 128-bit. &amp;nbsp;This means that if your CVS only contains host addresses, you need to use /128 with all IPv6 entries and /32 with all IPv4 entries.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;2. Will OUPUTNEW work just fine as regular lookup?&lt;BR /&gt;3. a) If I update CSV file (with new fields), will the definition lookup still work?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;CIDR(ip) does not change any other aspect of lookup.&lt;/P&gt;&lt;BLOCKQUOTE&gt;3.&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; b) Is there a way to automate update on the definition lookup?&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I plan on creating automatic update on CSV, but it looks like the definition ties on specific field.&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Not sure what you mean by automation. &amp;nbsp;If you mean in the background with some external utilities, certainly. &amp;nbsp;Once lookup is defined, all you need to do is to update the file. (In distributed deployment, however, you do need to take care to update every search head.)&lt;/P&gt;&lt;P&gt;In Splunk, you can take a look at &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Outputlookup" target="_blank" rel="noopener"&gt;outputlookup&lt;/A&gt;. &amp;nbsp;You can use a Splunk search to update an existing lookup (even create a new one).&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;4.&amp;nbsp; Note that if I use /120, it could return multiple result like the following: &lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%"&gt;expected&lt;/TD&gt;&lt;TD width="50%"&gt;ip&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%"&gt;&lt;DIV class=""&gt;test mask 2&lt;/DIV&gt;&lt;DIV class=""&gt;test mask 4&lt;/DIV&gt;&lt;DIV class=""&gt;test mask 6&lt;/DIV&gt;&lt;/TD&gt;&lt;TD width="50%"&gt;2001:db8:3333:4444:5555:6666::2101&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That is precisely what netmask does. (Using CIDR for host address is just a special, and less common use case.) &amp;nbsp;You can read about IP address spaces, subnet, and CIDR in a variety of online resources.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 21:59:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/657094#M226963</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-09-08T21:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform lookup on inconsistent IPv6 format in CSV file from index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/657101#M226965</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;The CSV file is derived from dbxQuery, so I need to figure out how to append/128 for ipv6 and /32 for ipv6.&lt;/P&gt;&lt;P&gt;Does Splunk have a function to check if an IP is IPv4 or IPv6?&lt;BR /&gt;| dbxquery query="select IP from tableCompany"&lt;BR /&gt;|&amp;nbsp;&amp;nbsp; eval IP = if ( isIPv4(IP),&amp;nbsp; IP=IP . "/32",&amp;nbsp; IP=IP . "/128")&lt;BR /&gt;&lt;BR /&gt;Thank you so much&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2023 00:28:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/657101#M226965</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2023-09-09T00:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to perform lookup on inconsistent IPv6 format in CSV file from index?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/657104#M226967</link>
      <description>&lt;P&gt;Splunk does not have a IP version check per se. &amp;nbsp;But you can hack&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/ConversionFunctions#ipmask.28.26lt.3Bmask.26gt.3B.2C.26lt.3Bip.26gt.3B.29" target="_blank" rel="noopener"&gt;ipmask&lt;/A&gt;&amp;nbsp;to your advantage. &amp;nbsp;ipmask only works with IPv4. &amp;nbsp;So, if you are confident that your query returns legitimate IP addresses, you can tell IPv4 from IPv6.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| dbxquery query="select IP from tableCompany"
| eval IP = if(isnull(ipmask("255.255.255.255", IP)), IP . "/128", IP . "/32")&lt;/LI-CODE&gt;&lt;P&gt;Here is a snippet to help you observe how ipmask works in this context:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval ip = mvappend("10.11.12.13", "::")
| mvexpand ip
| eval hostmask4 = ipmask("255.255.255.255", ip)&lt;/LI-CODE&gt;&lt;P&gt;Netmask 255.255.255.255 also serves as an IPv4 validator. &amp;nbsp;IPv6 can be validated using regex, but if your database is trustworthy, you can save this trouble.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2023 04:16:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-perform-lookup-on-inconsistent-IPv6-format-in-CSV-file/m-p/657104#M226967</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-09-09T04:16:37Z</dc:date>
    </item>
  </channel>
</rss>

