Welcome, Guest. Please login or register.

Author Topic: Device name + FQDN and Neighbor name truncation  (Read 2415 times)

joserra

  • Newbie
  • *
  • Posts: 17
    • View Profile
Device name + FQDN and Neighbor name truncation
« on: March 23, 2016, 12:17:14 PM »
Hi,

In discovery process using FQDN (-f option), neighbor´s names are truncated on 40 characters lenght.
Instead, Nedi.links table is defined to be 64 characters for neighbor field

Code: [Select]
DisProtocol  ------------------------------------------------------------------
SNMP:Connect 10.39.191.201 XXXXX v2 Tout:7s MaxMS:4095 Retry:1 NB:0
NEB :10124.1
CDP :RAD_0.3_cat3750G_IMG01.1234.1234567890.1,Gi1/0/50 10.39.191.1 on Gi0/24

A second cuestion  :-\

I don´t like to include domain name in device´s name, but we have several devices with a period character on device name and cannot be changed.
Is there any workaround to use an specific device name when certain device name is discovered ?
For example, i would like RAD_0.3_cat3750G_IMG01.acme.com device to be named RAD_0.3_cat3750G_IMG01

Making rename on database generates "duplicated" devices when next discovery process is executed.

What´s the source code lib/file/line where device name is fixed ?

Thanks

joserra

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Device name + FQDN and Neighbor name truncation
« Reply #1 on: March 24, 2016, 06:01:54 PM »

...

A second cuestion  :-\

I don´t like to include domain name in device´s name, but we have several devices with a period character on device name and cannot be changed.
Is there any workaround to use an specific device name when certain device name is discovered ?
For example, i would like RAD_0.3_cat3750G_IMG01.acme.com device to be named RAD_0.3_cat3750G_IMG01

Making rename on database generates "duplicated" devices when next discovery process is executed.

What´s the source code lib/file/line where device name is fixed ?

Thanks

A flavour of autoresponse  ::)

Device names are fixed on inc/libsnmp.pm using sentences similar to this one:
Code: [Select]
$na =~ s/^(.*?)\.(.*)/$1/ if !$main::opt{'F'};
Could be interesting to use a new NeDi configuration parameter (Domain name) ?
Preceding code would be transformed to:

Code: [Select]
$mydomain = ".acme.com";
$na =~ s/^(.*?)$mydomain/$1/; if !$main::opt{'F'};


Hannu Liljemark

  • Full Member
  • ***
  • Posts: 149
  • Here to help
    • View Profile
Re: Device name + FQDN and Neighbor name truncation
« Reply #2 on: March 25, 2016, 12:21:29 PM »
Does it help if you map the name in nedi.conf with a mapna line?

Br,
Hannu

joserra

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Device name + FQDN and Neighbor name truncation
« Reply #3 on: March 29, 2016, 10:49:49 AM »
Hi Hannu,

Thanks a lot for your comment.
It works fine but you need to know previously the name of your devices to avoid to be identified erroneously.

I discovered this problem using NeDi in our network with an stranger network loops.
I think that creating a new NeDi"domain name" parameter would be a better solution.

Thanks again.

JoSerra

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2785
    • View Profile
    • NeDi
Re: Device name + FQDN and Neighbor name truncation
« Reply #4 on: March 31, 2016, 04:43:31 PM »
I've added an option to use a regexp on mapna, allowing to remove or replace any part of the name. Will be available in NeDi 1.6
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo