published

Troubleshooting Toolkit for Cisco SD-WAN

This python script interacts with the Cisco SD-WAN vManage REST API, to perform network troubleshooting programmatically.
Having a host IPv4 address as a starting point, this script attempts to:

  • Locate which site ID the host was originated, using OMP prefixes the controller received;
  • Managed devices (i.e.: vEdges, cEdges) generate ICMP packets using nPing to confirm reachability towards the target host;
  • Gather operational details, such as interface, omp, or bfd, of managed devices of the site;

The idea is to have a CLI tool able to provide as many operational details as output, with minimal information as input, such as an IP or site ID.
The interaction with the tool is menu-based and each option is either method or collective methods. This makes it modular, so more functions can be added to the tool if needed. For example, interacting with DDI for more information on the IP.

This script was built to interact with the Cisco DevNet Reservable Sandbox for SD-WAN 20.4. So the credentials used to authenticate towards the vManage are only applicable to the Cisco Sandbox. If used in another environment the variables below would need to be changed.

API used for this project

Method API path
POST /j_security_check
GET /dataservice/client/token
GET /dataservice/device/interface
GET /dataservice/device/omp/summary
GET /dataservice/device/omp/routes/received
GET /dataservice/device/bfd/sessions
GET /dataservice/device/tunnel/statistics
GET /dataservice/device/ip/routetable
POST /dataservice/device/tools/nping

For more information on available vManage APIs v20-4:

Requirements

git clone https://github.com/apomps/CiscoSdWanToolKit
cd CiscoSdWanToolKit
pip install -r requirements.txt

Example of Toolkit being used

sdwantoolkit

sdwan

About me!

I'm Arthur Pompeu, I'm a Network Engineer and very excited about finding new and creative ways to automate just about... anything!

Hope this code helps you in some way!

You can find me on LinkedIn

View code on GitHub
  • Owner

  • Contributors

    +2Github contributors
  • Categories

  • Products

    Catalyst SD-WAN
  • Programming Languages

    Python
  • License

    BSD 3-Clause "New" or "Revised" License

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.