Hello oumar
STP is all about transmitting and receiving special frames ("BPDU") between switches.
If all switches are STP enabled (nowadays, should be RSTP or MSTP) they kind of "learn" the topology and one of them will administratively "open" the loop on one interface.
If switch3 does not run STP protocol, either :
- it will pass the BPDU as-is, then the loop protection should occur.
- it will "filter" these BPDU, and the other switches will loose the topology information carried by these frames.
Also keep in mind that there may be a "convergence delay" when connecting switches. Be sure to wait for 30 to 60 seconds before concluding that it does not work.(in MSTP network, there should be quite no delay)
On CX switches (MSTP):
update them to a recent firmware.
check which switch is the "root bridge"
show spanning-tree summary root
as a good practice, you should set (define) the root bridge by assigning a lower priority :
spanning-tree priority 0
check the status of each interface
show spanning-tree detail
show spanning-tree mst
also check the "Number of topology changes" : in a stable network, this number (may be non-zero) must not change
show spanning-tree summary port
You can get additionnal help in "AOS-CX 10.12 Layer-2 Bridging Guide", especially chapter 8 "Spanning Tree protocols (STP)" and sub-section "MSTP debugging and troubleshooting"
------------------------------
Frederic
(kudos welcome)
------------------------------