Networking-Forums.com

Professional Discussions => Programming Goodies and Software-Defined Networking => Topic started by: dlots on June 01, 2017, 10:48:07 AM

Title: CDP parser
Post by: dlots on June 01, 2017, 10:48:07 AM
For those that are interested I built a python CDP parser over on https://github.com/GoreNetwork/CDP-parser/tree/master

Give it a text file with the output from "show cdp entry *" from a Cisco IOS device and it will give you a list of dictionaries one dict for each device in this format

{'capabilities': 'Router Switch IGMP ',
'local_int': 'GigabitEthernet1/3',
'platform': 'cisco WS-C6509-E',
'remote_id': 'bob.GoreNetwork',
'remote_int': 'GigabitEthernet2/6',
'remote_ip': '10.0.0.1',
'version': 'Cisco IOS Software, s72033_rp Software '
            '(s72033_rp-ADVIPSERVICESK9_WAN-M), Version 12.2(33)SXH5, RELEASE '
            'SOFTWARE (fc1)'},
Title: Re: CDP parser
Post by: deanwebb on June 01, 2017, 11:47:44 AM
That is some cool, right there.
Title: Re: CDP parser
Post by: dlots on June 01, 2017, 01:23:17 PM
thank you :-D
Title: Re: CDP parser
Post by: wintermute000 on June 01, 2017, 04:36:43 PM
Did you follow the Kirk Byers tutorial?
Title: Re: CDP parser
Post by: that1guy15 on June 01, 2017, 07:50:47 PM
Cool stuff dude! Ive never heard of ciscoconfparse but it looks like it has some nice features.