Autodiscovery by IP

I have yet to get autodiscovery using IP to work. This is a new install of LibreNMS.
I have edited config.php setting snmp community = array. Had an issue with that using multiple lines for different communities per the docs so for now just have one line with the predominant community.
I have set [‘nets’] for the allowed networks and set the following;
// Autodiscovery Settings
$config[‘autodiscovery’][‘xdp’] = false;
// Autodiscover hosts via discovery protocols
$config[‘autodiscovery’][‘ospf’] = false;
// Autodiscover hosts via OSPF
$config[‘autodiscovery’][‘bgp’] = false;
// Autodiscover hosts via BGP
$config[‘autodiscovery’][‘snmpscan’] = false;
// autodiscover hosts via SNMP scanning
$config[‘discover_services’] = false;
// Autodiscover services via SNMP on devices of type “server”
// Networks to exclude from autodiscovery
$config[‘autodiscovery’][‘nets-exclude’][] = ‘0.0.0.0/8’;
$config[‘autodiscovery’][‘nets-exclude’][] = ‘127.0.0.0/8’;
$config[‘autodiscovery’][‘nets-exclude’][] = ‘169.254.0.0/16’;
$config[‘autodiscovery’][‘nets-exclude’][] = ‘224.0.0.0/4’;
$config[‘autodiscovery’][‘nets-exclude’][] = ‘240.0.0.0/4’;
// Autodiscover by IP
$config[‘discovery_by_ip’] = true;
// Set to true if you want to enable auto discovery by IP

I ran snmp-scan -d with a network specified and that worked after I removed the multiple communities. That originally appeared to use only the last community listed.
Still no autodiscover by IP. Server has been running since 12/21. Any ideas?

You need to allow to autodiscovery to discover you have excluded allot discovery modules only thing is allowed is the discovery by ip and all that does allow a device to be added if cant resolve the DNS name it will try with IP.

Also, You need to specify a network and set the SNMP community strings in config.php

If I were I would allow $config[‘autodiscovery’][‘xdp’] = true;

https://docs.librenms.org/#Extensions/Auto-Discovery/

Yes, I have been through that and several posts. I didn’t realize I needed one of them true for it to do the IP discovery. I have set xdp to true and will see what happens next time it trys.

Thanks,

tk

1 Like

Autodiscovery by ip means when the devices are added it uses the IP and not a hostname if one is found.

It does not mean it will scan your IP ranges, that is what snmp-scan.py is for.

1 Like

Ah, so there is not an automatic scan for devices by say a subnet? If so, unfortunate since I would like it to do a periodic scan for new devices by IP since we do not add everything to dns etc.

tk

Not just by subnet, it would need to be discovered using the following. (From the doc)

ARP
XDP: FDP, CDP LLDP
OSPF
BGP

You could use SNMP-scan.py with the properly configured subnets in config.php and run a scan on the subnets you have set.

You could always set up a cron to run snmp-scan.py. lldp, etc works great for me though.

1 Like

iam in a similar position as this poster (we dont use DNS, only IPs), and i kept having issues trying to figure out why auto discovery would not work on the IPs ranges/subnets i had defined. Then i found snmp-scan.py (maybe that should be part of the normal auto discovery, or alteleate an option that can be enabled).

however my question is- is there anyway that LLDP device discovery can be done via the IP address returned via LLDP ? ie (in librenms) my switch sees LLDP data from access points connected to its eth ports, but it tries to scan the APs name (and fails, as we dont use DNS). I know that the devices’ IP address is also in the LLDP packet/data, so id like that to be tried to scan. any what to do this?

tks

https://docs.librenms.org/Extensions/Auto-Discovery/#discovering-devices-by-ip## Additional Options

Discovering devices by IP

By default we don’t add devices by IP address, we look for a reverse dns name to be found and add with that. If this fails and you would like to still add devices automatically then you will need to set $config['discovery_by_ip'] = true;

Is there an easy possibility to add multiple Devices by IP-Range and mapped SNMP Community Settings? And do this as an auto-discovery?

The documentation only tells about CIDR Networks, and does not include mapped SNMP Community

Example:
Range 1:
Range: 192.168.103.11-192.168.103.23
SNMP Version: v2c
Community: community1

Range 2:
Range: 172.18.10.100-172.18.10.199
SNMP Version: v2c
Community: community2

I prefer to avoid not to access Devices with wrong community, or non-networking Devices in the subnet.