I'm a bit confused about how SNMP can be used to discover network topology based on the CDP packets it receives from Cisco devices.

Say the network consists only of Cisco equipment. My understanding is that CDP is sent by the device only to directly connected devices. So how would a SNMP manager know about the devices that are connected more than one hop away?


The network devices use CDP to build a table of adjacent devices. You can extract this table with SNMP for a known device, and use it you discover its neighbours and their management addresses. Then you can just repeat the process, assuming your SNMP credentials are good for all network devices on the local network.

In principle, you could listen for CDP announcements from the nearest switch to bootstrap the process. It's usually going to be easier to start from a known address like the default router.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.