I have a modern network with DNAC and Cat 9k switches. Given a static list of IPs , I'm trying to find a programmatic way of bouncing the interfaces those devices are connected to.
I know how to query DNAC with a Client's IP and have it return the Switch & Switchport the Client is connected to, but I can't work out how, either via DNAC or via Netconf to the Switch, to bounce the interface (ie, "Shutdown" followed shortly by "No Shutdown" in CLI terms).
Are there any examples of how to achieve this? Or suggestions of the best approach? It seems quite basic and I'm surprised I can't find any examples of how to bounce a port.
If you looking to Build one, you need to list what you like to achieve, based on the post you looking for bounce the ports, so i have suggested the method to do the same.
if you looking if the ports gone disabled - this bit tricky, not that its not possible, - some time you need to investigate whu this ports gone error disabled ?
on programming point of view. send all the logs to syslog server - capture the logs, trigger the script.
you can send me personal message if you like more to do frame work we can discuss. (this is my favourite topic) self healing with out engineer intervention.
How are you getting the data from DNAC? Is it something you can work with easily (JSON, XML, etc)? Does it include the IP of the switch the hosts are on?
You could write something in python to take that and restconf the ports up/down