cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7293
Views
3
Helpful
7
Replies

Programmatically identify MX WAN Ports

Prodrick
Level 4
Level 4

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

aleabrahao
Meraki Community All-Star
Meraki Community All-Star

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 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 All-Star
Meraki Employee All-Star

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?

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
Level 4
Level 4

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"}
]

Ryan_Miles
Meraki Employee All-Star
Meraki Employee All-Star

That request is just getting the LAN port configs

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?