Showing results for 
Search instead for 
Did you mean: 

How to make NSO discover devices using CDP or LLDP


I want to make NSO discover the architecture of the network (Mapping between differents nodes) is there any way to do this using LLDP/CDP or any other alternative.

Currently I am using a static mapping that specify the connection between the interfaces of the devices but this method is not good because I can't detect changes when a connection between two devices is changed.

Cisco Employee



I'm not an expert in this area, but I've searched and found that there’s a discovery package shipped with NSO, documentation is available under:




Here's a nice discussion about Service discovery using NSO. Even if you can't find your answer, there are several experts in this area listed there.

Thank you for your reply Alextev,

The discovery package is not present in the 5.3 version of NSO and I'm looking for a way to discover devices and not services. That's mean how are the devices connected to each other (For exemple device1 interface Gig0/0 is connected to device2 Gig1/2).

You're welcome @AlaeddineJebnoun90723  . I did notice that what I was offering was about services instead of devices. I thought there was a chance it might help you. Luckily, the reply below seems to be very promising!

Cisco Employee

The discovery package was/is about discoverying nodes in the management network to onboard them in NSO. I believe the ask here is how to use NSO to get CDP/LLDP neighboring relationship. I did write a small package for that using NSO live-status capabilities. Moreover, depenending on the device vendor, this may be available already in the NED. For Cisco IOS try:

"admin@ncs# show devices device test live-status cdp neighbors"


That should give you the list of neighbors for that device. You can then use an action in python to create the logic that you wish.