NeDi Community

NeDi Software Specific => Discovery => Topic started by: ascii on June 26, 2020, 10:41:08 am

Title: Moving from CDP to LLDP
Post by: ascii on June 26, 2020, 10:41:08 am
Hello together,

we startet moving from CDP to LLDP for various reasons.
i had the problem/challange to also change the discovery for new devices.
a lot and i mean a lot of .def file have just CDP enable.
since i'm lazy not willing to spent hour of finding and changing them.

i did it via CLI
at least on linux (debian) the code works. but should work on all unix plattforms. maybe different escaping

Code: [Select]
cd /var/nedi/sysobj
mkdir back
cp * back
grep -rlZ '\CDP$' . | xargs -0 sed -i 's/CDP/CDP|LLDPXN/g

the will search for file which have a line that is ending with CDP
it will pass the file names to sed to replace CDP with CDP|LLDPXN

at least for us it didn't break anything.

i would advise test it first with a couple of switches.
LLDP will most likely give you more Neighbor than CDP.
Would be grade if Nedi would only insert actual network devices.
eg. based on LLDP flags/Capability
Title: Re: Moving from CDP to LLDP
Post by: rickli on July 01, 2020, 08:31:48 am
Thanks for sharing. It'll be the way to go! I'll adjust the .defs as required by my customers.