Meraki autoMAC - allows you to automatically configure the switch ports on a MS network based on historical cisco switch config(show run and show mac address-table) or device profiles (OUI/CDP/LLDP/MAC/Vendor). Think of it like API based Secure-Connect. Works on any switch type.
- "History" mode, where it uses "show run" and "show mac address-table" output to identify new clients and port configurations
- "Profile" mode, where it uses Mac address, OUI, Vendor, Manufacturer, CDP/LLDP info to assign a default profile
- "Hybrid" mode, both of the above enabled. Configures all known devices, and uses profiles to configure anything new
- place config files in local directory 'cisco/' (raw output from 'show run' and 'show mac address-table' in a " .log" file format)
- Configure the ORG_ID in 'autoMAC.py' to match the org your configuring
- TAG your switch Network with "autoMAC" tag
- TAG your switches in the Network with "autoMAC" (not tagging them will exclude them)
- TAG your switch ports with "AM:on" to allow switch port configuration (requires them to be an access port, not TRUNK!)
- (optional) TAG your switch ports with "AM:auto" as well as "AM:on" to have it perpetually configure port on change, otherwise it'll be one-time config
- (optional) to disable Auto-Profiles, set "allowProfileConfigs" to 'False' in autoMAC.py
- (optional) to disable Auto-History, set "allowHistoryConfigs" to 'False' in autoMAC.py
- (optional) For CUSTOM profiles, edit portConfig.py and create new profiles in the init() section, examples provided
- If you have your network, switches and ports tagged, run the script!
- python 3.x
- meraki SDK v1 or later for python (https://developer.cisco.com/meraki/api/#/python/getting-started)
- install python packages ('pip3 install -r requirements.txt')
-test it first -Try not to do CDP only profiles, there's some issues where devices that don't do CDP/LLDP might show CDP info of another device in the stack
- Check it out here -> https://youtu.be/HCRGmuMJFd0