This flask app gathers Client Details (MAC, IP, CDP Neighbors, etc.) across Catalyst Switches and across the Meraki networks in an organization. Information is gathered based on MAC address and time period (optionally: IP Address).
The app helps track a client across a mixed network, identifying the most recent connections on both Catalyst Switches and Meraki Networks.
Note:
In order to use the Meraki API, you need to enable the API for your organization first. After enabling API access, you can generate an API key. Follow these instructions to enable API access and generate an API key:
Organization > Settings > Dashboard API access
Enable access to the Cisco Meraki Dashboard API
My Profile > API access
Generate API key
For more information on how to generate an API key, please click here.
Note: You can add your account as Full Organization Admin to your organizations by following the instructions here.
git clone [repository name]
.env_sample
file to .env
. Rename config_sample.py
to config.py
..env
MERAKI_API_KEY = "" ORG_NAME = ""
config.py
. These Switches will be queried by the application.SWITCH_INFO = [ { "device_type": "cisco_ios", "ip": "X.X.X.X", "username": "", "password": "", "secret": "" } ]
Note: Please ensure SSH is configured on each Catalyst Switch, as this is required for the Netmiko SSH connection. For more information on Netmiko, consult this guide.
pip3 install -r requirements.txt
To run the program, use the command:
flask run
Navigate to the Flask URL, and the main page will be displayed:
To get client information, provide a MAC Address (or IP), and a Time Period (or Custom Interval). The script will first query all Catalyst Switches provided in the config.py
list, then it will query the Meraki Cloud.
The 3 Main Pieces of Client Data Are:
Each piece of data can be downloaded as an Excel file as well.
Provided under Cisco Sample Code License, for details see LICENSE
Our code of conduct is available here
See our contributing guidelines here
Please note: This script is meant for demo purposes only. All tools/ scripts in this repo are released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. Any use of these scripts and tools is at your own risk. There is no guarantee that they have been through thorough testing in a comparable environment and we are not responsible for any damage or data loss incurred with their use.
You are responsible for reviewing and testing any scripts you run thoroughly before use in any non-testing environment.
Owner
Contributors
Categories
Products
MerakiCatalyst SwitchesProgramming Languages
CSSLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community