Tuesday, April 20, 2021

Anyone have an example of a script with CiscoConfParse that will put together a list of of IPs?

I want to use ciscoconfparse to scan a range of switch IPs, and on those switch IPs, find specific ports that are in a certain vlan and not being used. I want it to compile a list then and then issue shutdown commands to those ports on each switch. For example, issue a shutdown command to ports in vlan x that are not being used on switch IP. xx.xx.xx.xx

I know this is a two step process, so right now working on the first step of putting the list together.

I understand how apps like ansible and netmiko point to a host or device file. I am thinking I can do this with ciscoconfparse, but just curious what this list should look like, considering I also want port information like vlan and current status. Like is it just another host file with a list of IPs plus added port info?

If anyone has an example I would greatly appreciate it.



No comments:

Post a Comment