NeDi Community

NeDi Software Specific => Discovery => Topic started by: ingoh on June 21, 2019, 11:56:04 am

Title: CDPD link changed on discovery
Post by: ingoh on June 21, 2019, 11:56:04 am
We have some ports with GXP2160 IP phones. These are detected by CDP and the description is set according: CDP:GXP2160_xx:xx:xx:xx:xx:xx

Some users seem to turn off the device outside working hours (power strip?) and nedi sends annoying discovery messages ("...was CDPD link changed type  from CDPD" or "...is CDPD link changed type  to CDPD"). Is there a way to skip this messages for these devices or selected ports?

Thanks!
Title: Re: CDPD link changed on discovery
Post by: rickli on June 24, 2019, 12:17:22 pm
Phones should create CDPF links, which won't create notifactions like that. So the proper fix is to have those phones properly recognised. How good are your Perl skills? :)
Look at the function Disprot() in libsnmp.pm, if you dare. There's a section where all the phones are defined. Simply add another if for yours to match (look for $main::dev{$neb{$i}{$n}{'na'}}{ic} = "phon";). I can help in a remote session, if you want. Just send me a mail...
Title: Re: CDPD link changed on discovery
Post by: ingoh on June 24, 2019, 04:30:28 pm
Found the section in function DisProtocol() of libsnmp.pm and added a new match in the elsif - but nothing changed  :(

The phone is shown in Devices|Interfaces>Comment as "CDP:GXP2160_xx:xx:xx:xx:xx:xx". Do I have to match /GXP2160/ against $neb{$i}{$n}{'na'} or another entry?

Code: [Select]
   }elsif($neb{$i}{$n}{'na'} =~ /GXP2160/){
      $main::dev{$neb{$i}{$n}{'na'}}{ty} = "GXP2160";
      $main::dev{$neb{$i}{$n}{'na'}}{ic} = "phon";
      $main::dev{$neb{$i}{$n}{'na'}}{sv} = 34;
      $main::dev{$neb{$i}{$n}{'na'}}{dm} = 30;
      $misc::portprop{$na}{$lif}{lnk} = 'F';
      $main::dev{$neb{$i}{$n}{'na'}}{ven} = 'Grandstream';

Title: Re: CDPD link changed on discovery
Post by: rickli on July 05, 2019, 10:12:28 am
The change looks good to me. Do you see NeDi trying to discover the phone with SNMP? You probably have to add a match for the type in nedi.conf nosnmpdev.
Title: Re: CDPD link changed on discovery
Post by: ingoh on July 08, 2019, 12:16:08 pm
Added GXP2160 to nosnmpdev and after a new discovery the connection type has changed to CDPF  :)

Thanks a lot!
Title: Re: CDPD link changed on discovery
Post by: ingoh on July 19, 2019, 09:50:17 am
Although the connection type is recognized as CDPF, I still get this notification emaisl when changing. Nedi version is 1.7.090.

Code: [Select]
Hello ingoh

1) SWITCH Gi0/4 (DVT-XXX-Y-ZZ) was CDPF link changed type  from CDPF
Title: Re: CDPD link changed on discovery
Post by: rickli on July 22, 2019, 11:05:26 am
Tx for the feedback. I'll release 1.8 to the public soon, which will ignore phone links...