How to run ping when STP is ready in a mininet topology
If you have a topology like a mesh or any other with redundant links, you must use Spanning tree protocol (STP) to avoid a while. To run STP, you can use a controller app or setup your virtual switches to be compatible with STP. To run as controller: Run a STP controller app. In my case I use Ryu: ryu-manager --ofp-tcp-listen-port=6633 ryu.app.simple_switch_stp_13 To run as virtual switch (OVSSwitch): You can modify your switch from your terminal (outside mininet) as follows: ovs-vsctl set bridge s1 stp-enable=true You can use the same sentence inside a python script like follows: s1 .cmd( 'ovs-vsctl set bridge s1 stp-enable=true' ) Now, to avoid execute ping before STP is ready, you need to see the status port of your switch. You can use the following code to insert in your python script. while (s1.cmdPrint( 'ovs-ofctl show s1 | grep -o FORWARD | head -n1' ) != "FORWARD \r\n " ): time.sleep( 3 ) # Avoid initial too long delay time.slee...