04-20-2020 01:41 PM
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.
04-20-2020 04:14 PM
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,
04-20-2020 04:14 PM
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,
04-22-2020 01:03 AM
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.
04-24-2020 03:15 AM
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.
04-30-2020 05:09 AM
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...
07-30-2020 08:12 AM
Can Meraki support make these changes? We are migrating dhcp servers and I have over 100 meraki vlan SVI's to change.
07-30-2020 12:30 PM
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
07-30-2020 01:40 PM
V1 is coming ....
(Next week)
04-21-2021 07:19 AM
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.
04-21-2021 07:33 AM
you can do this in API 1.0. latest is 1.7 i believe. that's what i'm using
04-21-2021 08:05 AM
@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
09-22-2023 07:00 AM
This works for individual switches, but for stacks I get
"'errors': ['This endpoint is not supported for switches in switch stack'
Can't see the relevance the Layer 3 should be defined in 1 place?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide