<?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 convert Decimal IP address to dotted quad IPv4 using SPL ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364013#M162982</link>
    <description>&lt;P&gt;I saw that answer before asking my question.. it's  a different case&lt;/P&gt;</description>
    <pubDate>Sat, 10 Feb 2018 08:41:11 GMT</pubDate>
    <dc:creator>Muwafi</dc:creator>
    <dc:date>2018-02-10T08:41:11Z</dc:date>
    <item>
      <title>How to convert Decimal IP address to dotted quad IPv4 using SPL ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364009#M162978</link>
      <description>&lt;P&gt;Hello Guys,&lt;/P&gt;

&lt;P&gt;I'm working on Data which is exported by telecom devices and IPs is exported in Decimal format as 170468155&lt;/P&gt;

&lt;P&gt;can you help to convert this to normal dotted quad IP format xxx.xxx.xxx.xxx ?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 06:42:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364009#M162978</guid>
      <dc:creator>Muwafi</dc:creator>
      <dc:date>2018-02-10T06:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Decimal IP address to dotted quad IPv4 using SPL ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364010#M162979</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Have you tried this?&lt;BR /&gt;
    | eval ips=tostring(ip)| eval newip=substr(ips,1,3)+"."+substr(ips,4,6)+"."+substr(ips,7,9)&lt;BR /&gt;
 Assuming your 170468155 is a field value for a field named ip &lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 06:50:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364010#M162979</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-02-10T06:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Decimal IP address to dotted quad IPv4 using SPL ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364011#M162980</link>
      <description>&lt;P&gt;Have a look at this answer:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/108752/converting-an-encoded-ip-address-to-dotted-decimal.html"&gt;https://answers.splunk.com/answers/108752/converting-an-encoded-ip-address-to-dotted-decimal.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 06:55:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364011#M162980</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-10T06:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Decimal IP address to dotted quad IPv4 using SPL ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364012#M162981</link>
      <description>&lt;P&gt;That didn't work!&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 08:39:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364012#M162981</guid>
      <dc:creator>Muwafi</dc:creator>
      <dc:date>2018-02-10T08:39:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Decimal IP address to dotted quad IPv4 using SPL ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364013#M162982</link>
      <description>&lt;P&gt;I saw that answer before asking my question.. it's  a different case&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 08:41:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364013#M162982</guid>
      <dc:creator>Muwafi</dc:creator>
      <dc:date>2018-02-10T08:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Decimal IP address to dotted quad IPv4 using SPL ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364014#M162983</link>
      <description>&lt;P&gt;didnt work? care to explain? can you post your event log containing your ip field?&lt;BR /&gt;
What you are asking is very simple. I suspect we are not understanding your question completely&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 08:58:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364014#M162983</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-02-10T08:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Decimal IP address to dotted quad IPv4 using SPL ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364015#M162984</link>
      <description>&lt;P&gt;it's giving a wrong result&lt;/P&gt;

&lt;P&gt;if you used this website &lt;A href="https://www.ipaddressguide.com/ip"&gt;https://www.ipaddressguide.com/ip&lt;/A&gt; to convert between decimal IP and dotted quad IP the result of converting 170468155 is 10.41.35.59   while your eval result is 170.468155.155&lt;/P&gt;

&lt;P&gt;The issue is not adding the "." , it needs calculations!&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 09:16:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364015#M162984</guid>
      <dc:creator>Muwafi</dc:creator>
      <dc:date>2018-02-10T09:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Decimal IP address to dotted quad IPv4 using SPL ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364016#M162985</link>
      <description>&lt;P&gt;hang on a second...this is not strictly a splunk question, what you need is the logic to convert the decimal to ip (in general mathematical terms) and then implement the same in splunk.&lt;BR /&gt;
Do you have the maths / formula behind the conversion?&lt;BR /&gt;
We can then try to implement the same in splunk&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 09:26:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364016#M162985</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2018-02-10T09:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Decimal IP address to dotted quad IPv4 using SPL ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364017#M162986</link>
      <description>&lt;P&gt;I don't have the formula &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 09:28:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364017#M162986</guid>
      <dc:creator>Muwafi</dc:creator>
      <dc:date>2018-02-10T09:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Decimal IP address to dotted quad IPv4 using SPL ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364018#M162987</link>
      <description>&lt;P&gt;Hi @Muwafi,&lt;BR /&gt;
If your decimal value is present in &lt;CODE&gt;IP&lt;/CODE&gt;  field then try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval ip=if(IP&amp;lt;1,IP+2147483648,IP) | eval aaa=floor(ip/16777216) | eval     bbb=floor((ip-aaa*16777216)/65536) | eval ccc=floor((ip-(aaa*16777216+bbb*65536))/256)| eval ddd=ip-(aaa*16777216+bbb*65536+ccc*256) | eval ipv4=tostring(aaa)+"."+tostring(bbb)+"."+tostring(ccc)+"."+tostring(ddd)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Try this run anywhere search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults|eval IP="170468155"| eval ip=if(IP&amp;lt;1,IP+2147483648,IP) | eval aaa=floor(ip/16777216) | eval     bbb=floor((ip-aaa*16777216)/65536) | eval ccc=floor((ip-(aaa*16777216+bbb*65536))/256)| eval ddd=ip-(aaa*16777216+bbb*65536+ccc*256) | eval ipv4=tostring(aaa)+"."+tostring(bbb)+"."+tostring(ccc)+"."+tostring(ddd)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;so for decimal val of IP=&lt;CODE&gt;"170468155"&lt;/CODE&gt; it will output as &lt;CODE&gt;"10.41.35.59"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Feb 2018 14:37:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364018#M162987</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-02-10T14:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Decimal IP address to dotted quad IPv4 using SPL ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364019#M162988</link>
      <description>&lt;P&gt;I tested this app, it works. It's in splunkbase&lt;BR /&gt;
IP Format Conversion Scripted Lookup&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 23:48:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-Decimal-IP-address-to-dotted-quad-IPv4-using-SPL/m-p/364019#M162988</guid>
      <dc:creator>mgohman_splunk</dc:creator>
      <dc:date>2018-10-23T23:48:18Z</dc:date>
    </item>
  </channel>
</rss>

