- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
API - MS add or update DHCP settings
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.
- Labels:
-
Dashboard API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Larry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can Meraki support make these changes? We are migrating dhcp servers and I have over 100 meraki vlan SVI's to change.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
V1 is coming ....
(Next week)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can do this in API 1.0. latest is 1.7 i believe. that's what i'm using
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
