Skip to content

STP PVRST Port Roles

barryo edited this page Feb 13, 2013 · 3 revisions

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:

Screenshot of STP RSTP port roles functionality

Behind the Interface

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:

  1. Get all VLANs on a given device: $host->useCisco_VTP()->vlanNames()

  2. 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:

  1. Get all MST instances on a given device: $host->useCisco_SMST()->instances()

  2. Get the port roles of all ports on the device for a given instance: $host->useCisco_MST()->portRoles( $instance, true );

Clone this wiki locally