Hi,
Is there any API call to add or update the DHCP settings in MS Switches or Switch Stacks?
We have 150+ networks and each has multiple VLANs that we are relaying to our DHCP servers.
It will be good if we could write a script to update the servers' IP addresses, and to revert in case of back out.
If the API is not available, do we have any suggestion on how could automate the changes?
Thanks in advance!
Solved! Go to Solution.
Hi,
I ran through the API docs (help > API docs page on the Dashboard) there is still no API call available to update the DHCP configuration of the switches so you will need to update the configuration individually on each of the networks you have.
Thanks,
Hi,
I ran through the API docs (help > API docs page on the Dashboard) there is still no API call available to update the DHCP configuration of the switches so you will need to update the configuration individually on each of the networks you have.
Thanks,
Why wouldn't the code below work? I just threw it together to answer your question. It is how I would do it in Python 3.82 using Meraki API 0.100.1. This would update the DHCP relay servers on all vlans - adjust accordingly to fit your need. I have used the update vlan API call to update vlans on MX appliances. You may want to add some error checking logic. Replace ['se.rv.er.01, se.rv.er.02'] with your new server IP's. I would test it on one network/vlan first to be sure you get the desired result and confirm the new setting works, ie. no typos on the server IP's.
Thanks for the reply.
The VLANs API calls works for MX only, since the argument is network-wide (network ID).
This is my guess for it to work with MS switches - DHCP settings or VLAN should have a way to associate with a switch or switch-stack.
Updating the MS Layer 3 interfaces and related routing/DHCP services might be in your near future. Stay tuned for lots of good stuff in Dashboard API v1...
Can Meraki support make these changes? We are migrating dhcp servers and I have over 100 meraki vlan SVI's to change.
looks like the ability is coming in v1 per changelog in beta 10
https://developer.cisco.com/meraki/whats-new/#!v1-0-0-beta-10
V1 is coming ....
(Next week)
Same problem. I have to change the dhcp-relayservers to hundreds of switches. There is no API for this, so it will have to be done manually.
you can do this in API 1.0. latest is 1.7 i believe. that's what i'm using
@Willem_vd_Pas - If you are referring to changing this on Layer 3 switches, it was added in API V1.
https://developer.cisco.com/meraki/api-v1/#!update-device-switch-routing-interface-dhcp
Description: Update a layer 3 interface DHCP configuration for a switch
Larry