Hi,
I found several posts where authors needed some CDP crawler to draw actual network scheme, like:
Script or tool to map a cdp (cisco) network
I just wrote something like this, tested on my environment and found pretty much useful. Want to share with everyone and hope to get some feedback. Currently, only cisco is supported (this is what I have in my network).
Actually, it is a Python library, may be useful for your network automation scripts. Please find it at:
https://github.com/sergeyzelyukin/cisco-mapper
To use it, just feed it with a dictionary with all possible auth credentials, which can be met in your network, also give it a start device and optionally limit the depths. The script will start logging in to devices, gathering info, browsing "sh cdp neighbors" and so far and so forth until it gets all network map.
The result will be given in a dictionary which you can store in yaml/json file and draw text scheme to view the actual network hierarchy. The drawing function is very simple now, but I hope to add new features soon.
No comments:
Post a Comment