-
Notifications
You must be signed in to change notification settings - Fork 17
STP PVRST Port Roles
This tool shows the per-VLAN Rapid Spanning Tree port roles (or also the per MST instance port roles) for each port in all VLANs on the device or for a given VLAN.
The following screenshot is an example for a given device with a given VLAN:
The code for this is actually really simple thanks to the Cisco/VTP
and Cisco/RSTP
MIBs of OSS_SNMP. All of the work is done via two commands:
-
Get all VLANs on a given device:
$host->useCisco_VTP()->vlanNames()
-
Get the port roles of all ports on the device for a given VLAN:
$host->useCisco_RSTP()->portRoles( $vlanid, true );
For the MST version, we:
-
Get all MST instances on a given device:
$host->useCisco_SMST()->instances()
-
Get the port roles of all ports on the device for a given instance:
$host->useCisco_MST()->portRoles( $instance, true );