{"id":13787393,"url":"https://github.com/cisco-en-programmability/dnacenter_path_trace","last_synced_at":"2026-01-16T16:49:52.346Z","repository":{"id":98765139,"uuid":"205210571","full_name":"cisco-en-programmability/dnacenter_path_trace","owner":"cisco-en-programmability","description":"Sample code for performing a path trace between two nodes in the Cisco DNA Center managed network","archived":false,"fork":false,"pushed_at":"2019-12-13T01:49:13.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-18T00:37:25.177Z","etag":null,"topics":["cisco-dna","cisco-dna-center","cisco-dnac"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cisco-en-programmability.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-29T16:56:34.000Z","updated_at":"2019-12-16T19:25:53.000Z","dependencies_parsed_at":"2023-03-16T01:44:11.766Z","dependency_job_id":null,"html_url":"https://github.com/cisco-en-programmability/dnacenter_path_trace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fdnacenter_path_trace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fdnacenter_path_trace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fdnacenter_path_trace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-en-programmability%2Fdnacenter_path_trace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cisco-en-programmability","download_url":"https://codeload.github.com/cisco-en-programmability/dnacenter_path_trace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253655798,"owners_count":21943068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cisco-dna","cisco-dna-center","cisco-dnac"],"created_at":"2024-08-03T20:00:33.676Z","updated_at":"2026-01-16T16:49:52.332Z","avatar_url":"https://github.com/cisco-en-programmability.png","language":"Python","funding_links":[],"categories":["Assurance"],"sub_categories":[],"readme":"# Cisco DNA Center Path Trace\n\n\nThis Python script will perform Path Trace between two clients in the Cisco DNA Center managed network.\n\nPath Trace is a excellent tool to assist in troubleshooting connectivity between a source device and destination device.\n\nPath Trace will collect the path information for specified source and destination IPv4 addresses, and optional, source and destination port numbers, and protocol number.\n\nIt will collect also information about in-path statistics for interfaces, interface configured ACLs and QoS policies, and device statistics\n\n**Cisco Products \u0026 Services:**\n\n- Cisco DNA Center\n\n**Tools \u0026 Frameworks:**\n\n- Python environment\n\n**Usage**\n\nThis app will ask the user to input the following:\n\n- Source IPv4 Address\n- Source port number (or Enter for none)\n- Destination IPv4 Address\n- Destination port number (or Enter for none)\n- Protocol number (or Enter for none)\n\nIt will validate if the provided IPv4 addresses, ports and protocol numbers are valid.\nIt will initiate a new flow analysis, verify when the task is completed, retrieve the Path Trace details, parse the output and provide the hop-by-hop info.\n\n$ python path_trace.py \n\n*Sample output:*\n\n    Input the source IPv4 Address:   10.93.140.35\n    Input the source port number (or Enter for none):   5500\n    Input the destination IPv4 Address:   10.93.234.96\n    Input the destination port number (or Enter for none):   80\n    Input the protocol number (or Enter for none):   6\n    \n    Initiated Path Trace with these parameters:\n    {\n        \"destIP\" : \"10.93.234.96\" , \n        \"sourceIP\" : \"10.93.140.35\" , \n        \"periodicRefresh\" : false , \n        \"inclusions\" : [\n            \"INTERFACE-STATS\" , \n            \"DEVICE-STATS\" , \n            \"ACL-TRACE\" , \n            \"QOS-STATS\"\n        ] , \n        \"sourcePort\" : 5500 , \n        \"destPort\" : 80 , \n        \"protocol\" : 6\n    }\n    \n    Initiated Path Trace with the id: \n    a1bba53b-5d80-4aba-9372-573645077ee9\n    \n    \n    The complete path trace info is: \n    \n    {\n        \"request\" : {\n            \"sourceIP\" : \"10.93.140.35\" , \n            \"sourcePort\" : \"5500\" , \n            \"destIP\" : \"10.93.234.96\" , \n            \"destPort\" : \"80\" , \n            \"protocol\" : \"6\" , \n            \"periodicRefresh\" : false , \n            \"inclusions\" : [\n                \"INTERFACE-STATS\" , \n                \"ACL-TRACE\" , \n                \"DEVICE-STATS\" , \n                \"QOS-STATS\"\n            ] , \n            \"id\" : \"a1bba53b-5d80-4aba-9372-573645077ee9\" , \n            \"status\" : \"COMPLETED\" , \n            \"createTime\" : 1574879612290 , \n            \"lastUpdateTime\" : 1574879612878 , \n            \"controlPath\" : false\n            .....\n            .....\n            .....\n            }\n    \n    Path Trace status:  COMPLETED\n    \n    Path Trace result:\n    [\n        \"10.93.140.35\" , \n        \"TenGigabitEthernet1/0/1\" , \n        \"NYC-ACCESS\" , \n        \"TenGigabitEthernet1/0/24\" , \n        \"GigabitEthernet2\" , \n        \"NYC-RO\" , \n        \"GigabitEthernet3\" , \n        \"GigabitEthernet3\" , \n        \"SP\" , \n        \"GigabitEthernet2\" , \n        \"GigabitEthernet2\" , \n        \"PDX-RO\" , \n        \"GigabitEthernet1\" , \n        \"GigabitEthernet1/0/13\" , \n        \"PDX-M\" , \n        \"GigabitEthernet1/0/20\" , \n        \"FastEthernet0\" , \n        \"PDX-DMZ\" , \n        \"10.93.234.96\"\n    ]\n    \n    \n    End of Application \"path_trace.py\" Run\n\n\n**License**\n\nThis project is licensed to you under the terms of the [Cisco Sample Code License](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcisco-en-programmability%2Fdnacenter_path_trace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcisco-en-programmability%2Fdnacenter_path_trace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcisco-en-programmability%2Fdnacenter_path_trace/lists"}