Tuesday, October 16, 2018

Script or tool to map a CDP (Cisco) network

Specifically, there is no SNMP, I have telnet/ssh access (it's a mix), CDP is running. So I can log on to a switch, get basic info, and see the neighbouring switches and their IPs, hop to the next switch get info, see neighbours etc. I do not have a list of devices but do have "probable" authentication details (as in try these passwords and/or user/pass). So discovery is an important requirement.

What's needed is to be able to telnet/ssh in and map from one switch to the next, limit the crawling by IP range, and output a list of x is connected to y, z, v, v is connected to w, x, y etc etc.

Needs to be free or very low cost (no budget for this at the moment - and there's a grand plan to buy a big expensive system™ "real soon now").

What would be nice is to be able to extend with arbitrary commands (so get a list of active ports, ports that are errored out, administratively down, trunk ports, version information, configs etc). And some kind of error handling (can't connect, authentication failure, can't run commands, CDP not running etc).

And very nice would be to output a topology map diagram.

The tools I've looked at thus far are either SNMP based, insanely complex/feature, or expensive or some combination.



No comments:

Post a Comment