The following variables are obtained to determine trunk cable connections:
dot1dStpPortDesignatedBridge{" 1.3.6.1.2.1.17.2.15.1.8"} This returns the MAC address of the bridge designated by this LAN segment to forward STP traffic.
dot1dStpPortDesignatedPort {"1.3.6.1.2.1.17.2.15.1.9"} This returns the port of the designated bridge above that is used in passing STP information.
dot1dStpPortState {"1.3.6.1.2.1.17.2.15.1.3"} This determines if the local port is enabled.
Once all the information above has been obtained, a STPNode object is created using the VLAN that the local port belongs to. Once the STPNode object is created, the following attributes are set:
dot1dStpPortDesignatedPort and dot1dStpPortDesignatedBridge.
A trunk network connection is made between the local port, which is the index into the above table (dot1dStpPortTable), and the neighboring switch, returned by the variable dot1dStpPortDesignatedBridge. The connecting port on the neighboring switch is identified by the variable dot1dStpPortDesignatedPort.