2 Replies Latest reply on May 20, 2013 6:23 PM by klep

    What is IPAddressGUID ?


      There is a new field in the Nodes table named IPAddressGUID. How is it created, and what is it used for?




        • Re: What is IPAddressGUID ?
          Tomas Mrkvicka

          It is IP address converted into GUID. For IPv4 addresses only first 4 bytes are used. IPv6 use simple algorithm how to convert it to GUID. Our plan is to use it internally for some operations like joins bettween tables based on IP address. It is because joins based on GUIDs are much more faster than joins based on strings.

            • Re: What is IPAddressGUID ?

              the simple algorithm for IPv4 is just the hexadecimal representation of each octet in reverse followed by a string of "0's" making up the remainder of the 128bit addy .. I wrote a quick PS function to generate them for me, feel free to use it.



              function klep_guid($ip)


                $ipx = @()

                foreach ($ipa in $ip.split("."))


                  $ipx += "{0:X2}" -f [int]$ipa #Hex



                $ipy = $ipx[3] + $ipx[2] + $ipx[1] + $ipx[0] + "-0000-0000-0000-000000000000"

                $ipy = $ipy.replace(' ', '')