Hi ,
Is it possible via any endpoint to get the RSTP state ?
I can see it from the dashboard :
( Which should be Discarding and not Blocking since this is based on RSTP and not 802.1D 🤔 )
The only way I was able to get something similar is via the port status Warnings : 'BPDU guard activated, STP discarding packets'
Thanks !
What device is connected to that port? Because rstp can fall back to stp
For purposes , I have looped my own switch. Eg : Port 2 into Port 3
Hmm i thought it might be a indication of that.
But apparently not 😛
A couple of calls return at least enabled state true/false, for instance https://developer.cisco.com/meraki/api-v1/#!get-device-switch-ports
...
"rstpEnabled": true,
"stpGuard": "disabled",
...
Might be worth trying it to see what you get, as the documentation often shows just a limited example of possible return data.
It returns the actual configuration of the RSTP instead of the status 😞
But tbh I do think that Meraki is presenting the RSTP state on the dashboard at the wrong place. It is shadowing the configuration with the status :
So that's maybe why there are no endpoints that returns that info.
I don't know the answer.
This seems the closest - but it doesn't show that field in the example:
https://developer.cisco.com/meraki/api-v1/#!get-device-switch-ports-statuses
It does have an "Errors" and "Warnings" array - perhaps it might appear in there.
The other potential - ugly - way might be to retrieve the event log. Look for a log entry saying the port is blocked, that is not matched by a more recent entry saying that it is forwarding again.
That is actually the most clever ( and only ) way that I have found so far !
I'm trapping these cases with the switch port statuses endpoint at the moment.
Warnings:[ 'BPDU guard activated, STP discarding packets']