Welcome, Guest. Please login or register.

Author Topic: Discovery via proxy  (Read 2230 times)

Ronald

  • Newbie
  • *
  • Posts: 15
    • View Profile
Discovery via proxy
« on: August 13, 2020, 09:02:59 am »
I have a configuration with a SNMP proxy
Different devices use the same IP but each device has a different read community.
Problem is this when I do a disco.
Quote
amastelek@nedi:~$ sudo /var/nedi/nedi.pl -Aall

Network Discovery (1.9.100) /var/nedi/nedi.pl -Aall
Started with 9 seeds at Thu Aug 13 06:56:33 2020
-------------------------------------------------------------------------------
Device                          Status                          Todo/Done-Time
===============================================================================
102.132.201.164 Warehouse       StIvIx i12  j2   Ap a0/0    Fw    8/1-1s
102.132.201.180 fbsa34Diasmedia StIvIx i2  j2    a4/0    Fw    7/2-1s
102.132.201.164 IP discovered already                       6/2-0s
102.132.201.164 IP discovered already                       5/2-0s
102.132.201.180 IP discovered already                       4/2-0s
102.132.201.164 IP discovered already                       3/2-0s
102.132.201.164 IP discovered already                       2/2-0s
102.132.201.164 IP discovered already                       1/2-0s
102.132.201.164 IP discovered already                       0/2-0s
How do I run nedi.pl so it ignores the IP?

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2901
    • View Profile
    • NeDi
Re: Discovery via proxy
« Reply #1 on: August 13, 2020, 03:44:19 pm »
I've never seen this and I'm afraid you'll need to run nedi.pl once for every ip. Alternatively you could disable the "discover already" check in the source code...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

Ronald

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Discovery via proxy
« Reply #2 on: August 13, 2020, 04:24:17 pm »
I'll have to create a new script for that but it won't really scale.

Is it possible to have a command line switch to disable discover already?

I am using nedi as a POC on an SDWAN and am using the standard linux NET-SNMP proxy on the CPE.

Ronald

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Discovery via proxy
« Reply #3 on: August 13, 2020, 08:56:06 pm »
Maybe it would be easier if a dup IP is reported only if the IP & read community is the same?

I'm using this: http://net-snmp.sourceforge.net/wiki/index.php/Snmpd_proxy

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2901
    • View Profile
    • NeDi
Re: Discovery via proxy
« Reply #4 on: August 15, 2020, 12:37:50 pm »
Could be done, but as long as there's not more demand for this I'd rather keep the process as is.

Change line 1529 in libmisc.pm:

   }elsif( 0 and grep {$_ eq $doip{$id}} (@doneip,@failip) ){
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

Ronald

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Discovery via proxy
« Reply #5 on: August 16, 2020, 04:31:35 pm »
I gave that a go but now it still reports "Done already"
The index for the discovery is the IP and not the device name.

I think the Index would be used with a -p but doesn't make sense with -A???

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2901
    • View Profile
    • NeDi
Re: Discovery via proxy
« Reply #6 on: August 31, 2020, 02:48:53 pm »
$doip contains IP addresses...

You still get the same log entries?
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo