3 Replies Latest reply on Feb 7, 2011 8:46 AM by David.Hruby

    LANSurveyor Discovery Configuration File Format

      Hi,
      I`m writing this because I couldn`t access the related discussion on this site and also because I wasn`t able to find this info anywhere on the net. Basically this is a tip and also a further discussion if other people have more info

      The problem I was facing was the need to create .lsc discovery files from a script and not to type everything by hand in lan surveyor. The .lsc config file isn`t extremely friendly to edit so the following info describes how to enter IP address ranges in .lsc file format.
      I know this is not 100% complete info so you should check LS ranges before creating a diagram :)

      ok,
      for example we have the following two ranges:
      10.1.1.1 - 10.1.1.254 and 10.100.2.1 - 10.100.3.254
      part of the lsc file would look something like this:

       2                          <- number of ranges
      16843018             <- range1 start ip addr
      -33488630            <- range1 end ip addr
      16933898             <- range2 start ip addr
      -33332214            <- range 2 end ip addr
      0                            <- end

      Lets take the first ip 10.1.1.1 and get it into 16843018 :)
      first step is to write the octets backwords so 10.1.1.1 becomes 1.1.1.10
      second step is to transform from base 10 to base 2 so 1.1.1.10 becomes 00000001.00000001.00000001.00001010
      third step is to delete the dots so we get this 00000001000000010000000100001010
      and the last step is to transform this 00000001000000010000000100001010 back into base 10 so we get 16843018
      the same for the other values

      The second ip: 10.1.1.254
      1)254.1.1.10
      2)11111110.00000001.00000001.00001010
      3)11111110000000010000000100001010
      4)4261478666

      I know the value is different but LS seems to work ok with it also.. I don`t know the negative values are created

      HTH