vManage APIs for Application Aware Routing Policies

This public repo contains python code that can be used to interact with the Cisco SD-WAN vManage REST API. The environment is pre-configured to access the Cisco DevNet Reservable Sandbox for SD-WAN fabric.You can edit the variables in the environment to point to your own vManage instance. The code contains REST API calls to authenticate, get a list of devices that are part of the SD-WAN fabric. Cisco SD-WAN vManage 19.2.2.

Sandbox Image

Objective

  • How to use vManage APIs -
    • Monitor Application Aware Routing statistics (BFD statistics) for Overlay Tunnels
    • Create new SLA class list, Application Aware Routing policy and update active vSmart policy
    • Delete SLA class list and Application Aware Routing policy

Requirements

To use this code you will need:

  • Python 3.7+
  • vManage user login details. (User should have privilege level to configure policies)

Install and Setup

  • Clone the code to local machine.
git clone https://github.com/ciscodevnet/sdwan-application-route-policy.git
cd sdwan-app-route-policy
  • Setup Python Virtual Environment (requires Python 3.7+)
python3.7 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
  • A YAML file with the Cisco SD-WAN Sandbox has been created vmanage_login.yaml You can edit the variables in the environment to point to your own vManage instance.

Example:

Yaml

Sample Outputs

AppOutput

Sample: Create new SLA class list, Application Aware Routing policy and update active vSmart policy

AppOutput

Sample: Delete SLA class list and Application Aware Routing policy

AppOutput

Use Case

Application-Aware Routing

Application-aware routing tracks network and path characteristics of the data plane tunnels between Cisco SD-WAN devices and uses the collected information to compute optimal paths for data traffic. These characteristics include packet loss, latency, and jitter, and the load, cost, and bandwidth of a link. The ability to consider factors in path selection other than those used by standard routing protocols—such as route prefixes, metrics, link-state information, and route removal on the Cisco SD-WAN device—offers a number of advantages to an enterprise:

  • In normal network operation, the path taken by application data traffic through the network can be optimized, by directing it to WAN links that support the required levels of packet loss, latency, and jitter defined in an application’s SLA.
  • Network costs can be reduced because data traffic can be more efficiently load-balanced.
  • Application performance can be increased without the need for WAN upgrades.

The process of classifying tunnels into one or more SLA classes for application-aware routing has three parts:

  • Measure loss, latency, and jitter information for the tunnel.
  • Calculate the average loss, latency, and jitter for the tunnel.
  • Determine the SLA classification of the tunnel.

How to use vManage APIs:

  • Monitor Application-Aware Routing statistics (BFD statistics) for Overlay Tunnels.
  • Create a new SLA class list, Application-Aware Routing policy, and update active vSmart policy.
  • Delete the SLA class list and Application-Aware Routing policy.

View code on GitHub

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.