A comprehensive Python script for managing Cisco Meraki MX VLAN configurations through Excel import/export functionality.
git clone https://github.com/Manvan33/mx-bulk-vlan-addressinggit
cd mx-bulk-vlan-addressingpython3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtOption A: API Key (simpler)
cp .env.example .env
Edit .env and add your MERAKI_API_KEY
Option B: OAuth (more secure)
.env to include your client ID and client secretusage: main.py [-h] --org ORG {check-api,validate-excel,apply-from-excel,export-to-excel,create-networks,create-vlans} ...
Meraki MX VLAN Configuration Tool
positional arguments:
{check-api,validate-excel,apply-from-excel,export-to-excel,create-networks,create-vlans}
Available commands
check-api Check Meraki API connectivity
validate-excel Validate Excel file format and data
apply-from-excel Apply VLAN configuration from Excel to Dashboard
export-to-excel Export VLAN configuration from Dashboard to Excel
create-networks Create networks
create-vlans Create VLANs
options:
-h, --help show this help message and exit
--org ORG Organization ID
python main.py --org <your_org_id> check-api
export-to-excel command:python main.py --org <your_org_id> export-to-excel
python main.py --org <your_org_id> validate-excel --file <path_to_your_excel_file>
python main.py --org <your_org_id> create-networks --file <path_to_your_excel_file> python main.py --org <your_org_id> create-vlans --file <path_to_your_excel_file>
python main.py --org <your_org_id> apply-from-excel --file <path_to_your_excel_file>
The tool exports and validates Excel files with this structure:
| Network Name | VLAN ID | VLAN Name | Subnet | MX IP |
|---|---|---|---|---|
| Site-A | 10 | Data | 192.168.10.0/24 | 192.168.10.1 |
| Site-A | 20 | Guest | 192.168.20.0/24 | 192.168.20.1 |
| Site-B | 10 | Data | 192.168.30.0/24 | 192.168.30.1 |
You can create new columns as needed, they will be ignored. Don't rename the existing columns.
. @ # _ -. @ # _ -192.168.1.0/24)This project is licensed under the MIT License - see the LICENSE file for details.
This tool is not officially supported by Cisco Meraki. Use at your own risk and always test in a lab environment before applying to production networks.
Owner
Contributors
Categories
NetworkingProducts
MerakiProgramming Languages
PythonLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community