Swichport RSTP State

RaphaelL
Kind of a big deal
Kind of a big deal

Swichport RSTP State

Hi ,

 

Is it possible via any endpoint to get the RSTP state ?

 

I can see it from the dashboard : 

 

RaphaelL_0-1680115072428.png

( 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 ! 

7 Replies 7
ww
Kind of a big deal
Kind of a big deal

What device is connected to that port? Because rstp can fall back to stp

 

RaphaelL
Kind of a big deal
Kind of a big deal

For purposes , I have looped my own switch. Eg : Port 2 into Port 3

ww
Kind of a big deal
Kind of a big deal

Hmm i thought it might be a indication of that. 

But apparently not 😛

sungod
Head in the Cloud

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.

 

RaphaelL
Kind of a big deal
Kind of a big deal

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 : 

 

 

RaphaelL_1-1680118684309.png

 

So that's maybe why there are no endpoints that returns that info.

 

 

PhilipDAth
Kind of a big deal
Kind of a big deal

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.

RaphaelL
Kind of a big deal
Kind of a big deal

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']

Get notified when there are additional replies to this discussion.