phpipam-agent icon indicating copy to clipboard operation
phpipam-agent copied to clipboard

Scan agent incorrectly marking IPs as discovered that are unused

Open 9strands opened this issue 4 years ago • 5 comments

Versions: PHPIPAM host: PHP IPAMversion 1.5 with PHP 7.3.20 PHPIPAM-agent host https://github.com/phpipam/phpipam-agent master branch as of 2021-08-29 with PHP 7.4.22

We're trying to scan a /22. When I run the scan agent, it manually detects which IPs are up and not up according to the debug output when I run the scan manually. However, in the PHPIPAM dashboard, all IP's in the subnet are marked as discovered.

For example - running php index.php update prints the following details out:

ICMP Host Unreachable from 172.23.241.13 for ICMP Echo sent to 172.23.240.3 ICMP Host Unreachable from 172.23.241.13 for ICMP Echo sent to 172.23.240.9 ICMP Host Unreachable from 172.23.241.13 for ICMP Echo sent to 172.23.240.8 ICMP Host Unreachable from 172.23.241.13 for ICMP Echo sent to 172.23.240.7 ICMP Host Unreachable from 172.23.241.13 for ICMP Echo sent to 172.23.240.6 ICMP Host Unreachable from 172.23.241.13 for ICMP Echo sent to 172.23.240.5 ICMP Host Unreachable from 172.23.241.13 for ICMP Echo sent to 172.23.240.4 ... 172.23.240.1 : xmt/rcv/%loss = 1/1/0%, min/avg/max = 0.706/0.706/0.706 172.23.240.2 : xmt/rcv/%loss = 1/1/0%, min/avg/max = 0.739/0.739/0.739 172.23.240.3 : xmt/rcv/%loss = 1/0/100% 172.23.240.4 : xmt/rcv/%loss = 1/0/100% 172.23.240.5 : xmt/rcv/%loss = 1/0/100% 172.23.240.6 : xmt/rcv/%loss = 1/0/100% 172.23.240.7 : xmt/rcv/%loss = 1/0/100% 172.23.240.8 : xmt/rcv/%loss = 1/0/100% ...

However, in the subnet, these IPs all show up as online after the scan agent connects to the database and provides an update.

image

9strands avatar Sep 01 '21 08:09 9strands

I'm experiencing the same issue, I have not yet found a solution

superusergoose avatar Jun 16 '22 14:06 superusergoose

I ran into this issue when method was fping, however with pear I got expected results.

jsblock78 avatar Nov 17 '22 06:11 jsblock78

I ran into this issue when method was fping, however with pear I got expected results.

How is your config with pear?

WagoL avatar Feb 27 '23 18:02 WagoL

I have the same problem, which has not been solved yet.

jackychan114 avatar Jan 11 '24 01:01 jackychan114

My system environment is Rocky linux 9.3+PHP8.0, after debugging, I found that when class.Scon.php is scanned using fping, no matter whether the IP is reachable or not, there is a return value in the output, and the logic doesn't filter the timeout entries, I added an if function to deal with it, and it seems to be running normally at the moment! In class.Scon.php on line 449 image

DPxCruelty avatar Apr 26 '24 07:04 DPxCruelty