Programmatically identify MX WAN Ports

Solved
Prodrick
Building a reputation

Programmatically identify MX WAN Ports

What Dashboard API endpoint will help to positively identify which ports (interfaces) are configured as WAN1 and WAN2? An example device in the MX105

 

thanks

1 Accepted Solution
7 Replies 7
alemabrahao
Kind of a big deal
Kind of a big deal

There is no specific API for what you want, the closest you will get is with this API.
https://developer.cisco.com/meraki/api-v1/get-device-appliance-uplinks-settings/

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
Ryan_Miles
Meraki Employee
Meraki Employee

This https://developer.cisco.com/meraki/api-v1/get-network-appliance-traffic-shaping-uplink-selection/ ? Not sure if you mean which interface is primary or something else?

Prodrick
Building a reputation

Thanks @Ryan_Miles . Ultimately what I am trying to get is the status, loss and latency (which I get with the org-level uplink endpoints) and match them up with the send/receive traffic.

 

In most cases it’s easy to match the API data with the WAN interface data I get via snmp.meraki.com, but I’m unaware of an infallible method.

 

ideally, there would be a single org level endpoint that would provide the lloss, latency, send, and receive traffic for each WAN interface.

 

Without this I am relegated to matching up API data and snmp data which is challenging.

 

So, if there were an endpoint I could call to  reliably get the interface (port) numbers for WAN1 and WAN2 I’d be good to go.

 

alternatively, I’d be delighted for an API solution but it can’t be like switches where I have to query by serial number because that doesn’t scale.

 

Does that make sense?

Prodrick
Building a reputation

Interestingly, there is an endpoint that gets non WAN ports.  Hmmm.  Maybe one could make this call and assume the others are the WAN ports?  This should not be so difficult.

Example:

curl -L --request GET \
--url 'https://api.meraki.com/api/v1/networks/[Network_ID Here]/appliance/ports' \
--header 'Authorization: Bearer [API Key Here]' \
--header 'Accept: application/json'
[
{"number":3,"enabled":true,"type":"access","dropUntaggedTraffic":false,"vlan":10,"accessPolicy":"open"},{"number":4,"enabled":true,"type":"trunk","dropUntaggedTraffic":true,"allowedVlans":"all"},{"number":5,"enabled":true,"type":"trunk","dropUntaggedTraffic":true,"allowedVlans":"all"},{"number":6,"enabled":true,"type":"trunk","dropUntaggedTraffic":true,"allowedVlans":"all"},{"number":7,"enabled":true,"type":"trunk","dropUntaggedTraffic":true,"allowedVlans":"all"},{"number":8,"enabled":true,"type":"trunk","dropUntaggedTraffic":false,"vlan":11,"allowedVlans":"10,11"},{"number":9,"enabled":true,"type":"trunk","dropUntaggedTraffic":false,"vlan":11,"allowedVlans":"10,11"},{"number":10,"enabled":true,"type":"trunk","dropUntaggedTraffic":true,"allowedVlans":"all"},{"number":11,"enabled":true,"type":"trunk","dropUntaggedTraffic":true,"allowedVlans":"all"}
]

That request is just getting the LAN port configs

Prodrick
Building a reputation

So, one might deduce that any other ports returned by snmp.meraki.com are WAN Ports?

 

Is there any API endpoint that returns Appliance interface traffic stats (send/receive bytes), or is snmp.meraki.com or local SNMP the only way? 

Get notified when there are additional replies to this discussion.