<?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: Lookup table with several IP ranges per row in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Lookup-table-with-several-IP-ranges-per-row/m-p/532973#M150557</link>
    <description>&lt;P&gt;To use a CIDR match you need each row in the lookup to have a single row per CIDR block.&lt;/P&gt;&lt;P&gt;So if your lookup has comma separated CIDR blocks you need to split these into rows.&lt;/P&gt;&lt;P&gt;You can either do this by manually splitting the data and adding rows, or you could use |inputlookup,&amp;nbsp; split the field, then mvexpand and re-write the (or create a new)&amp;nbsp; lookup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval cidr="192.168.1.0/24,192.168.30.0/24", location="London"
| table cidr location
| eval cidr=split(cidr,",")|mvexpand cidr&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;replace the first 3 lines with |inputlookup yourfile.csv&lt;BR /&gt;add at the end |outputlookup yourNewfile.csv to write a new file&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup yourfile.csv 
| eval cidr=split(cidr,",")|mvexpand cidr
| outputlookup yourNewfile.csv&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 14 Dec 2020 11:15:49 GMT</pubDate>
    <dc:creator>nickhills</dc:creator>
    <dc:date>2020-12-14T11:15:49Z</dc:date>
    <item>
      <title>Lookup table with several IP ranges per row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-table-with-several-IP-ranges-per-row/m-p/532972#M150556</link>
      <description>&lt;P&gt;Hi, I have a lookup table with IP ranges and locations. The problem is in the IP range column there can be several IP ranges separated by comma. How can match the client IP address with the right location?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 10:47:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-table-with-several-IP-ranges-per-row/m-p/532972#M150556</guid>
      <dc:creator>pgomezji</dc:creator>
      <dc:date>2020-12-14T10:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup table with several IP ranges per row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-table-with-several-IP-ranges-per-row/m-p/532973#M150557</link>
      <description>&lt;P&gt;To use a CIDR match you need each row in the lookup to have a single row per CIDR block.&lt;/P&gt;&lt;P&gt;So if your lookup has comma separated CIDR blocks you need to split these into rows.&lt;/P&gt;&lt;P&gt;You can either do this by manually splitting the data and adding rows, or you could use |inputlookup,&amp;nbsp; split the field, then mvexpand and re-write the (or create a new)&amp;nbsp; lookup.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval cidr="192.168.1.0/24,192.168.30.0/24", location="London"
| table cidr location
| eval cidr=split(cidr,",")|mvexpand cidr&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;replace the first 3 lines with |inputlookup yourfile.csv&lt;BR /&gt;add at the end |outputlookup yourNewfile.csv to write a new file&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup yourfile.csv 
| eval cidr=split(cidr,",")|mvexpand cidr
| outputlookup yourNewfile.csv&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 14 Dec 2020 11:15:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-table-with-several-IP-ranges-per-row/m-p/532973#M150557</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-12-14T11:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: Lookup table with several IP ranges per row</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Lookup-table-with-several-IP-ranges-per-row/m-p/533572#M150780</link>
      <description>&lt;P&gt;Thanks, I was afraid of that answer.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 14:12:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Lookup-table-with-several-IP-ranges-per-row/m-p/533572#M150780</guid>
      <dc:creator>pgomezji</dc:creator>
      <dc:date>2020-12-18T14:12:12Z</dc:date>
    </item>
  </channel>
</rss>

