Spanning Tree root for Lab4

Spanning Tree root for Lab4

par Alessandro Bianchi,
Number of replies: 1

Hi everyone!

The last question of the bonus part of Lab4 asks to find the root of the Spanning Tree. In order to do that, I tried to dump the OpenVSwitch Database and identify it from there; however, the Bridge table doesn't give any information, as it shows that the STP is not enabled, despite it actually proving to be enabled in practice (as I also tested through Wireshark).

Any idea on why this happens? Also, any idea on possible solutions?

Thank you!

In reply to Alessandro Bianchi

Re: Spanning Tree root for Lab4

par Ludovic Thomas,

Hi Alessandro,

Names are a bit misleading here.

The Spanning Tree Protocol (the one defined by IEEE802.Q) is not used in part 6 of lab 4.
As a quick reminder STP is based on switch-to-switch messages ("Bridge Protocol Data Units") and a distributed algorithm, running on all switches. In section 2.2 of lab2, you enabled the Spanning Tree Protocol using an openVSwitch command. This command basically starts the above mentioned distributed algorithm on all switches, which starts the STP.

Here however we use a SDN controller (based on ryu) to compute a spanning tree and enforce it on the topology. In this kind of operations, we rely on switches-to-controller messages (openflow messages) and a centralized algorithm running only on the controller.  Hence, if we want to be rigorous, we shouldn't call it the spanning tree protocol (STP) but something like a "SDN-operated spanning tree". Yet the ryu application is called "simple_switch_stp_13", which is not rigorous.

Anyway, long story short: in part6 of lab4, the STP protocol of openVSwitch is not enabled.

To find the root, you have two options:

-either you use the 'ovs-ofctl show <switch>' command to find out the disabled ports and then you can re-build the spanning tree from this only information - and thus find the root.
-or you must dive in the ryu logs, because this is the ryu controller which is computing the spanning tree.

Ludovic