Menu

#108 Problems with subnets larger than /22 (/21, /20 etc..)

version 0.8
closed
None
1
2016-02-02
2014-10-25
Anonymous
No

I'm running a clean install of Ubuntu 12.04.3 LTS with Apache2, and meet all the requirements for PHPIPAM. The install was flawless, the app is AMAZING and works well. However...

We are a VERY large enterprise with over 21 Datacenters. We do a LOT of supernets in the range of /13, /14, /15, and /16's. We then variable subnet out some of those into smaller /20's and /21's.

The problem we have, is that when adding anything larger than a /23, such a a/21, you can add the Subnet fine, but when you do the scan, and it finds the hosts, then you "Add Discovered Hosts", they never do show up, and the subnet shows as 100% free.

We do not have this problem on /23's or /24s etc.. I've now tried many times to get this to work, and they just won't. Is there a known bug here? We've tried to disable the "visual IP table", and even that doesn't work.

If we can get this 1 piece squared away, we will do a full scale deployment as our company standard, and that would be HUGE. Please let me know what I can do to help/test etc.. This is a huge priority for us.

Discussion

  • Anonymous

    Anonymous - 2014-10-26

    I have the similar issue with anything greater than /24. The issue is all the scanned ip has been added with subnet id "0".

    Thanks

     
  • Jim Julson

    Jim Julson - 2014-10-26

    Hi There!

    I think I have some information about this that will prove to be useful.

    So, I looked in the MySQL DB under the "subnets" table, and saw the column for "subnetId" and looked for the subnet in question. I located it, and the ID was "78".

    Now, I did a "SELECT * FROM phpipam_mydbnamehere.ipaddresses; " and I expected to see a fairly sizeable list of "subnetID" entries with a value of "78", but in fact, there was not 1 single entry. I had plenty of entries with other subnet ID's for my /24s and /23s, but not 1 entry for any /21 or larger. That said, what they were, was actually "0".

    So basically, every single subnet that I add that is a /21 or larger is not getting the proper "subnetId" set in the "ipaddresses" table, hence it's not showing up properly in the section. I can duplicate this behavior with all my subnets that are /21s, and I have quite a few of them. I will provide any info you need to help with this, and run any tests you need as well. Just let me know!

     
  • Anonymous

    Anonymous - 2014-10-26

    I have same issue with subnet greater than /23 subnet. I noticed that all the up has been added with subnetid of 0. I hope this could be fix ad well.

     
  • Miha Petkovsek

    Miha Petkovsek - 2014-11-12

    Hi, thanks for info, will get into it.

    So to summarize > when scanning subnets larger than /23, all hosts that are found are added to database without subnetID (with subnetId = 0)?

     
  • Miha Petkovsek

    Miha Petkovsek - 2014-11-12

    Can someone check functions/functions-network.php, function insertScanResults

    after
    $query = implode("\n", $query);
    add
    print $query[1];

    If query is ok (the subnetId part is correct) then try to enter it manually to MySQL and check result.

    BTW I just scanned /20 subnet, added 1 host and it appeared without problems. I think it must be SQL-related, the only think that confuses me is this not happening for all subnets. Code is the same.

     
    • Jim Julson

      Jim Julson - 2014-11-19

      Hi Miha,

      You are correct. The problem appears to be intermittent. I have a HUGE number of subnets to add/scan, and after getting more into it, I noticed that some of the /20, /21, /22 and /23's actually worked fine, while others did not.

      The one common denominator was that the tables had a subnetID value of 0. And of course, I can manually assign the value and it updates just fine.

      Also, I'm happy to help, but I'm far from a dev/coder/dba. So I could use some "hand holding" to do stuff. Let me know. We can also work together after hours if it's easier for you.

       
  • Miha Petkovsek

    Miha Petkovsek - 2016-02-02
    • Status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel