detect MX in passthrough mode via API?

BreckanM
Conversationalist

detect MX in passthrough mode via API?

Im trying to write some audit/provision scripts in python - and i cannot seem to find any API call to get/set whether an MX appliance is in Routed mode, or Passthrough/VPN Concentrator mode ?

 

From an audit perspective, this also exposes a bug (?)

If VLANs were enabled prior to a network changing from Routed to Passthrough, then the getNetworkVlansEnabled() call returns True.

The next logical line of code is to query the VLANs which are supposedly in existence using getNetworkVlans()

This call will cause an exception and crash the script.

 

Has anyone else encountered this issue?

5 REPLIES 5
Seshu
Meraki Employee
Meraki Employee

Hello @BreckanM 

 

Good catch. Thank you for the details about the getNetworkVlansEnabled() and getNetworkVlans().

 

There are two separate issues where the getNetworkVlans() is returning the VLANs when the MX is in Passthrough mode. This sounds like a bug and I would recommend opening a case with Meraki Support so that we can submit a bug report. Secondly, the script crashing due to getNetworkVlans() returning VLANs should be handled in the script itself so that it doesn't crash. Unfortunately, we provide the SDK/API Endpoints for you to use and we can only troubleshoot the bugs in these methods or end points.

 

Let me know if you have any questions.

 

Regards,

Meraki Team

Hello Team Meraki,

 

Has an endpoint been added to Dashboard to get/set the MX mode (routed or VPN/passthrough)?  To @BreckanM point, this would be a really useful check to be able to use to determine other script logic based on the role of the MX.

Hi,

 

Do you happen to know whether we have an endpoint to detect whether a device is in routed/vpn concentrator mode and maybe for setting it?

 

Best Regards,
Alex

@AlexAndorko  Unfortunately, no, this is one of *many* things that are visible in Dashboard but are not exposed via any API endpoint.  I keep holding out hope that they will start to publish more endpoints and close this gap, as it would be very helpful for some of us, but so far not much progress.

Ilya_Kisel
Here to help

Hi, @BreckanM !

Just found that https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-settings
GET /networks/{network_id}/appliance/settings
response contains information regarding deployment mode, although it is not present in the official documentation.

{ "clientTrackingMethod": "MAC address", "deploymentMode": "routed" }
{ "clientTrackingMethod": "MAC address", "deploymentMode": "passthrough" }

@Seshu , could you please approve that "GET /networks/{network_id}/appliance/settings" response is a reliable option to retrieve deployment mode?
If yes, I suppose you need to update the response example on https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-settings page 🙂

Best regards,
Ilya

Get notified when there are additional replies to this discussion.