Welcome, Guest. Please login or register.

Author Topic: Moving from CDP to LLDP  (Read 285 times)


  • Full Member
  • ***
  • Posts: 100
    • View Profile
Moving from CDP to LLDP
« 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


  • Administrator
  • Hero Member
  • *****
  • Posts: 2780
    • View Profile
    • NeDi
Re: Moving from CDP to LLDP
« Reply #1 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.
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!