GithubHelp home page GithubHelp logo

merakiswitchprovision's Introduction

Meraki Network Provisioning Script

This Python script automates the process of provisioning Meraki networks, including switches and Layer 3 configurations, by using data provided in a CSV file. It leverages the Meraki Dashboard API to create networks, claim devices, configure switch settings, setup LACP for trunk ports, and provision Layer 3 interfaces with specific VLAN configurations.

Setup

Before running the script, ensure you have Python 3.x installed on your system. You will also need to install the requests library, which can be done via pip:

pip install requests

Configuration

Environment Variables: The script uses an environment variable MERAKI_DASHBOARD_API_KEY for the Meraki API key. Ensure you set this variable in your environment:

export MERAKI_DASHBOARD_API_KEY='your_api_key_here'

Replace your_api_key_here with your actual Meraki Dashboard API key.

CSV File: Prepare a CSV file with the required data for provisioning your networks and devices. The expected columns are:

  • SITEID
  • SITEIP
  • CoreSWNAME
  • CoreSN
  • CoreSW2PORT1-2
  • AccessSW1NAME
  • AccessSW1SN
  • AccessSW1PORT1-2
  • AccessSW2NAME
  • AccessSW2SN
  • AccessSW2PORT1-2 The script expects this file to be named inventory.csv by default.

Organization ID: Modify the ORGANIZATION_ID variable within the script to match your Meraki organization ID.

Usage

To run the script, simply execute it from the command line, ensuring your CSV file is in the same directory or specifying its path if located elsewhere:

python meraki_provisioning.py

Features

  • Network Creation: Automatically creates a new network for each site listed in the CSV file.
  • Device Claiming: Claims switches into the created networks based on their serial numbers.
  • Switch Configuration: Configures switch settings including names, management IPs, and LACP trunk ports.
  • Layer 3 Provisioning: Sets up Layer 3 configurations for VLANs, including SVIs and DHCP relay settings.

Notes

Ensure your API key has adequate permissions for all operations the script performs. Review and adjust the time zone in the network creation payload as necessary. The script outputs logs to the console for each operation, making it easy to track the provisioning process and troubleshoot any issues.

Licensing

https://github.com/CiscoSE/cisco-sample-code/blob/master/LICENSE

merakiswitchprovision's People

Contributors

brbuxton avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.